@dedot/chaintypes 0.0.1-alpha.24 → 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 (277) hide show
  1. package/aleph/consts.d.ts +590 -528
  2. package/aleph/errors.d.ts +981 -818
  3. package/aleph/events.d.ts +924 -937
  4. package/aleph/index.d.ts +11 -8
  5. package/aleph/query.d.ts +1477 -1268
  6. package/aleph/rpc.d.ts +725 -573
  7. package/aleph/runtime.d.ts +541 -406
  8. package/aleph/tx.d.ts +2664 -2202
  9. package/aleph/types.d.ts +3474 -5388
  10. package/astar/consts.d.ts +753 -674
  11. package/astar/errors.d.ts +1576 -1313
  12. package/astar/events.d.ts +1709 -1628
  13. package/astar/index.d.ts +11 -8
  14. package/astar/query.d.ts +1756 -1471
  15. package/astar/rpc.d.ts +972 -773
  16. package/astar/runtime.d.ts +310 -258
  17. package/astar/tx.d.ts +5474 -4806
  18. package/astar/types.d.ts +8848 -12108
  19. package/index.ts +10 -0
  20. package/kusama/consts.d.ts +1573 -1422
  21. package/kusama/errors.d.ts +2995 -2490
  22. package/kusama/events.d.ts +2996 -2723
  23. package/kusama/index.d.ts +11 -8
  24. package/kusama/query.d.ts +3828 -3248
  25. package/kusama/rpc.d.ts +902 -724
  26. package/kusama/runtime.d.ts +1130 -840
  27. package/kusama/tx.d.ts +7073 -6010
  28. package/kusama/types.d.ts +10151 -15344
  29. package/kusamaAssetHub/consts.d.ts +714 -627
  30. package/kusamaAssetHub/errors.d.ts +1405 -1160
  31. package/kusamaAssetHub/events.d.ts +2149 -2060
  32. package/kusamaAssetHub/index.d.ts +11 -8
  33. package/kusamaAssetHub/query.d.ts +1551 -1298
  34. package/kusamaAssetHub/rpc.d.ts +744 -588
  35. package/kusamaAssetHub/runtime.d.ts +510 -398
  36. package/kusamaAssetHub/tx.d.ts +5050 -4212
  37. package/kusamaAssetHub/types.d.ts +5976 -10009
  38. package/moonbeam/consts.d.ts +1075 -956
  39. package/moonbeam/errors.d.ts +2131 -1793
  40. package/moonbeam/events.d.ts +2932 -2681
  41. package/moonbeam/index.d.ts +11 -8
  42. package/moonbeam/query.d.ts +2391 -2024
  43. package/moonbeam/rpc.d.ts +1013 -807
  44. package/moonbeam/runtime.d.ts +665 -502
  45. package/moonbeam/tx.d.ts +6152 -5201
  46. package/moonbeam/types.d.ts +7731 -12035
  47. package/package.json +9 -8
  48. package/packageInfo.js +1 -1
  49. package/packageInfo.ts +3 -0
  50. package/polkadot/consts.d.ts +1272 -1155
  51. package/polkadot/errors.d.ts +2420 -2016
  52. package/polkadot/events.d.ts +2314 -2092
  53. package/polkadot/index.d.ts +11 -8
  54. package/polkadot/query.d.ts +3319 -2808
  55. package/polkadot/rpc.d.ts +902 -724
  56. package/polkadot/runtime.d.ts +1130 -840
  57. package/polkadot/tx.d.ts +5909 -5005
  58. package/polkadot/types.d.ts +8742 -13290
  59. package/polkadotAssetHub/consts.d.ts +586 -519
  60. package/polkadotAssetHub/errors.d.ts +1115 -921
  61. package/polkadotAssetHub/events.d.ts +1850 -1782
  62. package/polkadotAssetHub/index.d.ts +11 -8
  63. package/polkadotAssetHub/query.d.ts +1457 -1219
  64. package/polkadotAssetHub/rpc.d.ts +744 -588
  65. package/polkadotAssetHub/runtime.d.ts +447 -355
  66. package/polkadotAssetHub/tx.d.ts +4184 -3487
  67. package/polkadotAssetHub/types.d.ts +5183 -8808
  68. package/rococoAssetHub/consts.d.ts +745 -653
  69. package/rococoAssetHub/errors.d.ts +1490 -1227
  70. package/rococoAssetHub/events.d.ts +2127 -2047
  71. package/rococoAssetHub/index.d.ts +11 -8
  72. package/rococoAssetHub/query.d.ts +1513 -1266
  73. package/rococoAssetHub/rpc.d.ts +744 -588
  74. package/rococoAssetHub/runtime.d.ts +538 -424
  75. package/rococoAssetHub/tx.d.ts +5164 -4302
  76. package/rococoAssetHub/types.d.ts +6321 -10636
  77. package/substrate/consts.d.ts +2218 -1966
  78. package/substrate/errors.d.ts +4019 -3333
  79. package/substrate/events.d.ts +4585 -4255
  80. package/substrate/index.d.ts +11 -8
  81. package/substrate/query.d.ts +3887 -3347
  82. package/substrate/rpc.d.ts +892 -716
  83. package/substrate/runtime.d.ts +937 -704
  84. package/substrate/tx.d.ts +10387 -8796
  85. package/substrate/types.d.ts +12809 -19761
  86. package/westendAssetHub/consts.d.ts +745 -653
  87. package/westendAssetHub/errors.d.ts +1490 -1227
  88. package/westendAssetHub/events.d.ts +2127 -2047
  89. package/westendAssetHub/index.d.ts +11 -8
  90. package/westendAssetHub/query.d.ts +1513 -1266
  91. package/westendAssetHub/rpc.d.ts +744 -588
  92. package/westendAssetHub/runtime.d.ts +577 -452
  93. package/westendAssetHub/tx.d.ts +5164 -4302
  94. package/westendAssetHub/types.d.ts +6321 -10633
  95. package/aleph/consts.js +0 -2
  96. package/aleph/errors.js +0 -2
  97. package/aleph/events.js +0 -2
  98. package/aleph/index.js +0 -3
  99. package/aleph/query.js +0 -2
  100. package/aleph/rpc.js +0 -2
  101. package/aleph/runtime.js +0 -2
  102. package/aleph/tx.js +0 -2
  103. package/aleph/types.js +0 -2
  104. package/astar/consts.js +0 -2
  105. package/astar/errors.js +0 -2
  106. package/astar/events.js +0 -2
  107. package/astar/index.js +0 -3
  108. package/astar/query.js +0 -2
  109. package/astar/rpc.js +0 -2
  110. package/astar/runtime.js +0 -2
  111. package/astar/tx.js +0 -2
  112. package/astar/types.js +0 -2
  113. package/cjs/aleph/consts.js +0 -3
  114. package/cjs/aleph/errors.js +0 -3
  115. package/cjs/aleph/events.js +0 -3
  116. package/cjs/aleph/index.js +0 -19
  117. package/cjs/aleph/query.js +0 -3
  118. package/cjs/aleph/rpc.js +0 -3
  119. package/cjs/aleph/runtime.js +0 -3
  120. package/cjs/aleph/tx.js +0 -3
  121. package/cjs/aleph/types.js +0 -3
  122. package/cjs/astar/consts.js +0 -3
  123. package/cjs/astar/errors.js +0 -3
  124. package/cjs/astar/events.js +0 -3
  125. package/cjs/astar/index.js +0 -19
  126. package/cjs/astar/query.js +0 -3
  127. package/cjs/astar/rpc.js +0 -3
  128. package/cjs/astar/runtime.js +0 -3
  129. package/cjs/astar/tx.js +0 -3
  130. package/cjs/astar/types.js +0 -3
  131. package/cjs/index.js +0 -2
  132. package/cjs/kusama/consts.js +0 -3
  133. package/cjs/kusama/errors.js +0 -3
  134. package/cjs/kusama/events.js +0 -3
  135. package/cjs/kusama/index.js +0 -19
  136. package/cjs/kusama/query.js +0 -3
  137. package/cjs/kusama/rpc.js +0 -3
  138. package/cjs/kusama/runtime.js +0 -3
  139. package/cjs/kusama/tx.js +0 -3
  140. package/cjs/kusama/types.js +0 -3
  141. package/cjs/kusamaAssetHub/consts.js +0 -3
  142. package/cjs/kusamaAssetHub/errors.js +0 -3
  143. package/cjs/kusamaAssetHub/events.js +0 -3
  144. package/cjs/kusamaAssetHub/index.js +0 -19
  145. package/cjs/kusamaAssetHub/query.js +0 -3
  146. package/cjs/kusamaAssetHub/rpc.js +0 -3
  147. package/cjs/kusamaAssetHub/runtime.js +0 -3
  148. package/cjs/kusamaAssetHub/tx.js +0 -3
  149. package/cjs/kusamaAssetHub/types.js +0 -3
  150. package/cjs/moonbeam/consts.js +0 -3
  151. package/cjs/moonbeam/errors.js +0 -3
  152. package/cjs/moonbeam/events.js +0 -3
  153. package/cjs/moonbeam/index.js +0 -19
  154. package/cjs/moonbeam/query.js +0 -3
  155. package/cjs/moonbeam/rpc.js +0 -3
  156. package/cjs/moonbeam/runtime.js +0 -3
  157. package/cjs/moonbeam/tx.js +0 -3
  158. package/cjs/moonbeam/types.js +0 -3
  159. package/cjs/package.json +0 -1
  160. package/cjs/packageInfo.js +0 -5
  161. package/cjs/polkadot/consts.js +0 -3
  162. package/cjs/polkadot/errors.js +0 -3
  163. package/cjs/polkadot/events.js +0 -3
  164. package/cjs/polkadot/index.js +0 -19
  165. package/cjs/polkadot/query.js +0 -3
  166. package/cjs/polkadot/rpc.js +0 -3
  167. package/cjs/polkadot/runtime.js +0 -3
  168. package/cjs/polkadot/tx.js +0 -3
  169. package/cjs/polkadot/types.js +0 -3
  170. package/cjs/polkadotAssetHub/consts.js +0 -3
  171. package/cjs/polkadotAssetHub/errors.js +0 -3
  172. package/cjs/polkadotAssetHub/events.js +0 -3
  173. package/cjs/polkadotAssetHub/index.js +0 -19
  174. package/cjs/polkadotAssetHub/query.js +0 -3
  175. package/cjs/polkadotAssetHub/rpc.js +0 -3
  176. package/cjs/polkadotAssetHub/runtime.js +0 -3
  177. package/cjs/polkadotAssetHub/tx.js +0 -3
  178. package/cjs/polkadotAssetHub/types.js +0 -3
  179. package/cjs/rococoAssetHub/consts.js +0 -3
  180. package/cjs/rococoAssetHub/errors.js +0 -3
  181. package/cjs/rococoAssetHub/events.js +0 -3
  182. package/cjs/rococoAssetHub/index.js +0 -19
  183. package/cjs/rococoAssetHub/query.js +0 -3
  184. package/cjs/rococoAssetHub/rpc.js +0 -3
  185. package/cjs/rococoAssetHub/runtime.js +0 -3
  186. package/cjs/rococoAssetHub/tx.js +0 -3
  187. package/cjs/rococoAssetHub/types.js +0 -3
  188. package/cjs/substrate/consts.js +0 -3
  189. package/cjs/substrate/errors.js +0 -3
  190. package/cjs/substrate/events.js +0 -3
  191. package/cjs/substrate/index.js +0 -19
  192. package/cjs/substrate/query.js +0 -3
  193. package/cjs/substrate/rpc.js +0 -3
  194. package/cjs/substrate/runtime.js +0 -3
  195. package/cjs/substrate/tx.js +0 -3
  196. package/cjs/substrate/types.js +0 -3
  197. package/cjs/westendAssetHub/consts.js +0 -3
  198. package/cjs/westendAssetHub/errors.js +0 -3
  199. package/cjs/westendAssetHub/events.js +0 -3
  200. package/cjs/westendAssetHub/index.js +0 -19
  201. package/cjs/westendAssetHub/query.js +0 -3
  202. package/cjs/westendAssetHub/rpc.js +0 -3
  203. package/cjs/westendAssetHub/runtime.js +0 -3
  204. package/cjs/westendAssetHub/tx.js +0 -3
  205. package/cjs/westendAssetHub/types.js +0 -3
  206. package/kusama/consts.js +0 -2
  207. package/kusama/errors.js +0 -2
  208. package/kusama/events.js +0 -2
  209. package/kusama/index.js +0 -3
  210. package/kusama/query.js +0 -2
  211. package/kusama/rpc.js +0 -2
  212. package/kusama/runtime.js +0 -2
  213. package/kusama/tx.js +0 -2
  214. package/kusama/types.js +0 -2
  215. package/kusamaAssetHub/consts.js +0 -2
  216. package/kusamaAssetHub/errors.js +0 -2
  217. package/kusamaAssetHub/events.js +0 -2
  218. package/kusamaAssetHub/index.js +0 -3
  219. package/kusamaAssetHub/query.js +0 -2
  220. package/kusamaAssetHub/rpc.js +0 -2
  221. package/kusamaAssetHub/runtime.js +0 -2
  222. package/kusamaAssetHub/tx.js +0 -2
  223. package/kusamaAssetHub/types.js +0 -2
  224. package/moonbeam/consts.js +0 -2
  225. package/moonbeam/errors.js +0 -2
  226. package/moonbeam/events.js +0 -2
  227. package/moonbeam/index.js +0 -3
  228. package/moonbeam/query.js +0 -2
  229. package/moonbeam/rpc.js +0 -2
  230. package/moonbeam/runtime.js +0 -2
  231. package/moonbeam/tx.js +0 -2
  232. package/moonbeam/types.js +0 -2
  233. package/polkadot/consts.js +0 -2
  234. package/polkadot/errors.js +0 -2
  235. package/polkadot/events.js +0 -2
  236. package/polkadot/index.js +0 -3
  237. package/polkadot/query.js +0 -2
  238. package/polkadot/rpc.js +0 -2
  239. package/polkadot/runtime.js +0 -2
  240. package/polkadot/tx.js +0 -2
  241. package/polkadot/types.js +0 -2
  242. package/polkadotAssetHub/consts.js +0 -2
  243. package/polkadotAssetHub/errors.js +0 -2
  244. package/polkadotAssetHub/events.js +0 -2
  245. package/polkadotAssetHub/index.js +0 -3
  246. package/polkadotAssetHub/query.js +0 -2
  247. package/polkadotAssetHub/rpc.js +0 -2
  248. package/polkadotAssetHub/runtime.js +0 -2
  249. package/polkadotAssetHub/tx.js +0 -2
  250. package/polkadotAssetHub/types.js +0 -2
  251. package/rococoAssetHub/consts.js +0 -2
  252. package/rococoAssetHub/errors.js +0 -2
  253. package/rococoAssetHub/events.js +0 -2
  254. package/rococoAssetHub/index.js +0 -3
  255. package/rococoAssetHub/query.js +0 -2
  256. package/rococoAssetHub/rpc.js +0 -2
  257. package/rococoAssetHub/runtime.js +0 -2
  258. package/rococoAssetHub/tx.js +0 -2
  259. package/rococoAssetHub/types.js +0 -2
  260. package/substrate/consts.js +0 -2
  261. package/substrate/errors.js +0 -2
  262. package/substrate/events.js +0 -2
  263. package/substrate/index.js +0 -3
  264. package/substrate/query.js +0 -2
  265. package/substrate/rpc.js +0 -2
  266. package/substrate/runtime.js +0 -2
  267. package/substrate/tx.js +0 -2
  268. package/substrate/types.js +0 -2
  269. package/westendAssetHub/consts.js +0 -2
  270. package/westendAssetHub/errors.js +0 -2
  271. package/westendAssetHub/events.js +0 -2
  272. package/westendAssetHub/index.js +0 -3
  273. package/westendAssetHub/query.js +0 -2
  274. package/westendAssetHub/rpc.js +0 -2
  275. package/westendAssetHub/runtime.js +0 -2
  276. package/westendAssetHub/tx.js +0 -2
  277. package/westendAssetHub/types.js +0 -2
