@solana/web3.js 1.77.3 → 2.0.0-experimental.0b7dd02
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -112
- package/dist/index.browser.cjs +151 -0
- package/dist/index.browser.cjs.map +1 -0
- package/dist/index.browser.js +138 -0
- package/dist/index.browser.js.map +1 -0
- package/dist/index.development.js +710 -0
- package/dist/index.development.js.map +1 -0
- package/dist/index.native.js +138 -0
- package/dist/index.native.js.map +1 -0
- package/dist/index.node.cjs +151 -0
- package/dist/index.node.cjs.map +1 -0
- package/dist/index.node.js +138 -0
- package/dist/index.node.js.map +1 -0
- package/dist/index.production.min.js +13 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/rpc-default-config.d.ts +3 -0
- package/dist/types/rpc-integer-overflow-error.d.ts +8 -0
- package/dist/types/rpc-request-coalescer.d.ts +5 -0
- package/dist/types/rpc-request-deduplication.d.ts +2 -0
- package/dist/types/rpc-transport.d.ts +4 -0
- package/dist/types/rpc.d.ts +5 -0
- package/package.json +82 -107
- package/lib/index.browser.cjs.js +0 -9534
- package/lib/index.browser.cjs.js.map +0 -1
- package/lib/index.browser.esm.js +0 -9432
- package/lib/index.browser.esm.js.map +0 -1
- package/lib/index.cjs.js +0 -12058
- package/lib/index.cjs.js.map +0 -1
- package/lib/index.d.ts +0 -3891
- package/lib/index.esm.js +0 -11949
- package/lib/index.esm.js.map +0 -1
- package/lib/index.iife.js +0 -25985
- package/lib/index.iife.js.map +0 -1
- package/lib/index.iife.min.js +0 -20
- package/lib/index.iife.min.js.map +0 -1
- package/lib/index.native.js +0 -9534
- package/lib/index.native.js.map +0 -1
- package/src/__forks__/browser/fetch-impl.ts +0 -4
- package/src/__forks__/browser/rpc-websocket-factory.ts +0 -1
- package/src/__forks__/react-native/fetch-impl.ts +0 -4
- package/src/__forks__/react-native/rpc-websocket-factory.ts +0 -1
- package/src/account-data.ts +0 -39
- package/src/account.ts +0 -55
- package/src/blockhash.ts +0 -4
- package/src/bpf-loader-deprecated.ts +0 -5
- package/src/bpf-loader.ts +0 -45
- package/src/connection.ts +0 -6756
- package/src/epoch-schedule.ts +0 -102
- package/src/errors.ts +0 -50
- package/src/fee-calculator.ts +0 -18
- package/src/fetch-impl.ts +0 -13
- package/src/index.ts +0 -24
- package/src/instruction.ts +0 -58
- package/src/keypair.ts +0 -93
- package/src/layout.ts +0 -188
- package/src/loader.ts +0 -267
- package/src/message/account-keys.ts +0 -79
- package/src/message/compiled-keys.ts +0 -165
- package/src/message/index.ts +0 -47
- package/src/message/legacy.ts +0 -326
- package/src/message/v0.ts +0 -496
- package/src/message/versioned.ts +0 -36
- package/src/nonce-account.ts +0 -82
- package/src/programs/address-lookup-table/index.ts +0 -435
- package/src/programs/address-lookup-table/state.ts +0 -84
- package/src/programs/compute-budget.ts +0 -281
- package/src/programs/ed25519.ts +0 -157
- package/src/programs/index.ts +0 -7
- package/src/programs/secp256k1.ts +0 -228
- package/src/programs/stake.ts +0 -935
- package/src/programs/system.ts +0 -1048
- package/src/programs/vote.ts +0 -543
- package/src/publickey.ts +0 -259
- package/src/rpc-websocket-factory.ts +0 -4
- package/src/rpc-websocket.ts +0 -79
- package/src/sysvar.ts +0 -37
- package/src/timing.ts +0 -23
- package/src/transaction/constants.ts +0 -12
- package/src/transaction/expiry-custom-errors.ts +0 -48
- package/src/transaction/index.ts +0 -5
- package/src/transaction/legacy.ts +0 -918
- package/src/transaction/message.ts +0 -140
- package/src/transaction/versioned.ts +0 -126
- package/src/utils/assert.ts +0 -8
- package/src/utils/bigint.ts +0 -43
- package/src/utils/borsh-schema.ts +0 -38
- package/src/utils/cluster.ts +0 -31
- package/src/utils/ed25519.ts +0 -43
- package/src/utils/index.ts +0 -5
- package/src/utils/makeWebsocketUrl.ts +0 -26
- package/src/utils/promise-timeout.ts +0 -14
- package/src/utils/secp256k1.ts +0 -11
- package/src/utils/send-and-confirm-raw-transaction.ts +0 -102
- package/src/utils/send-and-confirm-transaction.ts +0 -98
- package/src/utils/shortvec-encoding.ts +0 -28
- package/src/utils/sleep.ts +0 -4
- package/src/utils/to-buffer.ts +0 -11
- package/src/validator-info.ts +0 -104
- package/src/vote-account.ts +0 -236
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
this.globalThis = this.globalThis || {};
|
|
2
|
+
this.globalThis.solanaWeb3 = (function (exports) {
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
var Q=Object.create;var k=Object.defineProperty;var Z=Object.getOwnPropertyDescriptor;var ee=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty;var ne=(e,t)=>()=>(e&&(t=e(e=0)),t);var O=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var oe=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ee(t))!re.call(e,n)&&n!==r&&k(e,n,{get:()=>t[n],enumerable:!(o=Z(t,n))||o.enumerable});return e};var v=(e,t,r)=>(r=e!=null?Q(te(e)):{},oe(t||!e||!e.__esModule?k(r,"default",{value:e,enumerable:!0}):r,e));var a=ne(()=>{});var H=O((Ie,q)=>{a();function se(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var o=0;o<e.length;o++){var n=e.charAt(o),i=n.charCodeAt(0);if(t[i]!==255)throw new TypeError(n+" is ambiguous");t[i]=o;}var s=e.length,c=e.charAt(0),p=Math.log(s)/Math.log(256),d=Math.log(256)/Math.log(s);function m(u){if(u instanceof Uint8Array||(ArrayBuffer.isView(u)?u=new Uint8Array(u.buffer,u.byteOffset,u.byteLength):Array.isArray(u)&&(u=Uint8Array.from(u))),!(u instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(u.length===0)return "";for(var f=0,A=0,h=0,w=u.length;h!==w&&u[h]===0;)h++,f++;for(var R=(w-h)*d+1>>>0,g=new Uint8Array(R);h!==w;){for(var E=u[h],S=0,y=R-1;(E!==0||S<A)&&y!==-1;y--,S++)E+=256*g[y]>>>0,g[y]=E%s>>>0,E=E/s>>>0;if(E!==0)throw new Error("Non-zero carry");A=S,h++;}for(var T=R-A;T!==R&&g[T]===0;)T++;for(var I=c.repeat(f);T<R;++T)I+=e.charAt(g[T]);return I}function C(u){if(typeof u!="string")throw new TypeError("Expected String");if(u.length===0)return new Uint8Array;for(var f=0,A=0,h=0;u[f]===c;)A++,f++;for(var w=(u.length-f)*p+1>>>0,R=new Uint8Array(w);u[f];){var g=t[u.charCodeAt(f)];if(g===255)return;for(var E=0,S=w-1;(g!==0||E<h)&&S!==-1;S--,E++)g+=s*R[S]>>>0,R[S]=g%256>>>0,g=g/256>>>0;if(g!==0)throw new Error("Non-zero carry");h=E,f++;}for(var y=w-h;y!==w&&R[y]===0;)y++;for(var T=new Uint8Array(A+(w-y)),I=A;y!==w;)T[I++]=R[y++];return T}function x(u){var f=C(u);if(f)return f;throw new Error("Non-base"+s+" character")}return {encode:m,decodeUnsafe:C,decode:x}}q.exports=se;});var P=O((Oe,K)=>{a();var ae=H(),ie="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";K.exports=ae(ie);});var B=O((tt,W)=>{a();var Ae=Object.prototype.toString,Se=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};function N(e,t){var r,o,n,i,s,c,p;if(e===!0)return "true";if(e===!1)return "false";switch(typeof e){case"object":if(e===null)return null;if(e.toJSON&&typeof e.toJSON=="function")return N(e.toJSON(),t);if(p=Ae.call(e),p==="[object Array]"){for(n="[",o=e.length-1,r=0;r<o;r++)n+=N(e[r],!0)+",";return o>-1&&(n+=N(e[r],!0)),n+"]"}else if(p==="[object Object]"){for(i=Se(e).sort(),o=i.length,n="",r=0;r<o;)s=i[r],c=N(e[s],!1),c!==void 0&&(n&&(n+=","),n+=JSON.stringify(s)+":"+c),r++;return "{"+n+"}"}else return JSON.stringify(e);case"function":case"undefined":return t?null:void 0;case"string":return JSON.stringify(e);default:return isFinite(e)?e:null}}W.exports=function(e){var t=N(e,!1);if(t!==void 0)return ""+t};});a();a();var M=v(P(),1);function Pe(e){try{if(e.length<32||e.length>44)throw new Error("Expected input string to decode to a byte array of length 32.");let r=M.default.decode(e).byteLength;if(r!==32)throw new Error(`Expected input string to decode to a byte array of length 32. Actual length: ${r}`)}catch(t){throw new Error(`\`${e}\` is not a base-58 encoded address`,{cause:t})}}a();a();v(P(),1);function D(e,t,r){if(Array.isArray(e))return e.map((o,n)=>D(o,[...t,n],r));if(typeof e=="object"&&e!==null){let o={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=D(e[n],[...t,n],r));return o}else return typeof e=="bigint"?(r&&(e>Number.MAX_SAFE_INTEGER||e<-Number.MAX_SAFE_INTEGER)&&r(t,e),Number(e)):e}function ue(e,t){return D(e,[],t)}var l={},pe={getBlockTime:[[]],getInflationReward:[[l,"commission"]],getRecentPerformanceSamples:[[l,"samplePeriodSecs"]],getTransaction:[["meta","preTokenBalances",l,"accountIndex"],["meta","preTokenBalances",l,"uiTokenAmount","decimals"],["meta","postTokenBalances",l,"accountIndex"],["meta","postTokenBalances",l,"uiTokenAmount","decimals"],["meta","rewards",l,"commission"],["meta","innerInstructions",l,"index"],["meta","innerInstructions",l,"instructions",l,"programIdIndex"],["meta","innerInstructions",l,"instructions",l,"accounts",l],["transaction","message","addressTableLookups",l,"writableIndexes",l],["transaction","message","addressTableLookups",l,"readonlyIndexes",l],["transaction","message","instructions",l,"programIdIndex"],["transaction","message","instructions",l,"accounts",l],["transaction","message","header","numReadonlySignedAccounts"],["transaction","message","header","numReadonlyUnsignedAccounts"],["transaction","message","header","numRequiredSignatures"]],getVoteAccounts:[["current",l,"commission"],["delinquent",l,"commission"]]};function U(e,t){return e.filter(r=>r[0]===l&&typeof t=="number"||r[0]===t).map(r=>r.slice(1))}function j(e,t){if(Array.isArray(e))return e.map((r,o)=>{let n=U(t,o);return j(r,n)});if(typeof e=="object"&&e!==null){let r={};for(let[o,n]of Object.entries(e)){let i=U(t,o);r[o]=j(n,i);}return r}else return typeof e=="number"&&t.length===0?BigInt(e):e}function le(e,t){let r=t?pe[t]:void 0;return j(e,r??[])}function F(e){return new Proxy({},{defineProperty(){return !1},deleteProperty(){return !1},get(...t){let[r,o]=t,n=o.toString();return function(...i){let s=e?.onIntegerOverflow,c=ue(i,s?(p,d)=>s(n,p,d):void 0);return {methodName:n,params:c,responseProcessor:p=>le(p,n)}}}})}a();var fe=class extends Error{constructor(e){super(`JSON-RPC 2.0 error (${e.code}): ${e.message}`),Error.captureStackTrace(this,this.constructor),this.code=e.code,this.data=e.data;}get name(){return "SolanaJsonRpcError"}},L=0;function de(){let e=L;return L=(L+1)%Number.MAX_SAFE_INTEGER,e}function me(e,t){return {id:de(),jsonrpc:"2.0",method:e,params:t}}function ge(e,t){return {async send(r){let{methodName:o,params:n,responseProcessor:i}=t,s=me(o,n),c=await e.transport({payload:s,signal:r?.abortSignal});if("error"in c)throw new fe(c.error);return i?i(c.result):c.result}}}function he(e){return new Proxy(e.api,{defineProperty(){return !1},deleteProperty(){return !1},get(t,r,o){return function(...n){let i=r.toString(),s=Reflect.get(t,i,o),c=s?s(...n):{methodName:i,params:n};return ge(e,c)}}})}function $(e){return he(e)}var ye=globalThis.fetch,be=class extends Error{constructor(e){super(`HTTP error (${e.statusCode}): ${e.message}`),Error.captureStackTrace(this,this.constructor),this.statusCode=e.statusCode;}get name(){return "SolanaHttpError"}};function Te(e){let t={};for(let r in e)t[r.toLowerCase()]=e[r];return t}function z({httpAgentNodeOnly:e,headers:t,url:r}){let o=void 0;let n=t&&Te(t);return async function({payload:s,signal:c}){let p=JSON.stringify(s),d={agent:o,body:p,headers:{...n,accept:"application/json","content-length":p.length.toString(),"content-type":"application/json; charset=utf-8"},method:"POST",signal:c},m=await ye(r,d);if(!m.ok)throw new be({message:m.statusText,statusCode:m.status});return await m.json()}}a();a();var _=class extends Error{constructor(r,o,n){let i=(typeof o[0]=="number"?o[0]:parseInt(o[0],10))+1,s="",c=i%10,p=i%100;c==1&&p!=11?s=i+"st":c==2&&p!=12?s=i+"nd":c==3&&p!=13?s=i+"rd":s=i+"th";let d=o.length>1?o.slice(1).map(m=>typeof m=="number"?`[${m}]`:m).join("."):null;super(`The ${s} argument to the \`${r}\` RPC method${d?` at path \`${d}\``:""} was \`${n}\`. This number is unsafe for use with the Solana JSON-RPC because it exceeds \`Number.MAX_SAFE_INTEGER\`.`);this.keyPath=o,this.methodName=r,this.value=n;}get name(){return "SolanaJsonRpcIntegerOverflowError"}};var V={onIntegerOverflow(e,t,r){throw new _(e,t,r)}};function Xe(e){return $({...e,api:F(V)})}a();a();function G(e,t){let r;return async function(n){let{payload:i,signal:s}=n,c=t(i);if(c===void 0)return await e(n);if(r||(Promise.resolve().then(()=>{r=void 0;}),r={}),r[c]==null){let d=new AbortController;r[c]={abortController:d,numConsumers:0,responsePromise:e({...n,signal:d.signal})};}let p=r[c];if(p.numConsumers++,s){let d=p.responsePromise;return await new Promise((m,C)=>{let x=u=>{s.removeEventListener("abort",x),p.numConsumers-=1,p.numConsumers===0&&p.abortController.abort();let f=new DOMException(u.target.reason,"AbortError");C(f);};s.addEventListener("abort",x),d.then(m).finally(()=>{s.removeEventListener("abort",x);});})}else return await p.responsePromise}}a();var X=v(B(),1);function Y(e){if(!(e==null||typeof e!="object"||Array.isArray(e))&&"jsonrpc"in e&&e.jsonrpc==="2.0"&&"method"in e&&"params"in e)return (0, X.default)([e.method,e.params])}function xe(e){let t={};for(let r in e)t[r.toLowerCase()]=e[r];return t}function ct(e){return G(z({...e,headers:{...e.headers?xe(e.headers):void 0,"solana-client":"js/2.0.0-development"}}),Y)}
|
|
6
|
+
|
|
7
|
+
exports.assertIsBase58EncodedAddress = Pe;
|
|
8
|
+
exports.createDefaultRpcTransport = ct;
|
|
9
|
+
exports.createSolanaRpc = Xe;
|
|
10
|
+
|
|
11
|
+
return exports;
|
|
12
|
+
|
|
13
|
+
})({});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare class SolanaJsonRpcIntegerOverflowError extends Error {
|
|
2
|
+
readonly methodName: string;
|
|
3
|
+
readonly keyPath: (number | string)[];
|
|
4
|
+
readonly value: bigint;
|
|
5
|
+
constructor(methodName: string, keyPath: (number | string)[], value: bigint);
|
|
6
|
+
get name(): string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=rpc-integer-overflow-error.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IRpcTransport } from '@solana/rpc-transport/dist/types/transports/transport-types';
|
|
2
|
+
type GetDeduplicationKeyFn = (payload: unknown) => string | undefined;
|
|
3
|
+
export declare function getRpcTransportWithRequestCoalescing(transport: IRpcTransport, getDeduplicationKey: GetDeduplicationKeyFn): IRpcTransport;
|
|
4
|
+
export {};
|
|
5
|
+
//# sourceMappingURL=rpc-request-coalescer.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createHttpTransport } from '@solana/rpc-transport';
|
|
2
|
+
import { IRpcTransport } from '@solana/rpc-transport/dist/types/transports/transport-types';
|
|
3
|
+
export declare function createDefaultRpcTransport(config: Parameters<typeof createHttpTransport>[0]): IRpcTransport;
|
|
4
|
+
//# sourceMappingURL=rpc-transport.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SolanaRpcMethods } from '@solana/rpc-core';
|
|
2
|
+
import { createJsonRpc } from '@solana/rpc-transport';
|
|
3
|
+
import type { Rpc } from '@solana/rpc-transport/dist/types/json-rpc-types';
|
|
4
|
+
export declare function createSolanaRpc(config: Omit<Parameters<typeof createJsonRpc>[0], 'api'>): Rpc<SolanaRpcMethods>;
|
|
5
|
+
//# sourceMappingURL=rpc.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,130 +1,105 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana/web3.js",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-experimental.0b7dd02",
|
|
4
4
|
"description": "Solana Javascript API",
|
|
5
|
+
"exports": {
|
|
6
|
+
"browser": {
|
|
7
|
+
"import": "./dist/index.browser.js",
|
|
8
|
+
"require": "./dist/index.browser.cjs"
|
|
9
|
+
},
|
|
10
|
+
"node": {
|
|
11
|
+
"import": "./dist/index.node.js",
|
|
12
|
+
"require": "./dist/index.node.cjs"
|
|
13
|
+
},
|
|
14
|
+
"react-native": "./dist/index.native.js",
|
|
15
|
+
"types": "./dist/types/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"browser": {
|
|
18
|
+
"./dist/index.node.cjs": "./dist/index.browser.cjs",
|
|
19
|
+
"./dist/index.node.js": "./dist/index.browser.js"
|
|
20
|
+
},
|
|
21
|
+
"jsdelivr": "./dist/index.production.min.js",
|
|
22
|
+
"umd": "./dist/index.production.min.js",
|
|
23
|
+
"unpkg": "./dist/index.production.min.js",
|
|
24
|
+
"main": "./dist/index.node.cjs",
|
|
25
|
+
"module": "./dist/index.node.js",
|
|
26
|
+
"react-native": "./dist/index.native.js",
|
|
27
|
+
"types": "./dist/types/index.d.ts",
|
|
28
|
+
"type": "module",
|
|
29
|
+
"files": [
|
|
30
|
+
"./dist/"
|
|
31
|
+
],
|
|
32
|
+
"sideEffects": false,
|
|
5
33
|
"keywords": [
|
|
6
|
-
"
|
|
7
|
-
"
|
|
34
|
+
"blockchain",
|
|
35
|
+
"solana",
|
|
36
|
+
"web3"
|
|
8
37
|
],
|
|
9
|
-
"license": "MIT",
|
|
10
38
|
"author": "Solana Labs Maintainers <maintainers@solanalabs.com>",
|
|
11
|
-
"
|
|
39
|
+
"license": "MIT",
|
|
12
40
|
"repository": {
|
|
13
41
|
"type": "git",
|
|
14
|
-
"url": "https://github.com/solana-labs/solana-web3.js
|
|
42
|
+
"url": "https://github.com/solana-labs/solana-web3.js"
|
|
15
43
|
},
|
|
16
44
|
"bugs": {
|
|
17
|
-
"url": "http://github.com/solana-labs/solana-web3.js
|
|
18
|
-
},
|
|
19
|
-
"publishConfig": {
|
|
20
|
-
"access": "public"
|
|
21
|
-
},
|
|
22
|
-
"browser": {
|
|
23
|
-
"./lib/index.cjs.js": "./lib/index.browser.cjs.js",
|
|
24
|
-
"./lib/index.esm.js": "./lib/index.browser.esm.js"
|
|
45
|
+
"url": "http://github.com/solana-labs/solana-web3.js/issues"
|
|
25
46
|
},
|
|
26
|
-
"react-native": "lib/index.native.js",
|
|
27
|
-
"main": "lib/index.cjs.js",
|
|
28
|
-
"module": "lib/index.esm.js",
|
|
29
|
-
"types": "lib/index.d.ts",
|
|
30
47
|
"browserslist": [
|
|
31
|
-
"
|
|
32
|
-
"not IE 11",
|
|
48
|
+
"supports bigint and not dead",
|
|
33
49
|
"maintained node versions"
|
|
34
50
|
],
|
|
35
|
-
"files": [
|
|
36
|
-
"/lib",
|
|
37
|
-
"/src"
|
|
38
|
-
],
|
|
39
|
-
"scripts": {
|
|
40
|
-
"compile:docs": "typedoc --treatWarningsAsErrors",
|
|
41
|
-
"compile:js": "cross-env NODE_ENV=production rollup -c",
|
|
42
|
-
"compile:typedefs": "./scripts/typegen.sh",
|
|
43
|
-
"build:fixtures": "set -ex; ./test/fixtures/noop-program/build.sh",
|
|
44
|
-
"clean": "rimraf ./doc ./declarations ./lib",
|
|
45
|
-
"dev": "cross-env NODE_ENV=development rollup -c --watch",
|
|
46
|
-
"publish-packages": "semantic-release --repository-url git@github.com:solana-labs/solana-web3.js.git",
|
|
47
|
-
"test:lint": "eslint src/ test/ --ext .js,.ts",
|
|
48
|
-
"test:lint:fix": "eslint src/ test/ --fix --ext .js,.ts",
|
|
49
|
-
"test:live": "TEST_LIVE=1 pnpm run test:unit:node",
|
|
50
|
-
"test:live-with-test-validator": "start-server-and-test '../../scripts/start-shared-test-validator.sh' http://127.0.0.1:8899/health test:live",
|
|
51
|
-
"test:prettier": "prettier --check '{,{src,test}/**/}*.{j,t}s'",
|
|
52
|
-
"test:prettier:fix": "prettier --write '{,{src,test}/**/}*.{j,t}s'",
|
|
53
|
-
"test:typecheck": "tsc --noEmit",
|
|
54
|
-
"test:unit:node": "cross-env NODE_ENV=test TS_NODE_COMPILER_OPTIONS='{ \"module\": \"commonjs\", \"target\": \"es2019\" }' ts-mocha --require esm './test/**/*.test.ts'"
|
|
55
|
-
},
|
|
56
51
|
"dependencies": {
|
|
57
|
-
"@babel/runtime": "^7.12.5",
|
|
58
|
-
"@noble/curves": "^1.0.0",
|
|
59
|
-
"@noble/hashes": "^1.3.0",
|
|
60
|
-
"@solana/buffer-layout": "^4.0.0",
|
|
61
|
-
"agentkeepalive": "^4.2.1",
|
|
62
|
-
"bigint-buffer": "^1.1.5",
|
|
63
|
-
"bn.js": "^5.0.0",
|
|
64
|
-
"borsh": "^0.7.0",
|
|
65
|
-
"bs58": "^4.0.1",
|
|
66
|
-
"buffer": "6.0.3",
|
|
67
52
|
"fast-stable-stringify": "^1.0.0",
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"rpc-
|
|
71
|
-
"superstruct": "^0.14.2"
|
|
53
|
+
"@solana/keys": "2.0.0-experimental.0b7dd02",
|
|
54
|
+
"@solana/rpc-core": "2.0.0-experimental.0b7dd02",
|
|
55
|
+
"@solana/rpc-transport": "2.0.0-experimental.0b7dd02"
|
|
72
56
|
},
|
|
73
57
|
"devDependencies": {
|
|
74
|
-
"@
|
|
75
|
-
"@
|
|
76
|
-
"@
|
|
77
|
-
"@
|
|
78
|
-
"@babel/preset-typescript": "^7.12.16",
|
|
79
|
-
"@rollup/plugin-alias": "^4.0.3",
|
|
80
|
-
"@rollup/plugin-babel": "^6.0.3",
|
|
81
|
-
"@rollup/plugin-commonjs": "^24.0.1",
|
|
82
|
-
"@rollup/plugin-json": "^6.0.0",
|
|
83
|
-
"@rollup/plugin-multi-entry": "^6.0.0",
|
|
84
|
-
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
85
|
-
"@rollup/plugin-replace": "^5.0.2",
|
|
86
|
-
"@rollup/plugin-terser": "^0.4.0",
|
|
87
|
-
"@solana/spl-token": "^0.3.7",
|
|
88
|
-
"@types/bn.js": "^5.1.0",
|
|
89
|
-
"@types/bs58": "^4.0.1",
|
|
90
|
-
"@types/chai": "^4.2.15",
|
|
91
|
-
"@types/chai-as-promised": "^7.1.3",
|
|
92
|
-
"@types/express-serve-static-core": "^4.17.35",
|
|
93
|
-
"@types/mocha": "^10.0.0",
|
|
94
|
-
"@types/mz": "^2.7.3",
|
|
95
|
-
"@types/node": "^18.11.10",
|
|
96
|
-
"@types/node-fetch": "2",
|
|
97
|
-
"@types/sinon": "^10.0.0",
|
|
98
|
-
"@types/sinon-chai": "^3.2.8",
|
|
58
|
+
"@solana/eslint-config-solana": "^1.0.1",
|
|
59
|
+
"@swc/core": "^1.3.18",
|
|
60
|
+
"@swc/jest": "^0.2.23",
|
|
61
|
+
"@types/jest": "^29.5.1",
|
|
99
62
|
"@typescript-eslint/eslint-plugin": "^5.57.1",
|
|
100
63
|
"@typescript-eslint/parser": "^5.57.1",
|
|
101
|
-
"
|
|
102
|
-
"chai-as-promised": "^7.1.1",
|
|
103
|
-
"cross-env": "7.0.3",
|
|
64
|
+
"agadoo": "^3.0.0",
|
|
104
65
|
"eslint": "^8.37.0",
|
|
105
|
-
"eslint-
|
|
106
|
-
"eslint-plugin-
|
|
107
|
-
"eslint-plugin-
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"node-abort-controller": "^3.0.1",
|
|
66
|
+
"eslint-plugin-jest": "^27.1.5",
|
|
67
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
68
|
+
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
69
|
+
"jest": "^29.5.0",
|
|
70
|
+
"jest-environment-jsdom": "^29.5.0",
|
|
71
|
+
"jest-runner-eslint": "^2.0.0",
|
|
72
|
+
"jest-runner-prettier": "^1.0.0",
|
|
73
|
+
"postcss": "^8.4.12",
|
|
114
74
|
"prettier": "^2.8.8",
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
75
|
+
"ts-node": "^10.9.1",
|
|
76
|
+
"tsup": "6.7.0",
|
|
77
|
+
"typescript": "^5.0.3",
|
|
78
|
+
"version-from-git": "^1.1.1",
|
|
79
|
+
"build-scripts": "0.0.0",
|
|
80
|
+
"test-config": "0.0.0",
|
|
81
|
+
"tsconfig": "0.0.0"
|
|
82
|
+
},
|
|
83
|
+
"bundlewatch": {
|
|
84
|
+
"defaultCompression": "gzip",
|
|
85
|
+
"files": [
|
|
86
|
+
{
|
|
87
|
+
"path": "./dist/index*.js"
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
"scripts": {
|
|
92
|
+
"compile:js": "tsup --config build-scripts/tsup.config.library.ts",
|
|
93
|
+
"compile:typedefs": "tsc -p ./tsconfig.declarations.json",
|
|
94
|
+
"dev": "jest -c node_modules/test-config/jest-dev.config.ts --rootDir . --watch",
|
|
95
|
+
"publish-packages": "sed -i 's/@solana\\/web3\\.js-experimental/@solana\\/web3\\.js/g' package.json && sed -i 's/@solana\\/web3\\.js/@solana\\/web3\\.js-bak/g' ../library-legacy/package.json && pnpm publish --tag experimental --access public --no-git-checks && git reset --hard",
|
|
96
|
+
"test:lint": "jest -c node_modules/test-config/jest-lint.config.ts --rootDir . --silent",
|
|
97
|
+
"test:prettier": "jest -c node_modules/test-config/jest-prettier.config.ts --rootDir . --silent",
|
|
98
|
+
"test:treeshakability:browser": "agadoo dist/index.browser.js",
|
|
99
|
+
"test:treeshakability:native": "agadoo dist/index.node.js",
|
|
100
|
+
"test:treeshakability:node": "agadoo dist/index.native.js",
|
|
101
|
+
"test:typecheck": "tsc --noEmit",
|
|
102
|
+
"test:unit:browser": "jest -c node_modules/test-config/jest-unit.config.browser.ts --rootDir . --silent",
|
|
103
|
+
"test:unit:node": "jest -c node_modules/test-config/jest-unit.config.node.ts --rootDir . --silent"
|
|
129
104
|
}
|
|
130
|
-
}
|
|
105
|
+
}
|