@dedot/chaintypes 0.0.1-alpha.3 → 0.0.1-alpha.31

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