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

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