@solana/web3.js 2.0.0-experimental.d6c5c0e → 2.0.0-experimental.d8524d8

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.
Files changed (36) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1154 -43
  3. package/dist/index.browser.cjs +296 -57
  4. package/dist/index.browser.cjs.map +1 -1
  5. package/dist/index.browser.js +224 -55
  6. package/dist/index.browser.js.map +1 -1
  7. package/dist/index.development.js +6569 -435
  8. package/dist/index.development.js.map +1 -1
  9. package/dist/index.native.js +222 -55
  10. package/dist/index.native.js.map +1 -1
  11. package/dist/index.node.cjs +298 -57
  12. package/dist/index.node.cjs.map +1 -1
  13. package/dist/index.node.js +224 -55
  14. package/dist/index.node.js.map +1 -1
  15. package/dist/index.production.min.js +286 -4
  16. package/dist/types/airdrop-internal.d.ts +16 -0
  17. package/dist/types/airdrop-internal.d.ts.map +1 -0
  18. package/dist/types/airdrop.d.ts +12 -0
  19. package/dist/types/airdrop.d.ts.map +1 -0
  20. package/dist/types/decode-transaction.d.ts +9 -0
  21. package/dist/types/decode-transaction.d.ts.map +1 -0
  22. package/dist/types/index.d.ts +15 -2
  23. package/dist/types/index.d.ts.map +1 -1
  24. package/dist/types/send-transaction-internal.d.ts +27 -0
  25. package/dist/types/send-transaction-internal.d.ts.map +1 -0
  26. package/dist/types/send-transaction.d.ts +23 -0
  27. package/dist/types/send-transaction.d.ts.map +1 -0
  28. package/package.json +27 -39
  29. package/dist/types/rpc-default-config.d.ts +0 -3
  30. package/dist/types/rpc-default-config.d.ts.map +0 -1
  31. package/dist/types/rpc-integer-overflow-error.d.ts +0 -8
  32. package/dist/types/rpc-integer-overflow-error.d.ts.map +0 -1
  33. package/dist/types/rpc-transport.d.ts +0 -4
  34. package/dist/types/rpc-transport.d.ts.map +0 -1
  35. package/dist/types/rpc.d.ts +0 -5
  36. package/dist/types/rpc.d.ts.map +0 -1
