@solana/web3.js 2.0.0-experimental.3244e3e → 2.0.0-experimental.34c3228

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 (49) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1153 -43
  3. package/dist/index.browser.cjs +728 -30
  4. package/dist/index.browser.cjs.map +1 -1
  5. package/dist/index.browser.js +660 -32
  6. package/dist/index.browser.js.map +1 -1
  7. package/dist/index.development.js +5629 -295
  8. package/dist/index.development.js.map +1 -1
  9. package/dist/index.native.js +649 -32
  10. package/dist/index.native.js.map +1 -1
  11. package/dist/index.node.cjs +717 -30
  12. package/dist/index.node.cjs.map +1 -1
  13. package/dist/index.node.js +651 -32
  14. package/dist/index.node.js.map +1 -1
  15. package/dist/index.production.min.js +273 -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/cached-abortable-iterable.d.ts +11 -0
  21. package/dist/types/cached-abortable-iterable.d.ts.map +1 -0
  22. package/dist/types/decode-transaction.d.ts +10 -0
  23. package/dist/types/decode-transaction.d.ts.map +1 -0
  24. package/dist/types/index.d.ts +16 -2
  25. package/dist/types/index.d.ts.map +1 -1
  26. package/dist/types/rpc-default-config.d.ts.map +1 -1
  27. package/dist/types/rpc-integer-overflow-error.d.ts +3 -7
  28. package/dist/types/rpc-integer-overflow-error.d.ts.map +1 -1
  29. package/dist/types/rpc-request-coalescer.d.ts +5 -0
  30. package/dist/types/rpc-request-coalescer.d.ts.map +1 -0
  31. package/dist/types/rpc-request-deduplication.d.ts +2 -0
  32. package/dist/types/rpc-request-deduplication.d.ts.map +1 -0
  33. package/dist/types/rpc-subscription-coalescer.d.ts +10 -0
  34. package/dist/types/rpc-subscription-coalescer.d.ts.map +1 -0
  35. package/dist/types/rpc-transport.d.ts +7 -2
  36. package/dist/types/rpc-transport.d.ts.map +1 -1
  37. package/dist/types/rpc-websocket-autopinger.d.ts +8 -0
  38. package/dist/types/rpc-websocket-autopinger.d.ts.map +1 -0
  39. package/dist/types/rpc-websocket-connection-sharding.d.ts +13 -0
  40. package/dist/types/rpc-websocket-connection-sharding.d.ts.map +1 -0
  41. package/dist/types/rpc-websocket-transport.d.ts +16 -0
  42. package/dist/types/rpc-websocket-transport.d.ts.map +1 -0
  43. package/dist/types/rpc.d.ts +12 -4
  44. package/dist/types/rpc.d.ts.map +1 -1
  45. package/dist/types/send-transaction-internal.d.ts +27 -0
  46. package/dist/types/send-transaction-internal.d.ts.map +1 -0
  47. package/dist/types/send-transaction.d.ts +23 -0
  48. package/dist/types/send-transaction.d.ts.map +1 -0
  49. package/package.json +28 -39
