@solana/rpc-subscriptions-api 2.0.0-experimental.021706b

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 (33) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +17 -0
  3. package/dist/index.browser.cjs +201 -0
  4. package/dist/index.browser.cjs.map +1 -0
  5. package/dist/index.browser.js +198 -0
  6. package/dist/index.browser.js.map +1 -0
  7. package/dist/index.native.js +198 -0
  8. package/dist/index.native.js.map +1 -0
  9. package/dist/index.node.cjs +201 -0
  10. package/dist/index.node.cjs.map +1 -0
  11. package/dist/index.node.js +198 -0
  12. package/dist/index.node.js.map +1 -0
  13. package/dist/types/account-notifications.d.ts +30 -0
  14. package/dist/types/account-notifications.d.ts.map +1 -0
  15. package/dist/types/block-notifications.d.ts +237 -0
  16. package/dist/types/block-notifications.d.ts.map +1 -0
  17. package/dist/types/index.d.ts +18 -0
  18. package/dist/types/index.d.ts.map +1 -0
  19. package/dist/types/logs-notifications.d.ts +25 -0
  20. package/dist/types/logs-notifications.d.ts.map +1 -0
  21. package/dist/types/program-notifications.d.ts +45 -0
  22. package/dist/types/program-notifications.d.ts.map +1 -0
  23. package/dist/types/root-notifications.d.ts +11 -0
  24. package/dist/types/root-notifications.d.ts.map +1 -0
  25. package/dist/types/signature-notifications.d.ts +25 -0
  26. package/dist/types/signature-notifications.d.ts.map +1 -0
  27. package/dist/types/slot-notifications.d.ts +15 -0
  28. package/dist/types/slot-notifications.d.ts.map +1 -0
  29. package/dist/types/slots-updates-notifications.d.ts +33 -0
  30. package/dist/types/slots-updates-notifications.d.ts.map +1 -0
  31. package/dist/types/vote-notifications.d.ts +19 -0
  32. package/dist/types/vote-notifications.d.ts.map +1 -0
  33. package/package.json +80 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";AAAA;AAAA,EACI;AAAA,OAGG;AACP;AAAA,EAEI;AAAA,EACA;AAAA,EACA;AAAA,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A,MAChE;AAAA,MACA,sBAAsB,0BAA0B,QAAQ,OAAK;AAAA,QACzD,CAAC,SAAS,kBAAkB,WAAW,GAAG,CAAC;AAAA,QAC3C,CAAC,kBAAkB,WAAW,GAAG,CAAC;AAAA,MACtC,CAAC;AAAA,IACL;AAAA,EACJ;AACA,SAAO;AACX","sourcesContent":["import {\n createRpcSubscriptionsApi,\n RpcSubscriptionsApi,\n RpcSubscriptionsApiMethods,\n} from '@solana/rpc-subscriptions-spec';\nimport {\n AllowedNumericKeypaths,\n getDefaultParamsTransformerForSolanaRpc,\n getDefaultResponseTransformerForSolanaRpc,\n jsonParsedAccountsConfigs,\n KEYPATH_WILDCARD,\n ParamsTransformerConfig,\n} from '@solana/rpc-transformers';\n\nimport { AccountNotificationsApi } from './account-notifications';\nimport { BlockNotificationsApi } from './block-notifications';\nimport { LogsNotificationsApi } from './logs-notifications';\nimport { ProgramNotificationsApi } from './program-notifications';\nimport { RootNotificationsApi } from './root-notifications';\nimport { SignatureNotificationsApi } from './signature-notifications';\nimport { SlotNotificationsApi } from './slot-notifications';\nimport { SlotsUpdatesNotificationsApi } from './slots-updates-notifications';\nimport { VoteNotificationsApi } from './vote-notifications';\n\nexport type SolanaRpcSubscriptionsApi = AccountNotificationsApi &\n LogsNotificationsApi &\n ProgramNotificationsApi &\n RootNotificationsApi &\n SignatureNotificationsApi &\n SlotNotificationsApi;\nexport type SolanaRpcSubscriptionsApiUnstable = BlockNotificationsApi & SlotsUpdatesNotificationsApi & VoteNotificationsApi;\n\nexport type {\n AccountNotificationsApi,\n BlockNotificationsApi,\n LogsNotificationsApi,\n ProgramNotificationsApi,\n RootNotificationsApi,\n SignatureNotificationsApi,\n SlotNotificationsApi,\n SlotsUpdatesNotificationsApi,\n VoteNotificationsApi,\n};\n\ntype Config = ParamsTransformerConfig;\n\nfunction createSolanaRpcSubscriptionsApi_INTERNAL<TApi extends RpcSubscriptionsApiMethods>(\n config?: Config,\n): RpcSubscriptionsApi<TApi> {\n return createRpcSubscriptionsApi<TApi>({\n parametersTransformer: getDefaultParamsTransformerForSolanaRpc(config) as (params: unknown[]) => unknown[],\n responseTransformer: getDefaultResponseTransformerForSolanaRpc({\n allowedNumericKeyPaths: getAllowedNumericKeypaths(),\n }),\n subscribeNotificationNameTransformer: (notificationName: string) =>\n notificationName.replace(/Notifications$/, 'Subscribe'),\n unsubscribeNotificationNameTransformer: (notificationName: string) =>\n notificationName.replace(/Notifications$/, 'Unsubscribe'),\n });\n}\n\nexport function createSolanaRpcSubscriptionsApi<TApi extends RpcSubscriptionsApiMethods = SolanaRpcSubscriptionsApi>(\n config?: Config,\n): RpcSubscriptionsApi<TApi> {\n return createSolanaRpcSubscriptionsApi_INTERNAL<TApi>(config);\n}\n\nexport function createSolanaRpcSubscriptionsApi_UNSTABLE(config?: Config) {\n return createSolanaRpcSubscriptionsApi_INTERNAL<SolanaRpcSubscriptionsApi & SolanaRpcSubscriptionsApiUnstable>(\n config,\n );\n}\n\nlet memoizedKeypaths: AllowedNumericKeypaths<\n RpcSubscriptionsApi<SolanaRpcSubscriptionsApi & SolanaRpcSubscriptionsApiUnstable>\n>;\n\n/**\n * These are keypaths at the end of which you will find a numeric value that should *not* be upcast\n * to a `bigint`. These are values that are legitimately defined as `u8` or `usize` on the backend.\n */\nfunction getAllowedNumericKeypaths(): AllowedNumericKeypaths<\n RpcSubscriptionsApi<SolanaRpcSubscriptionsApi & SolanaRpcSubscriptionsApiUnstable>\n> {\n if (!memoizedKeypaths) {\n memoizedKeypaths = {\n accountNotifications: jsonParsedAccountsConfigs.map(c => ['value', ...c]),\n blockNotifications: [\n ['value', 'block', 'blockTime'],\n [\n 'value',\n 'block',\n 'transactions',\n KEYPATH_WILDCARD,\n 'meta',\n 'preTokenBalances',\n KEYPATH_WILDCARD,\n 'accountIndex',\n ],\n [\n 'value',\n 'block',\n 'transactions',\n KEYPATH_WILDCARD,\n 'meta',\n 'preTokenBalances',\n KEYPATH_WILDCARD,\n 'uiTokenAmount',\n 'decimals',\n ],\n [\n 'value',\n 'block',\n 'transactions',\n KEYPATH_WILDCARD,\n 'meta',\n 'postTokenBalances',\n KEYPATH_WILDCARD,\n 'accountIndex',\n ],\n [\n 'value',\n 'block',\n 'transactions',\n KEYPATH_WILDCARD,\n 'meta',\n 'postTokenBalances',\n KEYPATH_WILDCARD,\n 'uiTokenAmount',\n 'decimals',\n ],\n ['value', 'block', 'transactions', KEYPATH_WILDCARD, 'meta', 'rewards', KEYPATH_WILDCARD, 'commission'],\n [\n 'value',\n 'block',\n 'transactions',\n KEYPATH_WILDCARD,\n 'meta',\n 'innerInstructions',\n KEYPATH_WILDCARD,\n 'index',\n ],\n [\n 'value',\n 'block',\n 'transactions',\n KEYPATH_WILDCARD,\n 'meta',\n 'innerInstructions',\n KEYPATH_WILDCARD,\n 'instructions',\n KEYPATH_WILDCARD,\n 'programIdIndex',\n ],\n [\n 'value',\n 'block',\n 'transactions',\n KEYPATH_WILDCARD,\n 'meta',\n 'innerInstructions',\n KEYPATH_WILDCARD,\n 'instructions',\n KEYPATH_WILDCARD,\n 'accounts',\n KEYPATH_WILDCARD,\n ],\n [\n 'value',\n 'block',\n 'transactions',\n KEYPATH_WILDCARD,\n 'transaction',\n 'message',\n 'addressTableLookups',\n KEYPATH_WILDCARD,\n 'writableIndexes',\n KEYPATH_WILDCARD,\n ],\n [\n 'value',\n 'block',\n 'transactions',\n KEYPATH_WILDCARD,\n 'transaction',\n 'message',\n 'addressTableLookups',\n KEYPATH_WILDCARD,\n 'readonlyIndexes',\n KEYPATH_WILDCARD,\n ],\n [\n 'value',\n 'block',\n 'transactions',\n KEYPATH_WILDCARD,\n 'transaction',\n 'message',\n 'instructions',\n KEYPATH_WILDCARD,\n 'programIdIndex',\n ],\n [\n 'value',\n 'block',\n 'transactions',\n KEYPATH_WILDCARD,\n 'transaction',\n 'message',\n 'instructions',\n KEYPATH_WILDCARD,\n 'accounts',\n KEYPATH_WILDCARD,\n ],\n [\n 'value',\n 'block',\n 'transactions',\n KEYPATH_WILDCARD,\n 'transaction',\n 'message',\n 'header',\n 'numReadonlySignedAccounts',\n ],\n [\n 'value',\n 'block',\n 'transactions',\n KEYPATH_WILDCARD,\n 'transaction',\n 'message',\n 'header',\n 'numReadonlyUnsignedAccounts',\n ],\n [\n 'value',\n 'block',\n 'transactions',\n KEYPATH_WILDCARD,\n 'transaction',\n 'message',\n 'header',\n 'numRequiredSignatures',\n ],\n ['value', 'block', 'rewards', KEYPATH_WILDCARD, 'commission'],\n ],\n programNotifications: jsonParsedAccountsConfigs.flatMap(c => [\n ['value', KEYPATH_WILDCARD, 'account', ...c],\n [KEYPATH_WILDCARD, 'account', ...c],\n ]),\n };\n }\n return memoizedKeypaths;\n}\n"]}