package/astar/rpc.d.ts CHANGED
@@ -1,775 +1,974 @@
1
- import type { GenericRpcCalls, Unsub, Callback, GenericRpcCall, ExtrinsicOrHash, BlockStats, StorageKind, RpcMethods, ReadProof, StorageChangeSet, TraceBlockResponse, ChainType, Health, NodeRole, PeerInfo, ChainProperties, SyncState, NetworkState } from '@dedot/types';
2
- import type { Bytes, Hash, TransactionStatus, Option, SignedBlock, BlockHash, BlockNumber, Header, StorageKey, PrefixedStorageKey, StorageData, FeeDetails, RuntimeDispatchInfo, Metadata, RuntimeVersion, ApplyExtrinsicResult } from '@dedot/codecs';
1
+ // Generated by @dedot/codegen
2
+
3
+ import type {
4
+ GenericRpcCalls,
5
+ Unsub,
6
+ Callback,
7
+ GenericRpcCall,
8
+ ExtrinsicOrHash,
9
+ BlockStats,
10
+ StorageKind,
11
+ RpcMethods,
12
+ ReadProof,
13
+ StorageChangeSet,
14
+ TraceBlockResponse,
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
+
3
42
  export interface RpcCalls extends GenericRpcCalls {
4
- author: {
5
- /**
6
- * Checks if the keystore has private keys for the given public key and key type. Returns `true` if a private key could be found.
7
- *
8
- * @rpcname: author_hasKey
9
- * @param {Bytes} publicKey
10
- * @param {string} keyType
11
- **/
12
- hasKey: GenericRpcCall<(publicKey: Bytes, keyType: string) => Promise<boolean>>;
13
- /**
14
- * 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.
15
- *
16
- * @rpcname: author_hasSessionKeys
17
- * @param {Bytes} sessionKeys
18
- **/
19
- hasSessionKeys: GenericRpcCall<(sessionKeys: Bytes) => Promise<boolean>>;
20
- /**
21
- * Insert a key into the keystore.
22
- *
23
- * @rpcname: author_insertKey
24
- * @param {string} keyType
25
- * @param {string} suri
26
- * @param {Bytes} publicKey
27
- **/
28
- insertKey: GenericRpcCall<(keyType: string, suri: string, publicKey: Bytes) => Promise<void>>;
29
- /**
30
- * Returns all pending extrinsics, potentially grouped by sender.
31
- *
32
- * @rpcname: author_pendingExtrinsics
33
- **/
34
- pendingExtrinsics: GenericRpcCall<() => Promise<Array<Bytes>>>;
35
- /**
36
- * Remove given extrinsic from the pool and temporarily ban it to prevent reimporting.
37
- *
38
- * @rpcname: author_removeExtrinsic
39
- * @param {Array<ExtrinsicOrHash>} bytesOrHash
40
- **/
41
- removeExtrinsic: GenericRpcCall<(bytesOrHash: Array<ExtrinsicOrHash>) => Promise<Array<Hash>>>;
42
- /**
43
- * Generate new session keys and returns the corresponding public keys.
44
- *
45
- * @rpcname: author_rotateKeys
46
- **/
47
- rotateKeys: GenericRpcCall<() => Promise<Bytes>>;
48
- /**
49
- * Submit and subscribe to watch an extrinsic until unsubscribed
50
- *
51
- * @pubsub: author_extrinsicUpdate, author_submitAndWatchExtrinsic, author_unwatchExtrinsic
52
- * @param {Bytes} extrinsic
53
- **/
54
- submitAndWatchExtrinsic: GenericRpcCall<(extrinsic: Bytes, callback: Callback<TransactionStatus>) => Promise<Unsub>>;
55
- /**
56
- * Submit hex-encoded extrinsic for inclusion in block.
57
- *
58
- * @rpcname: author_submitExtrinsic
59
- * @param {Bytes} extrinsic
60
- **/
61
- submitExtrinsic: GenericRpcCall<(extrinsic: Bytes) => Promise<Hash>>;
62
- [method: string]: GenericRpcCall;
63
- };
64
- chainHead: {
65
- /**
66
- * @rpcname: chainHead_unstable_body
67
- **/
68
- unstable_body: GenericRpcCall;
69
- /**
70
- * @rpcname: chainHead_unstable_call
71
- **/
72
- unstable_call: GenericRpcCall;
73
- /**
74
- * @rpcname: chainHead_unstable_follow
75
- **/
76
- unstable_follow: GenericRpcCall;
77
- /**
78
- * @rpcname: chainHead_unstable_genesisHash
79
- **/
80
- unstable_genesisHash: GenericRpcCall;
81
- /**
82
- * @rpcname: chainHead_unstable_header
83
- **/
84
- unstable_header: GenericRpcCall;
85
- /**
86
- * @rpcname: chainHead_unstable_stopBody
87
- **/
88
- unstable_stopBody: GenericRpcCall;
89
- /**
90
- * @rpcname: chainHead_unstable_stopCall
91
- **/
92
- unstable_stopCall: GenericRpcCall;
93
- /**
94
- * @rpcname: chainHead_unstable_stopStorage
95
- **/
96
- unstable_stopStorage: GenericRpcCall;
97
- /**
98
- * @rpcname: chainHead_unstable_storage
99
- **/
100
- unstable_storage: GenericRpcCall;
101
- /**
102
- * @rpcname: chainHead_unstable_unfollow
103
- **/
104
- unstable_unfollow: GenericRpcCall;
105
- /**
106
- * @rpcname: chainHead_unstable_unpin
107
- **/
108
- unstable_unpin: GenericRpcCall;
109
- [method: string]: GenericRpcCall;
110
- };
111
- chain: {
112
- /**
113
- * Get header and body of a relay chain block
114
- *
115
- * @rpcname: chain_getBlock
116
- * @param {BlockHash} at
117
- **/
118
- getBlock: GenericRpcCall<(at?: BlockHash) => Promise<Option<SignedBlock>>>;
119
- /**
120
- * Get the block hash for a specific block
121
- *
122
- * @rpcname: chain_getBlockHash
123
- * @param {BlockNumber} blockNumber
124
- **/
125
- getBlockHash: GenericRpcCall<(blockNumber?: BlockNumber) => Promise<Option<BlockHash>>>;
126
- /**
127
- * Get hash of the last finalized block in the canon chain
128
- *
129
- * @rpcname: chain_getFinalizedHead
130
- **/
131
- getFinalizedHead: GenericRpcCall<() => Promise<BlockHash>>;
132
- /**
133
- * Retrieves the header for a specific block
134
- *
135
- * @rpcname: chain_getHeader
136
- * @param {BlockHash} at
137
- **/
138
- getHeader: GenericRpcCall<(at?: BlockHash) => Promise<Option<Header>>>;
139
- /**
140
- * All head subscription.
141
- *
142
- * @pubsub: chain_allHead, chain_subscribeAllHeads, chain_unsubscribeAllHeads
143
- **/
144
- subscribeAllHeads: GenericRpcCall<(callback: Callback<Header>) => Promise<Unsub>>;
145
- /**
146
- * Retrieves the best finalized header via subscription
147
- *
148
- * @pubsub: chain_finalizedHead, chain_subscribeFinalizedHeads, chain_unsubscribeFinalizedHeads
149
- **/
150
- subscribeFinalizedHeads: GenericRpcCall<(callback: Callback<Header>) => Promise<Unsub>>;
151
- /**
152
- * Retrieves the best header via subscription
153
- *
154
- * @pubsub: chain_newHead, chain_subscribeNewHeads, chain_unsubscribeNewHeads
155
- **/
156
- subscribeNewHeads: GenericRpcCall<(callback: Callback<Header>) => Promise<Unsub>>;
157
- [method: string]: GenericRpcCall;
158
- };
159
- childstate: {
160
- /**
161
- * Returns the keys with prefix from a child storage, leave empty to get all the keys
162
- *
163
- * @rpcname: childstate_getKeys
164
- * @deprecated: Please use `getKeysPaged` with proper paging support
165
- * @param {PrefixedStorageKey} childStorageKey
166
- * @param {StorageKey} prefix
167
- * @param {BlockHash} at
168
- **/
169
- getKeys: GenericRpcCall<(childStorageKey: PrefixedStorageKey, prefix: StorageKey, at?: BlockHash) => Promise<Array<StorageKey>>>;
170
- /**
171
- * Returns the keys with prefix from a child storage with pagination support.
172
- * Up to `count` keys will be returned.
173
- * If `start_key` is passed, return next keys in storage in lexicographic order.
174
- *
175
- * @rpcname: childstate_getKeysPaged
176
- * @param {PrefixedStorageKey} childStorageKey
177
- * @param {Option<StorageKey>} prefix
178
- * @param {number} count
179
- * @param {StorageKey} startKey
180
- * @param {BlockHash} at
181
- **/
182
- getKeysPaged: GenericRpcCall<(childStorageKey: PrefixedStorageKey, prefix: Option<StorageKey>, count: number, startKey?: StorageKey, at?: BlockHash) => Promise<Array<StorageKey>>>;
183
- /**
184
- * Returns a child storage entry at specific block's state.
185
- *
186
- * @rpcname: childstate_getStorage
187
- * @param {PrefixedStorageKey} childStorageKey
188
- * @param {StorageKey} key
189
- * @param {BlockHash} at
190
- **/
191
- getStorage: GenericRpcCall<(childStorageKey: PrefixedStorageKey, key: StorageKey, at?: BlockHash) => Promise<Option<StorageData>>>;
192
- /**
193
- * Returns child storage entries for multiple keys at a specific block's state.
194
- *
195
- * @rpcname: childstate_getStorageEntries
196
- * @param {PrefixedStorageKey} childStorageKey
197
- * @param {Array<StorageKey>} keys
198
- * @param {BlockHash} at
199
- **/
200
- getStorageEntries: GenericRpcCall<(childStorageKey: PrefixedStorageKey, keys: Array<StorageKey>, at?: BlockHash) => Promise<Array<Option<StorageData>>>>;
201
- /**
202
- * Returns the hash of a child storage entry at a block's state.
203
- *
204
- * @rpcname: childstate_getStorageHash
205
- * @param {PrefixedStorageKey} childStorageKey
206
- * @param {StorageKey} key
207
- * @param {BlockHash} at
208
- **/
209
- getStorageHash: GenericRpcCall<(childStorageKey: PrefixedStorageKey, key: StorageKey, at?: BlockHash) => Promise<Option<Hash>>>;
210
- /**
211
- * Returns the size of a child storage entry at a block's state
212
- *
213
- * @rpcname: childstate_getStorageSize
214
- * @param {PrefixedStorageKey} childStorageKey
215
- * @param {StorageKey} key
216
- * @param {BlockHash} at
217
- **/
218
- getStorageSize: GenericRpcCall<(childStorageKey: PrefixedStorageKey, key: StorageKey, at?: BlockHash) => Promise<Option<number>>>;
219
- [method: string]: GenericRpcCall;
220
- };
221
- dev: {
222
- /**
223
- * Reexecute the specified `block_hash` and gather statistics while doing so.
224
- *
225
- * This function requires the specified block and its parent to be available
226
- * at the queried node. If either the specified block or the parent is pruned,
227
- * this function will return `None`.
228
- *
229
- * @rpcname: dev_getBlockStats
230
- * @param {BlockHash} at
231
- **/
232
- getBlockStats: GenericRpcCall<(at?: BlockHash) => Promise<Option<BlockStats>>>;
233
- [method: string]: GenericRpcCall;
234
- };
235
- eth: {
236
- /**
237
- * @rpcname: eth_accounts
238
- **/
239
- accounts: GenericRpcCall;
240
- /**
241
- * @rpcname: eth_blockNumber
242
- **/
243
- blockNumber: GenericRpcCall;
244
- /**
245
- * @rpcname: eth_call
246
- **/
247
- call: GenericRpcCall;
248
- /**
249
- * @rpcname: eth_chainId
250
- **/
251
- chainId: GenericRpcCall;
252
- /**
253
- * @rpcname: eth_coinbase
254
- **/
255
- coinbase: GenericRpcCall;
256
- /**
257
- * @rpcname: eth_estimateGas
258
- **/
259
- estimateGas: GenericRpcCall;
260
- /**
261
- * @rpcname: eth_feeHistory
262
- **/
263
- feeHistory: GenericRpcCall;
264
- /**
265
- * @rpcname: eth_gasPrice
266
- **/
267
- gasPrice: GenericRpcCall;
268
- /**
269
- * @rpcname: eth_getBalance
270
- **/
271
- getBalance: GenericRpcCall;
272
- /**
273
- * @rpcname: eth_getBlockByHash
274
- **/
275
- getBlockByHash: GenericRpcCall;
276
- /**
277
- * @rpcname: eth_getBlockByNumber
278
- **/
279
- getBlockByNumber: GenericRpcCall;
280
- /**
281
- * @rpcname: eth_getBlockTransactionCountByHash
282
- **/
283
- getBlockTransactionCountByHash: GenericRpcCall;
284
- /**
285
- * @rpcname: eth_getBlockTransactionCountByNumber
286
- **/
287
- getBlockTransactionCountByNumber: GenericRpcCall;
288
- /**
289
- * @rpcname: eth_getCode
290
- **/
291
- getCode: GenericRpcCall;
292
- /**
293
- * @rpcname: eth_getFilterChanges
294
- **/
295
- getFilterChanges: GenericRpcCall;
296
- /**
297
- * @rpcname: eth_getFilterLogs
298
- **/
299
- getFilterLogs: GenericRpcCall;
300
- /**
301
- * @rpcname: eth_getLogs
302
- **/
303
- getLogs: GenericRpcCall;
304
- /**
305
- * @rpcname: eth_getStorageAt
306
- **/
307
- getStorageAt: GenericRpcCall;
308
- /**
309
- * @rpcname: eth_getTransactionByBlockHashAndIndex
310
- **/
311
- getTransactionByBlockHashAndIndex: GenericRpcCall;
312
- /**
313
- * @rpcname: eth_getTransactionByBlockNumberAndIndex
314
- **/
315
- getTransactionByBlockNumberAndIndex: GenericRpcCall;
316
- /**
317
- * @rpcname: eth_getTransactionByHash
318
- **/
319
- getTransactionByHash: GenericRpcCall;
320
- /**
321
- * @rpcname: eth_getTransactionCount
322
- **/
323
- getTransactionCount: GenericRpcCall;
324
- /**
325
- * @rpcname: eth_getTransactionReceipt
326
- **/
327
- getTransactionReceipt: GenericRpcCall;
328
- /**
329
- * @rpcname: eth_getUncleByBlockHashAndIndex
330
- **/
331
- getUncleByBlockHashAndIndex: GenericRpcCall;
332
- /**
333
- * @rpcname: eth_getUncleByBlockNumberAndIndex
334
- **/
335
- getUncleByBlockNumberAndIndex: GenericRpcCall;
336
- /**
337
- * @rpcname: eth_getUncleCountByBlockHash
338
- **/
339
- getUncleCountByBlockHash: GenericRpcCall;
340
- /**
341
- * @rpcname: eth_getUncleCountByBlockNumber
342
- **/
343
- getUncleCountByBlockNumber: GenericRpcCall;
344
- /**
345
- * @rpcname: eth_getWork
346
- **/
347
- getWork: GenericRpcCall;
348
- /**
349
- * @rpcname: eth_hashrate
350
- **/
351
- hashrate: GenericRpcCall;
352
- /**
353
- * @rpcname: eth_maxPriorityFeePerGas
354
- **/
355
- maxPriorityFeePerGas: GenericRpcCall;
356
- /**
357
- * @rpcname: eth_mining
358
- **/
359
- mining: GenericRpcCall;
360
- /**
361
- * @rpcname: eth_newBlockFilter
362
- **/
363
- newBlockFilter: GenericRpcCall;
364
- /**
365
- * @rpcname: eth_newFilter
366
- **/
367
- newFilter: GenericRpcCall;
368
- /**
369
- * @rpcname: eth_newPendingTransactionFilter
370
- **/
371
- newPendingTransactionFilter: GenericRpcCall;
372
- /**
373
- * @rpcname: eth_protocolVersion
374
- **/
375
- protocolVersion: GenericRpcCall;
376
- /**
377
- * @rpcname: eth_sendRawTransaction
378
- **/
379
- sendRawTransaction: GenericRpcCall;
380
- /**
381
- * @rpcname: eth_sendTransaction
382
- **/
383
- sendTransaction: GenericRpcCall;
384
- /**
385
- * @rpcname: eth_submitHashrate
386
- **/
387
- submitHashrate: GenericRpcCall;
388
- /**
389
- * @rpcname: eth_submitWork
390
- **/
391
- submitWork: GenericRpcCall;
392
- /**
393
- * @rpcname: eth_subscribe
394
- **/
395
- subscribe: GenericRpcCall;
396
- /**
397
- * @rpcname: eth_syncing
398
- **/
399
- syncing: GenericRpcCall;
400
- /**
401
- * @rpcname: eth_uninstallFilter
402
- **/
403
- uninstallFilter: GenericRpcCall;
404
- /**
405
- * @rpcname: eth_unsubscribe
406
- **/
407
- unsubscribe: GenericRpcCall;
408
- [method: string]: GenericRpcCall;
409
- };
410
- net: {
411
- /**
412
- * @rpcname: net_listening
413
- **/
414
- listening: GenericRpcCall;
415
- /**
416
- * @rpcname: net_peerCount
417
- **/
418
- peerCount: GenericRpcCall;
419
- /**
420
- * @rpcname: net_version
421
- **/
422
- version: GenericRpcCall;
423
- [method: string]: GenericRpcCall;
424
- };
425
- offchain: {
426
- /**
427
- * Get offchain local storage under given key and prefix.
428
- *
429
- * @rpcname: offchain_localStorageGet
430
- * @param {StorageKind} kind
431
- * @param {Bytes} key
432
- **/
433
- localStorageGet: GenericRpcCall<(kind: StorageKind, key: Bytes) => Promise<Option<Bytes>>>;
434
- /**
435
- * Set offchain local storage under given key and prefix.
436
- *
437
- * @rpcname: offchain_localStorageSet
438
- * @param {StorageKind} kind
439
- * @param {Bytes} key
440
- * @param {Bytes} value
441
- **/
442
- localStorageSet: GenericRpcCall<(kind: StorageKind, key: Bytes, value: Bytes) => Promise<void>>;
443
- [method: string]: GenericRpcCall;
444
- };
445
- payment: {
446
- /**
447
- * Query the detailed fee of a given encoded extrinsic
448
- *
449
- * @rpcname: payment_queryFeeDetails
450
- * @param {Bytes} extrinsic
451
- * @param {BlockHash} at
452
- **/
453
- queryFeeDetails: GenericRpcCall<(extrinsic: Bytes, at?: BlockHash) => Promise<FeeDetails>>;
454
- /**
455
- * Retrieves the fee information for an encoded extrinsic
456
- *
457
- * @rpcname: payment_queryInfo
458
- * @param {Bytes} extrinsic
459
- * @param {BlockHash} at
460
- **/
461
- queryInfo: GenericRpcCall<(extrinsic: Bytes, at?: BlockHash) => Promise<RuntimeDispatchInfo>>;
462
- [method: string]: GenericRpcCall;
463
- };
464
- rpc: {
465
- /**
466
- * Retrieves the list of RPC methods that are exposed by the node
467
- *
468
- * @rpcname: rpc_methods
469
- **/
470
- methods: GenericRpcCall<() => Promise<RpcMethods>>;
471
- [method: string]: GenericRpcCall;
472
- };
473
- state: {
474
- /**
475
- * Call a method from the runtime API at a block's state.
476
- *
477
- * @rpcname: state_call
478
- * @param {string} method
479
- * @param {Bytes} data
480
- * @param {BlockHash} at
481
- **/
482
- call: GenericRpcCall<(method: string, data: Bytes, at?: BlockHash) => Promise<Bytes>>;
483
- /**
484
- * Returns proof of storage for child key entries at a specific block state.
485
- *
486
- * @rpcname: state_getChildReadProof
487
- * @param {PrefixedStorageKey} childStorageKey
488
- * @param {Array<StorageKey>} keys
489
- * @param {BlockHash} at
490
- **/
491
- getChildReadProof: GenericRpcCall<(childStorageKey: PrefixedStorageKey, keys: Array<StorageKey>, at?: BlockHash) => Promise<ReadProof>>;
492
- /**
493
- * Returns the keys with prefix, leave empty to get all the keys.
494
- *
495
- * @rpcname: state_getKeys
496
- * @deprecated: Please use `getKeysPaged` with proper paging support
497
- * @param {StorageKey} prefix
498
- * @param {BlockHash} at
499
- **/
500
- getKeys: GenericRpcCall<(prefix: StorageKey, at?: BlockHash) => Promise<Array<StorageKey>>>;
501
- /**
502
- * 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.
503
- *
504
- * @rpcname: state_getKeysPaged
505
- * @param {Option<StorageKey>} prefix
506
- * @param {number} count
507
- * @param {StorageKey} startKey
508
- * @param {BlockHash} at
509
- **/
510
- getKeysPaged: GenericRpcCall<(prefix: Option<StorageKey>, count: number, startKey?: StorageKey, at?: BlockHash) => Promise<Array<StorageKey>>>;
511
- /**
512
- * Returns the runtime metadata
513
- *
514
- * @rpcname: state_getMetadata
515
- * @param {BlockHash} at
516
- **/
517
- getMetadata: GenericRpcCall<(at?: BlockHash) => Promise<Metadata>>;
518
- /**
519
- * Returns the keys with prefix, leave empty to get all the keys
520
- *
521
- * @rpcname: state_getPairs
522
- * @deprecated: Please use `getKeysPaged` with proper paging support
523
- * @param {StorageKey} prefix
524
- * @param {BlockHash} at
525
- **/
526
- getPairs: GenericRpcCall<(prefix: StorageKey, at?: BlockHash) => Promise<Array<[StorageKey, StorageData]>>>;
527
- /**
528
- * Returns proof of storage entries at a specific block's state.
529
- *
530
- * @rpcname: state_getReadProof
531
- * @param {Array<StorageKey>} keys
532
- * @param {BlockHash} at
533
- **/
534
- getReadProof: GenericRpcCall<(keys: Array<StorageKey>, at?: BlockHash) => Promise<ReadProof>>;
535
- /**
536
- * Get the runtime version.
537
- *
538
- * @rpcname: state_getRuntimeVersion
539
- **/
540
- getRuntimeVersion: GenericRpcCall<() => Promise<RuntimeVersion>>;
541
- /**
542
- * Returns a storage entry at a specific block's state.
543
- *
544
- * @rpcname: state_getStorage
545
- * @param {StorageKey} key
546
- * @param {BlockHash} at
547
- **/
548
- getStorage: GenericRpcCall<(key: StorageKey, at?: BlockHash) => Promise<Option<StorageData>>>;
549
- /**
550
- * Returns the hash of a storage entry at a block's state.
551
- *
552
- * @rpcname: state_getStorageHash
553
- * @param {StorageKey} key
554
- * @param {BlockHash} at
555
- **/
556
- getStorageHash: GenericRpcCall<(key: StorageKey, at?: BlockHash) => Promise<Option<Hash>>>;
557
- /**
558
- * Returns the hash of a storage entry at a block's state.
559
- *
560
- * @rpcname: state_getStorageSize
561
- * @param {StorageKey} key
562
- * @param {BlockHash} at
563
- **/
564
- getStorageSize: GenericRpcCall<(key: StorageKey, at?: BlockHash) => Promise<Option<bigint>>>;
565
- /**
566
- * 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.
567
- *
568
- * @rpcname: state_queryStorage
569
- * @param {Array<StorageKey>} keys
570
- * @param {Hash} fromBlock
571
- * @param {BlockHash} at
572
- **/
573
- queryStorage: GenericRpcCall<(keys: Array<StorageKey>, fromBlock: Hash, at?: BlockHash) => Promise<Array<StorageChangeSet>>>;
574
- /**
575
- * 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.
576
- *
577
- * @rpcname: state_queryStorageAt
578
- * @param {Array<StorageKey>} keys
579
- * @param {BlockHash} at
580
- **/
581
- queryStorageAt: GenericRpcCall<(keys: Array<StorageKey>, at?: BlockHash) => Promise<Array<StorageChangeSet>>>;
582
- /**
583
- * New runtime version subscription
584
- *
585
- * @pubsub: state_runtimeVersion, state_subscribeRuntimeVersion, state_unsubscribeRuntimeVersion
586
- **/
587
- subscribeRuntimeVersion: GenericRpcCall<(callback: Callback<RuntimeVersion>) => Promise<Unsub>>;
588
- /**
589
- * Subscribes to storage changes for the provided keys
590
- *
591
- * @pubsub: state_storage, state_subscribeStorage, state_unsubscribeStorage
592
- * @param {Array<StorageKey>} keys
593
- **/
594
- subscribeStorage: GenericRpcCall<(keys: Array<StorageKey>, callback: Callback<StorageChangeSet>) => Promise<Unsub>>;
595
- /**
596
- * 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.
597
- *
598
- * @rpcname: state_traceBlock
599
- * @param {Hash} block
600
- * @param {Option<string>} targets
601
- * @param {Option<string>} storage_keys
602
- * @param {Option<string>} methods
603
- **/
604
- traceBlock: GenericRpcCall<(block: Hash, targets: Option<string>, storage_keys: Option<string>, methods: Option<string>) => Promise<TraceBlockResponse>>;
605
- [method: string]: GenericRpcCall;
606
- };
607
- system: {
608
- /**
609
- * Returns the next valid index (aka nonce) for given account.
610
- *
611
- * This method takes into consideration all pending transactions
612
- * currently in the pool and if no transactions are found in the pool
613
- * it fallbacks to query the index from the runtime (aka. state nonce).
614
- *
615
- * @rpcname: system_accountNextIndex
616
- * @param {string} address
617
- **/
618
- accountNextIndex: GenericRpcCall<(address: string) => Promise<number>>;
619
- /**
620
- * Adds the supplied directives to the current log filter
621
- *
622
- * The syntax is identical to the CLI `<target>=<level>`:
623
- *
624
- * `sync=debug,state=trace`
625
- *
626
- * @rpcname: system_addLogFilter
627
- * @param {string} directives
628
- **/
629
- addLogFilter: GenericRpcCall<(directives: string) => Promise<void>>;
630
- /**
631
- * Adds a reserved peer. Returns the empty string or an error. The string
632
- * parameter should encode a `p2p` multiaddr.
633
- *
634
- * `/ip4/198.51.100.19/tcp/30333/p2p/QmSk5HQbn6LhUwDiNMseVUjuRYhEtYj4aUZ6WfWoGURpdV`
635
- * is an example of a valid, passing multiaddr with PeerId attached.
636
- *
637
- * @rpcname: system_addReservedPeer
638
- * @param {string} peer
639
- **/
640
- addReservedPeer: GenericRpcCall<(peer: string) => Promise<void>>;
641
- /**
642
- * Get the chain's name. Given as a string identifier.
643
- *
644
- * @rpcname: system_chain
645
- **/
646
- chain: GenericRpcCall<() => Promise<string>>;
647
- /**
648
- * Get the chain's type.
649
- *
650
- * @rpcname: system_chainType
651
- **/
652
- chainType: GenericRpcCall<() => Promise<ChainType>>;
653
- /**
654
- * Dry run an extrinsic at a given block. Return SCALE encoded ApplyExtrinsicResult.
655
- *
656
- * @rpcname: system_dryRun
657
- * @param {Bytes} extrinsic
658
- * @param {BlockHash} at
659
- **/
660
- dryRun: GenericRpcCall<(extrinsic: Bytes, at?: BlockHash) => Promise<ApplyExtrinsicResult>>;
661
- /**
662
- * Return health status of the node.
663
- *
664
- * Node is considered healthy if it is:
665
- * - connected to some peers (unless running in dev mode)
666
- * - not performing a major sync
667
- *
668
- * @rpcname: system_health
669
- **/
670
- health: GenericRpcCall<() => Promise<Health>>;
671
- /**
672
- * Returns the multi-addresses that the local node is listening on
673
- *
674
- * The addresses include a trailing `/p2p/` with the local PeerId, and are thus suitable to
675
- * be passed to `addReservedPeer` or as a bootnode address for example.
676
- *
677
- * @rpcname: system_localListenAddresses
678
- **/
679
- localListenAddresses: GenericRpcCall<() => Promise<Array<string>>>;
680
- /**
681
- * Returns the base58-encoded PeerId of the node.
682
- *
683
- * @rpcname: system_localPeerId
684
- **/
685
- localPeerId: GenericRpcCall<() => Promise<string>>;
686
- /**
687
- * Get the node's implementation name. Plain old string.
688
- *
689
- * @rpcname: system_name
690
- **/
691
- name: GenericRpcCall<() => Promise<string>>;
692
- /**
693
- * Returns the roles the node is running as
694
- *
695
- * @rpcname: system_nodeRoles
696
- **/
697
- nodeRoles: GenericRpcCall<() => Promise<Array<NodeRole>>>;
698
- /**
699
- * Returns the currently connected peers
700
- *
701
- * @rpcname: system_peers
702
- **/
703
- peers: GenericRpcCall<() => Promise<Array<PeerInfo>>>;
704
- /**
705
- * Get a custom set of properties as a JSON object, defined in the chain spec.
706
- *
707
- * @rpcname: system_properties
708
- **/
709
- properties: GenericRpcCall<() => Promise<ChainProperties>>;
710
- /**
711
- * Remove a reserved peer. Returns the empty string or an error. The string
712
- * should encode only the PeerId e.g. `QmSk5HQbn6LhUwDiNMseVUjuRYhEtYj4aUZ6WfWoGURpdV`.
713
- *
714
- * @rpcname: system_removeReservedPeer
715
- * @param {string} peerId
716
- **/
717
- removeReservedPeer: GenericRpcCall<(peerId: string) => Promise<void>>;
718
- /**
719
- * Returns the list of reserved peers
720
- *
721
- * @rpcname: system_reservedPeers
722
- **/
723
- reservedPeers: GenericRpcCall<() => Promise<Array<string>>>;
724
- /**
725
- * Resets the log filter to Substrate defaults
726
- *
727
- * @rpcname: system_resetLogFilter
728
- **/
729
- resetLogFilter: GenericRpcCall<() => Promise<void>>;
730
- /**
731
- * Returns the state of the syncing of the node: starting block, current best block, highest known block.
732
- *
733
- * @rpcname: system_syncState
734
- **/
735
- syncState: GenericRpcCall<() => Promise<SyncState>>;
736
- /**
737
- * Returns current state of the network.
738
- *
739
- * **Warning**: This API is not stable. Please do not programmatically interpret its output,
740
- * as its format might change at any time.
741
- *
742
- * @rpcname: system_unstable_networkState
743
- **/
744
- unstable_networkState: GenericRpcCall<() => Promise<NetworkState>>;
745
- /**
746
- * Get the node implementation's version. Should be a semver string.
747
- *
748
- * @rpcname: system_version
749
- **/
750
- version: GenericRpcCall<() => Promise<string>>;
751
- [method: string]: GenericRpcCall;
752
- };
753
- transaction: {
754
- /**
755
- * @rpcname: transaction_unstable_submitAndWatch
756
- **/
757
- unstable_submitAndWatch: GenericRpcCall;
758
- /**
759
- * @rpcname: transaction_unstable_unwatch
760
- **/
761
- unstable_unwatch: GenericRpcCall;
762
- [method: string]: GenericRpcCall;
763
- };
764
- web3: {
765
- /**
766
- * @rpcname: web3_clientVersion
767
- **/
768
- clientVersion: GenericRpcCall;
769
- /**
770
- * @rpcname: web3_sha3
771
- **/
772
- sha3: GenericRpcCall;
773
- [method: string]: GenericRpcCall;
774
- };
43
+ author: {
44
+ /**
45
+ * Checks if the keystore has private keys for the given public key and key type. Returns `true` if a private key could be found.
46
+ *
47
+ * @rpcname: author_hasKey
48
+ * @param {Bytes} publicKey
49
+ * @param {string} keyType
50
+ **/
51
+ hasKey: GenericRpcCall<(publicKey: Bytes, keyType: string) => Promise<boolean>>;
52
+
53
+ /**
54
+ * 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.
55
+ *
56
+ * @rpcname: author_hasSessionKeys
57
+ * @param {Bytes} sessionKeys
58
+ **/
59
+ hasSessionKeys: GenericRpcCall<(sessionKeys: Bytes) => Promise<boolean>>;
60
+
61
+ /**
62
+ * Insert a key into the keystore.
63
+ *
64
+ * @rpcname: author_insertKey
65
+ * @param {string} keyType
66
+ * @param {string} suri
67
+ * @param {Bytes} publicKey
68
+ **/
69
+ insertKey: GenericRpcCall<(keyType: string, suri: string, publicKey: Bytes) => Promise<void>>;
70
+
71
+ /**
72
+ * Returns all pending extrinsics, potentially grouped by sender.
73
+ *
74
+ * @rpcname: author_pendingExtrinsics
75
+ **/
76
+ pendingExtrinsics: GenericRpcCall<() => Promise<Array<Bytes>>>;
77
+
78
+ /**
79
+ * Remove given extrinsic from the pool and temporarily ban it to prevent reimporting.
80
+ *
81
+ * @rpcname: author_removeExtrinsic
82
+ * @param {Array<ExtrinsicOrHash>} bytesOrHash
83
+ **/
84
+ removeExtrinsic: GenericRpcCall<(bytesOrHash: Array<ExtrinsicOrHash>) => Promise<Array<Hash>>>;
85
+
86
+ /**
87
+ * Generate new session keys and returns the corresponding public keys.
88
+ *
89
+ * @rpcname: author_rotateKeys
90
+ **/
91
+ rotateKeys: GenericRpcCall<() => Promise<Bytes>>;
92
+
93
+ /**
94
+ * Submit and subscribe to watch an extrinsic until unsubscribed
95
+ *
96
+ * @pubsub: author_extrinsicUpdate, author_submitAndWatchExtrinsic, author_unwatchExtrinsic
97
+ * @param {Bytes} extrinsic
98
+ **/
99
+ submitAndWatchExtrinsic: GenericRpcCall<
100
+ (extrinsic: Bytes, callback: Callback<TransactionStatus>) => Promise<Unsub>
101
+ >;
102
+
103
+ /**
104
+ * Submit hex-encoded extrinsic for inclusion in block.
105
+ *
106
+ * @rpcname: author_submitExtrinsic
107
+ * @param {Bytes} extrinsic
108
+ **/
109
+ submitExtrinsic: GenericRpcCall<(extrinsic: Bytes) => Promise<Hash>>;
110
+
111
+ [method: string]: GenericRpcCall;
112
+ };
113
+ chainHead: {
114
+ /**
115
+ * @rpcname: chainHead_unstable_body
116
+ **/
117
+ unstable_body: GenericRpcCall;
118
+
119
+ /**
120
+ * @rpcname: chainHead_unstable_call
121
+ **/
122
+ unstable_call: GenericRpcCall;
123
+
124
+ /**
125
+ * @rpcname: chainHead_unstable_follow
126
+ **/
127
+ unstable_follow: GenericRpcCall;
128
+
129
+ /**
130
+ * @rpcname: chainHead_unstable_genesisHash
131
+ **/
132
+ unstable_genesisHash: GenericRpcCall;
133
+
134
+ /**
135
+ * @rpcname: chainHead_unstable_header
136
+ **/
137
+ unstable_header: GenericRpcCall;
138
+
139
+ /**
140
+ * @rpcname: chainHead_unstable_stopBody
141
+ **/
142
+ unstable_stopBody: GenericRpcCall;
143
+
144
+ /**
145
+ * @rpcname: chainHead_unstable_stopCall
146
+ **/
147
+ unstable_stopCall: GenericRpcCall;
148
+
149
+ /**
150
+ * @rpcname: chainHead_unstable_stopStorage
151
+ **/
152
+ unstable_stopStorage: GenericRpcCall;
153
+
154
+ /**
155
+ * @rpcname: chainHead_unstable_storage
156
+ **/
157
+ unstable_storage: GenericRpcCall;
158
+
159
+ /**
160
+ * @rpcname: chainHead_unstable_unfollow
161
+ **/
162
+ unstable_unfollow: GenericRpcCall;
163
+
164
+ /**
165
+ * @rpcname: chainHead_unstable_unpin
166
+ **/
167
+ unstable_unpin: GenericRpcCall;
168
+
169
+ [method: string]: GenericRpcCall;
170
+ };
171
+ chain: {
172
+ /**
173
+ * Get header and body of a relay chain block
174
+ *
175
+ * @rpcname: chain_getBlock
176
+ * @param {BlockHash} at
177
+ **/
178
+ getBlock: GenericRpcCall<(at?: BlockHash) => Promise<Option<SignedBlock>>>;
179
+
180
+ /**
181
+ * Get the block hash for a specific block
182
+ *
183
+ * @rpcname: chain_getBlockHash
184
+ * @param {BlockNumber} blockNumber
185
+ **/
186
+ getBlockHash: GenericRpcCall<(blockNumber?: BlockNumber) => Promise<Option<BlockHash>>>;
187
+
188
+ /**
189
+ * Get hash of the last finalized block in the canon chain
190
+ *
191
+ * @rpcname: chain_getFinalizedHead
192
+ **/
193
+ getFinalizedHead: GenericRpcCall<() => Promise<BlockHash>>;
194
+
195
+ /**
196
+ * Retrieves the header for a specific block
197
+ *
198
+ * @rpcname: chain_getHeader
199
+ * @param {BlockHash} at
200
+ **/
201
+ getHeader: GenericRpcCall<(at?: BlockHash) => Promise<Option<Header>>>;
202
+
203
+ /**
204
+ * All head subscription.
205
+ *
206
+ * @pubsub: chain_allHead, chain_subscribeAllHeads, chain_unsubscribeAllHeads
207
+ **/
208
+ subscribeAllHeads: GenericRpcCall<(callback: Callback<Header>) => Promise<Unsub>>;
209
+
210
+ /**
211
+ * Retrieves the best finalized header via subscription
212
+ *
213
+ * @pubsub: chain_finalizedHead, chain_subscribeFinalizedHeads, chain_unsubscribeFinalizedHeads
214
+ **/
215
+ subscribeFinalizedHeads: GenericRpcCall<(callback: Callback<Header>) => Promise<Unsub>>;
216
+
217
+ /**
218
+ * Retrieves the best header via subscription
219
+ *
220
+ * @pubsub: chain_newHead, chain_subscribeNewHeads, chain_unsubscribeNewHeads
221
+ **/
222
+ subscribeNewHeads: GenericRpcCall<(callback: Callback<Header>) => Promise<Unsub>>;
223
+
224
+ [method: string]: GenericRpcCall;
225
+ };
226
+ childstate: {
227
+ /**
228
+ * Returns the keys with prefix from a child storage, leave empty to get all the keys
229
+ *
230
+ * @rpcname: childstate_getKeys
231
+ * @deprecated: Please use `getKeysPaged` with proper paging support
232
+ * @param {PrefixedStorageKey} childStorageKey
233
+ * @param {StorageKey} prefix
234
+ * @param {BlockHash} at
235
+ **/
236
+ getKeys: GenericRpcCall<
237
+ (childStorageKey: PrefixedStorageKey, prefix: StorageKey, at?: BlockHash) => Promise<Array<StorageKey>>
238
+ >;
239
+
240
+ /**
241
+ * Returns the keys with prefix from a child storage with pagination support.
242
+ * Up to `count` keys will be returned.
243
+ * If `start_key` is passed, return next keys in storage in lexicographic order.
244
+ *
245
+ * @rpcname: childstate_getKeysPaged
246
+ * @param {PrefixedStorageKey} childStorageKey
247
+ * @param {Option<StorageKey>} prefix
248
+ * @param {number} count
249
+ * @param {StorageKey} startKey
250
+ * @param {BlockHash} at
251
+ **/
252
+ getKeysPaged: GenericRpcCall<
253
+ (
254
+ childStorageKey: PrefixedStorageKey,
255
+ prefix: Option<StorageKey>,
256
+ count: number,
257
+ startKey?: StorageKey,
258
+ at?: BlockHash,
259
+ ) => Promise<Array<StorageKey>>
260
+ >;
261
+
262
+ /**
263
+ * Returns a child storage entry at specific block's state.
264
+ *
265
+ * @rpcname: childstate_getStorage
266
+ * @param {PrefixedStorageKey} childStorageKey
267
+ * @param {StorageKey} key
268
+ * @param {BlockHash} at
269
+ **/
270
+ getStorage: GenericRpcCall<
271
+ (childStorageKey: PrefixedStorageKey, key: StorageKey, at?: BlockHash) => Promise<Option<StorageData>>
272
+ >;
273
+
274
+ /**
275
+ * Returns child storage entries for multiple keys at a specific block's state.
276
+ *
277
+ * @rpcname: childstate_getStorageEntries
278
+ * @param {PrefixedStorageKey} childStorageKey
279
+ * @param {Array<StorageKey>} keys
280
+ * @param {BlockHash} at
281
+ **/
282
+ getStorageEntries: GenericRpcCall<
283
+ (
284
+ childStorageKey: PrefixedStorageKey,
285
+ keys: Array<StorageKey>,
286
+ at?: BlockHash,
287
+ ) => Promise<Array<Option<StorageData>>>
288
+ >;
289
+
290
+ /**
291
+ * Returns the hash of a child storage entry at a block's state.
292
+ *
293
+ * @rpcname: childstate_getStorageHash
294
+ * @param {PrefixedStorageKey} childStorageKey
295
+ * @param {StorageKey} key
296
+ * @param {BlockHash} at
297
+ **/
298
+ getStorageHash: GenericRpcCall<
299
+ (childStorageKey: PrefixedStorageKey, key: StorageKey, at?: BlockHash) => Promise<Option<Hash>>
300
+ >;
301
+
302
+ /**
303
+ * Returns the size of a child storage entry at a block's state
304
+ *
305
+ * @rpcname: childstate_getStorageSize
306
+ * @param {PrefixedStorageKey} childStorageKey
307
+ * @param {StorageKey} key
308
+ * @param {BlockHash} at
309
+ **/
310
+ getStorageSize: GenericRpcCall<
311
+ (childStorageKey: PrefixedStorageKey, key: StorageKey, at?: BlockHash) => Promise<Option<number>>
312
+ >;
313
+
314
+ [method: string]: GenericRpcCall;
315
+ };
316
+ dev: {
317
+ /**
318
+ * Reexecute the specified `block_hash` and gather statistics while doing so.
319
+ *
320
+ * This function requires the specified block and its parent to be available
321
+ * at the queried node. If either the specified block or the parent is pruned,
322
+ * this function will return `None`.
323
+ *
324
+ * @rpcname: dev_getBlockStats
325
+ * @param {BlockHash} at
326
+ **/
327
+ getBlockStats: GenericRpcCall<(at?: BlockHash) => Promise<Option<BlockStats>>>;
328
+
329
+ [method: string]: GenericRpcCall;
330
+ };
331
+ eth: {
332
+ /**
333
+ * @rpcname: eth_accounts
334
+ **/
335
+ accounts: GenericRpcCall;
336
+
337
+ /**
338
+ * @rpcname: eth_blockNumber
339
+ **/
340
+ blockNumber: GenericRpcCall;
341
+
342
+ /**
343
+ * @rpcname: eth_call
344
+ **/
345
+ call: GenericRpcCall;
346
+
347
+ /**
348
+ * @rpcname: eth_chainId
349
+ **/
350
+ chainId: GenericRpcCall;
351
+
352
+ /**
353
+ * @rpcname: eth_coinbase
354
+ **/
355
+ coinbase: GenericRpcCall;
356
+
357
+ /**
358
+ * @rpcname: eth_estimateGas
359
+ **/
360
+ estimateGas: GenericRpcCall;
361
+
362
+ /**
363
+ * @rpcname: eth_feeHistory
364
+ **/
365
+ feeHistory: GenericRpcCall;
366
+
367
+ /**
368
+ * @rpcname: eth_gasPrice
369
+ **/
370
+ gasPrice: GenericRpcCall;
371
+
372
+ /**
373
+ * @rpcname: eth_getBalance
374
+ **/
375
+ getBalance: GenericRpcCall;
376
+
377
+ /**
378
+ * @rpcname: eth_getBlockByHash
379
+ **/
380
+ getBlockByHash: GenericRpcCall;
381
+
382
+ /**
383
+ * @rpcname: eth_getBlockByNumber
384
+ **/
385
+ getBlockByNumber: GenericRpcCall;
386
+
387
+ /**
388
+ * @rpcname: eth_getBlockTransactionCountByHash
389
+ **/
390
+ getBlockTransactionCountByHash: GenericRpcCall;
391
+
392
+ /**
393
+ * @rpcname: eth_getBlockTransactionCountByNumber
394
+ **/
395
+ getBlockTransactionCountByNumber: GenericRpcCall;
396
+
397
+ /**
398
+ * @rpcname: eth_getCode
399
+ **/
400
+ getCode: GenericRpcCall;
401
+
402
+ /**
403
+ * @rpcname: eth_getFilterChanges
404
+ **/
405
+ getFilterChanges: GenericRpcCall;
406
+
407
+ /**
408
+ * @rpcname: eth_getFilterLogs
409
+ **/
410
+ getFilterLogs: GenericRpcCall;
411
+
412
+ /**
413
+ * @rpcname: eth_getLogs
414
+ **/
415
+ getLogs: GenericRpcCall;
416
+
417
+ /**
418
+ * @rpcname: eth_getStorageAt
419
+ **/
420
+ getStorageAt: GenericRpcCall;
421
+
422
+ /**
423
+ * @rpcname: eth_getTransactionByBlockHashAndIndex
424
+ **/
425
+ getTransactionByBlockHashAndIndex: GenericRpcCall;
426
+
427
+ /**
428
+ * @rpcname: eth_getTransactionByBlockNumberAndIndex
429
+ **/
430
+ getTransactionByBlockNumberAndIndex: GenericRpcCall;
431
+
432
+ /**
433
+ * @rpcname: eth_getTransactionByHash
434
+ **/
435
+ getTransactionByHash: GenericRpcCall;
436
+
437
+ /**
438
+ * @rpcname: eth_getTransactionCount
439
+ **/
440
+ getTransactionCount: GenericRpcCall;
441
+
442
+ /**
443
+ * @rpcname: eth_getTransactionReceipt
444
+ **/
445
+ getTransactionReceipt: GenericRpcCall;
446
+
447
+ /**
448
+ * @rpcname: eth_getUncleByBlockHashAndIndex
449
+ **/
450
+ getUncleByBlockHashAndIndex: GenericRpcCall;
451
+
452
+ /**
453
+ * @rpcname: eth_getUncleByBlockNumberAndIndex
454
+ **/
455
+ getUncleByBlockNumberAndIndex: GenericRpcCall;
456
+
457
+ /**
458
+ * @rpcname: eth_getUncleCountByBlockHash
459
+ **/
460
+ getUncleCountByBlockHash: GenericRpcCall;
461
+
462
+ /**
463
+ * @rpcname: eth_getUncleCountByBlockNumber
464
+ **/
465
+ getUncleCountByBlockNumber: GenericRpcCall;
466
+
467
+ /**
468
+ * @rpcname: eth_getWork
469
+ **/
470
+ getWork: GenericRpcCall;
471
+
472
+ /**
473
+ * @rpcname: eth_hashrate
474
+ **/
475
+ hashrate: GenericRpcCall;
476
+
477
+ /**
478
+ * @rpcname: eth_maxPriorityFeePerGas
479
+ **/
480
+ maxPriorityFeePerGas: GenericRpcCall;
481
+
482
+ /**
483
+ * @rpcname: eth_mining
484
+ **/
485
+ mining: GenericRpcCall;
486
+
487
+ /**
488
+ * @rpcname: eth_newBlockFilter
489
+ **/
490
+ newBlockFilter: GenericRpcCall;
491
+
492
+ /**
493
+ * @rpcname: eth_newFilter
494
+ **/
495
+ newFilter: GenericRpcCall;
496
+
497
+ /**
498
+ * @rpcname: eth_newPendingTransactionFilter
499
+ **/
500
+ newPendingTransactionFilter: GenericRpcCall;
501
+
502
+ /**
503
+ * @rpcname: eth_protocolVersion
504
+ **/
505
+ protocolVersion: GenericRpcCall;
506
+
507
+ /**
508
+ * @rpcname: eth_sendRawTransaction
509
+ **/
510
+ sendRawTransaction: GenericRpcCall;
511
+
512
+ /**
513
+ * @rpcname: eth_sendTransaction
514
+ **/
515
+ sendTransaction: GenericRpcCall;
516
+
517
+ /**
518
+ * @rpcname: eth_submitHashrate
519
+ **/
520
+ submitHashrate: GenericRpcCall;
521
+
522
+ /**
523
+ * @rpcname: eth_submitWork
524
+ **/
525
+ submitWork: GenericRpcCall;
526
+
527
+ /**
528
+ * @rpcname: eth_subscribe
529
+ **/
530
+ subscribe: GenericRpcCall;
531
+
532
+ /**
533
+ * @rpcname: eth_syncing
534
+ **/
535
+ syncing: GenericRpcCall;
536
+
537
+ /**
538
+ * @rpcname: eth_uninstallFilter
539
+ **/
540
+ uninstallFilter: GenericRpcCall;
541
+
542
+ /**
543
+ * @rpcname: eth_unsubscribe
544
+ **/
545
+ unsubscribe: GenericRpcCall;
546
+
547
+ [method: string]: GenericRpcCall;
548
+ };
549
+ net: {
550
+ /**
551
+ * @rpcname: net_listening
552
+ **/
553
+ listening: GenericRpcCall;
554
+
555
+ /**
556
+ * @rpcname: net_peerCount
557
+ **/
558
+ peerCount: GenericRpcCall;
559
+
560
+ /**
561
+ * @rpcname: net_version
562
+ **/
563
+ version: GenericRpcCall;
564
+
565
+ [method: string]: GenericRpcCall;
566
+ };
567
+ offchain: {
568
+ /**
569
+ * Get offchain local storage under given key and prefix.
570
+ *
571
+ * @rpcname: offchain_localStorageGet
572
+ * @param {StorageKind} kind
573
+ * @param {Bytes} key
574
+ **/
575
+ localStorageGet: GenericRpcCall<(kind: StorageKind, key: Bytes) => Promise<Option<Bytes>>>;
576
+
577
+ /**
578
+ * Set offchain local storage under given key and prefix.
579
+ *
580
+ * @rpcname: offchain_localStorageSet
581
+ * @param {StorageKind} kind
582
+ * @param {Bytes} key
583
+ * @param {Bytes} value
584
+ **/
585
+ localStorageSet: GenericRpcCall<(kind: StorageKind, key: Bytes, value: Bytes) => Promise<void>>;
586
+
587
+ [method: string]: GenericRpcCall;
588
+ };
589
+ payment: {
590
+ /**
591
+ * Query the detailed fee of a given encoded extrinsic
592
+ *
593
+ * @rpcname: payment_queryFeeDetails
594
+ * @param {Bytes} extrinsic
595
+ * @param {BlockHash} at
596
+ **/
597
+ queryFeeDetails: GenericRpcCall<(extrinsic: Bytes, at?: BlockHash) => Promise<FeeDetails>>;
598
+
599
+ /**
600
+ * Retrieves the fee information for an encoded extrinsic
601
+ *
602
+ * @rpcname: payment_queryInfo
603
+ * @param {Bytes} extrinsic
604
+ * @param {BlockHash} at
605
+ **/
606
+ queryInfo: GenericRpcCall<(extrinsic: Bytes, at?: BlockHash) => Promise<RuntimeDispatchInfo>>;
607
+
608
+ [method: string]: GenericRpcCall;
609
+ };
610
+ rpc: {
611
+ /**
612
+ * Retrieves the list of RPC methods that are exposed by the node
613
+ *
614
+ * @rpcname: rpc_methods
615
+ **/
616
+ methods: GenericRpcCall<() => Promise<RpcMethods>>;
617
+
618
+ [method: string]: GenericRpcCall;
619
+ };
620
+ state: {
621
+ /**
622
+ * Call a method from the runtime API at a block's state.
623
+ *
624
+ * @rpcname: state_call
625
+ * @param {string} method
626
+ * @param {Bytes} data
627
+ * @param {BlockHash} at
628
+ **/
629
+ call: GenericRpcCall<(method: string, data: Bytes, at?: BlockHash) => Promise<Bytes>>;
630
+
631
+ /**
632
+ * Returns proof of storage for child key entries at a specific block state.
633
+ *
634
+ * @rpcname: state_getChildReadProof
635
+ * @param {PrefixedStorageKey} childStorageKey
636
+ * @param {Array<StorageKey>} keys
637
+ * @param {BlockHash} at
638
+ **/
639
+ getChildReadProof: GenericRpcCall<
640
+ (childStorageKey: PrefixedStorageKey, keys: Array<StorageKey>, at?: BlockHash) => Promise<ReadProof>
641
+ >;
642
+
643
+ /**
644
+ * Returns the keys with prefix, leave empty to get all the keys.
645
+ *
646
+ * @rpcname: state_getKeys
647
+ * @deprecated: Please use `getKeysPaged` with proper paging support
648
+ * @param {StorageKey} prefix
649
+ * @param {BlockHash} at
650
+ **/
651
+ getKeys: GenericRpcCall<(prefix: StorageKey, at?: BlockHash) => Promise<Array<StorageKey>>>;
652
+
653
+ /**
654
+ * 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.
655
+ *
656
+ * @rpcname: state_getKeysPaged
657
+ * @param {Option<StorageKey>} prefix
658
+ * @param {number} count
659
+ * @param {StorageKey} startKey
660
+ * @param {BlockHash} at
661
+ **/
662
+ getKeysPaged: GenericRpcCall<
663
+ (prefix: Option<StorageKey>, count: number, startKey?: StorageKey, at?: BlockHash) => Promise<Array<StorageKey>>
664
+ >;
665
+
666
+ /**
667
+ * Returns the runtime metadata
668
+ *
669
+ * @rpcname: state_getMetadata
670
+ * @param {BlockHash} at
671
+ **/
672
+ getMetadata: GenericRpcCall<(at?: BlockHash) => Promise<Metadata>>;
673
+
674
+ /**
675
+ * Returns the keys with prefix, leave empty to get all the keys
676
+ *
677
+ * @rpcname: state_getPairs
678
+ * @deprecated: Please use `getKeysPaged` with proper paging support
679
+ * @param {StorageKey} prefix
680
+ * @param {BlockHash} at
681
+ **/
682
+ getPairs: GenericRpcCall<(prefix: StorageKey, at?: BlockHash) => Promise<Array<[StorageKey, StorageData]>>>;
683
+
684
+ /**
685
+ * Returns proof of storage entries at a specific block's state.
686
+ *
687
+ * @rpcname: state_getReadProof
688
+ * @param {Array<StorageKey>} keys
689
+ * @param {BlockHash} at
690
+ **/
691
+ getReadProof: GenericRpcCall<(keys: Array<StorageKey>, at?: BlockHash) => Promise<ReadProof>>;
692
+
693
+ /**
694
+ * Get the runtime version.
695
+ *
696
+ * @rpcname: state_getRuntimeVersion
697
+ **/
698
+ getRuntimeVersion: GenericRpcCall<() => Promise<RuntimeVersion>>;
699
+
700
+ /**
701
+ * Returns a storage entry at a specific block's state.
702
+ *
703
+ * @rpcname: state_getStorage
704
+ * @param {StorageKey} key
705
+ * @param {BlockHash} at
706
+ **/
707
+ getStorage: GenericRpcCall<(key: StorageKey, at?: BlockHash) => Promise<Option<StorageData>>>;
708
+
709
+ /**
710
+ * Returns the hash of a storage entry at a block's state.
711
+ *
712
+ * @rpcname: state_getStorageHash
713
+ * @param {StorageKey} key
714
+ * @param {BlockHash} at
715
+ **/
716
+ getStorageHash: GenericRpcCall<(key: StorageKey, at?: BlockHash) => Promise<Option<Hash>>>;
717
+
718
+ /**
719
+ * Returns the hash of a storage entry at a block's state.
720
+ *
721
+ * @rpcname: state_getStorageSize
722
+ * @param {StorageKey} key
723
+ * @param {BlockHash} at
724
+ **/
725
+ getStorageSize: GenericRpcCall<(key: StorageKey, at?: BlockHash) => Promise<Option<bigint>>>;
726
+
727
+ /**
728
+ * 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.
729
+ *
730
+ * @rpcname: state_queryStorage
731
+ * @param {Array<StorageKey>} keys
732
+ * @param {Hash} fromBlock
733
+ * @param {BlockHash} at
734
+ **/
735
+ queryStorage: GenericRpcCall<
736
+ (keys: Array<StorageKey>, fromBlock: Hash, at?: BlockHash) => Promise<Array<StorageChangeSet>>
737
+ >;
738
+
739
+ /**
740
+ * 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.
741
+ *
742
+ * @rpcname: state_queryStorageAt
743
+ * @param {Array<StorageKey>} keys
744
+ * @param {BlockHash} at
745
+ **/
746
+ queryStorageAt: GenericRpcCall<(keys: Array<StorageKey>, at?: BlockHash) => Promise<Array<StorageChangeSet>>>;
747
+
748
+ /**
749
+ * New runtime version subscription
750
+ *
751
+ * @pubsub: state_runtimeVersion, state_subscribeRuntimeVersion, state_unsubscribeRuntimeVersion
752
+ **/
753
+ subscribeRuntimeVersion: GenericRpcCall<(callback: Callback<RuntimeVersion>) => Promise<Unsub>>;
754
+
755
+ /**
756
+ * Subscribes to storage changes for the provided keys
757
+ *
758
+ * @pubsub: state_storage, state_subscribeStorage, state_unsubscribeStorage
759
+ * @param {Array<StorageKey>} keys
760
+ **/
761
+ subscribeStorage: GenericRpcCall<(keys: Array<StorageKey>, callback: Callback<StorageChangeSet>) => Promise<Unsub>>;
762
+
763
+ /**
764
+ * 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.
765
+ *
766
+ * @rpcname: state_traceBlock
767
+ * @param {Hash} block
768
+ * @param {Option<string>} targets
769
+ * @param {Option<string>} storage_keys
770
+ * @param {Option<string>} methods
771
+ **/
772
+ traceBlock: GenericRpcCall<
773
+ (
774
+ block: Hash,
775
+ targets: Option<string>,
776
+ storage_keys: Option<string>,
777
+ methods: Option<string>,
778
+ ) => Promise<TraceBlockResponse>
779
+ >;
780
+
781
+ [method: string]: GenericRpcCall;
782
+ };
783
+ system: {
784
+ /**
785
+ * Returns the next valid index (aka nonce) for given account.
786
+ *
787
+ * This method takes into consideration all pending transactions
788
+ * currently in the pool and if no transactions are found in the pool
789
+ * it fallbacks to query the index from the runtime (aka. state nonce).
790
+ *
791
+ * @rpcname: system_accountNextIndex
792
+ * @param {string} address
793
+ **/
794
+ accountNextIndex: GenericRpcCall<(address: string) => Promise<number>>;
795
+
796
+ /**
797
+ * Adds the supplied directives to the current log filter
798
+ *
799
+ * The syntax is identical to the CLI `<target>=<level>`:
800
+ *
801
+ * `sync=debug,state=trace`
802
+ *
803
+ * @rpcname: system_addLogFilter
804
+ * @param {string} directives
805
+ **/
806
+ addLogFilter: GenericRpcCall<(directives: string) => Promise<void>>;
807
+
808
+ /**
809
+ * Adds a reserved peer. Returns the empty string or an error. The string
810
+ * parameter should encode a `p2p` multiaddr.
811
+ *
812
+ * `/ip4/198.51.100.19/tcp/30333/p2p/QmSk5HQbn6LhUwDiNMseVUjuRYhEtYj4aUZ6WfWoGURpdV`
813
+ * is an example of a valid, passing multiaddr with PeerId attached.
814
+ *
815
+ * @rpcname: system_addReservedPeer
816
+ * @param {string} peer
817
+ **/
818
+ addReservedPeer: GenericRpcCall<(peer: string) => Promise<void>>;
819
+
820
+ /**
821
+ * Get the chain's name. Given as a string identifier.
822
+ *
823
+ * @rpcname: system_chain
824
+ **/
825
+ chain: GenericRpcCall<() => Promise<string>>;
826
+
827
+ /**
828
+ * Get the chain's type.
829
+ *
830
+ * @rpcname: system_chainType
831
+ **/
832
+ chainType: GenericRpcCall<() => Promise<ChainType>>;
833
+
834
+ /**
835
+ * Dry run an extrinsic at a given block. Return SCALE encoded ApplyExtrinsicResult.
836
+ *
837
+ * @rpcname: system_dryRun
838
+ * @param {Bytes} extrinsic
839
+ * @param {BlockHash} at
840
+ **/
841
+ dryRun: GenericRpcCall<(extrinsic: Bytes, at?: BlockHash) => Promise<ApplyExtrinsicResult>>;
842
+
843
+ /**
844
+ * Return health status of the node.
845
+ *
846
+ * Node is considered healthy if it is:
847
+ * - connected to some peers (unless running in dev mode)
848
+ * - not performing a major sync
849
+ *
850
+ * @rpcname: system_health
851
+ **/
852
+ health: GenericRpcCall<() => Promise<Health>>;
853
+
854
+ /**
855
+ * Returns the multi-addresses that the local node is listening on
856
+ *
857
+ * The addresses include a trailing `/p2p/` with the local PeerId, and are thus suitable to
858
+ * be passed to `addReservedPeer` or as a bootnode address for example.
859
+ *
860
+ * @rpcname: system_localListenAddresses
861
+ **/
862
+ localListenAddresses: GenericRpcCall<() => Promise<Array<string>>>;
863
+
864
+ /**
865
+ * Returns the base58-encoded PeerId of the node.
866
+ *
867
+ * @rpcname: system_localPeerId
868
+ **/
869
+ localPeerId: GenericRpcCall<() => Promise<string>>;
870
+
871
+ /**
872
+ * Get the node's implementation name. Plain old string.
873
+ *
874
+ * @rpcname: system_name
875
+ **/
876
+ name: GenericRpcCall<() => Promise<string>>;
877
+
878
+ /**
879
+ * Returns the roles the node is running as
880
+ *
881
+ * @rpcname: system_nodeRoles
882
+ **/
883
+ nodeRoles: GenericRpcCall<() => Promise<Array<NodeRole>>>;
884
+
885
+ /**
886
+ * Returns the currently connected peers
887
+ *
888
+ * @rpcname: system_peers
889
+ **/
890
+ peers: GenericRpcCall<() => Promise<Array<PeerInfo>>>;
891
+
892
+ /**
893
+ * Get a custom set of properties as a JSON object, defined in the chain spec.
894
+ *
895
+ * @rpcname: system_properties
896
+ **/
897
+ properties: GenericRpcCall<() => Promise<ChainProperties>>;
898
+
899
+ /**
900
+ * Remove a reserved peer. Returns the empty string or an error. The string
901
+ * should encode only the PeerId e.g. `QmSk5HQbn6LhUwDiNMseVUjuRYhEtYj4aUZ6WfWoGURpdV`.
902
+ *
903
+ * @rpcname: system_removeReservedPeer
904
+ * @param {string} peerId
905
+ **/
906
+ removeReservedPeer: GenericRpcCall<(peerId: string) => Promise<void>>;
907
+
908
+ /**
909
+ * Returns the list of reserved peers
910
+ *
911
+ * @rpcname: system_reservedPeers
912
+ **/
913
+ reservedPeers: GenericRpcCall<() => Promise<Array<string>>>;
914
+
915
+ /**
916
+ * Resets the log filter to Substrate defaults
917
+ *
918
+ * @rpcname: system_resetLogFilter
919
+ **/
920
+ resetLogFilter: GenericRpcCall<() => Promise<void>>;
921
+
922
+ /**
923
+ * Returns the state of the syncing of the node: starting block, current best block, highest known block.
924
+ *
925
+ * @rpcname: system_syncState
926
+ **/
927
+ syncState: GenericRpcCall<() => Promise<SyncState>>;
928
+
929
+ /**
930
+ * Returns current state of the network.
931
+ *
932
+ * **Warning**: This API is not stable. Please do not programmatically interpret its output,
933
+ * as its format might change at any time.
934
+ *
935
+ * @rpcname: system_unstable_networkState
936
+ **/
937
+ unstable_networkState: GenericRpcCall<() => Promise<NetworkState>>;
938
+
939
+ /**
940
+ * Get the node implementation's version. Should be a semver string.
941
+ *
942
+ * @rpcname: system_version
943
+ **/
944
+ version: GenericRpcCall<() => Promise<string>>;
945
+
946
+ [method: string]: GenericRpcCall;
947
+ };
948
+ transaction: {
949
+ /**
950
+ * @rpcname: transaction_unstable_submitAndWatch
951
+ **/
952
+ unstable_submitAndWatch: GenericRpcCall;
953
+
954
+ /**
955
+ * @rpcname: transaction_unstable_unwatch
956
+ **/
957
+ unstable_unwatch: GenericRpcCall;
958
+
959
+ [method: string]: GenericRpcCall;
960
+ };
961
+ web3: {
962
+ /**
963
+ * @rpcname: web3_clientVersion
964
+ **/
965
+ clientVersion: GenericRpcCall;
966
+
967
+ /**
968
+ * @rpcname: web3_sha3
969
+ **/
970
+ sha3: GenericRpcCall;
971
+
972
+ [method: string]: GenericRpcCall;
973
+ };
775
974
  }