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