@@ -0,0 +1,5 @@
1
+ import type { IRpcTransport } from '@solana/rpc-transport';
2
+ type GetDeduplicationKeyFn = (payload: unknown) => string | undefined;
3
+ export declare function getRpcTransportWithRequestCoalescing<TTransport extends IRpcTransport>(transport: TTransport, getDeduplicationKey: GetDeduplicationKeyFn): TTransport;
4
+ export {};
5
+ //# sourceMappingURL=rpc-request-coalescer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rpc-request-coalescer.d.ts","sourceRoot":"","sources":["../../src/rpc-request-coalescer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAQ3D,KAAK,qBAAqB,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,GAAG,SAAS,CAAC;AAEtE,wBAAgB,oCAAoC,CAAC,UAAU,SAAS,aAAa,EACjF,SAAS,EAAE,UAAU,EACrB,mBAAmB,EAAE,qBAAqB,GAC3C,UAAU,CAkEZ"}
@@ -0,0 +1,2 @@
1
+ export declare function getSolanaRpcPayloadDeduplicationKey(payload: unknown): string | undefined;
2
+ //# sourceMappingURL=rpc-request-deduplication.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rpc-request-deduplication.d.ts","sourceRoot":"","sources":["../../src/rpc-request-deduplication.ts"],"names":[],"mappings":"AAiBA,wBAAgB,mCAAmC,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAExF"}
@@ -0,0 +1,10 @@
1
+ import { RpcSubscriptions } from '@solana/rpc-types';
2
+ type CacheKey = string | undefined;
3
+ type Config<TRpcSubscriptionsMethods> = Readonly<{
4
+ getDeduplicationKey: GetDeduplicationKeyFn;
5
+ rpcSubscriptions: RpcSubscriptions<TRpcSubscriptionsMethods>;
6
+ }>;
7
+ type GetDeduplicationKeyFn = (subscriptionMethod: string | symbol, payload: unknown) => CacheKey;
8
+ export declare function getRpcSubscriptionsWithSubscriptionCoalescing<TRpcSubscriptionsMethods>({ getDeduplicationKey, rpcSubscriptions, }: Config<TRpcSubscriptionsMethods>): RpcSubscriptions<TRpcSubscriptionsMethods>;
9
+ export {};
10
+ //# sourceMappingURL=rpc-subscription-coalescer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rpc-subscription-coalescer.d.ts","sourceRoot":"","sources":["../../src/rpc-subscription-coalescer.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAI7E,KAAK,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AACnC,KAAK,MAAM,CAAC,wBAAwB,IAAI,QAAQ,CAAC;IAC7C,mBAAmB,EAAE,qBAAqB,CAAC;IAC3C,gBAAgB,EAAE,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;CAChE,CAAC,CAAC;AACH,KAAK,qBAAqB,GAAG,CAAC,kBAAkB,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,QAAQ,CAAC;AAuBjG,wBAAgB,6CAA6C,CAAC,wBAAwB,EAAE,EACpF,mBAAmB,EACnB,gBAAgB,GACnB,EAAE,MAAM,CAAC,wBAAwB,CAAC,GAAG,gBAAgB,CAAC,wBAAwB,CAAC,CAgG/E"}
@@ -1,4 +1,9 @@
1
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;
2
+ import { ClusterUrl } from '@solana/rpc-types';
3
+ type Config<TClusterUrl extends ClusterUrl> = Readonly<{
4
+ headers?: Parameters<typeof createHttpTransport>[0]['headers'];
5
+ url: TClusterUrl;
6
+ }>;
7
+ export declare function createDefaultRpcTransport<TClusterUrl extends ClusterUrl>(config: Config<TClusterUrl>): import("@solana/rpc-transport").IRpcTransportFromClusterUrl<TClusterUrl>;
8
+ export {};
4
9
  //# sourceMappingURL=rpc-transport.d.ts.map