@@ -0,0 +1,30 @@
1
+ import type { Address } from '@solana/addresses';
2
+ import type { RpcSubscriptionsApiMethods } from '@solana/rpc-subscriptions-spec';
3
+ import type { AccountInfoBase, AccountInfoWithBase58Bytes, AccountInfoWithBase58EncodedData, AccountInfoWithBase64EncodedData, AccountInfoWithBase64EncodedZStdCompressedData, AccountInfoWithJsonData, Commitment, SolanaRpcResponse } from '@solana/rpc-types';
4
+ type AccountNotificationsApiCommonConfig = Readonly<{
5
+ commitment?: Commitment;
6
+ }>;
7
+ export interface AccountNotificationsApi extends RpcSubscriptionsApiMethods {
8
+ /**
9
+ * Subscribe to an account to receive notifications when the lamports or data for
10
+ * a given account public key changes.
11
+ *
12
+ * The notification format is the same as seen in the `getAccountInfo` RPC HTTP method.
13
+ * @see https://docs.solana.com/api/websocket#getAccountInfo
14
+ */
15
+ accountNotifications(address: Address, config: AccountNotificationsApiCommonConfig & Readonly<{
16
+ encoding: 'base64';
17
+ }>): SolanaRpcResponse<AccountInfoBase & AccountInfoWithBase64EncodedData>;
18
+ accountNotifications(address: Address, config: AccountNotificationsApiCommonConfig & Readonly<{
19
+ encoding: 'base64+zstd';
20
+ }>): SolanaRpcResponse<AccountInfoBase & AccountInfoWithBase64EncodedZStdCompressedData>;
21
+ accountNotifications(address: Address, config: AccountNotificationsApiCommonConfig & Readonly<{
22
+ encoding: 'jsonParsed';
23
+ }>): SolanaRpcResponse<AccountInfoBase & AccountInfoWithJsonData>;
24
+ accountNotifications(address: Address, config: AccountNotificationsApiCommonConfig & Readonly<{
25
+ encoding: 'base58';
26
+ }>): SolanaRpcResponse<AccountInfoBase & AccountInfoWithBase58EncodedData>;
27
+ accountNotifications(address: Address, config?: AccountNotificationsApiCommonConfig): SolanaRpcResponse<AccountInfoBase & AccountInfoWithBase58Bytes>;
28
+ }
29
+ export {};
30
+ //# sourceMappingURL=account-notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account-notifications.d.ts","sourceRoot":"","sources":["../../src/account-notifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,KAAK,EACR,eAAe,EACf,0BAA0B,EAC1B,gCAAgC,EAChC,gCAAgC,EAChC,8CAA8C,EAC9C,uBAAuB,EACvB,UAAU,EACV,iBAAiB,EACpB,MAAM,mBAAmB,CAAC;AAE3B,KAAK,mCAAmC,GAAG,QAAQ,CAAC;IAChD,UAAU,CAAC,EAAE,UAAU,CAAC;CAC3B,CAAC,CAAC;AAEH,MAAM,WAAW,uBAAwB,SAAQ,0BAA0B;IACvE;;;;;;OAMG;IACH,oBAAoB,CAChB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,mCAAmC,GACvC,QAAQ,CAAC;QACL,QAAQ,EAAE,QAAQ,CAAC;KACtB,CAAC,GACP,iBAAiB,CAAC,eAAe,GAAG,gCAAgC,CAAC,CAAC;IACzE,oBAAoB,CAChB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,mCAAmC,GACvC,QAAQ,CAAC;QACL,QAAQ,EAAE,aAAa,CAAC;KAC3B,CAAC,GACP,iBAAiB,CAAC,eAAe,GAAG,8CAA8C,CAAC,CAAC;IACvF,oBAAoB,CAChB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,mCAAmC,GACvC,QAAQ,CAAC;QACL,QAAQ,EAAE,YAAY,CAAC;KAC1B,CAAC,GACP,iBAAiB,CAAC,eAAe,GAAG,uBAAuB,CAAC,CAAC;IAChE,oBAAoB,CAChB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,mCAAmC,GACvC,QAAQ,CAAC;QACL,QAAQ,EAAE,QAAQ,CAAC;KACtB,CAAC,GACP,iBAAiB,CAAC,eAAe,GAAG,gCAAgC,CAAC,CAAC;IACzE,oBAAoB,CAChB,OAAO,EAAE,OAAO,EAChB,MAAM,CAAC,EAAE,mCAAmC,GAC7C,iBAAiB,CAAC,eAAe,GAAG,0BAA0B,CAAC,CAAC;CACtE"}
@@ -0,0 +1,237 @@
1
+ import type { RpcSubscriptionsApiMethods } from '@solana/rpc-subscriptions-spec';
2
+ import type { Base58EncodedBytes, Blockhash, Commitment, Reward, Slot, SolanaRpcResponse, TransactionForAccounts, TransactionForFullBase58, TransactionForFullBase64, TransactionForFullJson, TransactionForFullJsonParsed, U64UnsafeBeyond2Pow53Minus1, UnixTimestamp } from '@solana/rpc-types';
3
+ import type { TransactionVersion } from '@solana/transactions';
4
+ type BlockNotificationsNotificationBase = Readonly<{
5
+ /**
6
+ * Errors can arise in generating a block notification.
7
+ * If an error is encountered, this field will contain the error, and the `block` field will return null.
8
+ * @see https://github.com/solana-labs/solana/blob/6ea51280ddc235ed93e16906c3427efd20cd7ce4/rpc/src/rpc_subscriptions.rs#L1059-L1074
9
+ * @see https://github.com/solana-labs/solana/blob/6ea51280ddc235ed93e16906c3427efd20cd7ce4/rpc-client-api/src/response.rs#L507-L514
10
+ */
11
+ err: string | null;
12
+ slot: Slot;
13
+ }>;
14
+ type BlockNotificationsNotificationBlock = Readonly<{
15
+ /** The number of blocks beneath this block */
16
+ blockHeight: U64UnsafeBeyond2Pow53Minus1;
17
+ /** The number of blocks beneath this block */
18
+ blockTime: UnixTimestamp;
19
+ /** the blockhash of this block */
20
+ blockhash: Blockhash;
21
+ /** The slot index of this block's parent */
22
+ parentSlot: Slot;
23
+ /** The blockhash of this block's parent */
24
+ previousBlockhash: Blockhash;
25
+ }>;
26
+ type BlockNotificationsNotificationBlockWithRewards = Readonly<{
27
+ /** Block-level rewards */
28
+ rewards: readonly Reward[];
29
+ }>;
30
+ type BlockNotificationsNotificationBlockWithSignatures = Readonly<{
31
+ /** List of signatures applied to transactions in this block */
32
+ signatures: readonly Base58EncodedBytes[];
33
+ }>;
34
+ type BlockNotificationsNotificationBlockWithTransactions<TTransaction> = Readonly<{
35
+ transactions: readonly TTransaction[];
36
+ }>;
37
+ type BlockNotificationsFilter = 'all' | {
38
+ mentionsAccountOrProgram: string;
39
+ };
40
+ type BlockNotificationsCommonConfig = Readonly<{
41
+ /** @defaultValue finalized */
42
+ commitment?: Omit<Commitment, 'processed'>;
43
+ }>;
44
+ type BlockNotificationsEncoding = 'base58' | 'base64' | 'json' | 'jsonParsed';
45
+ type BlockNotificationsMaxSupportedTransactionVersion = Exclude<TransactionVersion, 'legacy'>;
46
+ export interface BlockNotificationsApi extends RpcSubscriptionsApiMethods {
47
+ /**
48
+ * Subscribe to receive notification anytime a new block is Confirmed or Finalized.
49
+ *
50
+ * Note: The `block` field is a block object as seen in the `getBlock` RPC HTTP method.
51
+ * @see https://docs.solana.com/api/http#getblock
52
+ */
53
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
54
+ encoding?: BlockNotificationsEncoding;
55
+ maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion;
56
+ showRewards: false;
57
+ transactionDetails: 'none';
58
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
59
+ block: BlockNotificationsNotificationBlock | null;
60
+ }>>;
61
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
62
+ encoding?: BlockNotificationsEncoding;
63
+ maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion;
64
+ showRewards?: true;
65
+ transactionDetails: 'none';
66
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
67
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithRewards) | null;
68
+ }>>;
69
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
70
+ encoding?: BlockNotificationsEncoding;
71
+ maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion;
72
+ showRewards: false;
73
+ transactionDetails: 'signatures';
74
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
75
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithSignatures) | null;
76
+ }>>;
77
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
78
+ encoding?: BlockNotificationsEncoding;
79
+ maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion;
80
+ showRewards?: true;
81
+ transactionDetails: 'signatures';
82
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
83
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithSignatures & BlockNotificationsNotificationBlockWithRewards) | null;
84
+ }>>;
85
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
86
+ encoding?: BlockNotificationsEncoding;
87
+ maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion;
88
+ showRewards: false;
89
+ transactionDetails: 'accounts';
90
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
91
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForAccounts<BlockNotificationsMaxSupportedTransactionVersion>>) | null;
92
+ }>>;
93
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
94
+ encoding?: BlockNotificationsEncoding;
95
+ showRewards: false;
96
+ transactionDetails: 'accounts';
97
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
98
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForAccounts<void>>) | null;
99
+ }>>;
100
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
101
+ encoding?: BlockNotificationsEncoding;
102
+ maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion;
103
+ showRewards?: true;
104
+ transactionDetails: 'accounts';
105
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
106
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForAccounts<BlockNotificationsMaxSupportedTransactionVersion>> & BlockNotificationsNotificationBlockWithRewards) | null;
107
+ }>>;
108
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
109
+ encoding?: BlockNotificationsEncoding;
110
+ showRewards?: true;
111
+ transactionDetails: 'accounts';
112
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
113
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForAccounts<void>> & BlockNotificationsNotificationBlockWithRewards) | null;
114
+ }>>;
115
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
116
+ encoding: 'base58';
117
+ maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion;
118
+ showRewards: false;
119
+ transactionDetails?: 'full';
120
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
121
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullBase58<BlockNotificationsMaxSupportedTransactionVersion>>) | null;
122
+ }>>;
123
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
124
+ encoding: 'base58';
125
+ showRewards: false;
126
+ transactionDetails?: 'full';
127
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
128
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullBase58<void>>) | null;
129
+ }>>;
130
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
131
+ encoding: 'base58';
132
+ maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion;
133
+ showRewards?: true;
134
+ transactionDetails?: 'full';
135
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
136
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullBase58<BlockNotificationsMaxSupportedTransactionVersion>> & BlockNotificationsNotificationBlockWithRewards) | null;
137
+ }>>;
138
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
139
+ encoding: 'base58';
140
+ showRewards?: true;
141
+ transactionDetails?: 'full';
142
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
143
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullBase58<void>> & BlockNotificationsNotificationBlockWithRewards) | null;
144
+ }>>;
145
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
146
+ encoding: 'base64';
147
+ maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion;
148
+ showRewards: false;
149
+ transactionDetails?: 'full';
150
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
151
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullBase64<BlockNotificationsMaxSupportedTransactionVersion>>) | null;
152
+ }>>;
153
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
154
+ encoding: 'base64';
155
+ showRewards: false;
156
+ transactionDetails?: 'full';
157
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
158
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullBase64<void>>) | null;
159
+ }>>;
160
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
161
+ encoding: 'base64';
162
+ maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion;
163
+ showRewards?: true;
164
+ transactionDetails?: 'full';
165
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
166
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullBase64<BlockNotificationsMaxSupportedTransactionVersion>> & BlockNotificationsNotificationBlockWithRewards) | null;
167
+ }>>;
168
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
169
+ encoding: 'base64';
170
+ showRewards?: true;
171
+ transactionDetails?: 'full';
172
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
173
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullBase64<void>> & BlockNotificationsNotificationBlockWithRewards) | null;
174
+ }>>;
175
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
176
+ encoding: 'jsonParsed';
177
+ maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion;
178
+ showRewards: false;
179
+ transactionDetails?: 'full';
180
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
181
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullJsonParsed<BlockNotificationsMaxSupportedTransactionVersion>>) | null;
182
+ }>>;
183
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
184
+ encoding: 'jsonParsed';
185
+ showRewards: false;
186
+ transactionDetails?: 'full';
187
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
188
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullJsonParsed<void>>) | null;
189
+ }>>;
190
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
191
+ encoding: 'jsonParsed';
192
+ maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion;
193
+ showRewards?: true;
194
+ transactionDetails?: 'full';
195
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
196
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullJsonParsed<BlockNotificationsMaxSupportedTransactionVersion>> & BlockNotificationsNotificationBlockWithRewards) | null;
197
+ }>>;
198
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
199
+ encoding: 'jsonParsed';
200
+ showRewards?: true;
201
+ transactionDetails?: 'full';
202
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
203
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullJsonParsed<void>> & BlockNotificationsNotificationBlockWithRewards) | null;
204
+ }>>;
205
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
206
+ encoding?: 'json';
207
+ maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion;
208
+ showRewards: false;
209
+ transactionDetails?: 'full';
210
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
211
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullJson<BlockNotificationsMaxSupportedTransactionVersion>>) | null;
212
+ }>>;
213
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
214
+ encoding?: 'json';
215
+ showRewards: false;
216
+ transactionDetails?: 'full';
217
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
218
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullJson<void>>) | null;
219
+ }>>;
220
+ blockNotifications(filter: BlockNotificationsFilter, config: BlockNotificationsCommonConfig & Readonly<{
221
+ encoding?: 'json';
222
+ maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion;
223
+ showRewards?: true;
224
+ transactionDetails?: 'full';
225
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
226
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullJson<BlockNotificationsMaxSupportedTransactionVersion>> & BlockNotificationsNotificationBlockWithRewards) | null;
227
+ }>>;
228
+ blockNotifications(filter: BlockNotificationsFilter, config?: BlockNotificationsCommonConfig & Readonly<{
229
+ encoding?: 'json';
230
+ showRewards?: true;
231
+ transactionDetails?: 'full';
232
+ }>): SolanaRpcResponse<BlockNotificationsNotificationBase & Readonly<{
233
+ block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithTransactions<TransactionForFullJson<void>> & BlockNotificationsNotificationBlockWithRewards) | null;
234
+ }>>;
235
+ }
236
+ export {};
237
+ //# sourceMappingURL=block-notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block-notifications.d.ts","sourceRoot":"","sources":["../../src/block-notifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,KAAK,EACR,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,MAAM,EACN,IAAI,EACJ,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,4BAA4B,EAC5B,2BAA2B,EAC3B,aAAa,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAI/D,KAAK,kCAAkC,GAAG,QAAQ,CA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KAAK,EACC,CAAC,mCAAmC,GAChC,mDAAmD,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC,CAAC,GACtF,IAAI,CAAC;KACd,CAAC,CACT,CAAC;IAEF,kBAAkB,CACd,MAAM,EAAE,wBAAwB,EAChC,MAAM,EAAE,8BAA8B,GAClC,QAAQ,CAAC;QACL,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,8BAA8B,EAAE,gDAAgD,CAAC;QACjF,WAAW,CAAC,EAAE,IAAI,CAAC;QACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC/B,CAAC,GACP,iBAAiB,CAChB,kCAAkC,GAC9B,QAAQ,CAAC;QACL,KAAK,EACC,CAAC,mCAAmC,GAChC,mDAAmD,CAC/C,sBAAsB,CAAC,gDAAgD,CAAC,CAC3E,GACD,8CAA8C,CAAC,GACnD,IAAI,CAAC;KACd,CAAC,CACT,CAAC;IAEF,kBAAkB,CACd,MAAM,EAAE,wBAAwB,EAChC,MAAM,CAAC,EAAE,8BAA8B,GACnC,QAAQ,CAAC;QACL,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,WAAW,CAAC,EAAE,IAAI,CAAC;QACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC/B,CAAC,GACP,iBAAiB,CAChB,kCAAkC,GAC9B,QAAQ,CAAC;QACL,KAAK,EACC,CAAC,mCAAmC,GAChC,mDAAmD,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC,GACjF,8CAA8C,CAAC,GACnD,IAAI,CAAC;KACd,CAAC,CACT,CAAC;CACL"}
@@ -0,0 +1,18 @@
1
+ import { RpcSubscriptionsApi, RpcSubscriptionsApiMethods } from '@solana/rpc-subscriptions-spec';
2
+ import { ParamsTransformerConfig } from '@solana/rpc-transformers';
3
+ import { AccountNotificationsApi } from './account-notifications.js';
4
+ import { BlockNotificationsApi } from './block-notifications.js';
5
+ import { LogsNotificationsApi } from './logs-notifications.js';
6
+ import { ProgramNotificationsApi } from './program-notifications.js';
7
+ import { RootNotificationsApi } from './root-notifications.js';
8
+ import { SignatureNotificationsApi } from './signature-notifications.js';
9
+ import { SlotNotificationsApi } from './slot-notifications.js';
10
+ import { SlotsUpdatesNotificationsApi } from './slots-updates-notifications.js';
11
+ import { VoteNotificationsApi } from './vote-notifications.js';
12
+ export type SolanaRpcSubscriptionsApi = AccountNotificationsApi & LogsNotificationsApi & ProgramNotificationsApi & RootNotificationsApi & SignatureNotificationsApi & SlotNotificationsApi;
13
+ export type SolanaRpcSubscriptionsApiUnstable = BlockNotificationsApi & SlotsUpdatesNotificationsApi & VoteNotificationsApi;
14
+ export type { AccountNotificationsApi, BlockNotificationsApi, LogsNotificationsApi, ProgramNotificationsApi, RootNotificationsApi, SignatureNotificationsApi, SlotNotificationsApi, SlotsUpdatesNotificationsApi, VoteNotificationsApi, };
15
+ type Config = ParamsTransformerConfig;
16
+ export declare function createSolanaRpcSubscriptionsApi<TApi extends RpcSubscriptionsApiMethods = SolanaRpcSubscriptionsApi>(config?: Config): RpcSubscriptionsApi<TApi>;
17
+ export declare function createSolanaRpcSubscriptionsApi_UNSTABLE(config?: Config): RpcSubscriptionsApi<AccountNotificationsApi & LogsNotificationsApi & ProgramNotificationsApi & RootNotificationsApi & SignatureNotificationsApi & SlotNotificationsApi & BlockNotificationsApi & SlotsUpdatesNotificationsApi & VoteNotificationsApi>;
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,mBAAmB,EACnB,0BAA0B,EAC7B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAMH,uBAAuB,EAC1B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,MAAM,yBAAyB,GAAG,uBAAuB,GAC3D,oBAAoB,GACpB,uBAAuB,GACvB,oBAAoB,GACpB,yBAAyB,GACzB,oBAAoB,CAAC;AACzB,MAAM,MAAM,iCAAiC,GAAG,qBAAqB,GAAG,4BAA4B,GAAG,oBAAoB,CAAC;AAE5H,YAAY,EACR,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EACzB,oBAAoB,EACpB,4BAA4B,EAC5B,oBAAoB,GACvB,CAAC;AAEF,KAAK,MAAM,GAAG,uBAAuB,CAAC;AAiBtC,wBAAgB,+BAA+B,CAAC,IAAI,SAAS,0BAA0B,GAAG,yBAAyB,EAC/G,MAAM,CAAC,EAAE,MAAM,GAChB,mBAAmB,CAAC,IAAI,CAAC,CAE3B;AAED,wBAAgB,wCAAwC,CAAC,MAAM,CAAC,EAAE,MAAM,yPAIvE"}
@@ -0,0 +1,25 @@
1
+ import type { Address } from '@solana/addresses';
2
+ import type { Signature } from '@solana/keys';
3
+ import type { RpcSubscriptionsApiMethods } from '@solana/rpc-subscriptions-spec';
4
+ import type { Commitment, SolanaRpcResponse, TransactionError } from '@solana/rpc-types';
5
+ type LogsNotificationsApiNotification = SolanaRpcResponse<Readonly<{
6
+ err: TransactionError | null;
7
+ logs: readonly string[] | null;
8
+ signature: Signature;
9
+ }>>;
10
+ type LogsNotificationsApiFilter = 'all' | 'allWithVotes' | {
11
+ mentions: [Address];
12
+ };
13
+ type LogsNotificationsApiConfig = Readonly<{
14
+ commitment?: Commitment;
15
+ }>;
16
+ export interface LogsNotificationsApi extends RpcSubscriptionsApiMethods {
17
+ /**
18
+ * Subscribe to a transaction logs to receive notification when a given transaction is committed.
19
+ * On `logsNotification` - the subscription is automatically cancelled.
20
+ * The logs must be a txid, the first logs of a transaction.
21
+ */
22
+ logsNotifications(filter: LogsNotificationsApiFilter, config?: LogsNotificationsApiConfig): LogsNotificationsApiNotification;
23
+ }
24
+ export {};
25
+ //# sourceMappingURL=logs-notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs-notifications.d.ts","sourceRoot":"","sources":["../../src/logs-notifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEzF,KAAK,gCAAgC,GAAG,iBAAiB,CACrD,QAAQ,CAAC;IAEL,GAAG,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAI7B,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;IAE/B,SAAS,EAAE,SAAS,CAAC;CACxB,CAAC,CACL,CAAC;AAIF,KAAK,0BAA0B,GAAG,KAAK,GAAG,cAAc,GAAG;IAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAA;CAAE,CAAC;AAEnF,KAAK,0BAA0B,GAAG,QAAQ,CAAC;IACvC,UAAU,CAAC,EAAE,UAAU,CAAC;CAC3B,CAAC,CAAC;AAEH,MAAM,WAAW,oBAAqB,SAAQ,0BAA0B;IACpE;;;;OAIG;IACH,iBAAiB,CACb,MAAM,EAAE,0BAA0B,EAClC,MAAM,CAAC,EAAE,0BAA0B,GACpC,gCAAgC,CAAC;CACvC"}
@@ -0,0 +1,45 @@
1
+ import type { Address } from '@solana/addresses';
2
+ import type { RpcSubscriptionsApiMethods } from '@solana/rpc-subscriptions-spec';
3
+ import type { AccountInfoBase, AccountInfoWithBase58Bytes, AccountInfoWithBase58EncodedData, AccountInfoWithBase64EncodedData, AccountInfoWithBase64EncodedZStdCompressedData, AccountInfoWithJsonData, Base58EncodedBytes, Base64EncodedBytes, Commitment, SolanaRpcResponse, U64UnsafeBeyond2Pow53Minus1 } from '@solana/rpc-types';
4
+ type ProgramNotificationsMemcmpFilterBase58 = Readonly<{
5
+ offset: U64UnsafeBeyond2Pow53Minus1;
6
+ bytes: Base58EncodedBytes;
7
+ encoding: 'base58';
8
+ }>;
9
+ type ProgramNotificationsMemcmpFilterBase64 = Readonly<{
10
+ offset: U64UnsafeBeyond2Pow53Minus1;
11
+ bytes: Base64EncodedBytes;
12
+ encoding: 'base64';
13
+ }>;
14
+ type ProgramNotificationsDatasizeFilter = Readonly<{
15
+ dataSize: U64UnsafeBeyond2Pow53Minus1;
16
+ }>;
17
+ type ProgramNotificationsApiNotificationBase<TData> = SolanaRpcResponse<Readonly<{
18
+ pubkey: Address;
19
+ account: AccountInfoBase & TData;
20
+ }>>;
21
+ type ProgramNotificationsApiCommonConfig = Readonly<{
22
+ commitment?: Commitment;
23
+ filters?: readonly (ProgramNotificationsMemcmpFilterBase58 | ProgramNotificationsMemcmpFilterBase64 | ProgramNotificationsDatasizeFilter)[];
24
+ }>;
25
+ export interface ProgramNotificationsApi extends RpcSubscriptionsApiMethods {
26
+ /**
27
+ * Subscribe to a program to receive notifications when the lamports or data for an account
28
+ * owned by the given program changes
29
+ */
30
+ programNotifications(programId: Address, config: ProgramNotificationsApiCommonConfig & Readonly<{
31
+ encoding: 'base64';
32
+ }>): ProgramNotificationsApiNotificationBase<AccountInfoWithBase64EncodedData>;
33
+ programNotifications(programId: Address, config: ProgramNotificationsApiCommonConfig & Readonly<{
34
+ encoding: 'base64+zstd';
35
+ }>): ProgramNotificationsApiNotificationBase<AccountInfoWithBase64EncodedZStdCompressedData>;
36
+ programNotifications(programId: Address, config: ProgramNotificationsApiCommonConfig & Readonly<{
37
+ encoding: 'jsonParsed';
38
+ }>): ProgramNotificationsApiNotificationBase<AccountInfoWithJsonData>;
39
+ programNotifications(programId: Address, config: ProgramNotificationsApiCommonConfig & Readonly<{
40
+ encoding: 'base58';
41
+ }>): ProgramNotificationsApiNotificationBase<AccountInfoWithBase58EncodedData>;
42
+ programNotifications(programId: Address, config?: ProgramNotificationsApiCommonConfig): ProgramNotificationsApiNotificationBase<AccountInfoWithBase58Bytes>;
43
+ }
44
+ export {};
45
+ //# sourceMappingURL=program-notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"program-notifications.d.ts","sourceRoot":"","sources":["../../src/program-notifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,KAAK,EACR,eAAe,EACf,0BAA0B,EAC1B,gCAAgC,EAChC,gCAAgC,EAChC,8CAA8C,EAC9C,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,iBAAiB,EACjB,2BAA2B,EAC9B,MAAM,mBAAmB,CAAC;AAE3B,KAAK,sCAAsC,GAAG,QAAQ,CAAC;IACnD,MAAM,EAAE,2BAA2B,CAAC;IACpC,KAAK,EAAE,kBAAkB,CAAC;IAC1B,QAAQ,EAAE,QAAQ,CAAC;CACtB,CAAC,CAAC;AAEH,KAAK,sCAAsC,GAAG,QAAQ,CAAC;IACnD,MAAM,EAAE,2BAA2B,CAAC;IACpC,KAAK,EAAE,kBAAkB,CAAC;IAC1B,QAAQ,EAAE,QAAQ,CAAC;CACtB,CAAC,CAAC;AAEH,KAAK,kCAAk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CAAC,0BAA0B,CAAC,CAAC;CAC1E"}
@@ -0,0 +1,11 @@
1
+ import type { RpcSubscriptionsApiMethods } from '@solana/rpc-subscriptions-spec';
2
+ import type { Slot } from '@solana/rpc-types';
3
+ type RootNotificationsApiNotification = Slot;
4
+ export interface RootNotificationsApi extends RpcSubscriptionsApiMethods {
5
+ /**
6
+ * Subscribe to receive notification anytime a new root is set by the validator
7
+ */
8
+ rootNotifications(NO_CONFIG?: Record<string, never>): RootNotificationsApiNotification;
9
+ }
10
+ export {};
11
+ //# sourceMappingURL=root-notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root-notifications.d.ts","sourceRoot":"","sources":["../../src/root-notifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE9C,KAAK,gCAAgC,GAAG,IAAI,CAAC;AAE7C,MAAM,WAAW,oBAAqB,SAAQ,0BAA0B;IACpE;;OAEG;IACH,iBAAiB,CAEb,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAClC,gCAAgC,CAAC;CACvC"}
@@ -0,0 +1,25 @@
1
+ import type { Signature } from '@solana/keys';
2
+ import type { RpcSubscriptionsApiMethods } from '@solana/rpc-subscriptions-spec';
3
+ import type { Commitment, SolanaRpcResponse, TransactionError } from '@solana/rpc-types';
4
+ type SignatureNotificationsApiNotificationReceived = SolanaRpcResponse<Readonly<string>>;
5
+ type SignatureNotificationsApiNotificationProcessed = SolanaRpcResponse<Readonly<{
6
+ err: TransactionError | null;
7
+ }>>;
8
+ type SignatureNotificationsApiConfigBase = Readonly<{
9
+ commitment?: Commitment;
10
+ }>;
11
+ export interface SignatureNotificationsApi extends RpcSubscriptionsApiMethods {
12
+ /**
13
+ * Subscribe to a transaction signature to receive notification when a given transaction is committed.
14
+ * On `signatureNotification` - the subscription is automatically cancelled.
15
+ * The signature must be a txid, the first signature of a transaction.
16
+ */
17
+ signatureNotifications(signature: Signature, config: SignatureNotificationsApiConfigBase & Readonly<{
18
+ enableReceivedNotification: true;
19
+ }>): SignatureNotificationsApiNotificationReceived | SignatureNotificationsApiNotificationProcessed;
20
+ signatureNotifications(signature: Signature, config?: SignatureNotificationsApiConfigBase & Readonly<{
21
+ enableReceivedNotification?: false;
22
+ }>): SignatureNotificationsApiNotificationProcessed;
23
+ }
24
+ export {};
25
+ //# sourceMappingURL=signature-notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signature-notifications.d.ts","sourceRoot":"","sources":["../../src/signature-notifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEzF,KAAK,6CAA6C,GAAG,iBAAiB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;AAEzF,KAAK,8CAA8C,GAAG,iBAAiB,CACnE,QAAQ,CAAC;IAEL,GAAG,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAChC,CAAC,CACL,CAAC;AAEF,KAAK,mCAAmC,GAAG,QAAQ,CAAC;IAChD,UAAU,CAAC,EAAE,UAAU,CAAC;CAC3B,CAAC,CAAC;AAEH,MAAM,WAAW,yBAA0B,SAAQ,0BAA0B;IACzE;;;;OAIG;IACH,sBAAsB,CAElB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,mCAAmC,GACvC,QAAQ,CAAC;QAGL,0BAA0B,EAAE,IAAI,CAAC;KACpC,CAAC,GACP,6CAA6C,GAAG,8CAA8C,CAAC;IAClG,sBAAsB,CAClB,SAAS,EAAE,SAAS,EACpB,MAAM,CAAC,EAAE,mCAAmC,GACxC,QAAQ,CAAC;QACL,0BAA0B,CAAC,EAAE,KAAK,CAAC;KACtC,CAAC,GACP,8CAA8C,CAAC;CACrD"}
@@ -0,0 +1,15 @@
1
+ import type { RpcSubscriptionsApiMethods } from '@solana/rpc-subscriptions-spec';
2
+ import type { Slot } from '@solana/rpc-types';
3
+ type SlotNotificationsApiNotification = Readonly<{
4
+ parent: Slot;
5
+ root: Slot;
6
+ slot: Slot;
7
+ }>;
8
+ export interface SlotNotificationsApi extends RpcSubscriptionsApiMethods {
9
+ /**
10
+ * Subscribe to receive notification anytime a slot is processed by the validator
11
+ */
12
+ slotNotifications(NO_CONFIG?: Record<string, never>): SlotNotificationsApiNotification;
13
+ }
14
+ export {};
15
+ //# sourceMappingURL=slot-notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slot-notifications.d.ts","sourceRoot":"","sources":["../../src/slot-notifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE9C,KAAK,gCAAgC,GAAG,QAAQ,CAAC;IAC7C,MAAM,EAAE,IAAI,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,IAAI,CAAC;CACd,CAAC,CAAC;AAEH,MAAM,WAAW,oBAAqB,SAAQ,0BAA0B;IACpE;;OAEG;IACH,iBAAiB,CAEb,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAClC,gCAAgC,CAAC;CACvC"}
@@ -0,0 +1,33 @@
1
+ import type { RpcSubscriptionsApiMethods } from '@solana/rpc-subscriptions-spec';
2
+ import type { Slot, U64UnsafeBeyond2Pow53Minus1 } from '@solana/rpc-types';
3
+ type SlotsUpdatesNotificationsApiNotificationBase = Readonly<{
4
+ slot: Slot;
5
+ timestamp: U64UnsafeBeyond2Pow53Minus1;
6
+ type: 'completed' | 'firstShredReceived' | 'optimisticConfirmation' | 'root';
7
+ }>;
8
+ type SlotsUpdatesNotificationsApiNotificationCreatedBank = SlotsUpdatesNotificationsApiNotificationBase & Readonly<{
9
+ parent: Slot;
10
+ type: 'createdBank';
11
+ }>;
12
+ type SlotsUpdatesNotificationsApiNotificationDead = SlotsUpdatesNotificationsApiNotificationBase & Readonly<{
13
+ err: string;
14
+ type: 'dead';
15
+ }>;
16
+ type SlotsUpdatesNotificationsApiNotificationFrozen = SlotsUpdatesNotificationsApiNotificationBase & Readonly<{
17
+ stats: Readonly<{
18
+ maxTransactionsPerEntry: U64UnsafeBeyond2Pow53Minus1;
19
+ numFailedTransactions: U64UnsafeBeyond2Pow53Minus1;
20
+ numSuccessfulTransactions: U64UnsafeBeyond2Pow53Minus1;
21
+ numTransactionEntries: U64UnsafeBeyond2Pow53Minus1;
22
+ }>;
23
+ type: 'frozen';
24
+ }>;
25
+ type SlotsUpdatesNotificationsApiNotification = SlotsUpdatesNotificationsApiNotificationBase | SlotsUpdatesNotificationsApiNotificationCreatedBank | SlotsUpdatesNotificationsApiNotificationDead | SlotsUpdatesNotificationsApiNotificationFrozen;
26
+ export interface SlotsUpdatesNotificationsApi extends RpcSubscriptionsApiMethods {
27
+ /**
28
+ * Subscribe to receive a notification from the validator on a variety of updates on every slot
29
+ */
30
+ slotsUpdatesNotifications(NO_CONFIG?: Record<string, never>): SlotsUpdatesNotificationsApiNotification;
31
+ }
32
+ export {};
33
+ //# sourceMappingURL=slots-updates-notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slots-updates-notifications.d.ts","sourceRoot":"","sources":["../../src/slots-updates-notifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,KAAK,EAAE,IAAI,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAE3E,KAAK,4CAA4C,GAAG,QAAQ,CAAC;IACzD,IAAI,EAAE,IAAI,CAAC;IACX,SAAS,EAAE,2BAA2B,CAAC;IACvC,IAAI,EAAE,WAAW,GAAG,oBAAoB,GAAG,wBAAwB,GAAG,MAAM,CAAC;CAChF,CAAC,CAAC;AAEH,KAAK,mDAAmD,GAAG,4CAA4C,GACnG,QAAQ,CAAC;IACL,MAAM,EAAE,IAAI,CAAC;IACb,IAAI,EAAE,aAAa,CAAC;CACvB,CAAC,CAAC;AAEP,KAAK,4CAA4C,GAAG,4CAA4C,GAC5F,QAAQ,CAAC;IACL,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC;AAEP,KAAK,8CAA8C,GAAG,4CAA4C,GAC9F,QAAQ,CAAC;IACL,KAAK,EAAE,QAAQ,CAAC;QACZ,uBAAuB,EAAE,2BAA2B,CAAC;QACrD,qBAAqB,EAAE,2BAA2B,CAAC;QACnD,yBAAyB,EAAE,2BAA2B,CAAC;QACvD,qBAAqB,EAAE,2BAA2B,CAAC;KACtD,CAAC,CAAC;IACH,IAAI,EAAE,QAAQ,CAAC;CAClB,CAAC,CAAC;AAEP,KAAK,wCAAwC,GACvC,4CAA4C,GAC5C,mDAAmD,GACnD,4CAA4C,GAC5C,8CAA8C,CAAC;AAErD,MAAM,WAAW,4BAA6B,SAAQ,0BAA0B;IAC5E;;OAEG;IACH,yBAAyB,CAErB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAClC,wCAAwC,CAAC;CAC/C"}
@@ -0,0 +1,19 @@
1
+ import type { Address } from '@solana/addresses';
2
+ import type { Signature } from '@solana/keys';
3
+ import type { RpcSubscriptionsApiMethods } from '@solana/rpc-subscriptions-spec';
4
+ import type { Blockhash, Slot, UnixTimestamp } from '@solana/rpc-types';
5
+ type VoteNotificationsApiNotification = Readonly<{
6
+ hash: Blockhash;
7
+ signature: Signature;
8
+ slots: readonly Slot[];
9
+ timestamp: UnixTimestamp | null;
10
+ votePubkey: Address;
11
+ }>;
12
+ export interface VoteNotificationsApi extends RpcSubscriptionsApiMethods {
13
+ /**
14
+ * Subscribe to receive a notification from the validator on a variety of updates on every slot
15
+ */
16
+ voteNotifications(NO_CONFIG?: Record<string, never>): VoteNotificationsApiNotification;
17
+ }
18
+ export {};
19
+ //# sourceMappingURL=vote-notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vote-notifications.d.ts","sourceRoot":"","sources":["../../src/vote-notifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAExE,KAAK,gCAAgC,GAAG,QAAQ,CAAC;IAC7C,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IACvB,SAAS,EAAE,aAAa,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;CACvB,CAAC,CAAC;AAEH,MAAM,WAAW,oBAAqB,SAAQ,0BAA0B;IACpE;;OAEG;IACH,iBAAiB,CAEb,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAClC,gCAAgC,CAAC;CACvC"}