@@ -0,0 +1,23 @@
1
+ import type { GetAccountInfoApi, GetEpochInfoApi, GetSignatureStatusesApi, Rpc, SendTransactionApi } from '@solana/rpc';
2
+ import type { AccountNotificationsApi, RpcSubscriptions, SignatureNotificationsApi, SlotNotificationsApi } from '@solana/rpc-subscriptions';
3
+ import { BaseTransaction, IDurableNonceTransaction, IFullySignedTransaction, ITransactionWithBlockhashLifetime, ITransactionWithFeePayer } from '@solana/transactions';
4
+ import { SendableTransaction, sendAndConfirmDurableNonceTransaction_INTERNAL_ONLY_DO_NOT_EXPORT, sendAndConfirmTransactionWithBlockhashLifetime_INTERNAL_ONLY_DO_NOT_EXPORT, sendTransaction_INTERNAL_ONLY_DO_NOT_EXPORT } from './send-transaction-internal.js';
5
+ interface SendAndConfirmDurableNonceTransactionFactoryConfig {
6
+ rpc: Rpc<GetAccountInfoApi & GetSignatureStatusesApi & SendTransactionApi>;
7
+ rpcSubscriptions: RpcSubscriptions<AccountNotificationsApi & SignatureNotificationsApi>;
8
+ }
9
+ interface SendAndConfirmTransactionWithBlockhashLifetimeFactoryConfig {
10
+ rpc: Rpc<GetEpochInfoApi & GetSignatureStatusesApi & SendTransactionApi>;
11
+ rpcSubscriptions: RpcSubscriptions<SignatureNotificationsApi & SlotNotificationsApi>;
12
+ }
13
+ interface SendTransactionWithoutConfirmingFactoryConfig {
14
+ rpc: Rpc<SendTransactionApi>;
15
+ }
16
+ type SendAndConfirmTransactionWithBlockhashLifetimeFunction = (transaction: SendableTransaction & ITransactionWithBlockhashLifetime, config: Omit<Parameters<typeof sendAndConfirmTransactionWithBlockhashLifetime_INTERNAL_ONLY_DO_NOT_EXPORT>[0], 'confirmRecentTransaction' | 'rpc' | 'transaction'>) => Promise<void>;
17
+ type SendAndConfirmDurableNonceTransactionFunction = (transaction: BaseTransaction & ITransactionWithFeePayer & IDurableNonceTransaction & IFullySignedTransaction, config: Omit<Parameters<typeof sendAndConfirmDurableNonceTransaction_INTERNAL_ONLY_DO_NOT_EXPORT>[0], 'confirmDurableNonceTransaction' | 'rpc' | 'transaction'>) => Promise<void>;
18
+ type SendTransactionWithoutConfirmingFunction = (transaction: SendableTransaction, config: Omit<Parameters<typeof sendTransaction_INTERNAL_ONLY_DO_NOT_EXPORT>[0], 'rpc' | 'transaction'>) => Promise<void>;
19
+ export declare function sendTransactionWithoutConfirmingFactory({ rpc, }: SendTransactionWithoutConfirmingFactoryConfig): SendTransactionWithoutConfirmingFunction;
20
+ export declare function sendAndConfirmDurableNonceTransactionFactory({ rpc, rpcSubscriptions, }: SendAndConfirmDurableNonceTransactionFactoryConfig): SendAndConfirmDurableNonceTransactionFunction;
21
+ export declare function sendAndConfirmTransactionFactory({ rpc, rpcSubscriptions, }: SendAndConfirmTransactionWithBlockhashLifetimeFactoryConfig): SendAndConfirmTransactionWithBlockhashLifetimeFunction;
22
+ export {};
23
+ //# sourceMappingURL=send-transaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send-transaction.d.ts","sourceRoot":"","sources":["../../src/send-transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,uBAAuB,EAAE,GAAG,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACxH,OAAO,KAAK,EACR,uBAAuB,EACvB,gBAAgB,EAChB,yBAAyB,EACzB,oBAAoB,EACvB,MAAM,2BAA2B,CAAC;AAQnC,OAAO,EACH,eAAe,EACf,wBAAwB,EACxB,uBAAuB,EACvB,iCAAiC,EACjC,wBAAwB,EAC3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACH,mBAAmB,EACnB,iEAAiE,EACjE,0EAA0E,EAC1E,2CAA2C,EAC9C,MAAM,6BAA6B,CAAC;AAErC,UAAU,kDAAkD;IACxD,GAAG,EAAE,GAAG,CAAC,iBAAiB,GAAG,uBAAuB,GAAG,kBAAkB,CAAC,CAAC;IAC3E,gBAAgB,EAAE,gBAAgB,CAAC,uBAAuB,GAAG,yBAAyB,CAAC,CAAC;CAC3F;AAED,UAAU,2DAA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1
  {
2
2
  "name": "@solana/web3.js",
3
- "version": "2.0.0-experimental.d6c5c0e",
3
+ "version": "2.0.0-experimental.d8524d8",
4
4
  "description": "Solana Javascript API",
5
5
  "exports": {
6
6
  "browser": {
@@ -49,35 +49,21 @@
49
49
  "maintained node versions"
50
50
  ],
51
51
  "dependencies": {
52
- "@solana/keys": "2.0.0-experimental.d6c5c0e",
53
- "@solana/rpc-core": "2.0.0-development",
54
- "@solana/rpc-transport": "2.0.0-experimental.d6c5c0e"
55
- },
56
- "devDependencies": {
57
- "@solana/eslint-config-solana": "^1.0.0",
58
- "@swc/core": "^1.3.18",
59
- "@swc/jest": "^0.2.23",
60
- "@types/jest": "^29.5.0",
61
- "@typescript-eslint/eslint-plugin": "^5.57.1",
62
- "@typescript-eslint/parser": "^5.57.1",
63
- "agadoo": "^3.0.0",
64
- "eslint": "^8.37.0",
65
- "eslint-plugin-jest": "^27.1.5",
66
- "eslint-plugin-react-hooks": "^4.6.0",
67
- "eslint-plugin-sort-keys-fix": "^1.1.2",
68
- "jest": "^29.5.0",
69
- "jest-environment-jsdom": "^29.5.0",
70
- "jest-runner-eslint": "^2.0.0",
71
- "jest-runner-prettier": "^1.0.0",
72
- "postcss": "^8.4.12",
73
- "prettier": "^2.7.1",
74
- "ts-node": "^10.9.1",
75
- "tsup": "6.7.0",
76
- "typescript": "^5.0.3",
77
- "version-from-git": "^1.1.1",
78
- "build-scripts": "0.0.0",
79
- "test-config": "0.0.0",
80
- "tsconfig": "0.0.0"
52
+ "@solana/accounts": "2.0.0-experimental.d8524d8",
53
+ "@solana/codecs": "2.0.0-experimental.d8524d8",
54
+ "@solana/errors": "2.0.0-experimental.d8524d8",
55
+ "@solana/addresses": "2.0.0-experimental.d8524d8",
56
+ "@solana/instructions": "2.0.0-experimental.d8524d8",
57
+ "@solana/functional": "2.0.0-experimental.d8524d8",
58
+ "@solana/keys": "2.0.0-experimental.d8524d8",
59
+ "@solana/rpc": "2.0.0-experimental.d8524d8",
60
+ "@solana/rpc-parsed-types": "2.0.0-experimental.d8524d8",
61
+ "@solana/programs": "2.0.0-experimental.d8524d8",
62
+ "@solana/rpc-subscriptions": "2.0.0-experimental.d8524d8",
63
+ "@solana/signers": "2.0.0-experimental.d8524d8",
64
+ "@solana/rpc-types": "2.0.0-experimental.d8524d8",
65
+ "@solana/transaction-confirmation": "2.0.0-experimental.d8524d8",
66
+ "@solana/transactions": "2.0.0-experimental.d8524d8"
81
67
  },
82
68
  "bundlewatch": {
83
69
  "defaultCompression": "gzip",
@@ -89,16 +75,18 @@
89
75
  },
90
76
  "scripts": {
91
77
  "compile:js": "tsup --config build-scripts/tsup.config.library.ts",
92
- "compile:typedefs": "tsc -p ./tsconfig.declarations.json",
93
- "dev": "jest -c node_modules/test-config/jest-dev.config.ts --rootDir . --watch",
94
- "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",
95
- "test:lint": "jest -c node_modules/test-config/jest-lint.config.ts --rootDir . --silent",
96
- "test:prettier": "jest -c node_modules/test-config/jest-prettier.config.ts --rootDir . --silent",
78
+ "compile:typedefs": "tsc -p ./tsconfig.declarations.json && node node_modules/@solana/build-scripts/add-js-extension-to-types.mjs",
79
+ "dev": "jest -c node_modules/@solana/test-config/jest-dev.config.ts --rootDir . --watch",
80
+ "publish-impl": "npm view $npm_package_name@$npm_package_version > /dev/null 2>&1 || pnpm publish --tag experimental --access public --no-git-checks",
81
+ "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 prepublishOnly && pnpm publish-impl && git reset --hard",
82
+ "style:fix": "pnpm eslint --fix src/* && pnpm prettier -w src/* package.json",
83
+ "test:lint": "jest -c node_modules/@solana/test-config/jest-lint.config.ts --rootDir . --silent",
84
+ "test:prettier": "jest -c node_modules/@solana/test-config/jest-prettier.config.ts --rootDir . --silent",
97
85
  "test:treeshakability:browser": "agadoo dist/index.browser.js",
98
- "test:treeshakability:native": "agadoo dist/index.node.js",
99
- "test:treeshakability:node": "agadoo dist/index.native.js",
86
+ "test:treeshakability:native": "agadoo dist/index.native.js",
87
+ "test:treeshakability:node": "agadoo dist/index.node.js",
100
88
  "test:typecheck": "tsc --noEmit",
101
- "test:unit:browser": "jest -c node_modules/test-config/jest-unit.config.browser.ts --rootDir . --silent",
102
- "test:unit:node": "jest -c node_modules/test-config/jest-unit.config.node.ts --rootDir . --silent"
89
+ "test:unit:browser": "jest -c node_modules/@solana/test-config/jest-unit.config.browser.ts --rootDir . --silent",
90
+ "test:unit:node": "jest -c node_modules/@solana/test-config/jest-unit.config.node.ts --rootDir . --silent"
103
91
  }
104
92
  }
@@ -1,3 +0,0 @@
1
- import { createSolanaRpcApi } from '@solana/rpc-core';
2
- export declare const DEFAULT_RPC_CONFIG: Partial<Parameters<typeof createSolanaRpcApi>[0]>;
3
- //# sourceMappingURL=rpc-default-config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rpc-default-config.d.ts","sourceRoot":"","sources":["../../src/rpc-default-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAGtD,eAAO,MAAM,kBAAkB,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAIhF,CAAC"}
@@ -1,8 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"rpc-integer-overflow-error.d.ts","sourceRoot":"","sources":["../../src/rpc-integer-overflow-error.ts"],"names":[],"mappings":"AAAA,qBAAa,iCAAkC,SAAQ,KAAK;IACxD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;gBACX,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM;IA+B3E,IAAI,IAAI,WAEP;CACJ"}
@@ -1,4 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"rpc-transport.d.ts","sourceRoot":"","sources":["../../src/rpc-transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,6DAA6D,CAAC;AAe5F,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,GAAG,aAAa,CAW1G"}
@@ -1,5 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../src/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAsB,MAAM,kBAAkB,CAAC;AAGxE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iDAAiD,CAAC;AAE3E,wBAAgB,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,GAAG,CAAC,gBAAgB,CAAC,CAK/G"}