@dedot/chaintypes 0.0.1-next.f5bf4fc2.1 → 0.1.0

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 (144) hide show
  1. package/README.md +3 -1
  2. package/aleph/consts.d.ts +94 -13
  3. package/aleph/errors.d.ts +251 -182
  4. package/aleph/events.d.ts +319 -102
  5. package/aleph/index.d.ts +16 -11
  6. package/aleph/json-rpc.d.ts +76 -0
  7. package/aleph/query.d.ts +261 -168
  8. package/aleph/runtime.d.ts +90 -39
  9. package/aleph/tx.d.ts +1822 -1052
  10. package/aleph/types.d.ts +458 -138
  11. package/astar/consts.d.ts +112 -116
  12. package/astar/errors.d.ts +342 -409
  13. package/astar/events.d.ts +449 -358
  14. package/astar/index.d.ts +16 -11
  15. package/astar/json-rpc.d.ts +131 -0
  16. package/astar/query.d.ts +459 -367
  17. package/astar/runtime.d.ts +591 -98
  18. package/astar/tx.d.ts +2485 -3430
  19. package/astar/types.d.ts +1530 -4436
  20. package/index.d.ts +3 -0
  21. package/index.ts +3 -0
  22. package/kusama/consts.d.ts +54 -115
  23. package/kusama/errors.d.ts +696 -682
  24. package/kusama/events.d.ts +592 -407
  25. package/kusama/index.d.ts +16 -11
  26. package/kusama/json-rpc.d.ts +103 -0
  27. package/kusama/query.d.ts +840 -538
  28. package/kusama/runtime.d.ts +136 -65
  29. package/kusama/tx.d.ts +4557 -3051
  30. package/kusama/types.d.ts +1437 -1161
  31. package/kusamaAssetHub/consts.d.ts +66 -20
  32. package/kusamaAssetHub/errors.d.ts +428 -308
  33. package/kusamaAssetHub/events.d.ts +497 -305
  34. package/kusamaAssetHub/index.d.ts +16 -11
  35. package/kusamaAssetHub/json-rpc.d.ts +89 -0
  36. package/kusamaAssetHub/query.d.ts +376 -253
  37. package/kusamaAssetHub/runtime.d.ts +82 -41
  38. package/kusamaAssetHub/tx.d.ts +3264 -1955
  39. package/kusamaAssetHub/types.d.ts +1262 -726
  40. package/moonbeam/consts.d.ts +115 -170
  41. package/moonbeam/errors.d.ts +564 -787
  42. package/moonbeam/events.d.ts +583 -746
  43. package/moonbeam/index.d.ts +16 -11
  44. package/moonbeam/json-rpc.d.ts +137 -0
  45. package/moonbeam/query.d.ts +507 -607
  46. package/moonbeam/runtime.d.ts +132 -47
  47. package/moonbeam/tx.d.ts +3309 -3268
  48. package/moonbeam/types.d.ts +1484 -1375
  49. package/package.json +4 -14
  50. package/paseo/consts.d.ts +1331 -0
  51. package/paseo/errors.d.ts +2644 -0
  52. package/paseo/events.d.ts +2821 -0
  53. package/paseo/index.d.ts +27 -0
  54. package/paseo/json-rpc.d.ts +103 -0
  55. package/paseo/query.d.ts +3709 -0
  56. package/paseo/runtime.d.ts +1205 -0
  57. package/paseo/tx.d.ts +8024 -0
  58. package/paseo/types.d.ts +10194 -0
  59. package/polkadot/consts.d.ts +95 -50
  60. package/polkadot/errors.d.ts +619 -468
  61. package/polkadot/events.d.ts +582 -257
  62. package/polkadot/index.d.ts +16 -11
  63. package/polkadot/json-rpc.d.ts +103 -0
  64. package/polkadot/query.d.ts +770 -399
  65. package/polkadot/runtime.d.ts +136 -65
  66. package/polkadot/tx.d.ts +4268 -2368
  67. package/polkadot/types.d.ts +1570 -745
  68. package/polkadotAssetHub/consts.d.ts +154 -15
  69. package/polkadotAssetHub/errors.d.ts +615 -234
  70. package/polkadotAssetHub/events.d.ts +829 -270
  71. package/polkadotAssetHub/index.d.ts +16 -11
  72. package/polkadotAssetHub/json-rpc.d.ts +89 -0
  73. package/polkadotAssetHub/query.d.ts +438 -243
  74. package/polkadotAssetHub/runtime.d.ts +147 -40
  75. package/polkadotAssetHub/tx.d.ts +3747 -1643
  76. package/polkadotAssetHub/types.d.ts +2096 -806
  77. package/rococo/consts.d.ts +51 -32
  78. package/rococo/errors.d.ts +549 -605
  79. package/rococo/events.d.ts +447 -238
  80. package/rococo/index.d.ts +16 -11
  81. package/rococo/json-rpc.d.ts +103 -0
  82. package/rococo/query.d.ts +724 -426
  83. package/rococo/runtime.d.ts +366 -144
  84. package/rococo/tx.d.ts +6850 -3079
  85. package/rococo/types.d.ts +5959 -1619
  86. package/rococoAssetHub/consts.d.ts +92 -7
  87. package/rococoAssetHub/errors.d.ts +381 -285
  88. package/rococoAssetHub/events.d.ts +461 -140
  89. package/rococoAssetHub/index.d.ts +16 -11
  90. package/rococoAssetHub/json-rpc.d.ts +89 -0
  91. package/rococoAssetHub/query.d.ts +487 -174
  92. package/rococoAssetHub/runtime.d.ts +235 -51
  93. package/rococoAssetHub/tx.d.ts +6005 -2163
  94. package/rococoAssetHub/types.d.ts +6683 -1003
  95. package/substrate/consts.d.ts +233 -52
  96. package/substrate/errors.d.ts +966 -781
  97. package/substrate/events.d.ts +1226 -381
  98. package/substrate/index.d.ts +16 -11
  99. package/substrate/json-rpc.d.ts +103 -0
  100. package/substrate/query.d.ts +1090 -460
  101. package/substrate/runtime.d.ts +274 -71
  102. package/substrate/tx.d.ts +12313 -4510
  103. package/substrate/types.d.ts +11036 -1432
  104. package/westend/consts.d.ts +1349 -0
  105. package/westend/errors.d.ts +2736 -0
  106. package/westend/events.d.ts +2906 -0
  107. package/westend/index.d.ts +27 -0
  108. package/westend/json-rpc.d.ts +103 -0
  109. package/westend/query.d.ts +3855 -0
  110. package/westend/runtime.d.ts +1437 -0
  111. package/westend/tx.d.ts +10248 -0
  112. package/westend/types.d.ts +14769 -0
  113. package/westendAssetHub/consts.d.ts +126 -7
  114. package/westendAssetHub/errors.d.ts +426 -285
  115. package/westendAssetHub/events.d.ts +498 -140
  116. package/westendAssetHub/index.d.ts +16 -11
  117. package/westendAssetHub/json-rpc.d.ts +89 -0
  118. package/westendAssetHub/query.d.ts +526 -174
  119. package/westendAssetHub/runtime.d.ts +245 -56
  120. package/westendAssetHub/tx.d.ts +6196 -2166
  121. package/westendAssetHub/types.d.ts +6913 -1002
  122. package/westendPeople/consts.d.ts +434 -0
  123. package/westendPeople/errors.d.ts +769 -0
  124. package/westendPeople/events.d.ts +1082 -0
  125. package/westendPeople/index.d.ts +27 -0
  126. package/westendPeople/json-rpc.d.ts +89 -0
  127. package/westendPeople/query.d.ts +1209 -0
  128. package/westendPeople/runtime.d.ts +636 -0
  129. package/westendPeople/tx.d.ts +2891 -0
  130. package/westendPeople/types.d.ts +4984 -0
  131. package/aleph/rpc.d.ts +0 -727
  132. package/astar/rpc.d.ts +0 -974
  133. package/kusama/rpc.d.ts +0 -904
  134. package/kusamaAssetHub/rpc.d.ts +0 -746
  135. package/moonbeam/rpc.d.ts +0 -1015
  136. package/packageInfo.d.ts +0 -4
  137. package/packageInfo.js +0 -2
  138. package/packageInfo.ts +0 -3
  139. package/polkadot/rpc.d.ts +0 -904
  140. package/polkadotAssetHub/rpc.d.ts +0 -746
  141. package/rococo/rpc.d.ts +0 -904
  142. package/rococoAssetHub/rpc.d.ts +0 -746
  143. package/substrate/rpc.d.ts +0 -894
  144. package/westendAssetHub/rpc.d.ts +0 -746
