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

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