@dedot/chaintypes 0.0.1-alpha.25 → 0.0.1-alpha.26

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 (97) hide show
  1. package/aleph/consts.d.ts +595 -0
  2. package/aleph/errors.d.ts +985 -0
  3. package/aleph/events.d.ts +984 -0
  4. package/aleph/index.d.ts +22 -0
  5. package/aleph/query.d.ts +1480 -0
  6. package/aleph/rpc.d.ts +727 -0
  7. package/aleph/runtime.d.ts +545 -0
  8. package/aleph/tx.d.ts +2668 -0
  9. package/aleph/types.d.ts +3646 -0
  10. package/astar/consts.d.ts +758 -0
  11. package/astar/errors.d.ts +1580 -0
  12. package/astar/events.d.ts +1788 -0
  13. package/astar/index.d.ts +22 -0
  14. package/astar/query.d.ts +1759 -0
  15. package/astar/rpc.d.ts +974 -0
  16. package/astar/runtime.d.ts +314 -0
  17. package/astar/tx.d.ts +5478 -0
  18. package/astar/types.d.ts +9078 -0
  19. package/index.ts +10 -0
  20. package/kusama/consts.d.ts +1578 -0
  21. package/kusama/errors.d.ts +2999 -0
  22. package/kusama/events.d.ts +3233 -0
  23. package/kusama/index.d.ts +22 -0
  24. package/kusama/query.d.ts +3831 -0
  25. package/kusama/rpc.d.ts +904 -0
  26. package/kusama/runtime.d.ts +1134 -0
  27. package/kusama/tx.d.ts +7077 -0
  28. package/kusama/types.d.ts +10710 -0
  29. package/kusamaAssetHub/consts.d.ts +719 -0
  30. package/kusamaAssetHub/errors.d.ts +1409 -0
  31. package/kusamaAssetHub/events.d.ts +2251 -0
  32. package/kusamaAssetHub/index.d.ts +22 -0
  33. package/kusamaAssetHub/query.d.ts +1554 -0
  34. package/kusamaAssetHub/rpc.d.ts +746 -0
  35. package/kusamaAssetHub/runtime.d.ts +514 -0
  36. package/kusamaAssetHub/tx.d.ts +5055 -0
  37. package/kusamaAssetHub/types.d.ts +6385 -0
  38. package/moonbeam/consts.d.ts +1080 -0
  39. package/moonbeam/errors.d.ts +2135 -0
  40. package/moonbeam/events.d.ts +3091 -0
  41. package/moonbeam/index.d.ts +22 -0
  42. package/moonbeam/query.d.ts +2394 -0
  43. package/moonbeam/rpc.d.ts +1015 -0
  44. package/moonbeam/runtime.d.ts +669 -0
  45. package/moonbeam/tx.d.ts +6156 -0
  46. package/moonbeam/types.d.ts +8045 -0
  47. package/package.json +9 -8
  48. package/packageInfo.js +1 -1
  49. package/packageInfo.ts +3 -0
  50. package/polkadot/consts.d.ts +1277 -0
  51. package/polkadot/errors.d.ts +2424 -0
  52. package/polkadot/events.d.ts +2457 -0
  53. package/polkadot/index.d.ts +22 -0
  54. package/polkadot/query.d.ts +3322 -0
  55. package/polkadot/rpc.d.ts +904 -0
  56. package/polkadot/runtime.d.ts +1134 -0
  57. package/polkadot/tx.d.ts +5913 -0
  58. package/polkadot/types.d.ts +9181 -0
  59. package/polkadotAssetHub/consts.d.ts +591 -0
  60. package/polkadotAssetHub/errors.d.ts +1119 -0
  61. package/polkadotAssetHub/events.d.ts +1855 -0
  62. package/polkadotAssetHub/index.d.ts +22 -0
  63. package/polkadotAssetHub/query.d.ts +1460 -0
  64. package/polkadotAssetHub/rpc.d.ts +746 -0
  65. package/polkadotAssetHub/runtime.d.ts +451 -0
  66. package/polkadotAssetHub/tx.d.ts +4189 -0
  67. package/polkadotAssetHub/types.d.ts +5539 -0
  68. package/rococoAssetHub/consts.d.ts +750 -0
  69. package/rococoAssetHub/errors.d.ts +1494 -0
  70. package/rococoAssetHub/events.d.ts +2252 -0
  71. package/rococoAssetHub/index.d.ts +22 -0
  72. package/rococoAssetHub/query.d.ts +1516 -0
  73. package/rococoAssetHub/rpc.d.ts +746 -0
  74. package/rococoAssetHub/runtime.d.ts +542 -0
  75. package/rococoAssetHub/tx.d.ts +5169 -0
  76. package/rococoAssetHub/types.d.ts +6751 -0
  77. package/substrate/consts.d.ts +2223 -0
  78. package/substrate/errors.d.ts +4023 -0
  79. package/substrate/events.d.ts +5107 -0
  80. package/substrate/index.d.ts +22 -0
  81. package/substrate/query.d.ts +3890 -0
  82. package/substrate/rpc.d.ts +894 -0
  83. package/substrate/runtime.d.ts +941 -0
  84. package/substrate/tx.d.ts +10391 -0
  85. package/substrate/types.d.ts +13380 -0
  86. package/westendAssetHub/consts.d.ts +750 -0
  87. package/westendAssetHub/errors.d.ts +1494 -0
  88. package/westendAssetHub/events.d.ts +2252 -0
  89. package/westendAssetHub/index.d.ts +22 -0
  90. package/westendAssetHub/query.d.ts +1516 -0
  91. package/westendAssetHub/rpc.d.ts +746 -0
  92. package/westendAssetHub/runtime.d.ts +581 -0
  93. package/westendAssetHub/tx.d.ts +5169 -0
  94. package/westendAssetHub/types.d.ts +6750 -0
  95. package/cjs/index.js +0 -2
  96. package/cjs/package.json +0 -1
  97. package/cjs/packageInfo.js +0 -5