package/kusama/rpc.d.ts DELETED
@@ -1,904 +0,0 @@
1
- // Generated by @dedot/codegen
2
-
3
- import type {
4
- GenericRpcCalls,
5
- Unsub,
6
- Callback,
7
- GenericRpcCall,
8
- ExtrinsicOrHash,
9
- EpochAuthorship,
10
- EncodedFinalityProofs,
11
- ReportedRoundStates,
12
- JustificationNotification,
13
- LeavesProof,
14
- StorageKind,
15
- RpcMethods,
16
- ReadProof,
17
- StorageChangeSet,
18
- TraceBlockResponse,
19
- MigrationStatusResult,
20
- ChainType,
21
- Health,
22
- NodeRole,
23
- PeerInfo,
24
- ChainProperties,
25
- SyncState,
26
- NetworkState,
27
- } from '@dedot/types';
28
- import type {
29
- Bytes,
30
- Hash,
31
- TransactionStatus,
32
- VersionedFinalityProof,
33
- Option,
34
- SignedBlock,
35
- BlockHash,
36
- BlockNumber,
37
- Header,
38
- StorageKey,
39
- PrefixedStorageKey,
40
- StorageData,
41
- FeeDetails,
42
- RuntimeDispatchInfo,
43
- Metadata,
44
- RuntimeVersion,
45
- ApplyExtrinsicResult,
46
- } from '@dedot/codecs';
47
-
48
- export interface RpcCalls extends GenericRpcCalls {
49
- archive: {
50
- /**
51
- * @rpcname: archive_unstable_body
52
- **/
53
- unstable_body: GenericRpcCall;
54
-
55
- /**
56
- * @rpcname: archive_unstable_call
57
- **/
58
- unstable_call: GenericRpcCall;
59
-
60
- /**
61
- * @rpcname: archive_unstable_finalizedHeight
62
- **/
63
- unstable_finalizedHeight: GenericRpcCall;
64
-
65
- /**
66
- * @rpcname: archive_unstable_genesisHash
67
- **/
68
- unstable_genesisHash: GenericRpcCall;
69
-
70
- /**
71
- * @rpcname: archive_unstable_hashByHeight
72
- **/
73
- unstable_hashByHeight: GenericRpcCall;
74
-
75
- /**
76
- * @rpcname: archive_unstable_header
77
- **/
78
- unstable_header: GenericRpcCall;
79
-
80
- /**
81
- * @rpcname: archive_unstable_storage
82
- **/
83
- unstable_storage: GenericRpcCall;
84
-
85
- [method: string]: GenericRpcCall;
86
- };
87
- author: {
88
- /**
89
- * Checks if the keystore has private keys for the given public key and key type. Returns `true` if a private key could be found.
90
- *
91
- * @rpcname: author_hasKey
92
- * @param {Bytes} publicKey
93
- * @param {string} keyType
94
- **/
95
- hasKey: GenericRpcCall<(publicKey: Bytes, keyType: string) => Promise<boolean>>;
96
-
97
- /**
98
- * 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.
99
- *
100
- * @rpcname: author_hasSessionKeys
101
- * @param {Bytes} sessionKeys
102
- **/
103
- hasSessionKeys: GenericRpcCall<(sessionKeys: Bytes) => Promise<boolean>>;
104
-
105
- /**
106
- * Insert a key into the keystore.
107
- *
108
- * @rpcname: author_insertKey
109
- * @param {string} keyType
110
- * @param {string} suri
111
- * @param {Bytes} publicKey
112
- **/
113
- insertKey: GenericRpcCall<(keyType: string, suri: string, publicKey: Bytes) => Promise<void>>;
114
-
115
- /**
116
- * Returns all pending extrinsics, potentially grouped by sender.
117
- *
118
- * @rpcname: author_pendingExtrinsics
119
- **/
120
- pendingExtrinsics: GenericRpcCall<() => Promise<Array<Bytes>>>;
121
-
122
- /**
123
- * Remove given extrinsic from the pool and temporarily ban it to prevent reimporting.
124
- *
125
- * @rpcname: author_removeExtrinsic
126
- * @param {Array<ExtrinsicOrHash>} bytesOrHash
127
- **/
128
- removeExtrinsic: GenericRpcCall<(bytesOrHash: Array<ExtrinsicOrHash>) => Promise<Array<Hash>>>;
129
-
130
- /**
131
- * Generate new session keys and returns the corresponding public keys.
132
- *
133
- * @rpcname: author_rotateKeys
134
- **/
135
- rotateKeys: GenericRpcCall<() => Promise<Bytes>>;
136
-
137
- /**
138
- * Submit and subscribe to watch an extrinsic until unsubscribed
139
- *
140
- * @pubsub: author_extrinsicUpdate, author_submitAndWatchExtrinsic, author_unwatchExtrinsic
141
- * @param {Bytes} extrinsic
142
- **/
143
- submitAndWatchExtrinsic: GenericRpcCall<
144
- (extrinsic: Bytes, callback: Callback<TransactionStatus>) => Promise<Unsub>
145
- >;
146
-
147
- /**
148
- * Submit hex-encoded extrinsic for inclusion in block.
149
- *
150
- * @rpcname: author_submitExtrinsic
151
- * @param {Bytes} extrinsic
152
- **/
153
- submitExtrinsic: GenericRpcCall<(extrinsic: Bytes) => Promise<Hash>>;
154
-
155
- [method: string]: GenericRpcCall;
156
- };
157
- babe: {
158
- /**
159
- * Returns data about which slots (primary or secondary) can be claimed in the current epoch with the keys in the keystore.
160
- *
161
- * @rpcname: babe_epochAuthorship
162
- **/
163
- epochAuthorship: GenericRpcCall<() => Promise<Record<string, EpochAuthorship>>>;
164
-
165
- [method: string]: GenericRpcCall;
166
- };
167
- beefy: {
168
- /**
169
- * Returns hash of the latest BEEFY finalized block as seen by this client.
170
- * The latest BEEFY block might not be available if the BEEFY gadget is not running
171
- * in the network or if the client is still initializing or syncing with the network.
172
- * In such case an error would be returned.
173
- *
174
- * @rpcname: beefy_getFinalizedHead
175
- **/
176
- getFinalizedHead: GenericRpcCall<() => Promise<Hash>>;
177
-
178
- /**
179
- * Returns the block most recently finalized by BEEFY, alongside its justification.
180
- *
181
- * @pubsub: beefy_justifications, beefy_subscribeJustifications, beefy_unsubscribeJustifications
182
- **/
183
- subscribeJustifications: GenericRpcCall<(callback: Callback<VersionedFinalityProof>) => Promise<Unsub>>;
184
-
185
- [method: string]: GenericRpcCall;
186
- };
187
- chainHead: {
188
- /**
189
- * @rpcname: chainHead_unstable_body
190
- **/
191
- unstable_body: GenericRpcCall;
192
-
193
- /**
194
- * @rpcname: chainHead_unstable_call
195
- **/
196
- unstable_call: GenericRpcCall;
197
-
198
- /**
199
- * @rpcname: chainHead_unstable_continue
200
- **/
201
- unstable_continue: GenericRpcCall;
202
-
203
- /**
204
- * @rpcname: chainHead_unstable_follow
205
- **/
206
- unstable_follow: GenericRpcCall;
207
-
208
- /**
209
- * @rpcname: chainHead_unstable_header
210
- **/
211
- unstable_header: GenericRpcCall;
212
-
213
- /**
214
- * @rpcname: chainHead_unstable_stopOperation
215
- **/
216
- unstable_stopOperation: GenericRpcCall;
217
-
218
- /**
219
- * @rpcname: chainHead_unstable_storage
220
- **/
221
- unstable_storage: GenericRpcCall;
222
-
223
- /**
224
- * @rpcname: chainHead_unstable_unfollow
225
- **/
226
- unstable_unfollow: GenericRpcCall;
227
-
228
- /**
229
- * @rpcname: chainHead_unstable_unpin
230
- **/
231
- unstable_unpin: GenericRpcCall;
232
-
233
- [method: string]: GenericRpcCall;
234
- };
235
- chainSpec: {
236
- /**
237
- * @rpcname: chainSpec_v1_chainName
238
- **/
239
- v1_chainName: GenericRpcCall;
240
-
241
- /**
242
- * @rpcname: chainSpec_v1_genesisHash
243
- **/
244
- v1_genesisHash: GenericRpcCall;
245
-
246
- /**
247
- * @rpcname: chainSpec_v1_properties
248
- **/
249
- v1_properties: GenericRpcCall;
250
-
251
- [method: string]: GenericRpcCall;
252
- };
253
- chain: {
254
- /**
255
- * Get header and body of a relay chain block
256
- *
257
- * @rpcname: chain_getBlock
258
- * @param {BlockHash} at
259
- **/
260
- getBlock: GenericRpcCall<(at?: BlockHash) => Promise<Option<SignedBlock>>>;
261
-
262
- /**
263
- * Get the block hash for a specific block
264
- *
265
- * @rpcname: chain_getBlockHash
266
- * @param {BlockNumber} blockNumber
267
- **/
268
- getBlockHash: GenericRpcCall<(blockNumber?: BlockNumber) => Promise<Option<BlockHash>>>;
269
-
270
- /**
271
- * Get hash of the last finalized block in the canon chain
272
- *
273
- * @rpcname: chain_getFinalizedHead
274
- **/
275
- getFinalizedHead: GenericRpcCall<() => Promise<BlockHash>>;
276
-
277
- /**
278
- * Retrieves the header for a specific block
279
- *
280
- * @rpcname: chain_getHeader
281
- * @param {BlockHash} at
282
- **/
283
- getHeader: GenericRpcCall<(at?: BlockHash) => Promise<Option<Header>>>;
284
-
285
- /**
286
- * All head subscription.
287
- *
288
- * @pubsub: chain_allHead, chain_subscribeAllHeads, chain_unsubscribeAllHeads
289
- **/
290
- subscribeAllHeads: GenericRpcCall<(callback: Callback<Header>) => Promise<Unsub>>;
291
-
292
- /**
293
- * Retrieves the best finalized header via subscription
294
- *
295
- * @pubsub: chain_finalizedHead, chain_subscribeFinalizedHeads, chain_unsubscribeFinalizedHeads
296
- **/
297
- subscribeFinalizedHeads: GenericRpcCall<(callback: Callback<Header>) => Promise<Unsub>>;
298
-
299
- /**
300
- * Retrieves the best header via subscription
301
- *
302
- * @pubsub: chain_newHead, chain_subscribeNewHeads, chain_unsubscribeNewHeads
303
- **/
304
- subscribeNewHeads: GenericRpcCall<(callback: Callback<Header>) => Promise<Unsub>>;
305
-
306
- [method: string]: GenericRpcCall;
307
- };
308
- childstate: {
309
- /**
310
- * Returns the keys with prefix from a child storage, leave empty to get all the keys
311
- *
312
- * @rpcname: childstate_getKeys
313
- * @deprecated: Please use `getKeysPaged` with proper paging support
314
- * @param {PrefixedStorageKey} childStorageKey
315
- * @param {StorageKey} prefix
316
- * @param {BlockHash} at
317
- **/
318
- getKeys: GenericRpcCall<
319
- (childStorageKey: PrefixedStorageKey, prefix: StorageKey, at?: BlockHash) => Promise<Array<StorageKey>>
320
- >;
321
-
322
- /**
323
- * Returns the keys with prefix from a child storage with pagination support.
324
- * Up to `count` keys will be returned.
325
- * If `start_key` is passed, return next keys in storage in lexicographic order.
326
- *
327
- * @rpcname: childstate_getKeysPaged
328
- * @param {PrefixedStorageKey} childStorageKey
329
- * @param {Option<StorageKey>} prefix
330
- * @param {number} count
331
- * @param {StorageKey} startKey
332
- * @param {BlockHash} at
333
- **/
334
- getKeysPaged: GenericRpcCall<
335
- (
336
- childStorageKey: PrefixedStorageKey,
337
- prefix: Option<StorageKey>,
338
- count: number,
339
- startKey?: StorageKey,
340
- at?: BlockHash,
341
- ) => Promise<Array<StorageKey>>
342
- >;
343
-
344
- /**
345
- * Returns a child storage entry at specific block's state.
346
- *
347
- * @rpcname: childstate_getStorage
348
- * @param {PrefixedStorageKey} childStorageKey
349
- * @param {StorageKey} key
350
- * @param {BlockHash} at
351
- **/
352
- getStorage: GenericRpcCall<
353
- (childStorageKey: PrefixedStorageKey, key: StorageKey, at?: BlockHash) => Promise<Option<StorageData>>
354
- >;
355
-
356
- /**
357
- * Returns child storage entries for multiple keys at a specific block's state.
358
- *
359
- * @rpcname: childstate_getStorageEntries
360
- * @param {PrefixedStorageKey} childStorageKey
361
- * @param {Array<StorageKey>} keys
362
- * @param {BlockHash} at
363
- **/
364
- getStorageEntries: GenericRpcCall<
365
- (
366
- childStorageKey: PrefixedStorageKey,
367
- keys: Array<StorageKey>,
368
- at?: BlockHash,
369
- ) => Promise<Array<Option<StorageData>>>
370
- >;
371
-
372
- /**
373
- * Returns the hash of a child storage entry at a block's state.
374
- *
375
- * @rpcname: childstate_getStorageHash
376
- * @param {PrefixedStorageKey} childStorageKey
377
- * @param {StorageKey} key
378
- * @param {BlockHash} at
379
- **/
380
- getStorageHash: GenericRpcCall<
381
- (childStorageKey: PrefixedStorageKey, key: StorageKey, at?: BlockHash) => Promise<Option<Hash>>
382
- >;
383
-
384
- /**
385
- * Returns the size of a child storage entry at a block's state
386
- *
387
- * @rpcname: childstate_getStorageSize
388
- * @param {PrefixedStorageKey} childStorageKey
389
- * @param {StorageKey} key
390
- * @param {BlockHash} at
391
- **/
392
- getStorageSize: GenericRpcCall<
393
- (childStorageKey: PrefixedStorageKey, key: StorageKey, at?: BlockHash) => Promise<Option<number>>
394
- >;
395
-
396
- [method: string]: GenericRpcCall;
397
- };
398
- grandpa: {
399
- /**
400
- * Prove finality for the given block number, returning the Justification for the last block in the set.
401
- *
402
- * @rpcname: grandpa_proveFinality
403
- * @param {BlockNumber} blockNumber
404
- **/
405
- proveFinality: GenericRpcCall<(blockNumber: BlockNumber) => Promise<Option<EncodedFinalityProofs>>>;
406
-
407
- /**
408
- * Returns the state of the current best round state as well as the ongoing background rounds
409
- *
410
- * @rpcname: grandpa_roundState
411
- **/
412
- roundState: GenericRpcCall<() => Promise<ReportedRoundStates>>;
413
-
414
- /**
415
- * Returns the block most recently finalized by Grandpa, alongside side its justification.
416
- *
417
- * @pubsub: grandpa_justifications, grandpa_subscribeJustifications, grandpa_unsubscribeJustifications
418
- **/
419
- subscribeJustifications: GenericRpcCall<(callback: Callback<JustificationNotification>) => Promise<Unsub>>;
420
-
421
- [method: string]: GenericRpcCall;
422
- };
423
- mmr: {
424
- /**
425
- * Generate an MMR proof for the given `block_numbers`.
426
- *
427
- * This method calls into a runtime with MMR pallet included and attempts to generate
428
- * an MMR proof for the set of blocks that have the given `block_numbers` with the MMR root at
429
- * `best_known_block_number`. `best_known_block_number` must be larger than all the
430
- * `block_numbers` for the function to succeed.
431
- *
432
- * Optionally via `at`, a block hash at which the runtime should be queried can be specified.
433
- * Optionally via `best_known_block_number`, the proof can be generated using the MMR's state
434
- * at a specific best block. Note that if `best_known_block_number` is provided, then also
435
- * specifying the block hash via `at` isn't super-useful here, unless you're generating proof
436
- * using non-finalized blocks where there are several competing forks. That's because MMR state
437
- * will be fixed to the state with `best_known_block_number`, which already points to
438
- * some historical block.
439
- *
440
- * Returns the (full) leaves and a proof for these leaves (compact encoding, i.e. hash of
441
- * the leaves). Both parameters are SCALE-encoded.
442
- * The order of entries in the `leaves` field of the returned struct
443
- * is the same as the order of the entries in `block_numbers` supplied
444
- *
445
- * @rpcname: mmr_generateProof
446
- * @param {Array<BlockNumber>} blockNumbers
447
- * @param {BlockNumber} bestKnownBlockNumber
448
- * @param {BlockHash} at
449
- **/
450
- generateProof: GenericRpcCall<
451
- (blockNumbers: Array<BlockNumber>, bestKnownBlockNumber?: BlockNumber, at?: BlockHash) => Promise<LeavesProof>
452
- >;
453
-
454
- /**
455
- * Get the MMR root hash for the current best block
456
- *
457
- * @rpcname: mmr_root
458
- * @param {BlockHash} at
459
- **/
460
- root: GenericRpcCall<(at?: BlockHash) => Promise<Hash>>;
461
-
462
- /**
463
- * Verify an MMR `proof`.
464
- *
465
- * This method calls into a runtime with MMR pallet included and attempts to verify
466
- * an MMR proof.
467
- *
468
- * Returns `true` if the proof is valid, else returns the verification error.
469
- *
470
- * @rpcname: mmr_verifyProof
471
- * @param {LeavesProof} proof
472
- **/
473
- verifyProof: GenericRpcCall<(proof: LeavesProof) => Promise<boolean>>;
474
-
475
- /**
476
- * Verify an MMR `proof` statelessly given an `mmr_root`.
477
- *
478
- * This method calls into a runtime with MMR pallet included and attempts to verify
479
- * an MMR proof against a provided MMR root.
480
- *
481
- * Returns `true` if the proof is valid, else returns the verification error.
482
- *
483
- * @rpcname: mmr_verifyProofStateless
484
- * @param {Hash} mmrRoot
485
- * @param {LeavesProof} proof
486
- **/
487
- verifyProofStateless: GenericRpcCall<(mmrRoot: Hash, proof: LeavesProof) => Promise<boolean>>;
488
-
489
- [method: string]: GenericRpcCall;
490
- };
491
- offchain: {
492
- /**
493
- * Get offchain local storage under given key and prefix.
494
- *
495
- * @rpcname: offchain_localStorageGet
496
- * @param {StorageKind} kind
497
- * @param {Bytes} key
498
- **/
499
- localStorageGet: GenericRpcCall<(kind: StorageKind, key: Bytes) => Promise<Option<Bytes>>>;
500
-
501
- /**
502
- * Set offchain local storage under given key and prefix.
503
- *
504
- * @rpcname: offchain_localStorageSet
505
- * @param {StorageKind} kind
506
- * @param {Bytes} key
507
- * @param {Bytes} value
508
- **/
509
- localStorageSet: GenericRpcCall<(kind: StorageKind, key: Bytes, value: Bytes) => Promise<void>>;
510
-
511
- [method: string]: GenericRpcCall;
512
- };
513
- payment: {
514
- /**
515
- * Query the detailed fee of a given encoded extrinsic
516
- *
517
- * @rpcname: payment_queryFeeDetails
518
- * @param {Bytes} extrinsic
519
- * @param {BlockHash} at
520
- **/
521
- queryFeeDetails: GenericRpcCall<(extrinsic: Bytes, at?: BlockHash) => Promise<FeeDetails>>;
522
-
523
- /**
524
- * Retrieves the fee information for an encoded extrinsic
525
- *
526
- * @rpcname: payment_queryInfo
527
- * @param {Bytes} extrinsic
528
- * @param {BlockHash} at
529
- **/
530
- queryInfo: GenericRpcCall<(extrinsic: Bytes, at?: BlockHash) => Promise<RuntimeDispatchInfo>>;
531
-
532
- [method: string]: GenericRpcCall;
533
- };
534
- rpc: {
535
- /**
536
- * Retrieves the list of RPC methods that are exposed by the node
537
- *
538
- * @rpcname: rpc_methods
539
- **/
540
- methods: GenericRpcCall<() => Promise<RpcMethods>>;
541
-
542
- [method: string]: GenericRpcCall;
543
- };
544
- state: {
545
- /**
546
- * Call a method from the runtime API at a block's state.
547
- *
548
- * @rpcname: state_call
549
- * @param {string} method
550
- * @param {Bytes} data
551
- * @param {BlockHash} at
552
- **/
553
- call: GenericRpcCall<(method: string, data: Bytes, at?: BlockHash) => Promise<Bytes>>;
554
-
555
- /**
556
- * Returns proof of storage for child key entries at a specific block state.
557
- *
558
- * @rpcname: state_getChildReadProof
559
- * @param {PrefixedStorageKey} childStorageKey
560
- * @param {Array<StorageKey>} keys
561
- * @param {BlockHash} at
562
- **/
563
- getChildReadProof: GenericRpcCall<
564
- (childStorageKey: PrefixedStorageKey, keys: Array<StorageKey>, at?: BlockHash) => Promise<ReadProof>
565
- >;
566
-
567
- /**
568
- * Returns the keys with prefix, leave empty to get all the keys.
569
- *
570
- * @rpcname: state_getKeys
571
- * @deprecated: Please use `getKeysPaged` with proper paging support
572
- * @param {StorageKey} prefix
573
- * @param {BlockHash} at
574
- **/
575
- getKeys: GenericRpcCall<(prefix: StorageKey, at?: BlockHash) => Promise<Array<StorageKey>>>;
576
-
577
- /**
578
- * 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.
579
- *
580
- * @rpcname: state_getKeysPaged
581
- * @param {Option<StorageKey>} prefix
582
- * @param {number} count
583
- * @param {StorageKey} startKey
584
- * @param {BlockHash} at
585
- **/
586
- getKeysPaged: GenericRpcCall<
587
- (prefix: Option<StorageKey>, count: number, startKey?: StorageKey, at?: BlockHash) => Promise<Array<StorageKey>>
588
- >;
589
-
590
- /**
591
- * Returns the runtime metadata
592
- *
593
- * @rpcname: state_getMetadata
594
- * @param {BlockHash} at
595
- **/
596
- getMetadata: GenericRpcCall<(at?: BlockHash) => Promise<Metadata>>;
597
-
598
- /**
599
- * Returns the keys with prefix, leave empty to get all the keys
600
- *
601
- * @rpcname: state_getPairs
602
- * @deprecated: Please use `getKeysPaged` with proper paging support
603
- * @param {StorageKey} prefix
604
- * @param {BlockHash} at
605
- **/
606
- getPairs: GenericRpcCall<(prefix: StorageKey, at?: BlockHash) => Promise<Array<[StorageKey, StorageData]>>>;
607
-
608
- /**
609
- * Returns proof of storage entries at a specific block's state.
610
- *
611
- * @rpcname: state_getReadProof
612
- * @param {Array<StorageKey>} keys
613
- * @param {BlockHash} at
614
- **/
615
- getReadProof: GenericRpcCall<(keys: Array<StorageKey>, at?: BlockHash) => Promise<ReadProof>>;
616
-
617
- /**
618
- * Get the runtime version.
619
- *
620
- * @rpcname: state_getRuntimeVersion
621
- **/
622
- getRuntimeVersion: GenericRpcCall<() => Promise<RuntimeVersion>>;
623
-
624
- /**
625
- * Returns a storage entry at a specific block's state.
626
- *
627
- * @rpcname: state_getStorage
628
- * @param {StorageKey} key
629
- * @param {BlockHash} at
630
- **/
631
- getStorage: GenericRpcCall<(key: StorageKey, at?: BlockHash) => Promise<Option<StorageData>>>;
632
-
633
- /**
634
- * Returns the hash of a storage entry at a block's state.
635
- *
636
- * @rpcname: state_getStorageHash
637
- * @param {StorageKey} key
638
- * @param {BlockHash} at
639
- **/
640
- getStorageHash: GenericRpcCall<(key: StorageKey, at?: BlockHash) => Promise<Option<Hash>>>;
641
-
642
- /**
643
- * Returns the hash of a storage entry at a block's state.
644
- *
645
- * @rpcname: state_getStorageSize
646
- * @param {StorageKey} key
647
- * @param {BlockHash} at
648
- **/
649
- getStorageSize: GenericRpcCall<(key: StorageKey, at?: BlockHash) => Promise<Option<bigint>>>;
650
-
651
- /**
652
- * 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.
653
- *
654
- * @rpcname: state_queryStorage
655
- * @param {Array<StorageKey>} keys
656
- * @param {Hash} fromBlock
657
- * @param {BlockHash} at
658
- **/
659
- queryStorage: GenericRpcCall<
660
- (keys: Array<StorageKey>, fromBlock: Hash, at?: BlockHash) => Promise<Array<StorageChangeSet>>
661
- >;
662
-
663
- /**
664
- * 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.
665
- *
666
- * @rpcname: state_queryStorageAt
667
- * @param {Array<StorageKey>} keys
668
- * @param {BlockHash} at
669
- **/
670
- queryStorageAt: GenericRpcCall<(keys: Array<StorageKey>, at?: BlockHash) => Promise<Array<StorageChangeSet>>>;
671
-
672
- /**
673
- * New runtime version subscription
674
- *
675
- * @pubsub: state_runtimeVersion, state_subscribeRuntimeVersion, state_unsubscribeRuntimeVersion
676
- **/
677
- subscribeRuntimeVersion: GenericRpcCall<(callback: Callback<RuntimeVersion>) => Promise<Unsub>>;
678
-
679
- /**
680
- * Subscribes to storage changes for the provided keys
681
- *
682
- * @pubsub: state_storage, state_subscribeStorage, state_unsubscribeStorage
683
- * @param {Array<StorageKey>} keys
684
- **/
685
- subscribeStorage: GenericRpcCall<(keys: Array<StorageKey>, callback: Callback<StorageChangeSet>) => Promise<Unsub>>;
686
-
687
- /**
688
- * 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.
689
- *
690
- * @rpcname: state_traceBlock
691
- * @param {Hash} block
692
- * @param {Option<string>} targets
693
- * @param {Option<string>} storage_keys
694
- * @param {Option<string>} methods
695
- **/
696
- traceBlock: GenericRpcCall<
697
- (
698
- block: Hash,
699
- targets: Option<string>,
700
- storage_keys: Option<string>,
701
- methods: Option<string>,
702
- ) => Promise<TraceBlockResponse>
703
- >;
704
-
705
- /**
706
- * Check current migration state. This call is performed locally without submitting any transactions. Thus executing this won't change any state. Nonetheless it is a VERY costy call that should be only exposed to trusted peers.
707
- *
708
- * @rpcname: state_trieMigrationStatus
709
- * @param {BlockHash} at
710
- **/
711
- trieMigrationStatus: GenericRpcCall<(at?: BlockHash) => Promise<MigrationStatusResult>>;
712
-
713
- [method: string]: GenericRpcCall;
714
- };
715
- syncstate: {
716
- /**
717
- * Returns the JSON-serialized chainspec running the node, with a sync state.
718
- *
719
- * @rpcname: sync_state_genSyncSpec
720
- * @param {boolean} raw
721
- **/
722
- genSyncSpec: GenericRpcCall<(raw: boolean) => Promise<Record<string, any>>>;
723
-
724
- [method: string]: GenericRpcCall;
725
- };
726
- system: {
727
- /**
728
- * Returns the next valid index (aka nonce) for given account.
729
- *
730
- * This method takes into consideration all pending transactions
731
- * currently in the pool and if no transactions are found in the pool
732
- * it fallbacks to query the index from the runtime (aka. state nonce).
733
- *
734
- * @rpcname: system_accountNextIndex
735
- * @param {string} address
736
- **/
737
- accountNextIndex: GenericRpcCall<(address: string) => Promise<number>>;
738
-
739
- /**
740
- * Adds the supplied directives to the current log filter
741
- *
742
- * The syntax is identical to the CLI `<target>=<level>`:
743
- *
744
- * `sync=debug,state=trace`
745
- *
746
- * @rpcname: system_addLogFilter
747
- * @param {string} directives
748
- **/
749
- addLogFilter: GenericRpcCall<(directives: string) => Promise<void>>;
750
-
751
- /**
752
- * Adds a reserved peer. Returns the empty string or an error. The string
753
- * parameter should encode a `p2p` multiaddr.
754
- *
755
- * `/ip4/198.51.100.19/tcp/30333/p2p/QmSk5HQbn6LhUwDiNMseVUjuRYhEtYj4aUZ6WfWoGURpdV`
756
- * is an example of a valid, passing multiaddr with PeerId attached.
757
- *
758
- * @rpcname: system_addReservedPeer
759
- * @param {string} peer
760
- **/
761
- addReservedPeer: GenericRpcCall<(peer: string) => Promise<void>>;
762
-
763
- /**
764
- * Get the chain's name. Given as a string identifier.
765
- *
766
- * @rpcname: system_chain
767
- **/
768
- chain: GenericRpcCall<() => Promise<string>>;
769
-
770
- /**
771
- * Get the chain's type.
772
- *
773
- * @rpcname: system_chainType
774
- **/
775
- chainType: GenericRpcCall<() => Promise<ChainType>>;
776
-
777
- /**
778
- * Dry run an extrinsic at a given block. Return SCALE encoded ApplyExtrinsicResult.
779
- *
780
- * @rpcname: system_dryRun
781
- * @param {Bytes} extrinsic
782
- * @param {BlockHash} at
783
- **/
784
- dryRun: GenericRpcCall<(extrinsic: Bytes, at?: BlockHash) => Promise<ApplyExtrinsicResult>>;
785
-
786
- /**
787
- * Return health status of the node.
788
- *
789
- * Node is considered healthy if it is:
790
- * - connected to some peers (unless running in dev mode)
791
- * - not performing a major sync
792
- *
793
- * @rpcname: system_health
794
- **/
795
- health: GenericRpcCall<() => Promise<Health>>;
796
-
797
- /**
798
- * Returns the multi-addresses that the local node is listening on
799
- *
800
- * The addresses include a trailing `/p2p/` with the local PeerId, and are thus suitable to
801
- * be passed to `addReservedPeer` or as a bootnode address for example.
802
- *
803
- * @rpcname: system_localListenAddresses
804
- **/
805
- localListenAddresses: GenericRpcCall<() => Promise<Array<string>>>;
806
-
807
- /**
808
- * Returns the base58-encoded PeerId of the node.
809
- *
810
- * @rpcname: system_localPeerId
811
- **/
812
- localPeerId: GenericRpcCall<() => Promise<string>>;
813
-
814
- /**
815
- * Get the node's implementation name. Plain old string.
816
- *
817
- * @rpcname: system_name
818
- **/
819
- name: GenericRpcCall<() => Promise<string>>;
820
-
821
- /**
822
- * Returns the roles the node is running as
823
- *
824
- * @rpcname: system_nodeRoles
825
- **/
826
- nodeRoles: GenericRpcCall<() => Promise<Array<NodeRole>>>;
827
-
828
- /**
829
- * Returns the currently connected peers
830
- *
831
- * @rpcname: system_peers
832
- **/
833
- peers: GenericRpcCall<() => Promise<Array<PeerInfo>>>;
834
-
835
- /**
836
- * Get a custom set of properties as a JSON object, defined in the chain spec.
837
- *
838
- * @rpcname: system_properties
839
- **/
840
- properties: GenericRpcCall<() => Promise<ChainProperties>>;
841
-
842
- /**
843
- * Remove a reserved peer. Returns the empty string or an error. The string
844
- * should encode only the PeerId e.g. `QmSk5HQbn6LhUwDiNMseVUjuRYhEtYj4aUZ6WfWoGURpdV`.
845
- *
846
- * @rpcname: system_removeReservedPeer
847
- * @param {string} peerId
848
- **/
849
- removeReservedPeer: GenericRpcCall<(peerId: string) => Promise<void>>;
850
-
851
- /**
852
- * Returns the list of reserved peers
853
- *
854
- * @rpcname: system_reservedPeers
855
- **/
856
- reservedPeers: GenericRpcCall<() => Promise<Array<string>>>;
857
-
858
- /**
859
- * Resets the log filter to Substrate defaults
860
- *
861
- * @rpcname: system_resetLogFilter
862
- **/
863
- resetLogFilter: GenericRpcCall<() => Promise<void>>;
864
-
865
- /**
866
- * Returns the state of the syncing of the node: starting block, current best block, highest known block.
867
- *
868
- * @rpcname: system_syncState
869
- **/
870
- syncState: GenericRpcCall<() => Promise<SyncState>>;
871
-
872
- /**
873
- * Returns current state of the network.
874
- *
875
- * **Warning**: This API is not stable. Please do not programmatically interpret its output,
876
- * as its format might change at any time.
877
- *
878
- * @rpcname: system_unstable_networkState
879
- **/
880
- unstable_networkState: GenericRpcCall<() => Promise<NetworkState>>;
881
-
882
- /**
883
- * Get the node implementation's version. Should be a semver string.
884
- *
885
- * @rpcname: system_version
886
- **/
887
- version: GenericRpcCall<() => Promise<string>>;
888
-
889
- [method: string]: GenericRpcCall;
890
- };
891
- transactionWatch: {
892
- /**
893
- * @rpcname: transactionWatch_unstable_submitAndWatch
894
- **/
895
- unstable_submitAndWatch: GenericRpcCall;
896
-
897
- /**
898
- * @rpcname: transactionWatch_unstable_unwatch
899
- **/
900
- unstable_unwatch: GenericRpcCall;
901
-
902
- [method: string]: GenericRpcCall;
903
- };
904
- }