@solana/rpc-subscriptions-api 6.3.1 → 6.3.2-canary-20260313112147
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/package.json +10 -9
- package/src/account-notifications.ts +128 -0
- package/src/block-notifications.ts +916 -0
- package/src/index.ts +261 -0
- package/src/logs-notifications.ts +62 -0
- package/src/program-notifications.ts +145 -0
- package/src/root-notifications.ts +13 -0
- package/src/signature-notifications.ts +74 -0
- package/src/slot-notifications.ts +19 -0
- package/src/slots-updates-notifications.ts +51 -0
- package/src/vote-notifications.ts +32 -0
|
@@ -0,0 +1,916 @@
|
|
|
1
|
+
import { Address } from '@solana/addresses';
|
|
2
|
+
import type {
|
|
3
|
+
Base58EncodedBytes,
|
|
4
|
+
Blockhash,
|
|
5
|
+
Commitment,
|
|
6
|
+
Reward,
|
|
7
|
+
Slot,
|
|
8
|
+
SolanaRpcResponse,
|
|
9
|
+
TransactionForAccounts,
|
|
10
|
+
TransactionForFullBase58,
|
|
11
|
+
TransactionForFullBase64,
|
|
12
|
+
TransactionForFullJson,
|
|
13
|
+
TransactionForFullJsonParsed,
|
|
14
|
+
UnixTimestamp,
|
|
15
|
+
} from '@solana/rpc-types';
|
|
16
|
+
import type { TransactionVersion } from '@solana/transaction-messages';
|
|
17
|
+
|
|
18
|
+
// Subscription notification types
|
|
19
|
+
|
|
20
|
+
type BlockNotificationsNotificationBase = Readonly<{
|
|
21
|
+
/**
|
|
22
|
+
* Errors can arise in generating a block notification.
|
|
23
|
+
* If an error is encountered, this field will contain the error, and the `block` field will return null.
|
|
24
|
+
* @see https://github.com/anza-xyz/agave/blob/6ea51280ddc235ed93e16906c3427efd20cd7ce4/rpc/src/rpc_subscriptions.rs#L1059-L1074
|
|
25
|
+
* @see https://github.com/anza-xyz/agave/blob/6ea51280ddc235ed93e16906c3427efd20cd7ce4/rpc-client-api/src/response.rs#L507-L514
|
|
26
|
+
*/
|
|
27
|
+
err: string | null;
|
|
28
|
+
slot: Slot;
|
|
29
|
+
}>;
|
|
30
|
+
|
|
31
|
+
type BlockNotificationsNotificationBlock = Readonly<{
|
|
32
|
+
/** The number of blocks beneath this block */
|
|
33
|
+
blockHeight: bigint;
|
|
34
|
+
/** Estimated production time, as Unix timestamp */
|
|
35
|
+
blockTime: UnixTimestamp;
|
|
36
|
+
/** the blockhash of this block */
|
|
37
|
+
blockhash: Blockhash;
|
|
38
|
+
/** The slot index of this block's parent */
|
|
39
|
+
parentSlot: Slot;
|
|
40
|
+
/** The blockhash of this block's parent */
|
|
41
|
+
previousBlockhash: Blockhash;
|
|
42
|
+
}>;
|
|
43
|
+
|
|
44
|
+
type BlockNotificationsNotificationBlockWithRewards = Readonly<{
|
|
45
|
+
/** Block-level rewards */
|
|
46
|
+
rewards: readonly Reward[];
|
|
47
|
+
}>;
|
|
48
|
+
|
|
49
|
+
type BlockNotificationsNotificationBlockWithSignatures = Readonly<{
|
|
50
|
+
/** List of signatures applied to transactions in this block */
|
|
51
|
+
signatures: readonly Base58EncodedBytes[];
|
|
52
|
+
}>;
|
|
53
|
+
|
|
54
|
+
type BlockNotificationsNotificationBlockWithTransactions<TTransaction> = Readonly<{
|
|
55
|
+
transactions: readonly TTransaction[];
|
|
56
|
+
}>;
|
|
57
|
+
|
|
58
|
+
// Subscription parameter types
|
|
59
|
+
|
|
60
|
+
type BlockNotificationsFilter =
|
|
61
|
+
| 'all'
|
|
62
|
+
| {
|
|
63
|
+
/**
|
|
64
|
+
* This filter matches when a transaction mentions the provided address. If no transaction
|
|
65
|
+
* mentions this address in a given block, then no notification will be sent for that
|
|
66
|
+
* block.
|
|
67
|
+
*/
|
|
68
|
+
mentionsAccountOrProgram: Address;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
type BlockNotificationsCommonConfig = Readonly<{
|
|
72
|
+
/**
|
|
73
|
+
* Get notified when a new block has reached this level of commitment.
|
|
74
|
+
*
|
|
75
|
+
* @defaultValue Whichever default is applied by the underlying {@link RpcSubscriptionsApi} in
|
|
76
|
+
* use. For example, when using an API created by a `createSolanaRpcSubscriptions*()` helper,
|
|
77
|
+
* the default commitment is `"confirmed"` unless configured otherwise. Unmitigated by an API
|
|
78
|
+
* layer on the client, the default commitment applied by the server is `"finalized"`.
|
|
79
|
+
*/
|
|
80
|
+
commitment?: Omit<Commitment, 'processed'>;
|
|
81
|
+
/**
|
|
82
|
+
* Determines how the transaction property should be encoded in the response.
|
|
83
|
+
*
|
|
84
|
+
* - `'base58'` produces a tuple whose first element is the wire transaction as a base58-encoded
|
|
85
|
+
* string.
|
|
86
|
+
* - `'base64'` produces a tuple whose first element is the wire transaction as a base64-encoded
|
|
87
|
+
* string.
|
|
88
|
+
* - `'json'` produces an object with `message` and `signatures` properties. The `instructions`
|
|
89
|
+
* property of the message is an array of instructions, each an object containing the indices
|
|
90
|
+
* of the instruction's accounts, the instruction data, the index of the program address, and
|
|
91
|
+
* optionally the stack height if it is an inner instruction.
|
|
92
|
+
* - `'jsonParsed'` produces an object with `message` and `signatures` properties. This property
|
|
93
|
+
* will cause the server to attempt to process each instruction using a parser specific to its
|
|
94
|
+
* program. If successful, the parsed instruction will be returned in the response as JSON.
|
|
95
|
+
* Otherwise, each instruction will be returned according to the rules of `'json'` encoding.
|
|
96
|
+
*
|
|
97
|
+
* @defaultValue "json"
|
|
98
|
+
*/
|
|
99
|
+
encoding?: BlockNotificationsEncoding;
|
|
100
|
+
/**
|
|
101
|
+
* The newest transaction version that the caller wants to receive in the response. This
|
|
102
|
+
* argument has no effect unless the {@link GetBlockCommonConfig.transactionDetails | transactionDetails}
|
|
103
|
+
* argument is set to `'accounts'` or `'full'`.
|
|
104
|
+
*
|
|
105
|
+
* When not supplied, only legacy (unversioned) transactions will be returned, and no `version`
|
|
106
|
+
* property will be returned in the response.
|
|
107
|
+
*
|
|
108
|
+
* If a block contains any transaction at a version higher than this, the server will throw
|
|
109
|
+
* {@link SolanaErrorCode.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION | SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION}.
|
|
110
|
+
*/
|
|
111
|
+
maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion;
|
|
112
|
+
/**
|
|
113
|
+
* Set this to `false` to omit block rewards from the response. These typically only
|
|
114
|
+
* materialize on the first block of an epoch.
|
|
115
|
+
* @defaultValue true
|
|
116
|
+
*/
|
|
117
|
+
rewards?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* The level of transaction detail to include in the response.
|
|
120
|
+
*
|
|
121
|
+
* - `'accounts'` includes signatures, an annotated list of accounts, and some transaction
|
|
122
|
+
* metadata.
|
|
123
|
+
* - `'full'` includes the entire transaction message and its signatures.
|
|
124
|
+
* - `'none'` excludes transaction details completely.
|
|
125
|
+
* - `'signatures'` includes transaction signatures only.
|
|
126
|
+
*
|
|
127
|
+
* @defaultValue "full"
|
|
128
|
+
*/
|
|
129
|
+
transactionDetails?: BlockNotificationTransactionDetailsMode;
|
|
130
|
+
}>;
|
|
131
|
+
|
|
132
|
+
type BlockNotificationsEncoding = 'base58' | 'base64' | 'json' | 'jsonParsed';
|
|
133
|
+
type BlockNotificationTransactionDetailsMode = 'accounts' | 'full' | 'none' | 'signatures';
|
|
134
|
+
|
|
135
|
+
type BlockNotificationsMaxSupportedTransactionVersion = Exclude<TransactionVersion, 'legacy'>;
|
|
136
|
+
|
|
137
|
+
export type BlockNotificationsApi = {
|
|
138
|
+
/**
|
|
139
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
140
|
+
* commitment.
|
|
141
|
+
*
|
|
142
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
143
|
+
* method.
|
|
144
|
+
*
|
|
145
|
+
* @param filter Notifications will only be produced for blocks that match this filter.
|
|
146
|
+
*
|
|
147
|
+
* {@label transactions-none--rewards-none}
|
|
148
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
149
|
+
*/
|
|
150
|
+
blockNotifications(
|
|
151
|
+
filter: BlockNotificationsFilter,
|
|
152
|
+
// transactionDetails=none, rewards=false, encoding + maxSupportedTransactionVersion irrelevant
|
|
153
|
+
config: BlockNotificationsCommonConfig &
|
|
154
|
+
Readonly<{
|
|
155
|
+
encoding?: BlockNotificationsEncoding;
|
|
156
|
+
maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion;
|
|
157
|
+
showRewards: false;
|
|
158
|
+
transactionDetails: 'none';
|
|
159
|
+
}>,
|
|
160
|
+
): SolanaRpcResponse<
|
|
161
|
+
BlockNotificationsNotificationBase &
|
|
162
|
+
Readonly<{
|
|
163
|
+
block: BlockNotificationsNotificationBlock | null;
|
|
164
|
+
}>
|
|
165
|
+
>;
|
|
166
|
+
/**
|
|
167
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
168
|
+
* commitment.
|
|
169
|
+
*
|
|
170
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
171
|
+
* method.
|
|
172
|
+
*
|
|
173
|
+
* @param filter Notifications will only be produced for blocks that match this filter.
|
|
174
|
+
*
|
|
175
|
+
* {@label transactions-none--rewards-included}
|
|
176
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
177
|
+
*/
|
|
178
|
+
blockNotifications(
|
|
179
|
+
filter: BlockNotificationsFilter,
|
|
180
|
+
// transactionDetails=none, rewards=missing/true, encoding + maxSupportedTransactionVersion irrelevant
|
|
181
|
+
config: BlockNotificationsCommonConfig &
|
|
182
|
+
Readonly<{
|
|
183
|
+
encoding?: BlockNotificationsEncoding;
|
|
184
|
+
maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion;
|
|
185
|
+
showRewards?: true;
|
|
186
|
+
transactionDetails: 'none';
|
|
187
|
+
}>,
|
|
188
|
+
): SolanaRpcResponse<
|
|
189
|
+
BlockNotificationsNotificationBase &
|
|
190
|
+
Readonly<{
|
|
191
|
+
block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithRewards) | null;
|
|
192
|
+
}>
|
|
193
|
+
>;
|
|
194
|
+
/**
|
|
195
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
196
|
+
* commitment.
|
|
197
|
+
*
|
|
198
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
199
|
+
* method.
|
|
200
|
+
*
|
|
201
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
202
|
+
* signatures of transactions that match this filter will be included in the block.
|
|
203
|
+
*
|
|
204
|
+
* {@label transactions-signatures--rewards-none}
|
|
205
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
206
|
+
*/
|
|
207
|
+
blockNotifications(
|
|
208
|
+
filter: BlockNotificationsFilter,
|
|
209
|
+
// transactionDetails=signatures, rewards=false, encoding + maxSupportedTransactionVersion irrelevant
|
|
210
|
+
config: BlockNotificationsCommonConfig &
|
|
211
|
+
Readonly<{
|
|
212
|
+
encoding?: BlockNotificationsEncoding;
|
|
213
|
+
maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion;
|
|
214
|
+
showRewards: false;
|
|
215
|
+
transactionDetails: 'signatures';
|
|
216
|
+
}>,
|
|
217
|
+
): SolanaRpcResponse<
|
|
218
|
+
BlockNotificationsNotificationBase &
|
|
219
|
+
Readonly<{
|
|
220
|
+
block: (BlockNotificationsNotificationBlock & BlockNotificationsNotificationBlockWithSignatures) | null;
|
|
221
|
+
}>
|
|
222
|
+
>;
|
|
223
|
+
/**
|
|
224
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
225
|
+
* commitment.
|
|
226
|
+
*
|
|
227
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
228
|
+
* method.
|
|
229
|
+
*
|
|
230
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
231
|
+
* signatures of transactions that match this filter will be included in the block.
|
|
232
|
+
*
|
|
233
|
+
* {@label transactions-signatures--rewards-included}
|
|
234
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
235
|
+
*/
|
|
236
|
+
blockNotifications(
|
|
237
|
+
filter: BlockNotificationsFilter,
|
|
238
|
+
// transactionDetails=signatures, rewards=missing/true, encoding + maxSupportedTransactionVersion irrelevant
|
|
239
|
+
config: BlockNotificationsCommonConfig &
|
|
240
|
+
Readonly<{
|
|
241
|
+
encoding?: BlockNotificationsEncoding;
|
|
242
|
+
maxSupportedTransactionVersion?: BlockNotificationsMaxSupportedTransactionVersion;
|
|
243
|
+
showRewards?: true;
|
|
244
|
+
transactionDetails: 'signatures';
|
|
245
|
+
}>,
|
|
246
|
+
): SolanaRpcResponse<
|
|
247
|
+
BlockNotificationsNotificationBase &
|
|
248
|
+
Readonly<{
|
|
249
|
+
block:
|
|
250
|
+
| (BlockNotificationsNotificationBlock &
|
|
251
|
+
BlockNotificationsNotificationBlockWithRewards &
|
|
252
|
+
BlockNotificationsNotificationBlockWithSignatures)
|
|
253
|
+
| null;
|
|
254
|
+
}>
|
|
255
|
+
>;
|
|
256
|
+
/**
|
|
257
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
258
|
+
* commitment.
|
|
259
|
+
*
|
|
260
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
261
|
+
* method.
|
|
262
|
+
*
|
|
263
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
264
|
+
* transactions that match this filter will be included in the block.
|
|
265
|
+
*
|
|
266
|
+
* {@label transactions-accounts--rewards-none--version-specified}
|
|
267
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
268
|
+
*/
|
|
269
|
+
blockNotifications(
|
|
270
|
+
filter: BlockNotificationsFilter,
|
|
271
|
+
// transactionDetails=accounts, rewards=false, maxSupportedTransactionVersion=0, encoding irrelevant
|
|
272
|
+
config: BlockNotificationsCommonConfig &
|
|
273
|
+
Readonly<{
|
|
274
|
+
encoding?: BlockNotificationsEncoding;
|
|
275
|
+
maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion;
|
|
276
|
+
showRewards: false;
|
|
277
|
+
transactionDetails: 'accounts';
|
|
278
|
+
}>,
|
|
279
|
+
): SolanaRpcResponse<
|
|
280
|
+
BlockNotificationsNotificationBase &
|
|
281
|
+
Readonly<{
|
|
282
|
+
block:
|
|
283
|
+
| (BlockNotificationsNotificationBlock &
|
|
284
|
+
BlockNotificationsNotificationBlockWithTransactions<
|
|
285
|
+
TransactionForAccounts<BlockNotificationsMaxSupportedTransactionVersion>
|
|
286
|
+
>)
|
|
287
|
+
| null;
|
|
288
|
+
}>
|
|
289
|
+
>;
|
|
290
|
+
/**
|
|
291
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
292
|
+
* commitment.
|
|
293
|
+
*
|
|
294
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
295
|
+
* method.
|
|
296
|
+
*
|
|
297
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
298
|
+
* transactions that match this filter will be included in the block.
|
|
299
|
+
*
|
|
300
|
+
* {@label transactions-accounts--rewards-none--version-legacy}
|
|
301
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
302
|
+
*/
|
|
303
|
+
blockNotifications(
|
|
304
|
+
filter: BlockNotificationsFilter,
|
|
305
|
+
// transactionDetails=accounts, rewards=false, maxSupportedTransactionVersion=missing, encoding irrelevant
|
|
306
|
+
config: BlockNotificationsCommonConfig &
|
|
307
|
+
Readonly<{
|
|
308
|
+
encoding?: BlockNotificationsEncoding;
|
|
309
|
+
showRewards: false;
|
|
310
|
+
transactionDetails: 'accounts';
|
|
311
|
+
}>,
|
|
312
|
+
): SolanaRpcResponse<
|
|
313
|
+
BlockNotificationsNotificationBase &
|
|
314
|
+
Readonly<{
|
|
315
|
+
block:
|
|
316
|
+
| (BlockNotificationsNotificationBlock &
|
|
317
|
+
BlockNotificationsNotificationBlockWithTransactions<TransactionForAccounts<void>>)
|
|
318
|
+
| null;
|
|
319
|
+
}>
|
|
320
|
+
>;
|
|
321
|
+
/**
|
|
322
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
323
|
+
* commitment.
|
|
324
|
+
*
|
|
325
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
326
|
+
* method.
|
|
327
|
+
*
|
|
328
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
329
|
+
* transactions that match this filter will be included in the block.
|
|
330
|
+
*
|
|
331
|
+
* {@label transactions-accounts--rewards-included--version-specified}
|
|
332
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
333
|
+
*/
|
|
334
|
+
blockNotifications(
|
|
335
|
+
filter: BlockNotificationsFilter,
|
|
336
|
+
// transactionDetails=accounts, rewards=missing/true, maxSupportedTransactionVersion=0, encoding irrelevant
|
|
337
|
+
config: BlockNotificationsCommonConfig &
|
|
338
|
+
Readonly<{
|
|
339
|
+
encoding?: BlockNotificationsEncoding;
|
|
340
|
+
maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion;
|
|
341
|
+
showRewards?: true;
|
|
342
|
+
transactionDetails: 'accounts';
|
|
343
|
+
}>,
|
|
344
|
+
): SolanaRpcResponse<
|
|
345
|
+
BlockNotificationsNotificationBase &
|
|
346
|
+
Readonly<{
|
|
347
|
+
block:
|
|
348
|
+
| (BlockNotificationsNotificationBlock &
|
|
349
|
+
BlockNotificationsNotificationBlockWithRewards &
|
|
350
|
+
BlockNotificationsNotificationBlockWithTransactions<
|
|
351
|
+
TransactionForAccounts<BlockNotificationsMaxSupportedTransactionVersion>
|
|
352
|
+
>)
|
|
353
|
+
| null;
|
|
354
|
+
}>
|
|
355
|
+
>;
|
|
356
|
+
/**
|
|
357
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
358
|
+
* commitment.
|
|
359
|
+
*
|
|
360
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
361
|
+
* method.
|
|
362
|
+
*
|
|
363
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
364
|
+
* transactions that match this filter will be included in the block.
|
|
365
|
+
*
|
|
366
|
+
* {@label transactions-accounts--rewards-included--version-legacy}
|
|
367
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
368
|
+
*/
|
|
369
|
+
blockNotifications(
|
|
370
|
+
filter: BlockNotificationsFilter,
|
|
371
|
+
// transactionDetails=accounts, rewards=missing/true, maxSupportedTransactionVersion=missing, encoding irrelevant
|
|
372
|
+
config: BlockNotificationsCommonConfig &
|
|
373
|
+
Readonly<{
|
|
374
|
+
encoding?: BlockNotificationsEncoding;
|
|
375
|
+
showRewards?: true;
|
|
376
|
+
transactionDetails: 'accounts';
|
|
377
|
+
}>,
|
|
378
|
+
): SolanaRpcResponse<
|
|
379
|
+
BlockNotificationsNotificationBase &
|
|
380
|
+
Readonly<{
|
|
381
|
+
block:
|
|
382
|
+
| (BlockNotificationsNotificationBlock &
|
|
383
|
+
BlockNotificationsNotificationBlockWithRewards &
|
|
384
|
+
BlockNotificationsNotificationBlockWithTransactions<TransactionForAccounts<void>>)
|
|
385
|
+
| null;
|
|
386
|
+
}>
|
|
387
|
+
>;
|
|
388
|
+
/**
|
|
389
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
390
|
+
* commitment.
|
|
391
|
+
*
|
|
392
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
393
|
+
* method.
|
|
394
|
+
*
|
|
395
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
396
|
+
* transactions that match this filter will be included in the block.
|
|
397
|
+
*
|
|
398
|
+
* {@label transactions-base58--rewards-none--version-specified}
|
|
399
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
400
|
+
*/
|
|
401
|
+
blockNotifications(
|
|
402
|
+
filter: BlockNotificationsFilter,
|
|
403
|
+
// transactionDetails=full (default), encoding=base58, rewards=false, maxSupportedTransactionVersion=0
|
|
404
|
+
config: BlockNotificationsCommonConfig &
|
|
405
|
+
Readonly<{
|
|
406
|
+
encoding: 'base58';
|
|
407
|
+
maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion;
|
|
408
|
+
showRewards: false;
|
|
409
|
+
transactionDetails?: 'full';
|
|
410
|
+
}>,
|
|
411
|
+
): SolanaRpcResponse<
|
|
412
|
+
BlockNotificationsNotificationBase &
|
|
413
|
+
Readonly<{
|
|
414
|
+
block:
|
|
415
|
+
| (BlockNotificationsNotificationBlock &
|
|
416
|
+
BlockNotificationsNotificationBlockWithTransactions<
|
|
417
|
+
TransactionForFullBase58<BlockNotificationsMaxSupportedTransactionVersion>
|
|
418
|
+
>)
|
|
419
|
+
| null;
|
|
420
|
+
}>
|
|
421
|
+
>;
|
|
422
|
+
/**
|
|
423
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
424
|
+
* commitment.
|
|
425
|
+
*
|
|
426
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
427
|
+
* method.
|
|
428
|
+
*
|
|
429
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
430
|
+
* transactions that match this filter will be included in the block.
|
|
431
|
+
*
|
|
432
|
+
* {@label transactions-base58--rewards-none--version-legacy}
|
|
433
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
434
|
+
*/
|
|
435
|
+
blockNotifications(
|
|
436
|
+
filter: BlockNotificationsFilter,
|
|
437
|
+
// transactionDetails=full (default), encoding=base58, rewards=false, maxSupportedTransactionVersion=missing
|
|
438
|
+
config: BlockNotificationsCommonConfig &
|
|
439
|
+
Readonly<{
|
|
440
|
+
encoding: 'base58';
|
|
441
|
+
showRewards: false;
|
|
442
|
+
transactionDetails?: 'full';
|
|
443
|
+
}>,
|
|
444
|
+
): SolanaRpcResponse<
|
|
445
|
+
BlockNotificationsNotificationBase &
|
|
446
|
+
Readonly<{
|
|
447
|
+
block:
|
|
448
|
+
| (BlockNotificationsNotificationBlock &
|
|
449
|
+
BlockNotificationsNotificationBlockWithTransactions<TransactionForFullBase58<void>>)
|
|
450
|
+
| null;
|
|
451
|
+
}>
|
|
452
|
+
>;
|
|
453
|
+
/**
|
|
454
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
455
|
+
* commitment.
|
|
456
|
+
*
|
|
457
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
458
|
+
* method.
|
|
459
|
+
*
|
|
460
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
461
|
+
* transactions that match this filter will be included in the block.
|
|
462
|
+
*
|
|
463
|
+
* {@label transactions-base58--rewards-included--version-specified}
|
|
464
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
465
|
+
*/
|
|
466
|
+
blockNotifications(
|
|
467
|
+
filter: BlockNotificationsFilter,
|
|
468
|
+
// transactionDetails=full (default), encoding=base58, rewards=missing/true, maxSupportedTransactionVersion=0
|
|
469
|
+
config: BlockNotificationsCommonConfig &
|
|
470
|
+
Readonly<{
|
|
471
|
+
encoding: 'base58';
|
|
472
|
+
maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion;
|
|
473
|
+
showRewards?: true;
|
|
474
|
+
transactionDetails?: 'full';
|
|
475
|
+
}>,
|
|
476
|
+
): SolanaRpcResponse<
|
|
477
|
+
BlockNotificationsNotificationBase &
|
|
478
|
+
Readonly<{
|
|
479
|
+
block:
|
|
480
|
+
| (BlockNotificationsNotificationBlock &
|
|
481
|
+
BlockNotificationsNotificationBlockWithRewards &
|
|
482
|
+
BlockNotificationsNotificationBlockWithTransactions<
|
|
483
|
+
TransactionForFullBase58<BlockNotificationsMaxSupportedTransactionVersion>
|
|
484
|
+
>)
|
|
485
|
+
| null;
|
|
486
|
+
}>
|
|
487
|
+
>;
|
|
488
|
+
/**
|
|
489
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
490
|
+
* commitment.
|
|
491
|
+
*
|
|
492
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
493
|
+
* method.
|
|
494
|
+
*
|
|
495
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
496
|
+
* transactions that match this filter will be included in the block.
|
|
497
|
+
*
|
|
498
|
+
* {@label transactions-base58--rewards-included--version-legacy}
|
|
499
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
500
|
+
*/
|
|
501
|
+
blockNotifications(
|
|
502
|
+
filter: BlockNotificationsFilter,
|
|
503
|
+
// transactionDetails=full (default), encoding=base58, rewards=missing/true, maxSupportedTransactionVersion=missing
|
|
504
|
+
config: BlockNotificationsCommonConfig &
|
|
505
|
+
Readonly<{
|
|
506
|
+
encoding: 'base58';
|
|
507
|
+
showRewards?: true;
|
|
508
|
+
transactionDetails?: 'full';
|
|
509
|
+
}>,
|
|
510
|
+
): SolanaRpcResponse<
|
|
511
|
+
BlockNotificationsNotificationBase &
|
|
512
|
+
Readonly<{
|
|
513
|
+
block:
|
|
514
|
+
| (BlockNotificationsNotificationBlock &
|
|
515
|
+
BlockNotificationsNotificationBlockWithRewards &
|
|
516
|
+
BlockNotificationsNotificationBlockWithTransactions<TransactionForFullBase58<void>>)
|
|
517
|
+
| null;
|
|
518
|
+
}>
|
|
519
|
+
>;
|
|
520
|
+
/**
|
|
521
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
522
|
+
* commitment.
|
|
523
|
+
*
|
|
524
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
525
|
+
* method.
|
|
526
|
+
*
|
|
527
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
528
|
+
* transactions that match this filter will be included in the block.
|
|
529
|
+
*
|
|
530
|
+
* {@label transactions-base64--rewards-none--version-specified}
|
|
531
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
532
|
+
*/
|
|
533
|
+
blockNotifications(
|
|
534
|
+
filter: BlockNotificationsFilter,
|
|
535
|
+
// transactionDetails=full (default), encoding=base64, rewards=false, maxSupportedTransactionVersion=0
|
|
536
|
+
config: BlockNotificationsCommonConfig &
|
|
537
|
+
Readonly<{
|
|
538
|
+
encoding: 'base64';
|
|
539
|
+
maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion;
|
|
540
|
+
showRewards: false;
|
|
541
|
+
transactionDetails?: 'full';
|
|
542
|
+
}>,
|
|
543
|
+
): SolanaRpcResponse<
|
|
544
|
+
BlockNotificationsNotificationBase &
|
|
545
|
+
Readonly<{
|
|
546
|
+
block:
|
|
547
|
+
| (BlockNotificationsNotificationBlock &
|
|
548
|
+
BlockNotificationsNotificationBlockWithTransactions<
|
|
549
|
+
TransactionForFullBase64<BlockNotificationsMaxSupportedTransactionVersion>
|
|
550
|
+
>)
|
|
551
|
+
| null;
|
|
552
|
+
}>
|
|
553
|
+
>;
|
|
554
|
+
/**
|
|
555
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
556
|
+
* commitment.
|
|
557
|
+
*
|
|
558
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
559
|
+
* method.
|
|
560
|
+
*
|
|
561
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
562
|
+
* transactions that match this filter will be included in the block.
|
|
563
|
+
*
|
|
564
|
+
* {@label transactions-base64--rewards-none--version-legacy}
|
|
565
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
566
|
+
*/
|
|
567
|
+
blockNotifications(
|
|
568
|
+
filter: BlockNotificationsFilter,
|
|
569
|
+
// transactionDetails=full (default), encoding=base64, rewards=false, maxSupportedTransactionVersion=missing
|
|
570
|
+
config: BlockNotificationsCommonConfig &
|
|
571
|
+
Readonly<{
|
|
572
|
+
encoding: 'base64';
|
|
573
|
+
showRewards: false;
|
|
574
|
+
transactionDetails?: 'full';
|
|
575
|
+
}>,
|
|
576
|
+
): SolanaRpcResponse<
|
|
577
|
+
BlockNotificationsNotificationBase &
|
|
578
|
+
Readonly<{
|
|
579
|
+
block:
|
|
580
|
+
| (BlockNotificationsNotificationBlock &
|
|
581
|
+
BlockNotificationsNotificationBlockWithTransactions<TransactionForFullBase64<void>>)
|
|
582
|
+
| null;
|
|
583
|
+
}>
|
|
584
|
+
>;
|
|
585
|
+
/**
|
|
586
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
587
|
+
* commitment.
|
|
588
|
+
*
|
|
589
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
590
|
+
* method.
|
|
591
|
+
*
|
|
592
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
593
|
+
* transactions that match this filter will be included in the block.
|
|
594
|
+
*
|
|
595
|
+
* {@label transactions-base64--rewards-included--version-specified}
|
|
596
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
597
|
+
*/
|
|
598
|
+
blockNotifications(
|
|
599
|
+
filter: BlockNotificationsFilter,
|
|
600
|
+
// transactionDetails=full (default), encoding=base64, rewards=missing/true, maxSupportedTransactionVersion=0
|
|
601
|
+
config: BlockNotificationsCommonConfig &
|
|
602
|
+
Readonly<{
|
|
603
|
+
encoding: 'base64';
|
|
604
|
+
maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion;
|
|
605
|
+
showRewards?: true;
|
|
606
|
+
transactionDetails?: 'full';
|
|
607
|
+
}>,
|
|
608
|
+
): SolanaRpcResponse<
|
|
609
|
+
BlockNotificationsNotificationBase &
|
|
610
|
+
Readonly<{
|
|
611
|
+
block:
|
|
612
|
+
| (BlockNotificationsNotificationBlock &
|
|
613
|
+
BlockNotificationsNotificationBlockWithRewards &
|
|
614
|
+
BlockNotificationsNotificationBlockWithTransactions<
|
|
615
|
+
TransactionForFullBase64<BlockNotificationsMaxSupportedTransactionVersion>
|
|
616
|
+
>)
|
|
617
|
+
| null;
|
|
618
|
+
}>
|
|
619
|
+
>;
|
|
620
|
+
/**
|
|
621
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
622
|
+
* commitment.
|
|
623
|
+
*
|
|
624
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
625
|
+
* method.
|
|
626
|
+
*
|
|
627
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
628
|
+
* transactions that match this filter will be included in the block.
|
|
629
|
+
*
|
|
630
|
+
* {@label transactions-base64--rewards-included--version-legacy}
|
|
631
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
632
|
+
*/
|
|
633
|
+
blockNotifications(
|
|
634
|
+
filter: BlockNotificationsFilter,
|
|
635
|
+
// transactionDetails=full (default), encoding=base64, rewards=missing/true, maxSupportedTransactionVersion=missing
|
|
636
|
+
config: BlockNotificationsCommonConfig &
|
|
637
|
+
Readonly<{
|
|
638
|
+
encoding: 'base64';
|
|
639
|
+
showRewards?: true;
|
|
640
|
+
transactionDetails?: 'full';
|
|
641
|
+
}>,
|
|
642
|
+
): SolanaRpcResponse<
|
|
643
|
+
BlockNotificationsNotificationBase &
|
|
644
|
+
Readonly<{
|
|
645
|
+
block:
|
|
646
|
+
| (BlockNotificationsNotificationBlock &
|
|
647
|
+
BlockNotificationsNotificationBlockWithRewards &
|
|
648
|
+
BlockNotificationsNotificationBlockWithTransactions<TransactionForFullBase64<void>>)
|
|
649
|
+
| null;
|
|
650
|
+
}>
|
|
651
|
+
>;
|
|
652
|
+
/**
|
|
653
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
654
|
+
* commitment.
|
|
655
|
+
*
|
|
656
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
657
|
+
* method.
|
|
658
|
+
*
|
|
659
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
660
|
+
* transactions that match this filter will be included in the block.
|
|
661
|
+
*
|
|
662
|
+
* {@label transactions-parsed--rewards-none--version-specified}
|
|
663
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
664
|
+
*/
|
|
665
|
+
blockNotifications(
|
|
666
|
+
filter: BlockNotificationsFilter,
|
|
667
|
+
// transactionDetails=full (default), encoding=jsonParsed, rewards=false, maxSupportedTransactionVersion=0
|
|
668
|
+
config: BlockNotificationsCommonConfig &
|
|
669
|
+
Readonly<{
|
|
670
|
+
encoding: 'jsonParsed';
|
|
671
|
+
maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion;
|
|
672
|
+
showRewards: false;
|
|
673
|
+
transactionDetails?: 'full';
|
|
674
|
+
}>,
|
|
675
|
+
): SolanaRpcResponse<
|
|
676
|
+
BlockNotificationsNotificationBase &
|
|
677
|
+
Readonly<{
|
|
678
|
+
block:
|
|
679
|
+
| (BlockNotificationsNotificationBlock &
|
|
680
|
+
BlockNotificationsNotificationBlockWithTransactions<
|
|
681
|
+
TransactionForFullJsonParsed<BlockNotificationsMaxSupportedTransactionVersion>
|
|
682
|
+
>)
|
|
683
|
+
| null;
|
|
684
|
+
}>
|
|
685
|
+
>;
|
|
686
|
+
/**
|
|
687
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
688
|
+
* commitment.
|
|
689
|
+
*
|
|
690
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
691
|
+
* method.
|
|
692
|
+
*
|
|
693
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
694
|
+
* transactions that match this filter will be included in the block.
|
|
695
|
+
*
|
|
696
|
+
* {@label transactions-parsed--rewards-none--version-legacy}
|
|
697
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
698
|
+
*/
|
|
699
|
+
blockNotifications(
|
|
700
|
+
filter: BlockNotificationsFilter,
|
|
701
|
+
// transactionDetails=full (default), encoding=jsonParsed, rewards=false, maxSupportedTransactionVersion=missing
|
|
702
|
+
config: BlockNotificationsCommonConfig &
|
|
703
|
+
Readonly<{
|
|
704
|
+
encoding: 'jsonParsed';
|
|
705
|
+
showRewards: false;
|
|
706
|
+
transactionDetails?: 'full';
|
|
707
|
+
}>,
|
|
708
|
+
): SolanaRpcResponse<
|
|
709
|
+
BlockNotificationsNotificationBase &
|
|
710
|
+
Readonly<{
|
|
711
|
+
block:
|
|
712
|
+
| (BlockNotificationsNotificationBlock &
|
|
713
|
+
BlockNotificationsNotificationBlockWithTransactions<TransactionForFullJsonParsed<void>>)
|
|
714
|
+
| null;
|
|
715
|
+
}>
|
|
716
|
+
>;
|
|
717
|
+
/**
|
|
718
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
719
|
+
* commitment.
|
|
720
|
+
*
|
|
721
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
722
|
+
* method.
|
|
723
|
+
*
|
|
724
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
725
|
+
* transactions that match this filter will be included in the block.
|
|
726
|
+
*
|
|
727
|
+
* {@label transactions-parsed--rewards-included--version-specified}
|
|
728
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
729
|
+
*/
|
|
730
|
+
blockNotifications(
|
|
731
|
+
filter: BlockNotificationsFilter,
|
|
732
|
+
// transactionDetails=full (default), encoding=jsonParsed, rewards=missing/true, maxSupportedTransactionVersion=0
|
|
733
|
+
config: BlockNotificationsCommonConfig &
|
|
734
|
+
Readonly<{
|
|
735
|
+
encoding: 'jsonParsed';
|
|
736
|
+
maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion;
|
|
737
|
+
showRewards?: true;
|
|
738
|
+
transactionDetails?: 'full';
|
|
739
|
+
}>,
|
|
740
|
+
): SolanaRpcResponse<
|
|
741
|
+
BlockNotificationsNotificationBase &
|
|
742
|
+
Readonly<{
|
|
743
|
+
block:
|
|
744
|
+
| (BlockNotificationsNotificationBlock &
|
|
745
|
+
BlockNotificationsNotificationBlockWithRewards &
|
|
746
|
+
BlockNotificationsNotificationBlockWithTransactions<
|
|
747
|
+
TransactionForFullJsonParsed<BlockNotificationsMaxSupportedTransactionVersion>
|
|
748
|
+
>)
|
|
749
|
+
| null;
|
|
750
|
+
}>
|
|
751
|
+
>;
|
|
752
|
+
/**
|
|
753
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
754
|
+
* commitment.
|
|
755
|
+
*
|
|
756
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
757
|
+
* method.
|
|
758
|
+
*
|
|
759
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
760
|
+
* transactions that match this filter will be included in the block.
|
|
761
|
+
*
|
|
762
|
+
* {@label transactions-parsed--rewards-included--version-legacy}
|
|
763
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
764
|
+
*/
|
|
765
|
+
blockNotifications(
|
|
766
|
+
filter: BlockNotificationsFilter,
|
|
767
|
+
// transactionDetails=full (default), encoding=jsonParsed, rewards=missing/true, maxSupportedTransactionVersion=missing
|
|
768
|
+
config: BlockNotificationsCommonConfig &
|
|
769
|
+
Readonly<{
|
|
770
|
+
encoding: 'jsonParsed';
|
|
771
|
+
showRewards?: true;
|
|
772
|
+
transactionDetails?: 'full';
|
|
773
|
+
}>,
|
|
774
|
+
): SolanaRpcResponse<
|
|
775
|
+
BlockNotificationsNotificationBase &
|
|
776
|
+
Readonly<{
|
|
777
|
+
block:
|
|
778
|
+
| (BlockNotificationsNotificationBlock &
|
|
779
|
+
BlockNotificationsNotificationBlockWithRewards &
|
|
780
|
+
BlockNotificationsNotificationBlockWithTransactions<TransactionForFullJsonParsed<void>>)
|
|
781
|
+
| null;
|
|
782
|
+
}>
|
|
783
|
+
>;
|
|
784
|
+
/**
|
|
785
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
786
|
+
* commitment.
|
|
787
|
+
*
|
|
788
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
789
|
+
* method.
|
|
790
|
+
*
|
|
791
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
792
|
+
* transactions that match this filter will be included in the block.
|
|
793
|
+
*
|
|
794
|
+
* {@label transactions-json--rewards-none--version-specified}
|
|
795
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
796
|
+
*/
|
|
797
|
+
blockNotifications(
|
|
798
|
+
filter: BlockNotificationsFilter,
|
|
799
|
+
// transactionDetails=full (default), encoding=json (default), rewards=false, maxSupportedTransactionVersion=0
|
|
800
|
+
config: BlockNotificationsCommonConfig &
|
|
801
|
+
Readonly<{
|
|
802
|
+
encoding?: 'json';
|
|
803
|
+
maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion;
|
|
804
|
+
showRewards: false;
|
|
805
|
+
transactionDetails?: 'full';
|
|
806
|
+
}>,
|
|
807
|
+
): SolanaRpcResponse<
|
|
808
|
+
BlockNotificationsNotificationBase &
|
|
809
|
+
Readonly<{
|
|
810
|
+
block:
|
|
811
|
+
| (BlockNotificationsNotificationBlock &
|
|
812
|
+
BlockNotificationsNotificationBlockWithTransactions<
|
|
813
|
+
TransactionForFullJson<BlockNotificationsMaxSupportedTransactionVersion>
|
|
814
|
+
>)
|
|
815
|
+
| null;
|
|
816
|
+
}>
|
|
817
|
+
>;
|
|
818
|
+
/**
|
|
819
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
820
|
+
* commitment.
|
|
821
|
+
*
|
|
822
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
823
|
+
* method.
|
|
824
|
+
*
|
|
825
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
826
|
+
* transactions that match this filter will be included in the block.
|
|
827
|
+
*
|
|
828
|
+
* {@label transactions-json--rewards-none--version-legacy}
|
|
829
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
830
|
+
*/
|
|
831
|
+
blockNotifications(
|
|
832
|
+
filter: BlockNotificationsFilter,
|
|
833
|
+
// transactionDetails=full (default), encoding=json (default), rewards=false, maxSupportedTransactionVersion=missing
|
|
834
|
+
config: BlockNotificationsCommonConfig &
|
|
835
|
+
Readonly<{
|
|
836
|
+
encoding?: 'json';
|
|
837
|
+
showRewards: false;
|
|
838
|
+
transactionDetails?: 'full';
|
|
839
|
+
}>,
|
|
840
|
+
): SolanaRpcResponse<
|
|
841
|
+
BlockNotificationsNotificationBase &
|
|
842
|
+
Readonly<{
|
|
843
|
+
block:
|
|
844
|
+
| (BlockNotificationsNotificationBlock &
|
|
845
|
+
BlockNotificationsNotificationBlockWithTransactions<TransactionForFullJson<void>>)
|
|
846
|
+
| null;
|
|
847
|
+
}>
|
|
848
|
+
>;
|
|
849
|
+
/**
|
|
850
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
851
|
+
* commitment.
|
|
852
|
+
*
|
|
853
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
854
|
+
* method.
|
|
855
|
+
*
|
|
856
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
857
|
+
* transactions that match this filter will be included in the block.
|
|
858
|
+
*
|
|
859
|
+
* {@label transactions-json--rewards-included--version-specified}
|
|
860
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
861
|
+
*/
|
|
862
|
+
blockNotifications(
|
|
863
|
+
filter: BlockNotificationsFilter,
|
|
864
|
+
// transactionDetails=full (default), encoding=json (default), rewards=missing/true, maxSupportedTransactionVersion=0
|
|
865
|
+
config: BlockNotificationsCommonConfig &
|
|
866
|
+
Readonly<{
|
|
867
|
+
encoding?: 'json';
|
|
868
|
+
maxSupportedTransactionVersion: BlockNotificationsMaxSupportedTransactionVersion;
|
|
869
|
+
showRewards?: true;
|
|
870
|
+
transactionDetails?: 'full';
|
|
871
|
+
}>,
|
|
872
|
+
): SolanaRpcResponse<
|
|
873
|
+
BlockNotificationsNotificationBase &
|
|
874
|
+
Readonly<{
|
|
875
|
+
block:
|
|
876
|
+
| (BlockNotificationsNotificationBlock &
|
|
877
|
+
BlockNotificationsNotificationBlockWithRewards &
|
|
878
|
+
BlockNotificationsNotificationBlockWithTransactions<
|
|
879
|
+
TransactionForFullJson<BlockNotificationsMaxSupportedTransactionVersion>
|
|
880
|
+
>)
|
|
881
|
+
| null;
|
|
882
|
+
}>
|
|
883
|
+
>;
|
|
884
|
+
/**
|
|
885
|
+
* Subscribe to receive notifications anytime a new block reaches the specified level of
|
|
886
|
+
* commitment.
|
|
887
|
+
*
|
|
888
|
+
* The notification format is the same as seen in the {@link GetBlockApi.getBlock} RPC HTTP
|
|
889
|
+
* method.
|
|
890
|
+
*
|
|
891
|
+
* @param filter Notifications will only be produced for blocks that match this filter. Only
|
|
892
|
+
* transactions that match this filter will be included in the block.
|
|
893
|
+
*
|
|
894
|
+
* {@label transactions-json--rewards-included--version-legacy}
|
|
895
|
+
* @see https://solana.com/docs/rpc/websocket/blocksubscribe
|
|
896
|
+
*/
|
|
897
|
+
blockNotifications(
|
|
898
|
+
filter: BlockNotificationsFilter,
|
|
899
|
+
// transactionDetails=full (default), encoding=json (default), rewards=missing/true, maxSupportedTransactionVersion=missing
|
|
900
|
+
config?: BlockNotificationsCommonConfig &
|
|
901
|
+
Readonly<{
|
|
902
|
+
encoding?: 'json';
|
|
903
|
+
showRewards?: true;
|
|
904
|
+
transactionDetails?: 'full';
|
|
905
|
+
}>,
|
|
906
|
+
): SolanaRpcResponse<
|
|
907
|
+
BlockNotificationsNotificationBase &
|
|
908
|
+
Readonly<{
|
|
909
|
+
block:
|
|
910
|
+
| (BlockNotificationsNotificationBlock &
|
|
911
|
+
BlockNotificationsNotificationBlockWithRewards &
|
|
912
|
+
BlockNotificationsNotificationBlockWithTransactions<TransactionForFullJson<void>>)
|
|
913
|
+
| null;
|
|
914
|
+
}>
|
|
915
|
+
>;
|
|
916
|
+
};
|