@@ -1 +1 @@
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
+ {"version":3,"file":"rpc-transport.d.ts","sourceRoot":"","sources":["../../src/rpc-transport.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAK/C,KAAK,MAAM,CAAC,WAAW,SAAS,UAAU,IAAI,QAAQ,CAAC;IACnD,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAC/D,GAAG,EAAE,WAAW,CAAC;CACpB,CAAC,CAAC;AAeH,wBAAgB,yBAAyB,CAAC,WAAW,SAAS,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,4EAcpG"}
@@ -0,0 +1,8 @@
1
+ import type { IRpcWebSocketTransport } from '@solana/rpc-transport';
2
+ type Config<TTransport extends IRpcWebSocketTransport> = Readonly<{
3
+ intervalMs: number;
4
+ transport: TTransport;
5
+ }>;
6
+ export declare function getWebSocketTransportWithAutoping<TTransport extends IRpcWebSocketTransport>({ intervalMs, transport, }: Config<TTransport>): TTransport;
7
+ export {};
8
+ //# sourceMappingURL=rpc-websocket-autopinger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rpc-websocket-autopinger.d.ts","sourceRoot":"","sources":["../../src/rpc-websocket-autopinger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEpE,KAAK,MAAM,CAAC,UAAU,SAAS,sBAAsB,IAAI,QAAQ,CAAC;IAC9D,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,UAAU,CAAC;CACzB,CAAC,CAAC;AAOH,wBAAgB,iCAAiC,CAAC,UAAU,SAAS,sBAAsB,EAAE,EACzF,UAAU,EACV,SAAS,GACZ,EAAE,MAAM,CAAC,UAAU,CAAC,GAAG,UAAU,CA+DjC"}
@@ -0,0 +1,13 @@
1
+ import type { IRpcWebSocketTransport } from '@solana/rpc-transport';
2
+ type Config<TTransport extends IRpcWebSocketTransport> = Readonly<{
3
+ /**
4
+ * You might like to open more subscriptions per connection than your RPC provider allows for.
5
+ * Using the initial payload as input, return a shard key from this method to assign
6
+ * subscriptions to separate connections. One socket will be opened per shard key.
7
+ */
8
+ getShard?: (payload: unknown) => string | symbol;
9
+ transport: TTransport;
10
+ }>;
11
+ export declare function getWebSocketTransportWithConnectionSharding<TTransport extends IRpcWebSocketTransport>({ getShard, transport, }: Config<TTransport>): TTransport;
12
+ export {};
13
+ //# sourceMappingURL=rpc-websocket-connection-sharding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rpc-websocket-connection-sharding.d.ts","sourceRoot":"","sources":["../../src/rpc-websocket-connection-sharding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAIpE,KAAK,MAAM,CAAC,UAAU,SAAS,sBAAsB,IAAI,QAAQ,CAAC;IAC9D;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,GAAG,MAAM,CAAC;IACjD,SAAS,EAAE,UAAU,CAAC;CACzB,CAAC,CAAC;AAMH,wBAAgB,2CAA2C,CAAC,UAAU,SAAS,sBAAsB,EAAE,EACnG,QAAQ,EACR,SAAS,GACZ,EAAE,MAAM,CAAC,UAAU,CAAC,GAAG,UAAU,CAejC"}
@@ -0,0 +1,16 @@
1
+ import { ClusterUrl } from '@solana/rpc-types';
2
+ type Config<TClusterUrl extends ClusterUrl> = Readonly<{
3
+ url: TClusterUrl;
4
+ }>;
5
+ export declare function createDefaultRpcSubscriptionsTransport<TClusterUrl extends ClusterUrl>(config: Config<TClusterUrl> & {
6
+ /**
7
+ * You might like to open more subscriptions per connection than your RPC provider allows
8
+ * for. Using the initial payload as input, return a shard key from this method to assign
9
+ * subscriptions to separate connections. One socket will be opened per shard key.
10
+ */
11
+ getShard?: (payload: unknown) => string;
12
+ intervalMs?: number;
13
+ sendBufferHighWatermark?: number;
14
+ }): import("@solana/rpc-transport").IRpcWebSocketTransportFromClusterUrl<TClusterUrl>;
15
+ export {};
16
+ //# sourceMappingURL=rpc-websocket-transport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rpc-websocket-transport.d.ts","sourceRoot":"","sources":["../../src/rpc-websocket-transport.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAK/C,KAAK,MAAM,CAAC,WAAW,SAAS,UAAU,IAAI,QAAQ,CAAC;IACnD,GAAG,EAAE,WAAW,CAAC;CACpB,CAAC,CAAC;AAEH,wBAAgB,sCAAsC,CAAC,WAAW,SAAS,UAAU,EACjF,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,GAAG;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uBAAuB,CAAC,EAAE,MAAM,CAAC;CACpC,qFAsBJ"}
@@ -1,5 +1,13 @@
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>;
1
+ import { SolanaRpcMethodsFromTransport, SolanaRpcSubscriptions, SolanaRpcSubscriptionsUnstable } from '@solana/rpc-core';
2
+ import { IRpcTransport, IRpcTransportWithCluster, IRpcWebSocketTransport, IRpcWebSocketTransportWithCluster, RpcFromTransport, RpcSubscriptionsFromTransport } from '@solana/rpc-transport';
3
+ type RpcConfig<TTransport extends IRpcTransport | IRpcTransportWithCluster> = Readonly<{
4
+ transport: TTransport;
5
+ }>;
6
+ export declare function createSolanaRpc<TTransport extends IRpcTransport | IRpcTransportWithCluster>(config: RpcConfig<TTransport>): RpcFromTransport<SolanaRpcMethodsFromTransport<TTransport>, TTransport>;
7
+ type RpcSubscriptionsConfig<TTransport extends IRpcWebSocketTransport | IRpcWebSocketTransportWithCluster> = Readonly<{
8
+ transport: TTransport;
9
+ }>;
10
+ export declare function createSolanaRpcSubscriptions<TTransport extends IRpcWebSocketTransport | IRpcWebSocketTransportWithCluster>(config: RpcSubscriptionsConfig<TTransport>): RpcSubscriptionsFromTransport<SolanaRpcSubscriptions, TTransport>;
11
+ export declare function createSolanaRpcSubscriptions_UNSTABLE<TTransport extends IRpcWebSocketTransport | IRpcWebSocketTransportWithCluster>(config: RpcSubscriptionsConfig<TTransport>): RpcSubscriptionsFromTransport<SolanaRpcSubscriptions & SolanaRpcSubscriptionsUnstable, TTransport>;
12
+ export {};
5
13
  //# sourceMappingURL=rpc.d.ts.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../src/rpc.ts"],"names":[],"mappings":"AACA,OAAO,EAIH,6BAA6B,EAC7B,sBAAsB,EACtB,8BAA8B,EACjC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAGH,aAAa,EACb,wBAAwB,EACxB,sBAAsB,EACtB,iCAAiC,EACjC,gBAAgB,EAChB,6BAA6B,EAChC,MAAM,uBAAuB,CAAC;AAQ/B,KAAK,SAAS,CAAC,UAAU,SAAS,aAAa,GAAG,wBAAwB,IAAI,QAAQ,CAAC;IACnF,SAAS,EAAE,UAAU,CAAC;CACzB,CAAC,CAAC;AAEH,wBAAgB,eAAe,CAAC,UAAU,SAAS,aAAa,GAAG,wBAAwB,EACvF,MAAM,EAAE,SAAS,CAAC,UAAU,CAAC,GAC9B,gBAAgB,CAAC,6BAA6B,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,CAMzE;AAED,KAAK,sBAAsB,CAAC,UAAU,SAAS,sBAAsB,GAAG,iCAAiC,IAAI,QAAQ,CAAC;IAClH,SAAS,EAAE,UAAU,CAAC;CACzB,CAAC,CAAC;AAEH,wBAAgB,4BAA4B,CACxC,UAAU,SAAS,sBAAsB,GAAG,iCAAiC,EAC/E,MAAM,EAAE,sBAAsB,CAAC,UAAU,CAAC,GAAG,6BAA6B,CAAC,sBAAsB,EAAE,UAAU,CAAC,CAY/G;AAED,wBAAgB,qCAAqC,CACjD,UAAU,SAAS,sBAAsB,GAAG,iCAAiC,EAE7E,MAAM,EAAE,sBAAsB,CAAC,UAAU,CAAC,GAC3C,6BAA6B,CAAC,sBAAsB,GAAG,8BAA8B,EAAE,UAAU,CAAC,CAKpG"}
@@ -0,0 +1,27 @@
1
+ import { Signature } from '@solana/keys';
2
+ import { SendTransactionApi } from '@solana/rpc-core';
3
+ import { Commitment, Rpc } from '@solana/rpc-types';
4
+ import { waitForDurableNonceTransactionConfirmation, waitForRecentTransactionConfirmation } from '@solana/transaction-confirmation';
5
+ import { BaseTransaction, IDurableNonceTransaction, IFullySignedTransaction, ITransactionWithBlockhashLifetime, ITransactionWithFeePayer } from '@solana/transactions';
6
+ interface SendAndConfirmDurableNonceTransactionConfig extends SendTransactionBaseConfig, SendTransactionConfigWithoutEncoding {
7
+ confirmDurableNonceTransaction: (config: Omit<Parameters<typeof waitForDurableNonceTransactionConfirmation>[0], 'getNonceInvalidationPromise' | 'getRecentSignatureConfirmationPromise'>) => Promise<void>;
8
+ transaction: SendableTransaction & IDurableNonceTransaction;
9
+ }
10
+ interface SendAndConfirmTransactionWithBlockhashLifetimeConfig extends SendTransactionBaseConfig, SendTransactionConfigWithoutEncoding {
11
+ confirmRecentTransaction: (config: Omit<Parameters<typeof waitForRecentTransactionConfirmation>[0], 'getBlockHeightExceedencePromise' | 'getRecentSignatureConfirmationPromise'>) => Promise<void>;
12
+ transaction: SendableTransaction & ITransactionWithBlockhashLifetime;
13
+ }
14
+ interface SendTransactionBaseConfig extends SendTransactionConfigWithoutEncoding {
15
+ abortSignal?: AbortSignal;
16
+ commitment: Commitment;
17
+ rpc: Rpc<SendTransactionApi>;
18
+ transaction: SendableTransaction;
19
+ }
20
+ interface SendTransactionConfigWithoutEncoding extends Omit<NonNullable<Parameters<SendTransactionApi['sendTransaction']>[1]>, 'encoding'> {
21
+ }
22
+ export type SendableTransaction = BaseTransaction & (ITransactionWithBlockhashLifetime | IDurableNonceTransaction) & ITransactionWithFeePayer & IFullySignedTransaction;
23
+ export declare function sendTransaction_INTERNAL_ONLY_DO_NOT_EXPORT({ abortSignal, commitment, rpc, transaction, ...sendTransactionConfig }: SendTransactionBaseConfig): Promise<Signature>;
24
+ export declare function sendAndConfirmDurableNonceTransaction_INTERNAL_ONLY_DO_NOT_EXPORT({ abortSignal, commitment, confirmDurableNonceTransaction, rpc, transaction, ...sendTransactionConfig }: SendAndConfirmDurableNonceTransactionConfig): Promise<Signature>;
25
+ export declare function sendAndConfirmTransactionWithBlockhashLifetime_INTERNAL_ONLY_DO_NOT_EXPORT({ abortSignal, commitment, confirmRecentTransaction, rpc, transaction, ...sendTransactionConfig }: SendAndConfirmTransactionWithBlockhashLifetimeConfig): Promise<Signature>;
26
+ export {};
27
+ //# sourceMappingURL=send-transaction-internal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send-transaction-internal.d.ts","sourceRoot":"","sources":["../../src/send-transaction-internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAwB,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EACH,0CAA0C,EAC1C,oCAAoC,EACvC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACH,eAAe,EAEf,wBAAwB,EACxB,uBAAuB,EACvB,iCAAiC,EACjC,wBAAwB,EAC3B,MAAM,sBAAsB,CAAC;AAE9B,UAAU,2CACN,SAAQ,yBAAyB,EAC7B,oCAAoC;IACxC,8BAA8B,EAAE,CAC5B,MAAM,EAAE,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;AAED,wBAAsB,0EAA0E,CAAC,EAC7F,WAAW,EACX,UAAU,EACV,wBAAwB,EACxB,GAAG,EACH,WAAW,EACX,GAAG,qBAAqB,EAC3B,EAAE,oDAAoD,GAAG,OAAO,CAAC,SAAS,CAAC,CAc3E"}
@@ -0,0 +1,23 @@
1
+ import type { AccountNotificationsApi, GetAccountInfoApi, GetEpochInfoApi, GetSignatureStatusesApi, SendTransactionApi, SignatureNotificationsApi, SlotNotificationsApi } from '@solana/rpc-core';
2
+ import type { Rpc, RpcSubscriptions } from '@solana/rpc-types';
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,EACR,uBAAuB,EACvB,iBAAiB,EACjB,eAAe,EACf,uBAAuB,EACvB,kBAAkB,EAClB,yBAAyB,EACzB,oBAAoB,EACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAQ/D,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,C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,GAAG,EACH,gBAAgB,GACnB,EAAE,kDAAkD,GAAG,6CAA6C,CA0BpG;AAED,wBAAgB,gCAAgC,CAAC,EAC7C,GAAG,EACH,gBAAgB,GACnB,EAAE,2DAA2D,GAAG,sDAAsD,CA6BtH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solana/web3.js",
3
- "version": "2.0.0-experimental.3244e3e",
3
+ "version": "2.0.0-experimental.34c3228",
4
4
  "description": "Solana Javascript API",
5
5
  "exports": {
6
6
  "browser": {
@@ -49,35 +49,22 @@
49
49
  "maintained node versions"
50
50
  ],
51
51
  "dependencies": {
52
- "@solana/keys": "2.0.0-experimental.3244e3e",
53
- "@solana/rpc-core": "2.0.0-experimental.3244e3e",
54
- "@solana/rpc-transport": "2.0.0-experimental.3244e3e"
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
+ "fast-stable-stringify": "^1.0.0",
53
+ "@solana/accounts": "2.0.0-experimental.34c3228",
54
+ "@solana/codecs": "2.0.0-experimental.34c3228",
55
+ "@solana/addresses": "2.0.0-experimental.34c3228",
56
+ "@solana/errors": "2.0.0-experimental.34c3228",
57
+ "@solana/functional": "2.0.0-experimental.34c3228",
58
+ "@solana/instructions": "2.0.0-experimental.34c3228",
59
+ "@solana/keys": "2.0.0-experimental.34c3228",
60
+ "@solana/rpc-core": "2.0.0-experimental.34c3228",
61
+ "@solana/rpc-parsed-types": "2.0.0-experimental.34c3228",
62
+ "@solana/programs": "2.0.0-experimental.34c3228",
63
+ "@solana/rpc-types": "2.0.0-experimental.34c3228",
64
+ "@solana/rpc-transport": "2.0.0-experimental.34c3228",
65
+ "@solana/signers": "2.0.0-experimental.34c3228",
66
+ "@solana/transaction-confirmation": "2.0.0-experimental.34c3228",
67
+ "@solana/transactions": "2.0.0-experimental.34c3228"
81
68
  },
82
69
  "bundlewatch": {
83
70
  "defaultCompression": "gzip",
@@ -89,16 +76,18 @@
89
76
  },
90
77
  "scripts": {
91
78
  "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",
79
+ "compile:typedefs": "tsc -p ./tsconfig.declarations.json && node node_modules/@solana/build-scripts/add-js-extension-to-types.mjs",
80
+ "dev": "jest -c node_modules/@solana/test-config/jest-dev.config.ts --rootDir . --watch",
81
+ "publish-impl": "npm view $npm_package_name@$npm_package_version > /dev/null 2>&1 || pnpm publish --tag experimental --access public --no-git-checks",
82
+ "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",
83
+ "style:fix": "pnpm eslint --fix src/* && pnpm prettier -w src/* package.json",
84
+ "test:lint": "jest -c node_modules/@solana/test-config/jest-lint.config.ts --rootDir . --silent",
85
+ "test:prettier": "jest -c node_modules/@solana/test-config/jest-prettier.config.ts --rootDir . --silent",
97
86
  "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",
87
+ "test:treeshakability:native": "agadoo dist/index.native.js",
88
+ "test:treeshakability:node": "agadoo dist/index.node.js",
100
89
  "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"
90
+ "test:unit:browser": "jest -c node_modules/@solana/test-config/jest-unit.config.browser.ts --rootDir . --silent",
91
+ "test:unit:node": "jest -c node_modules/@solana/test-config/jest-unit.config.node.ts --rootDir . --silent"
103
92
  }
104
93
  }