package/aleph/rpc.d.ts ADDED
@@ -0,0 +1,727 @@
1
+ // Generated by @dedot/codegen
2
+
3
+ import type {
4
+ GenericRpcCalls,
5
+ Unsub,
6
+ Callback,
7
+ GenericRpcCall,
8
+ ExtrinsicOrHash,
9
+ StorageKind,
10
+ RpcMethods,
11
+ ReadProof,
12
+ StorageChangeSet,
13
+ TraceBlockResponse,
14
+ ChainType,
15
+ Health,
16
+ NodeRole,
17
+ PeerInfo,
18
+ ChainProperties,
19
+ SyncState,
20
+ NetworkState,
21
+ } from '@dedot/types';
22
+ import type {
23
+ Bytes,
24
+ Hash,
25
+ TransactionStatus,
26
+ Option,
27
+ SignedBlock,
28
+ BlockHash,
29
+ BlockNumber,
30
+ Header,
31
+ StorageKey,
32
+ PrefixedStorageKey,
33
+ StorageData,
34
+ FeeDetails,
35
+ RuntimeDispatchInfo,
36
+ Metadata,
37
+ RuntimeVersion,
38
+ ApplyExtrinsicResult,
39
+ } from '@dedot/codecs';
40
+
41
+ export interface RpcCalls extends GenericRpcCalls {
42
+ alephNode: {
43
+ /**
44
+ * @rpcname: alephNode_emergencyFinalize
45
+ **/
46
+ emergencyFinalize: GenericRpcCall;
47
+
48
+ /**
49
+ * @rpcname: alephNode_getBlockAuthor
50
+ **/
51
+ getBlockAuthor: GenericRpcCall;
52
+
53
+ /**
54
+ * @rpcname: alephNode_ready
55
+ **/
56
+ ready: GenericRpcCall;
57
+
58
+ [method: string]: GenericRpcCall;
59
+ };
60
+ author: {
61
+ /**
62
+ * Checks if the keystore has private keys for the given public key and key type. Returns `true` if a private key could be found.
63
+ *
64
+ * @rpcname: author_hasKey
65
+ * @param {Bytes} publicKey
66
+ * @param {string} keyType
67
+ **/
68
+ hasKey: GenericRpcCall<(publicKey: Bytes, keyType: string) => Promise<boolean>>;
69
+
70
+ /**
71
+ * Checks if the keystore has private keys for the given session public keys. `session_keys` is the SCALE encoded session keys object from the runtime. Returns `true` iff all private keys could be found.
72
+ *
73
+ * @rpcname: author_hasSessionKeys
74
+ * @param {Bytes} sessionKeys
75
+ **/
76
+ hasSessionKeys: GenericRpcCall<(sessionKeys: Bytes) => Promise<boolean>>;
77
+
78
+ /**
79
+ * Insert a key into the keystore.
80
+ *
81
+ * @rpcname: author_insertKey
82
+ * @param {string} keyType
83
+ * @param {string} suri
84
+ * @param {Bytes} publicKey
85
+ **/
86
+ insertKey: GenericRpcCall<(keyType: string, suri: string, publicKey: Bytes) => Promise<void>>;
87
+
88
+ /**
89
+ * Returns all pending extrinsics, potentially grouped by sender.
90
+ *
91
+ * @rpcname: author_pendingExtrinsics
92
+ **/
93
+ pendingExtrinsics: GenericRpcCall<() => Promise<Array<Bytes>>>;
94
+
95
+ /**
96
+ * Remove given extrinsic from the pool and temporarily ban it to prevent reimporting.
97
+ *
98
+ * @rpcname: author_removeExtrinsic
99
+ * @param {Array<ExtrinsicOrHash>} bytesOrHash
100
+ **/
101
+ removeExtrinsic: GenericRpcCall<(bytesOrHash: Array<ExtrinsicOrHash>) => Promise<Array<Hash>>>;
102
+
103
+ /**
104
+ * Generate new session keys and returns the corresponding public keys.
105
+ *
106
+ * @rpcname: author_rotateKeys
107
+ **/
108
+ rotateKeys: GenericRpcCall<() => Promise<Bytes>>;
109
+
110
+ /**
111
+ * Submit and subscribe to watch an extrinsic until unsubscribed
112
+ *
113
+ * @pubsub: author_extrinsicUpdate, author_submitAndWatchExtrinsic, author_unwatchExtrinsic
114
+ * @param {Bytes} extrinsic
115
+ **/
116
+ submitAndWatchExtrinsic: GenericRpcCall<
117
+ (extrinsic: Bytes, callback: Callback<TransactionStatus>) => Promise<Unsub>
118
+ >;
119
+
120
+ /**
121
+ * Submit hex-encoded extrinsic for inclusion in block.
122
+ *
123
+ * @rpcname: author_submitExtrinsic
124
+ * @param {Bytes} extrinsic
125
+ **/
126
+ submitExtrinsic: GenericRpcCall<(extrinsic: Bytes) => Promise<Hash>>;
127
+
128
+ [method: string]: GenericRpcCall;
129
+ };
130
+ chainHead: {
131
+ /**
132
+ * @rpcname: chainHead_unstable_body
133
+ **/
134
+ unstable_body: GenericRpcCall;
135
+
136
+ /**
137
+ * @rpcname: chainHead_unstable_call
138
+ **/
139
+ unstable_call: GenericRpcCall;
140
+
141
+ /**
142
+ * @rpcname: chainHead_unstable_follow
143
+ **/
144
+ unstable_follow: GenericRpcCall;
145
+
146
+ /**
147
+ * @rpcname: chainHead_unstable_genesisHash
148
+ **/
149
+ unstable_genesisHash: GenericRpcCall;
150
+
151
+ /**
152
+ * @rpcname: chainHead_unstable_header
153
+ **/
154
+ unstable_header: GenericRpcCall;
155
+
156
+ /**
157
+ * @rpcname: chainHead_unstable_stopBody
158
+ **/
159
+ unstable_stopBody: GenericRpcCall;
160
+
161
+ /**
162
+ * @rpcname: chainHead_unstable_stopCall
163
+ **/
164
+ unstable_stopCall: GenericRpcCall;
165
+
166
+ /**
167
+ * @rpcname: chainHead_unstable_stopStorage
168
+ **/
169
+ unstable_stopStorage: GenericRpcCall;
170
+
171
+ /**
172
+ * @rpcname: chainHead_unstable_storage
173
+ **/
174
+ unstable_storage: GenericRpcCall;
175
+
176
+ /**
177
+ * @rpcname: chainHead_unstable_unfollow
178
+ **/
179
+ unstable_unfollow: GenericRpcCall;
180
+
181
+ /**
182
+ * @rpcname: chainHead_unstable_unpin
183
+ **/
184
+ unstable_unpin: GenericRpcCall;
185
+
186
+ [method: string]: GenericRpcCall;
187
+ };
188
+ chain: {
189
+ /**
190
+ * Get header and body of a relay chain block
191
+ *
192
+ * @rpcname: chain_getBlock
193
+ * @param {BlockHash} at
194
+ **/
195
+ getBlock: GenericRpcCall<(at?: BlockHash) => Promise<Option<SignedBlock>>>;
196
+
197
+ /**
198
+ * Get the block hash for a specific block
199
+ *
200
+ * @rpcname: chain_getBlockHash
201
+ * @param {BlockNumber} blockNumber
202
+ **/
203
+ getBlockHash: GenericRpcCall<(blockNumber?: BlockNumber) => Promise<Option<BlockHash>>>;
204
+
205
+ /**
206
+ * Get hash of the last finalized block in the canon chain
207
+ *
208
+ * @rpcname: chain_getFinalizedHead
209
+ **/
210
+ getFinalizedHead: GenericRpcCall<() => Promise<BlockHash>>;
211
+
212
+ /**
213
+ * Retrieves the header for a specific block
214
+ *
215
+ * @rpcname: chain_getHeader
216
+ * @param {BlockHash} at
217
+ **/
218
+ getHeader: GenericRpcCall<(at?: BlockHash) => Promise<Option<Header>>>;
219
+
220
+ /**
221
+ * All head subscription.
222
+ *
223
+ * @pubsub: chain_allHead, chain_subscribeAllHeads, chain_unsubscribeAllHeads
224
+ **/
225
+ subscribeAllHeads: GenericRpcCall<(callback: Callback<Header>) => Promise<Unsub>>;
226
+
227
+ /**
228
+ * Retrieves the best finalized header via subscription
229
+ *
230
+ * @pubsub: chain_finalizedHead, chain_subscribeFinalizedHeads, chain_unsubscribeFinalizedHeads
231
+ **/
232
+ subscribeFinalizedHeads: GenericRpcCall<(callback: Callback<Header>) => Promise<Unsub>>;
233
+
234
+ /**
235
+ * Retrieves the best header via subscription
236
+ *
237
+ * @pubsub: chain_newHead, chain_subscribeNewHeads, chain_unsubscribeNewHeads
238
+ **/
239
+ subscribeNewHeads: GenericRpcCall<(callback: Callback<Header>) => Promise<Unsub>>;
240
+
241
+ [method: string]: GenericRpcCall;
242
+ };
243
+ childstate: {
244
+ /**
245
+ * Returns the keys with prefix from a child storage, leave empty to get all the keys
246
+ *
247
+ * @rpcname: childstate_getKeys
248
+ * @deprecated: Please use `getKeysPaged` with proper paging support
249
+ * @param {PrefixedStorageKey} childStorageKey
250
+ * @param {StorageKey} prefix
251
+ * @param {BlockHash} at
252
+ **/
253
+ getKeys: GenericRpcCall<
254
+ (childStorageKey: PrefixedStorageKey, prefix: StorageKey, at?: BlockHash) => Promise<Array<StorageKey>>
255
+ >;
256
+
257
+ /**
258
+ * Returns the keys with prefix from a child storage with pagination support.
259
+ * Up to `count` keys will be returned.
260
+ * If `start_key` is passed, return next keys in storage in lexicographic order.
261
+ *
262
+ * @rpcname: childstate_getKeysPaged
263
+ * @param {PrefixedStorageKey} childStorageKey
264
+ * @param {Option<StorageKey>} prefix
265
+ * @param {number} count
266
+ * @param {StorageKey} startKey
267
+ * @param {BlockHash} at
268
+ **/
269
+ getKeysPaged: GenericRpcCall<
270
+ (
271
+ childStorageKey: PrefixedStorageKey,
272
+ prefix: Option<StorageKey>,
273
+ count: number,
274
+ startKey?: StorageKey,
275
+ at?: BlockHash,
276
+ ) => Promise<Array<StorageKey>>
277
+ >;
278
+
279
+ /**
280
+ * Returns a child storage entry at specific block's state.
281
+ *
282
+ * @rpcname: childstate_getStorage
283
+ * @param {PrefixedStorageKey} childStorageKey
284
+ * @param {StorageKey} key
285
+ * @param {BlockHash} at
286
+ **/
287
+ getStorage: GenericRpcCall<
288
+ (childStorageKey: PrefixedStorageKey, key: StorageKey, at?: BlockHash) => Promise<Option<StorageData>>
289
+ >;
290
+
291
+ /**
292
+ * Returns child storage entries for multiple keys at a specific block's state.
293
+ *
294
+ * @rpcname: childstate_getStorageEntries
295
+ * @param {PrefixedStorageKey} childStorageKey
296
+ * @param {Array<StorageKey>} keys
297
+ * @param {BlockHash} at
298
+ **/
299
+ getStorageEntries: GenericRpcCall<
300
+ (
301
+ childStorageKey: PrefixedStorageKey,
302
+ keys: Array<StorageKey>,
303
+ at?: BlockHash,
304
+ ) => Promise<Array<Option<StorageData>>>
305
+ >;
306
+
307
+ /**
308
+ * Returns the hash of a child storage entry at a block's state.
309
+ *
310
+ * @rpcname: childstate_getStorageHash
311
+ * @param {PrefixedStorageKey} childStorageKey
312
+ * @param {StorageKey} key
313
+ * @param {BlockHash} at
314
+ **/
315
+ getStorageHash: GenericRpcCall<
316
+ (childStorageKey: PrefixedStorageKey, key: StorageKey, at?: BlockHash) => Promise<Option<Hash>>
317
+ >;
318
+
319
+ /**
320
+ * Returns the size of a child storage entry at a block's state
321
+ *
322
+ * @rpcname: childstate_getStorageSize
323
+ * @param {PrefixedStorageKey} childStorageKey
324
+ * @param {StorageKey} key
325
+ * @param {BlockHash} at
326
+ **/
327
+ getStorageSize: GenericRpcCall<
328
+ (childStorageKey: PrefixedStorageKey, key: StorageKey, at?: BlockHash) => Promise<Option<number>>
329
+ >;
330
+
331
+ [method: string]: GenericRpcCall;
332
+ };
333
+ offchain: {
334
+ /**
335
+ * Get offchain local storage under given key and prefix.
336
+ *
337
+ * @rpcname: offchain_localStorageGet
338
+ * @param {StorageKind} kind
339
+ * @param {Bytes} key
340
+ **/
341
+ localStorageGet: GenericRpcCall<(kind: StorageKind, key: Bytes) => Promise<Option<Bytes>>>;
342
+
343
+ /**
344
+ * Set offchain local storage under given key and prefix.
345
+ *
346
+ * @rpcname: offchain_localStorageSet
347
+ * @param {StorageKind} kind
348
+ * @param {Bytes} key
349
+ * @param {Bytes} value
350
+ **/
351
+ localStorageSet: GenericRpcCall<(kind: StorageKind, key: Bytes, value: Bytes) => Promise<void>>;
352
+
353
+ [method: string]: GenericRpcCall;
354
+ };
355
+ payment: {
356
+ /**
357
+ * Query the detailed fee of a given encoded extrinsic
358
+ *
359
+ * @rpcname: payment_queryFeeDetails
360
+ * @param {Bytes} extrinsic
361
+ * @param {BlockHash} at
362
+ **/
363
+ queryFeeDetails: GenericRpcCall<(extrinsic: Bytes, at?: BlockHash) => Promise<FeeDetails>>;
364
+
365
+ /**
366
+ * Retrieves the fee information for an encoded extrinsic
367
+ *
368
+ * @rpcname: payment_queryInfo
369
+ * @param {Bytes} extrinsic
370
+ * @param {BlockHash} at
371
+ **/
372
+ queryInfo: GenericRpcCall<(extrinsic: Bytes, at?: BlockHash) => Promise<RuntimeDispatchInfo>>;
373
+
374
+ [method: string]: GenericRpcCall;
375
+ };
376
+ rpc: {
377
+ /**
378
+ * Retrieves the list of RPC methods that are exposed by the node
379
+ *
380
+ * @rpcname: rpc_methods
381
+ **/
382
+ methods: GenericRpcCall<() => Promise<RpcMethods>>;
383
+
384
+ [method: string]: GenericRpcCall;
385
+ };
386
+ state: {
387
+ /**
388
+ * Call a method from the runtime API at a block's state.
389
+ *
390
+ * @rpcname: state_call
391
+ * @param {string} method
392
+ * @param {Bytes} data
393
+ * @param {BlockHash} at
394
+ **/
395
+ call: GenericRpcCall<(method: string, data: Bytes, at?: BlockHash) => Promise<Bytes>>;
396
+
397
+ /**
398
+ * Returns proof of storage for child key entries at a specific block state.
399
+ *
400
+ * @rpcname: state_getChildReadProof
401
+ * @param {PrefixedStorageKey} childStorageKey
402
+ * @param {Array<StorageKey>} keys
403
+ * @param {BlockHash} at
404
+ **/
405
+ getChildReadProof: GenericRpcCall<
406
+ (childStorageKey: PrefixedStorageKey, keys: Array<StorageKey>, at?: BlockHash) => Promise<ReadProof>
407
+ >;
408
+
409
+ /**
410
+ * Returns the keys with prefix, leave empty to get all the keys.
411
+ *
412
+ * @rpcname: state_getKeys
413
+ * @deprecated: Please use `getKeysPaged` with proper paging support
414
+ * @param {StorageKey} prefix
415
+ * @param {BlockHash} at
416
+ **/
417
+ getKeys: GenericRpcCall<(prefix: StorageKey, at?: BlockHash) => Promise<Array<StorageKey>>>;
418
+
419
+ /**
420
+ * Returns the keys with prefix with pagination support. Up to `count` keys will be returned. If `start_key` is passed, return next keys in storage in lexicographic order.
421
+ *
422
+ * @rpcname: state_getKeysPaged
423
+ * @param {Option<StorageKey>} prefix
424
+ * @param {number} count
425
+ * @param {StorageKey} startKey
426
+ * @param {BlockHash} at
427
+ **/
428
+ getKeysPaged: GenericRpcCall<
429
+ (prefix: Option<StorageKey>, count: number, startKey?: StorageKey, at?: BlockHash) => Promise<Array<StorageKey>>
430
+ >;
431
+
432
+ /**
433
+ * Returns the runtime metadata
434
+ *
435
+ * @rpcname: state_getMetadata
436
+ * @param {BlockHash} at
437
+ **/
438
+ getMetadata: GenericRpcCall<(at?: BlockHash) => Promise<Metadata>>;
439
+
440
+ /**
441
+ * Returns the keys with prefix, leave empty to get all the keys
442
+ *
443
+ * @rpcname: state_getPairs
444
+ * @deprecated: Please use `getKeysPaged` with proper paging support
445
+ * @param {StorageKey} prefix
446
+ * @param {BlockHash} at
447
+ **/
448
+ getPairs: GenericRpcCall<(prefix: StorageKey, at?: BlockHash) => Promise<Array<[StorageKey, StorageData]>>>;
449
+
450
+ /**
451
+ * Returns proof of storage entries at a specific block's state.
452
+ *
453
+ * @rpcname: state_getReadProof
454
+ * @param {Array<StorageKey>} keys
455
+ * @param {BlockHash} at
456
+ **/
457
+ getReadProof: GenericRpcCall<(keys: Array<StorageKey>, at?: BlockHash) => Promise<ReadProof>>;
458
+
459
+ /**
460
+ * Get the runtime version.
461
+ *
462
+ * @rpcname: state_getRuntimeVersion
463
+ **/
464
+ getRuntimeVersion: GenericRpcCall<() => Promise<RuntimeVersion>>;
465
+
466
+ /**
467
+ * Returns a storage entry at a specific block's state.
468
+ *
469
+ * @rpcname: state_getStorage
470
+ * @param {StorageKey} key
471
+ * @param {BlockHash} at
472
+ **/
473
+ getStorage: GenericRpcCall<(key: StorageKey, at?: BlockHash) => Promise<Option<StorageData>>>;
474
+
475
+ /**
476
+ * Returns the hash of a storage entry at a block's state.
477
+ *
478
+ * @rpcname: state_getStorageHash
479
+ * @param {StorageKey} key
480
+ * @param {BlockHash} at
481
+ **/
482
+ getStorageHash: GenericRpcCall<(key: StorageKey, at?: BlockHash) => Promise<Option<Hash>>>;
483
+
484
+ /**
485
+ * Returns the hash of a storage entry at a block's state.
486
+ *
487
+ * @rpcname: state_getStorageSize
488
+ * @param {StorageKey} key
489
+ * @param {BlockHash} at
490
+ **/
491
+ getStorageSize: GenericRpcCall<(key: StorageKey, at?: BlockHash) => Promise<Option<bigint>>>;
492
+
493
+ /**
494
+ * Query historical storage entries (by key) starting from a block given as the second parameter. NOTE: The first returned result contains the initial state of storage for all keys. Subsequent values in the vector represent changes to the previous state (diffs). WARNING: The time complexity of this query is O(|keys|*dist(block, hash)), and the memory complexity is O(dist(block, hash)) -- use with caution.
495
+ *
496
+ * @rpcname: state_queryStorage
497
+ * @param {Array<StorageKey>} keys
498
+ * @param {Hash} fromBlock
499
+ * @param {BlockHash} at
500
+ **/
501
+ queryStorage: GenericRpcCall<
502
+ (keys: Array<StorageKey>, fromBlock: Hash, at?: BlockHash) => Promise<Array<StorageChangeSet>>
503
+ >;
504
+
505
+ /**
506
+ * Query storage entries (by key) at a block hash given as the second parameter. NOTE: Each StorageChangeSet in the result corresponds to exactly one element -- the storage value under an input key at the input block hash.
507
+ *
508
+ * @rpcname: state_queryStorageAt
509
+ * @param {Array<StorageKey>} keys
510
+ * @param {BlockHash} at
511
+ **/
512
+ queryStorageAt: GenericRpcCall<(keys: Array<StorageKey>, at?: BlockHash) => Promise<Array<StorageChangeSet>>>;
513
+
514
+ /**
515
+ * New runtime version subscription
516
+ *
517
+ * @pubsub: state_runtimeVersion, state_subscribeRuntimeVersion, state_unsubscribeRuntimeVersion
518
+ **/
519
+ subscribeRuntimeVersion: GenericRpcCall<(callback: Callback<RuntimeVersion>) => Promise<Unsub>>;
520
+
521
+ /**
522
+ * Subscribes to storage changes for the provided keys
523
+ *
524
+ * @pubsub: state_storage, state_subscribeStorage, state_unsubscribeStorage
525
+ * @param {Array<StorageKey>} keys
526
+ **/
527
+ subscribeStorage: GenericRpcCall<(keys: Array<StorageKey>, callback: Callback<StorageChangeSet>) => Promise<Unsub>>;
528
+
529
+ /**
530
+ * The `traceBlock` RPC provides a way to trace the re-execution of a single block, collecting Spans and Events from both the client and the relevant WASM runtime.
531
+ *
532
+ * @rpcname: state_traceBlock
533
+ * @param {Hash} block
534
+ * @param {Option<string>} targets
535
+ * @param {Option<string>} storage_keys
536
+ * @param {Option<string>} methods
537
+ **/
538
+ traceBlock: GenericRpcCall<
539
+ (
540
+ block: Hash,
541
+ targets: Option<string>,
542
+ storage_keys: Option<string>,
543
+ methods: Option<string>,
544
+ ) => Promise<TraceBlockResponse>
545
+ >;
546
+
547
+ [method: string]: GenericRpcCall;
548
+ };
549
+ system: {
550
+ /**
551
+ * Returns the next valid index (aka nonce) for given account.
552
+ *
553
+ * This method takes into consideration all pending transactions
554
+ * currently in the pool and if no transactions are found in the pool
555
+ * it fallbacks to query the index from the runtime (aka. state nonce).
556
+ *
557
+ * @rpcname: system_accountNextIndex
558
+ * @param {string} address
559
+ **/
560
+ accountNextIndex: GenericRpcCall<(address: string) => Promise<number>>;
561
+
562
+ /**
563
+ * Adds the supplied directives to the current log filter
564
+ *
565
+ * The syntax is identical to the CLI `<target>=<level>`:
566
+ *
567
+ * `sync=debug,state=trace`
568
+ *
569
+ * @rpcname: system_addLogFilter
570
+ * @param {string} directives
571
+ **/
572
+ addLogFilter: GenericRpcCall<(directives: string) => Promise<void>>;
573
+
574
+ /**
575
+ * Adds a reserved peer. Returns the empty string or an error. The string
576
+ * parameter should encode a `p2p` multiaddr.
577
+ *
578
+ * `/ip4/198.51.100.19/tcp/30333/p2p/QmSk5HQbn6LhUwDiNMseVUjuRYhEtYj4aUZ6WfWoGURpdV`
579
+ * is an example of a valid, passing multiaddr with PeerId attached.
580
+ *
581
+ * @rpcname: system_addReservedPeer
582
+ * @param {string} peer
583
+ **/
584
+ addReservedPeer: GenericRpcCall<(peer: string) => Promise<void>>;
585
+
586
+ /**
587
+ * Get the chain's name. Given as a string identifier.
588
+ *
589
+ * @rpcname: system_chain
590
+ **/
591
+ chain: GenericRpcCall<() => Promise<string>>;
592
+
593
+ /**
594
+ * Get the chain's type.
595
+ *
596
+ * @rpcname: system_chainType
597
+ **/
598
+ chainType: GenericRpcCall<() => Promise<ChainType>>;
599
+
600
+ /**
601
+ * Dry run an extrinsic at a given block. Return SCALE encoded ApplyExtrinsicResult.
602
+ *
603
+ * @rpcname: system_dryRun
604
+ * @param {Bytes} extrinsic
605
+ * @param {BlockHash} at
606
+ **/
607
+ dryRun: GenericRpcCall<(extrinsic: Bytes, at?: BlockHash) => Promise<ApplyExtrinsicResult>>;
608
+
609
+ /**
610
+ * Return health status of the node.
611
+ *
612
+ * Node is considered healthy if it is:
613
+ * - connected to some peers (unless running in dev mode)
614
+ * - not performing a major sync
615
+ *
616
+ * @rpcname: system_health
617
+ **/
618
+ health: GenericRpcCall<() => Promise<Health>>;
619
+
620
+ /**
621
+ * Returns the multi-addresses that the local node is listening on
622
+ *
623
+ * The addresses include a trailing `/p2p/` with the local PeerId, and are thus suitable to
624
+ * be passed to `addReservedPeer` or as a bootnode address for example.
625
+ *
626
+ * @rpcname: system_localListenAddresses
627
+ **/
628
+ localListenAddresses: GenericRpcCall<() => Promise<Array<string>>>;
629
+
630
+ /**
631
+ * Returns the base58-encoded PeerId of the node.
632
+ *
633
+ * @rpcname: system_localPeerId
634
+ **/
635
+ localPeerId: GenericRpcCall<() => Promise<string>>;
636
+
637
+ /**
638
+ * Get the node's implementation name. Plain old string.
639
+ *
640
+ * @rpcname: system_name
641
+ **/
642
+ name: GenericRpcCall<() => Promise<string>>;
643
+
644
+ /**
645
+ * Returns the roles the node is running as
646
+ *
647
+ * @rpcname: system_nodeRoles
648
+ **/
649
+ nodeRoles: GenericRpcCall<() => Promise<Array<NodeRole>>>;
650
+
651
+ /**
652
+ * Returns the currently connected peers
653
+ *
654
+ * @rpcname: system_peers
655
+ **/
656
+ peers: GenericRpcCall<() => Promise<Array<PeerInfo>>>;
657
+
658
+ /**
659
+ * Get a custom set of properties as a JSON object, defined in the chain spec.
660
+ *
661
+ * @rpcname: system_properties
662
+ **/
663
+ properties: GenericRpcCall<() => Promise<ChainProperties>>;
664
+
665
+ /**
666
+ * Remove a reserved peer. Returns the empty string or an error. The string
667
+ * should encode only the PeerId e.g. `QmSk5HQbn6LhUwDiNMseVUjuRYhEtYj4aUZ6WfWoGURpdV`.
668
+ *
669
+ * @rpcname: system_removeReservedPeer
670
+ * @param {string} peerId
671
+ **/
672
+ removeReservedPeer: GenericRpcCall<(peerId: string) => Promise<void>>;
673
+
674
+ /**
675
+ * Returns the list of reserved peers
676
+ *
677
+ * @rpcname: system_reservedPeers
678
+ **/
679
+ reservedPeers: GenericRpcCall<() => Promise<Array<string>>>;
680
+
681
+ /**
682
+ * Resets the log filter to Substrate defaults
683
+ *
684
+ * @rpcname: system_resetLogFilter
685
+ **/
686
+ resetLogFilter: GenericRpcCall<() => Promise<void>>;
687
+
688
+ /**
689
+ * Returns the state of the syncing of the node: starting block, current best block, highest known block.
690
+ *
691
+ * @rpcname: system_syncState
692
+ **/
693
+ syncState: GenericRpcCall<() => Promise<SyncState>>;
694
+
695
+ /**
696
+ * Returns current state of the network.
697
+ *
698
+ * **Warning**: This API is not stable. Please do not programmatically interpret its output,
699
+ * as its format might change at any time.
700
+ *
701
+ * @rpcname: system_unstable_networkState
702
+ **/
703
+ unstable_networkState: GenericRpcCall<() => Promise<NetworkState>>;
704
+
705
+ /**
706
+ * Get the node implementation's version. Should be a semver string.
707
+ *
708
+ * @rpcname: system_version
709
+ **/
710
+ version: GenericRpcCall<() => Promise<string>>;
711
+
712
+ [method: string]: GenericRpcCall;
713
+ };
714
+ transaction: {
715
+ /**
716
+ * @rpcname: transaction_unstable_submitAndWatch
717
+ **/
718
+ unstable_submitAndWatch: GenericRpcCall;
719
+
720
+ /**
721
+ * @rpcname: transaction_unstable_unwatch
722
+ **/
723
+ unstable_unwatch: GenericRpcCall;
724
+
725
+ [method: string]: GenericRpcCall;
726
+ };
727
+ }