@dedot/chaintypes 0.0.1-alpha.8 → 0.0.1-alpha.80

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 (298) hide show
  1. package/README.md +3 -1
  2. package/aleph/consts.d.ts +675 -532
  3. package/aleph/errors.d.ts +1053 -821
  4. package/aleph/events.d.ts +1144 -940
  5. package/aleph/index.d.ts +19 -11
  6. package/aleph/json-rpc.d.ts +85 -0
  7. package/aleph/query.d.ts +1572 -1270
  8. package/aleph/runtime.d.ts +595 -409
  9. package/aleph/tx.d.ts +3439 -2205
  10. package/aleph/types.d.ts +3756 -5365
  11. package/astar/consts.d.ts +694 -678
  12. package/astar/errors.d.ts +1468 -1316
  13. package/astar/events.d.ts +1745 -1630
  14. package/astar/index.d.ts +19 -11
  15. package/astar/json-rpc.d.ts +82 -0
  16. package/astar/query.d.ts +1761 -1473
  17. package/astar/runtime.d.ts +769 -261
  18. package/astar/tx.d.ts +4423 -4809
  19. package/astar/types.d.ts +6088 -12266
  20. package/index.d.ts +1 -0
  21. package/index.ts +11 -0
  22. package/kusama/consts.d.ts +1577 -1426
  23. package/kusama/errors.d.ts +3151 -2493
  24. package/kusama/events.d.ts +3323 -2704
  25. package/kusama/index.d.ts +19 -11
  26. package/kusama/json-rpc.d.ts +103 -0
  27. package/kusama/query.d.ts +4228 -3250
  28. package/kusama/runtime.d.ts +1195 -843
  29. package/kusama/tx.d.ts +9039 -6013
  30. package/kusama/types.d.ts +10866 -15400
  31. package/kusamaAssetHub/consts.d.ts +758 -631
  32. package/kusamaAssetHub/errors.d.ts +1493 -1163
  33. package/kusamaAssetHub/events.d.ts +2369 -2040
  34. package/kusamaAssetHub/index.d.ts +19 -11
  35. package/kusamaAssetHub/json-rpc.d.ts +89 -0
  36. package/kusamaAssetHub/query.d.ts +1661 -1300
  37. package/kusamaAssetHub/runtime.d.ts +554 -401
  38. package/kusamaAssetHub/tx.d.ts +6191 -4216
  39. package/kusamaAssetHub/types.d.ts +6551 -10138
  40. package/moonbeam/consts.d.ts +1022 -960
  41. package/moonbeam/errors.d.ts +1938 -1796
  42. package/moonbeam/events.d.ts +2832 -2685
  43. package/moonbeam/index.d.ts +19 -11
  44. package/moonbeam/json-rpc.d.ts +137 -0
  45. package/moonbeam/query.d.ts +2396 -2026
  46. package/moonbeam/runtime.d.ts +686 -505
  47. package/moonbeam/tx.d.ts +6368 -5204
  48. package/moonbeam/types.d.ts +7782 -12033
  49. package/package.json +8 -16
  50. package/polkadot/consts.d.ts +1312 -1159
  51. package/polkadot/errors.d.ts +2574 -2019
  52. package/polkadot/events.d.ts +2591 -2069
  53. package/polkadot/index.d.ts +19 -11
  54. package/polkadot/json-rpc.d.ts +103 -0
  55. package/polkadot/query.d.ts +3692 -2810
  56. package/polkadot/runtime.d.ts +1195 -843
  57. package/polkadot/tx.d.ts +7705 -5008
  58. package/polkadot/types.d.ts +9490 -13326
  59. package/polkadotAssetHub/consts.d.ts +723 -523
  60. package/polkadotAssetHub/errors.d.ts +1464 -924
  61. package/polkadotAssetHub/events.d.ts +2346 -1671
  62. package/polkadotAssetHub/index.d.ts +19 -11
  63. package/polkadotAssetHub/json-rpc.d.ts +89 -0
  64. package/polkadotAssetHub/query.d.ts +1639 -1221
  65. package/polkadotAssetHub/runtime.d.ts +557 -358
  66. package/polkadotAssetHub/tx.d.ts +6120 -3491
  67. package/polkadotAssetHub/types.d.ts +6474 -8899
  68. package/rococo/consts.d.ts +1423 -0
  69. package/rococo/errors.d.ts +2783 -0
  70. package/rococo/events.d.ts +3361 -0
  71. package/rococo/index.d.ts +27 -0
  72. package/rococo/json-rpc.d.ts +103 -0
  73. package/rococo/query.d.ts +3535 -0
  74. package/rococo/runtime.d.ts +1217 -0
  75. package/rococo/tx.d.ts +10657 -0
  76. package/rococo/types.d.ts +14776 -0
  77. package/rococoAssetHub/consts.d.ts +820 -657
  78. package/rococoAssetHub/errors.d.ts +1567 -1230
  79. package/rococoAssetHub/events.d.ts +2382 -2040
  80. package/rococoAssetHub/index.d.ts +19 -11
  81. package/rococoAssetHub/json-rpc.d.ts +89 -0
  82. package/rococoAssetHub/query.d.ts +1694 -1268
  83. package/rococoAssetHub/runtime.d.ts +578 -427
  84. package/rococoAssetHub/tx.d.ts +9171 -4306
  85. package/rococoAssetHub/types.d.ts +12252 -10796
  86. package/substrate/consts.d.ts +2222 -1970
  87. package/substrate/errors.d.ts +4022 -3336
  88. package/substrate/events.d.ts +4924 -4271
  89. package/substrate/index.d.ts +19 -11
  90. package/substrate/json-rpc.d.ts +101 -0
  91. package/substrate/query.d.ts +4082 -3349
  92. package/substrate/runtime.d.ts +970 -707
  93. package/substrate/tx.d.ts +12500 -8799
  94. package/substrate/types.d.ts +12809 -19761
  95. package/westendAssetHub/consts.d.ts +786 -657
  96. package/westendAssetHub/errors.d.ts +1522 -1230
  97. package/westendAssetHub/events.d.ts +2345 -2040
  98. package/westendAssetHub/index.d.ts +19 -11
  99. package/westendAssetHub/json-rpc.d.ts +89 -0
  100. package/westendAssetHub/query.d.ts +1655 -1268
  101. package/westendAssetHub/runtime.d.ts +651 -455
  102. package/westendAssetHub/tx.d.ts +8983 -4306
  103. package/westendAssetHub/types.d.ts +12027 -10797
  104. package/aleph/consts.js +0 -2
  105. package/aleph/errors.js +0 -2
  106. package/aleph/events.js +0 -2
  107. package/aleph/index.js +0 -3
  108. package/aleph/query.js +0 -2
  109. package/aleph/rpc.d.ts +0 -575
  110. package/aleph/rpc.js +0 -2
  111. package/aleph/runtime.js +0 -2
  112. package/aleph/tx.js +0 -2
  113. package/aleph/types.js +0 -2
  114. package/astar/consts.js +0 -2
  115. package/astar/errors.js +0 -2
  116. package/astar/events.js +0 -2
  117. package/astar/index.js +0 -3
  118. package/astar/query.js +0 -2
  119. package/astar/rpc.d.ts +0 -775
  120. package/astar/rpc.js +0 -2
  121. package/astar/runtime.js +0 -2
  122. package/astar/tx.js +0 -2
  123. package/astar/types.js +0 -2
  124. package/cjs/aleph/consts.js +0 -3
  125. package/cjs/aleph/errors.js +0 -3
  126. package/cjs/aleph/events.js +0 -3
  127. package/cjs/aleph/index.js +0 -19
  128. package/cjs/aleph/query.js +0 -3
  129. package/cjs/aleph/rpc.js +0 -3
  130. package/cjs/aleph/runtime.js +0 -3
  131. package/cjs/aleph/tx.js +0 -3
  132. package/cjs/aleph/types.js +0 -3
  133. package/cjs/astar/consts.js +0 -3
  134. package/cjs/astar/errors.js +0 -3
  135. package/cjs/astar/events.js +0 -3
  136. package/cjs/astar/index.js +0 -19
  137. package/cjs/astar/query.js +0 -3
  138. package/cjs/astar/rpc.js +0 -3
  139. package/cjs/astar/runtime.js +0 -3
  140. package/cjs/astar/tx.js +0 -3
  141. package/cjs/astar/types.js +0 -3
  142. package/cjs/index.js +0 -2
  143. package/cjs/kusama/consts.js +0 -3
  144. package/cjs/kusama/errors.js +0 -3
  145. package/cjs/kusama/events.js +0 -3
  146. package/cjs/kusama/index.js +0 -19
  147. package/cjs/kusama/query.js +0 -3
  148. package/cjs/kusama/rpc.js +0 -3
  149. package/cjs/kusama/runtime.js +0 -3
  150. package/cjs/kusama/tx.js +0 -3
  151. package/cjs/kusama/types.js +0 -3
  152. package/cjs/kusamaAssetHub/consts.js +0 -3
  153. package/cjs/kusamaAssetHub/errors.js +0 -3
  154. package/cjs/kusamaAssetHub/events.js +0 -3
  155. package/cjs/kusamaAssetHub/index.js +0 -19
  156. package/cjs/kusamaAssetHub/query.js +0 -3
  157. package/cjs/kusamaAssetHub/rpc.js +0 -3
  158. package/cjs/kusamaAssetHub/runtime.js +0 -3
  159. package/cjs/kusamaAssetHub/tx.js +0 -3
  160. package/cjs/kusamaAssetHub/types.js +0 -3
  161. package/cjs/moonbeam/consts.js +0 -3
  162. package/cjs/moonbeam/errors.js +0 -3
  163. package/cjs/moonbeam/events.js +0 -3
  164. package/cjs/moonbeam/index.js +0 -19
  165. package/cjs/moonbeam/query.js +0 -3
  166. package/cjs/moonbeam/rpc.js +0 -3
  167. package/cjs/moonbeam/runtime.js +0 -3
  168. package/cjs/moonbeam/tx.js +0 -3
  169. package/cjs/moonbeam/types.js +0 -3
  170. package/cjs/package.json +0 -1
  171. package/cjs/packageInfo.js +0 -5
  172. package/cjs/polkadot/consts.js +0 -3
  173. package/cjs/polkadot/errors.js +0 -3
  174. package/cjs/polkadot/events.js +0 -3
  175. package/cjs/polkadot/index.js +0 -19
  176. package/cjs/polkadot/query.js +0 -3
  177. package/cjs/polkadot/rpc.js +0 -3
  178. package/cjs/polkadot/runtime.js +0 -3
  179. package/cjs/polkadot/tx.js +0 -3
  180. package/cjs/polkadot/types.js +0 -3
  181. package/cjs/polkadotAssetHub/consts.js +0 -3
  182. package/cjs/polkadotAssetHub/errors.js +0 -3
  183. package/cjs/polkadotAssetHub/events.js +0 -3
  184. package/cjs/polkadotAssetHub/index.js +0 -19
  185. package/cjs/polkadotAssetHub/query.js +0 -3
  186. package/cjs/polkadotAssetHub/rpc.js +0 -3
  187. package/cjs/polkadotAssetHub/runtime.js +0 -3
  188. package/cjs/polkadotAssetHub/tx.js +0 -3
  189. package/cjs/polkadotAssetHub/types.js +0 -3
  190. package/cjs/rococoAssetHub/consts.js +0 -3
  191. package/cjs/rococoAssetHub/errors.js +0 -3
  192. package/cjs/rococoAssetHub/events.js +0 -3
  193. package/cjs/rococoAssetHub/index.js +0 -19
  194. package/cjs/rococoAssetHub/query.js +0 -3
  195. package/cjs/rococoAssetHub/rpc.js +0 -3
  196. package/cjs/rococoAssetHub/runtime.js +0 -3
  197. package/cjs/rococoAssetHub/tx.js +0 -3
  198. package/cjs/rococoAssetHub/types.js +0 -3
  199. package/cjs/substrate/consts.js +0 -3
  200. package/cjs/substrate/errors.js +0 -3
  201. package/cjs/substrate/events.js +0 -3
  202. package/cjs/substrate/index.js +0 -19
  203. package/cjs/substrate/query.js +0 -3
  204. package/cjs/substrate/rpc.js +0 -3
  205. package/cjs/substrate/runtime.js +0 -3
  206. package/cjs/substrate/tx.js +0 -3
  207. package/cjs/substrate/types.js +0 -3
  208. package/cjs/westendAssetHub/consts.js +0 -3
  209. package/cjs/westendAssetHub/errors.js +0 -3
  210. package/cjs/westendAssetHub/events.js +0 -3
  211. package/cjs/westendAssetHub/index.js +0 -19
  212. package/cjs/westendAssetHub/query.js +0 -3
  213. package/cjs/westendAssetHub/rpc.js +0 -3
  214. package/cjs/westendAssetHub/runtime.js +0 -3
  215. package/cjs/westendAssetHub/tx.js +0 -3
  216. package/cjs/westendAssetHub/types.js +0 -3
  217. package/kusama/consts.js +0 -2
  218. package/kusama/errors.js +0 -2
  219. package/kusama/events.js +0 -2
  220. package/kusama/index.js +0 -3
  221. package/kusama/query.js +0 -2
  222. package/kusama/rpc.d.ts +0 -726
  223. package/kusama/rpc.js +0 -2
  224. package/kusama/runtime.js +0 -2
  225. package/kusama/tx.js +0 -2
  226. package/kusama/types.js +0 -2
  227. package/kusamaAssetHub/consts.js +0 -2
  228. package/kusamaAssetHub/errors.js +0 -2
  229. package/kusamaAssetHub/events.js +0 -2
  230. package/kusamaAssetHub/index.js +0 -3
  231. package/kusamaAssetHub/query.js +0 -2
  232. package/kusamaAssetHub/rpc.d.ts +0 -590
  233. package/kusamaAssetHub/rpc.js +0 -2
  234. package/kusamaAssetHub/runtime.js +0 -2
  235. package/kusamaAssetHub/tx.js +0 -2
  236. package/kusamaAssetHub/types.js +0 -2
  237. package/moonbeam/consts.js +0 -2
  238. package/moonbeam/errors.js +0 -2
  239. package/moonbeam/events.js +0 -2
  240. package/moonbeam/index.js +0 -3
  241. package/moonbeam/query.js +0 -2
  242. package/moonbeam/rpc.d.ts +0 -809
  243. package/moonbeam/rpc.js +0 -2
  244. package/moonbeam/runtime.js +0 -2
  245. package/moonbeam/tx.js +0 -2
  246. package/moonbeam/types.js +0 -2
  247. package/packageInfo.d.ts +0 -4
  248. package/packageInfo.js +0 -2
  249. package/polkadot/consts.js +0 -2
  250. package/polkadot/errors.js +0 -2
  251. package/polkadot/events.js +0 -2
  252. package/polkadot/index.js +0 -3
  253. package/polkadot/query.js +0 -2
  254. package/polkadot/rpc.d.ts +0 -726
  255. package/polkadot/rpc.js +0 -2
  256. package/polkadot/runtime.js +0 -2
  257. package/polkadot/tx.js +0 -2
  258. package/polkadot/types.js +0 -2
  259. package/polkadotAssetHub/consts.js +0 -2
  260. package/polkadotAssetHub/errors.js +0 -2
  261. package/polkadotAssetHub/events.js +0 -2
  262. package/polkadotAssetHub/index.js +0 -3
  263. package/polkadotAssetHub/query.js +0 -2
  264. package/polkadotAssetHub/rpc.d.ts +0 -590
  265. package/polkadotAssetHub/rpc.js +0 -2
  266. package/polkadotAssetHub/runtime.js +0 -2
  267. package/polkadotAssetHub/tx.js +0 -2
  268. package/polkadotAssetHub/types.js +0 -2
  269. package/rococoAssetHub/consts.js +0 -2
  270. package/rococoAssetHub/errors.js +0 -2
  271. package/rococoAssetHub/events.js +0 -2
  272. package/rococoAssetHub/index.js +0 -3
  273. package/rococoAssetHub/query.js +0 -2
  274. package/rococoAssetHub/rpc.d.ts +0 -590
  275. package/rococoAssetHub/rpc.js +0 -2
  276. package/rococoAssetHub/runtime.js +0 -2
  277. package/rococoAssetHub/tx.js +0 -2
  278. package/rococoAssetHub/types.js +0 -2
  279. package/substrate/consts.js +0 -2
  280. package/substrate/errors.js +0 -2
  281. package/substrate/events.js +0 -2
  282. package/substrate/index.js +0 -3
  283. package/substrate/query.js +0 -2
  284. package/substrate/rpc.d.ts +0 -718
  285. package/substrate/rpc.js +0 -2
  286. package/substrate/runtime.js +0 -2
  287. package/substrate/tx.js +0 -2
  288. package/substrate/types.js +0 -2
  289. package/westendAssetHub/consts.js +0 -2
  290. package/westendAssetHub/errors.js +0 -2
  291. package/westendAssetHub/events.js +0 -2
  292. package/westendAssetHub/index.js +0 -3
  293. package/westendAssetHub/query.js +0 -2
  294. package/westendAssetHub/rpc.d.ts +0 -590
  295. package/westendAssetHub/rpc.js +0 -2
  296. package/westendAssetHub/runtime.js +0 -2
  297. package/westendAssetHub/tx.js +0 -2
  298. package/westendAssetHub/types.js +0 -2
@@ -1,844 +1,1196 @@
1
- import type { GenericRuntimeApis, GenericRuntimeApiMethod } from '@dedot/types';
2
- import type { RuntimeVersion, Header, DispatchError, Result, UncheckedExtrinsicLike, UncheckedExtrinsic, H256, Bytes, BytesLike, AccountId32Like } from '@dedot/codecs';
3
- import type { SpRuntimeBlock, SpCoreOpaqueMetadata, SpRuntimeTransactionValidityTransactionValidityError, SpInherentsInherentData, SpInherentsCheckInherentsResult, SpRuntimeTransactionValidityValidTransaction, SpRuntimeTransactionValidityTransactionSource, PolkadotPrimitivesV6ValidatorAppPublic, PolkadotPrimitivesV6ValidatorIndex, PolkadotPrimitivesV6GroupRotationInfo, PolkadotPrimitivesV6CoreState, PolkadotPrimitivesV6PersistedValidationData, PolkadotParachainPrimitivesPrimitivesId, PolkadotPrimitivesV6OccupiedCoreAssumption, PolkadotParachainPrimitivesPrimitivesValidationCodeHash, PolkadotPrimitivesV6CandidateCommitments, PolkadotParachainPrimitivesPrimitivesValidationCode, PolkadotPrimitivesV6CommittedCandidateReceipt, PolkadotPrimitivesV6CandidateEvent, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotPrimitivesV6ScrapedOnChainVotes, PolkadotPrimitivesV6SessionInfo, PolkadotPrimitivesV6PvfCheckStatement, PolkadotPrimitivesV6ValidatorAppSignature, PolkadotCorePrimitivesCandidateHash, PolkadotPrimitivesV6DisputeState, PolkadotPrimitivesV6ExecutorParams, PolkadotPrimitivesV6SlashingPendingSlashes, PolkadotPrimitivesV6SlashingOpaqueKeyOwnershipProof, PolkadotPrimitivesV6SlashingDisputeProof, PolkadotPrimitivesV6AsyncBackingBackingState, PolkadotPrimitivesV6AsyncBackingAsyncBackingParams, SpConsensusBeefyValidatorSet, SpConsensusBeefyEquivocationProof, SpConsensusBeefyOpaqueKeyOwnershipProof, SpConsensusBeefyEcdsaCryptoPublic, SpMmrPrimitivesError, SpMmrPrimitivesEncodableOpaqueLeaf, SpMmrPrimitivesProof, SpConsensusBeefyMmrBeefyAuthoritySet, SpConsensusGrandpaAppPublic, SpConsensusGrandpaEquivocationProof, SpConsensusGrandpaOpaqueKeyOwnershipProof, SpConsensusBabeBabeConfiguration, SpConsensusSlotsSlot, SpConsensusBabeEpoch, SpConsensusBabeOpaqueKeyOwnershipProof, SpConsensusBabeAppPublic, SpConsensusSlotsEquivocationProof, SpAuthorityDiscoveryAppPublic, SpCoreCryptoKeyTypeId, PalletTransactionPaymentRuntimeDispatchInfo, PalletTransactionPaymentFeeDetails, SpWeightsWeightV2Weight, StagingKusamaRuntimeRuntimeCallLike } from './types';
4
- export interface RuntimeApis extends GenericRuntimeApis {
5
- /**
6
- * @runtimeapi: Core - 0xdf6acb689907609b
7
- **/
8
- core: {
9
- /**
10
- * Returns the version of the runtime.
11
- *
12
- * @callname: Core_version
13
- **/
14
- version: GenericRuntimeApiMethod<() => Promise<RuntimeVersion>>;
15
- /**
16
- * Execute the given block.
17
- *
18
- * @callname: Core_execute_block
19
- * @param {SpRuntimeBlock} block
20
- **/
21
- executeBlock: GenericRuntimeApiMethod<(block: SpRuntimeBlock) => Promise<[]>>;
22
- /**
23
- * Initialize a block with the given header.
24
- *
25
- * @callname: Core_initialize_block
26
- * @param {Header} header
27
- **/
28
- initializeBlock: GenericRuntimeApiMethod<(header: Header) => Promise<[]>>;
29
- /**
30
- * Generic runtime api call
31
- **/
32
- [method: string]: GenericRuntimeApiMethod;
33
- };
34
- /**
35
- * @runtimeapi: Metadata - 0x37e397fc7c91f5e4
36
- **/
37
- metadata: {
38
- /**
39
- * Returns the metadata of a runtime.
40
- *
41
- * @callname: Metadata_metadata
42
- **/
43
- metadata: GenericRuntimeApiMethod<() => Promise<SpCoreOpaqueMetadata>>;
44
- /**
45
- * Returns the metadata at a given version.
46
- *
47
- * If the given `version` isn't supported, this will return `None`.
48
- * Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime.
49
- *
50
- * @callname: Metadata_metadata_at_version
51
- * @param {number} version
52
- **/
53
- metadataAtVersion: GenericRuntimeApiMethod<(version: number) => Promise<SpCoreOpaqueMetadata | undefined>>;
54
- /**
55
- * Returns the supported metadata versions.
56
- *
57
- * This can be used to call `metadata_at_version`.
58
- *
59
- * @callname: Metadata_metadata_versions
60
- **/
61
- metadataVersions: GenericRuntimeApiMethod<() => Promise<Array<number>>>;
62
- /**
63
- * Generic runtime api call
64
- **/
65
- [method: string]: GenericRuntimeApiMethod;
66
- };
67
- /**
68
- * @runtimeapi: BlockBuilder - 0x40fe3ad401f8959a
69
- **/
70
- blockBuilder: {
71
- /**
72
- * Apply the given extrinsic.
73
- *
74
- * Returns an inclusion outcome which specifies if this extrinsic is included in
75
- * this block or not.
76
- *
77
- * @callname: BlockBuilder_apply_extrinsic
78
- * @param {UncheckedExtrinsicLike} extrinsic
79
- **/
80
- applyExtrinsic: GenericRuntimeApiMethod<(extrinsic: UncheckedExtrinsicLike) => Promise<Result<Result<[], DispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>>;
81
- /**
82
- * Finish the current block.
83
- *
84
- * @callname: BlockBuilder_finalize_block
85
- **/
86
- finalizeBlock: GenericRuntimeApiMethod<() => Promise<Header>>;
87
- /**
88
- * Generate inherent extrinsics. The inherent data will vary from chain to chain.
89
- *
90
- * @callname: BlockBuilder_inherent_extrinsics
91
- * @param {SpInherentsInherentData} inherent
92
- **/
93
- inherentExtrinsics: GenericRuntimeApiMethod<(inherent: SpInherentsInherentData) => Promise<Array<UncheckedExtrinsic>>>;
94
- /**
95
- * Check that the inherents are valid. The inherent data will vary from chain to chain.
96
- *
97
- * @callname: BlockBuilder_check_inherents
98
- * @param {SpRuntimeBlock} block
99
- * @param {SpInherentsInherentData} data
100
- **/
101
- checkInherents: GenericRuntimeApiMethod<(block: SpRuntimeBlock, data: SpInherentsInherentData) => Promise<SpInherentsCheckInherentsResult>>;
102
- /**
103
- * Generic runtime api call
104
- **/
105
- [method: string]: GenericRuntimeApiMethod;
106
- };
107
- /**
108
- * @runtimeapi: TaggedTransactionQueue - 0xd2bc9897eed08f15
109
- **/
110
- taggedTransactionQueue: {
111
- /**
112
- * Validate the transaction.
113
- *
114
- * This method is invoked by the transaction pool to learn details about given transaction.
115
- * The implementation should make sure to verify the correctness of the transaction
116
- * against current state. The given `block_hash` corresponds to the hash of the block
117
- * that is used as current state.
118
- *
119
- * Note that this call may be performed by the pool multiple times and transactions
120
- * might be verified in any possible order.
121
- *
122
- * @callname: TaggedTransactionQueue_validate_transaction
123
- * @param {SpRuntimeTransactionValidityTransactionSource} source
124
- * @param {UncheckedExtrinsicLike} tx
125
- * @param {H256} block_hash
126
- **/
127
- validateTransaction: GenericRuntimeApiMethod<(source: SpRuntimeTransactionValidityTransactionSource, tx: UncheckedExtrinsicLike, blockHash: H256) => Promise<Result<SpRuntimeTransactionValidityValidTransaction, SpRuntimeTransactionValidityTransactionValidityError>>>;
128
- /**
129
- * Generic runtime api call
130
- **/
131
- [method: string]: GenericRuntimeApiMethod;
132
- };
133
- /**
134
- * @runtimeapi: OffchainWorkerApi - 0xf78b278be53f454c
135
- **/
136
- offchainWorkerApi: {
137
- /**
138
- * Starts the off-chain task for given block header.
139
- *
140
- * @callname: OffchainWorkerApi_offchain_worker
141
- * @param {Header} header
142
- **/
143
- offchainWorker: GenericRuntimeApiMethod<(header: Header) => Promise<[]>>;
144
- /**
145
- * Generic runtime api call
146
- **/
147
- [method: string]: GenericRuntimeApiMethod;
148
- };
149
- /**
150
- * @runtimeapi: ParachainHost - 0xaf2c0297a23e6d3d
151
- **/
152
- parachainHost: {
153
- /**
154
- * Get the current validators.
155
- *
156
- * @callname: ParachainHost_validators
157
- **/
158
- validators: GenericRuntimeApiMethod<() => Promise<Array<PolkadotPrimitivesV6ValidatorAppPublic>>>;
159
- /**
160
- * Returns the validator groups and rotation info localized based on the hypothetical child
161
- * of a block whose state this is invoked on. Note that `now` in the `GroupRotationInfo`
162
- * should be the successor of the number of the block.
163
- *
164
- * @callname: ParachainHost_validator_groups
165
- **/
166
- validatorGroups: GenericRuntimeApiMethod<() => Promise<[Array<Array<PolkadotPrimitivesV6ValidatorIndex>>, PolkadotPrimitivesV6GroupRotationInfo]>>;
167
- /**
168
- * Yields information on all availability cores as relevant to the child block.
169
- * Cores are either free or occupied. Free cores can have paras assigned to them.
170
- *
171
- * @callname: ParachainHost_availability_cores
172
- **/
173
- availabilityCores: GenericRuntimeApiMethod<() => Promise<Array<PolkadotPrimitivesV6CoreState>>>;
174
- /**
175
- * Yields the persisted validation data for the given `ParaId` along with an assumption that
176
- * should be used if the para currently occupies a core.
177
- *
178
- * Returns `None` if either the para is not registered or the assumption is `Freed`
179
- * and the para already occupies a core.
180
- *
181
- * @callname: ParachainHost_persisted_validation_data
182
- * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
183
- * @param {PolkadotPrimitivesV6OccupiedCoreAssumption} assumption
184
- **/
185
- persistedValidationData: GenericRuntimeApiMethod<(paraId: PolkadotParachainPrimitivesPrimitivesId, assumption: PolkadotPrimitivesV6OccupiedCoreAssumption) => Promise<PolkadotPrimitivesV6PersistedValidationData | undefined>>;
186
- /**
187
- * Returns the persisted validation data for the given `ParaId` along with the corresponding
188
- * validation code hash. Instead of accepting assumption about the para, matches the validation
189
- * data hash against an expected one and yields `None` if they're not equal.
190
- *
191
- * @callname: ParachainHost_assumed_validation_data
192
- * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
193
- * @param {H256} expected_persisted_validation_data_hash
194
- **/
195
- assumedValidationData: GenericRuntimeApiMethod<(paraId: PolkadotParachainPrimitivesPrimitivesId, expectedPersistedValidationDataHash: H256) => Promise<[PolkadotPrimitivesV6PersistedValidationData, PolkadotParachainPrimitivesPrimitivesValidationCodeHash] | undefined>>;
196
- /**
197
- * Checks if the given validation outputs pass the acceptance criteria.
198
- *
199
- * @callname: ParachainHost_check_validation_outputs
200
- * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
201
- * @param {PolkadotPrimitivesV6CandidateCommitments} outputs
202
- **/
203
- checkValidationOutputs: GenericRuntimeApiMethod<(paraId: PolkadotParachainPrimitivesPrimitivesId, outputs: PolkadotPrimitivesV6CandidateCommitments) => Promise<boolean>>;
204
- /**
205
- * Returns the session index expected at a child of the block.
206
- *
207
- * This can be used to instantiate a `SigningContext`.
208
- *
209
- * @callname: ParachainHost_session_index_for_child
210
- **/
211
- sessionIndexForChild: GenericRuntimeApiMethod<() => Promise<number>>;
212
- /**
213
- * Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.
214
- *
215
- * Returns `None` if either the para is not registered or the assumption is `Freed`
216
- * and the para already occupies a core.
217
- *
218
- * @callname: ParachainHost_validation_code
219
- * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
220
- * @param {PolkadotPrimitivesV6OccupiedCoreAssumption} assumption
221
- **/
222
- validationCode: GenericRuntimeApiMethod<(paraId: PolkadotParachainPrimitivesPrimitivesId, assumption: PolkadotPrimitivesV6OccupiedCoreAssumption) => Promise<PolkadotParachainPrimitivesPrimitivesValidationCode | undefined>>;
223
- /**
224
- * Get the receipt of a candidate pending availability. This returns `Some` for any paras
225
- * assigned to occupied cores in `availability_cores` and `None` otherwise.
226
- *
227
- * @callname: ParachainHost_candidate_pending_availability
228
- * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
229
- **/
230
- candidatePendingAvailability: GenericRuntimeApiMethod<(paraId: PolkadotParachainPrimitivesPrimitivesId) => Promise<PolkadotPrimitivesV6CommittedCandidateReceipt | undefined>>;
231
- /**
232
- * Get a vector of events concerning candidates that occurred within a block.
233
- *
234
- * @callname: ParachainHost_candidate_events
235
- **/
236
- candidateEvents: GenericRuntimeApiMethod<() => Promise<Array<PolkadotPrimitivesV6CandidateEvent>>>;
237
- /**
238
- * Get all the pending inbound messages in the downward message queue for a para.
239
- *
240
- * @callname: ParachainHost_dmq_contents
241
- * @param {PolkadotParachainPrimitivesPrimitivesId} recipient
242
- **/
243
- dmqContents: GenericRuntimeApiMethod<(recipient: PolkadotParachainPrimitivesPrimitivesId) => Promise<Array<PolkadotCorePrimitivesInboundDownwardMessage>>>;
244
- /**
245
- * Get the contents of all channels addressed to the given recipient. Channels that have no
246
- * messages in them are also included.
247
- *
248
- * @callname: ParachainHost_inbound_hrmp_channels_contents
249
- * @param {PolkadotParachainPrimitivesPrimitivesId} recipient
250
- **/
251
- inboundHrmpChannelsContents: GenericRuntimeApiMethod<(recipient: PolkadotParachainPrimitivesPrimitivesId) => Promise<Array<[PolkadotParachainPrimitivesPrimitivesId, Array<PolkadotCorePrimitivesInboundHrmpMessage>]>>>;
252
- /**
253
- * Get the validation code from its hash.
254
- *
255
- * @callname: ParachainHost_validation_code_by_hash
256
- * @param {PolkadotParachainPrimitivesPrimitivesValidationCodeHash} hash
257
- **/
258
- validationCodeByHash: GenericRuntimeApiMethod<(hash: PolkadotParachainPrimitivesPrimitivesValidationCodeHash) => Promise<PolkadotParachainPrimitivesPrimitivesValidationCode | undefined>>;
259
- /**
260
- * Scrape dispute relevant from on-chain, backing votes and resolved disputes.
261
- *
262
- * @callname: ParachainHost_on_chain_votes
263
- **/
264
- onChainVotes: GenericRuntimeApiMethod<() => Promise<PolkadotPrimitivesV6ScrapedOnChainVotes | undefined>>;
265
- /**
266
- * Get the session info for the given session, if stored.
267
- *
268
- * NOTE: This function is only available since parachain host version 2.
269
- *
270
- * @callname: ParachainHost_session_info
271
- * @param {number} index
272
- **/
273
- sessionInfo: GenericRuntimeApiMethod<(index: number) => Promise<PolkadotPrimitivesV6SessionInfo | undefined>>;
274
- /**
275
- * Submits a PVF pre-checking statement into the transaction pool.
276
- *
277
- * NOTE: This function is only available since parachain host version 2.
278
- *
279
- * @callname: ParachainHost_submit_pvf_check_statement
280
- * @param {PolkadotPrimitivesV6PvfCheckStatement} stmt
281
- * @param {PolkadotPrimitivesV6ValidatorAppSignature} signature
282
- **/
283
- submitPvfCheckStatement: GenericRuntimeApiMethod<(stmt: PolkadotPrimitivesV6PvfCheckStatement, signature: PolkadotPrimitivesV6ValidatorAppSignature) => Promise<[]>>;
284
- /**
285
- * Returns code hashes of PVFs that require pre-checking by validators in the active set.
286
- *
287
- * NOTE: This function is only available since parachain host version 2.
288
- *
289
- * @callname: ParachainHost_pvfs_require_precheck
290
- **/
291
- pvfsRequirePrecheck: GenericRuntimeApiMethod<() => Promise<Array<PolkadotParachainPrimitivesPrimitivesValidationCodeHash>>>;
292
- /**
293
- * Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`.
294
- *
295
- * NOTE: This function is only available since parachain host version 2.
296
- *
297
- * @callname: ParachainHost_validation_code_hash
298
- * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
299
- * @param {PolkadotPrimitivesV6OccupiedCoreAssumption} assumption
300
- **/
301
- validationCodeHash: GenericRuntimeApiMethod<(paraId: PolkadotParachainPrimitivesPrimitivesId, assumption: PolkadotPrimitivesV6OccupiedCoreAssumption) => Promise<PolkadotParachainPrimitivesPrimitivesValidationCodeHash | undefined>>;
302
- /**
303
- * Returns all onchain disputes.
304
- *
305
- * @callname: ParachainHost_disputes
306
- **/
307
- disputes: GenericRuntimeApiMethod<() => Promise<Array<[number, PolkadotCorePrimitivesCandidateHash, PolkadotPrimitivesV6DisputeState]>>>;
308
- /**
309
- * Returns execution parameters for the session.
310
- *
311
- * @callname: ParachainHost_session_executor_params
312
- * @param {number} session_index
313
- **/
314
- sessionExecutorParams: GenericRuntimeApiMethod<(sessionIndex: number) => Promise<PolkadotPrimitivesV6ExecutorParams | undefined>>;
315
- /**
316
- * Returns a list of validators that lost a past session dispute and need to be slashed.
317
- * NOTE: This function is only available since parachain host version 5.
318
- *
319
- * @callname: ParachainHost_unapplied_slashes
320
- **/
321
- unappliedSlashes: GenericRuntimeApiMethod<() => Promise<Array<[number, PolkadotCorePrimitivesCandidateHash, PolkadotPrimitivesV6SlashingPendingSlashes]>>>;
322
- /**
323
- * Returns a merkle proof of a validator session key.
324
- * NOTE: This function is only available since parachain host version 5.
325
- *
326
- * @callname: ParachainHost_key_ownership_proof
327
- * @param {PolkadotPrimitivesV6ValidatorAppPublic} validator_id
328
- **/
329
- keyOwnershipProof: GenericRuntimeApiMethod<(validatorId: PolkadotPrimitivesV6ValidatorAppPublic) => Promise<PolkadotPrimitivesV6SlashingOpaqueKeyOwnershipProof | undefined>>;
330
- /**
331
- * Submit an unsigned extrinsic to slash validators who lost a dispute about
332
- * a candidate of a past session.
333
- * NOTE: This function is only available since parachain host version 5.
334
- *
335
- * @callname: ParachainHost_submit_report_dispute_lost
336
- * @param {PolkadotPrimitivesV6SlashingDisputeProof} dispute_proof
337
- * @param {PolkadotPrimitivesV6SlashingOpaqueKeyOwnershipProof} key_ownership_proof
338
- **/
339
- submitReportDisputeLost: GenericRuntimeApiMethod<(disputeProof: PolkadotPrimitivesV6SlashingDisputeProof, keyOwnershipProof: PolkadotPrimitivesV6SlashingOpaqueKeyOwnershipProof) => Promise<[] | undefined>>;
340
- /**
341
- * Get the minimum number of backing votes for a parachain candidate.
342
- * This is a staging method! Do not use on production runtimes!
343
- *
344
- * @callname: ParachainHost_minimum_backing_votes
345
- **/
346
- minimumBackingVotes: GenericRuntimeApiMethod<() => Promise<number>>;
347
- /**
348
- * Returns the state of parachain backing for a given para.
349
- *
350
- * @callname: ParachainHost_para_backing_state
351
- * @param {PolkadotParachainPrimitivesPrimitivesId} _
352
- **/
353
- paraBackingState: GenericRuntimeApiMethod<(undefined: PolkadotParachainPrimitivesPrimitivesId) => Promise<PolkadotPrimitivesV6AsyncBackingBackingState | undefined>>;
354
- /**
355
- * Returns candidate's acceptance limitations for asynchronous backing for a relay parent.
356
- *
357
- * @callname: ParachainHost_async_backing_params
358
- **/
359
- asyncBackingParams: GenericRuntimeApiMethod<() => Promise<PolkadotPrimitivesV6AsyncBackingAsyncBackingParams>>;
360
- /**
361
- * Returns a list of all disabled validators at the given block.
362
- *
363
- * @callname: ParachainHost_disabled_validators
364
- **/
365
- disabledValidators: GenericRuntimeApiMethod<() => Promise<Array<PolkadotPrimitivesV6ValidatorIndex>>>;
366
- /**
367
- * Generic runtime api call
368
- **/
369
- [method: string]: GenericRuntimeApiMethod;
370
- };
371
- /**
372
- * @runtimeapi: BeefyApi - 0x49eaaf1b548a0cb0
373
- **/
374
- beefyApi: {
375
- /**
376
- * Return the block number where BEEFY consensus is enabled/started
377
- *
378
- * @callname: BeefyApi_beefy_genesis
379
- **/
380
- beefyGenesis: GenericRuntimeApiMethod<() => Promise<number | undefined>>;
381
- /**
382
- * Return the current active BEEFY validator set
383
- *
384
- * @callname: BeefyApi_validator_set
385
- **/
386
- validatorSet: GenericRuntimeApiMethod<() => Promise<SpConsensusBeefyValidatorSet | undefined>>;
387
- /**
388
- * Submits an unsigned extrinsic to report an equivocation. The caller
389
- * must provide the equivocation proof and a key ownership proof
390
- * (should be obtained using `generate_key_ownership_proof`). The
391
- * extrinsic will be unsigned and should only be accepted for local
392
- * authorship (not to be broadcast to the network). This method returns
393
- * `None` when creation of the extrinsic fails, e.g. if equivocation
394
- * reporting is disabled for the given runtime (i.e. this method is
395
- * hardcoded to return `None`). Only useful in an offchain context.
396
- *
397
- * @callname: BeefyApi_submit_report_equivocation_unsigned_extrinsic
398
- * @param {SpConsensusBeefyEquivocationProof} equivocation_proof
399
- * @param {SpConsensusBeefyOpaqueKeyOwnershipProof} key_owner_proof
400
- **/
401
- submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<(equivocationProof: SpConsensusBeefyEquivocationProof, keyOwnerProof: SpConsensusBeefyOpaqueKeyOwnershipProof) => Promise<[] | undefined>>;
402
- /**
403
- * Generates a proof of key ownership for the given authority in the
404
- * given set. An example usage of this module is coupled with the
405
- * session historical module to prove that a given authority key is
406
- * tied to a given staking identity during a specific session. Proofs
407
- * of key ownership are necessary for submitting equivocation reports.
408
- * NOTE: even though the API takes a `set_id` as parameter the current
409
- * implementations ignores this parameter and instead relies on this
410
- * method being called at the correct block height, i.e. any point at
411
- * which the given set id is live on-chain. Future implementations will
412
- * instead use indexed data through an offchain worker, not requiring
413
- * older states to be available.
414
- *
415
- * @callname: BeefyApi_generate_key_ownership_proof
416
- * @param {bigint} set_id
417
- * @param {SpConsensusBeefyEcdsaCryptoPublic} authority_id
418
- **/
419
- generateKeyOwnershipProof: GenericRuntimeApiMethod<(setId: bigint, authorityId: SpConsensusBeefyEcdsaCryptoPublic) => Promise<SpConsensusBeefyOpaqueKeyOwnershipProof | undefined>>;
420
- /**
421
- * Generic runtime api call
422
- **/
423
- [method: string]: GenericRuntimeApiMethod;
424
- };
425
- /**
426
- * @runtimeapi: MmrApi - 0x91d5df18b0d2cf58
427
- **/
428
- mmrApi: {
429
- /**
430
- * Return the on-chain MMR root hash.
431
- *
432
- * @callname: MmrApi_mmr_root
433
- **/
434
- mmrRoot: GenericRuntimeApiMethod<() => Promise<Result<H256, SpMmrPrimitivesError>>>;
435
- /**
436
- * Return the number of MMR blocks in the chain.
437
- *
438
- * @callname: MmrApi_mmr_leaf_count
439
- **/
440
- mmrLeafCount: GenericRuntimeApiMethod<() => Promise<Result<bigint, SpMmrPrimitivesError>>>;
441
- /**
442
- * Generate MMR proof for a series of block numbers. If `best_known_block_number = Some(n)`,
443
- * use historical MMR state at given block height `n`. Else, use current MMR state.
444
- *
445
- * @callname: MmrApi_generate_proof
446
- * @param {Array<number>} block_numbers
447
- * @param {number | undefined} best_known_block_number
448
- **/
449
- generateProof: GenericRuntimeApiMethod<(blockNumbers: Array<number>, bestKnownBlockNumber?: number | undefined) => Promise<Result<[Array<SpMmrPrimitivesEncodableOpaqueLeaf>, SpMmrPrimitivesProof], SpMmrPrimitivesError>>>;
450
- /**
451
- * Verify MMR proof against on-chain MMR for a batch of leaves.
452
- *
453
- * Note this function will use on-chain MMR root hash and check if the proof matches the hash.
454
- * Note, the leaves should be sorted such that corresponding leaves and leaf indices have the
455
- * same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]
456
- *
457
- * @callname: MmrApi_verify_proof
458
- * @param {Array<SpMmrPrimitivesEncodableOpaqueLeaf>} leaves
459
- * @param {SpMmrPrimitivesProof} proof
460
- **/
461
- verifyProof: GenericRuntimeApiMethod<(leaves: Array<SpMmrPrimitivesEncodableOpaqueLeaf>, proof: SpMmrPrimitivesProof) => Promise<Result<[], SpMmrPrimitivesError>>>;
462
- /**
463
- * Verify MMR proof against given root hash for a batch of leaves.
464
- *
465
- * Note this function does not require any on-chain storage - the
466
- * proof is verified against given MMR root hash.
467
- *
468
- * Note, the leaves should be sorted such that corresponding leaves and leaf indices have the
469
- * same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]
470
- *
471
- * @callname: MmrApi_verify_proof_stateless
472
- * @param {H256} root
473
- * @param {Array<SpMmrPrimitivesEncodableOpaqueLeaf>} leaves
474
- * @param {SpMmrPrimitivesProof} proof
475
- **/
476
- verifyProofStateless: GenericRuntimeApiMethod<(root: H256, leaves: Array<SpMmrPrimitivesEncodableOpaqueLeaf>, proof: SpMmrPrimitivesProof) => Promise<Result<[], SpMmrPrimitivesError>>>;
477
- /**
478
- * Generic runtime api call
479
- **/
480
- [method: string]: GenericRuntimeApiMethod;
481
- };
482
- /**
483
- * @runtimeapi: BeefyMmrApi - 0x2a5e924655399e60
484
- **/
485
- beefyMmrApi: {
486
- /**
487
- * Return the currently active BEEFY authority set proof.
488
- *
489
- * @callname: BeefyMmrApi_authority_set_proof
490
- **/
491
- authoritySetProof: GenericRuntimeApiMethod<() => Promise<SpConsensusBeefyMmrBeefyAuthoritySet>>;
492
- /**
493
- * Return the next/queued BEEFY authority set proof.
494
- *
495
- * @callname: BeefyMmrApi_next_authority_set_proof
496
- **/
497
- nextAuthoritySetProof: GenericRuntimeApiMethod<() => Promise<SpConsensusBeefyMmrBeefyAuthoritySet>>;
498
- /**
499
- * Generic runtime api call
500
- **/
501
- [method: string]: GenericRuntimeApiMethod;
502
- };
503
- /**
504
- * @runtimeapi: GrandpaApi - 0xed99c5acb25eedf5
505
- **/
506
- grandpaApi: {
507
- /**
508
- * Get the current GRANDPA authorities and weights. This should not change except
509
- * for when changes are scheduled and the corresponding delay has passed.
510
- *
511
- * When called at block B, it will return the set of authorities that should be
512
- * used to finalize descendants of this block (B+1, B+2, ...). The block B itself
513
- * is finalized by the authorities from block B-1.
514
- *
515
- * @callname: GrandpaApi_grandpa_authorities
516
- **/
517
- grandpaAuthorities: GenericRuntimeApiMethod<() => Promise<Array<[SpConsensusGrandpaAppPublic, bigint]>>>;
518
- /**
519
- * Submits an unsigned extrinsic to report an equivocation. The caller
520
- * must provide the equivocation proof and a key ownership proof
521
- * (should be obtained using `generate_key_ownership_proof`). The
522
- * extrinsic will be unsigned and should only be accepted for local
523
- * authorship (not to be broadcast to the network). This method returns
524
- * `None` when creation of the extrinsic fails, e.g. if equivocation
525
- * reporting is disabled for the given runtime (i.e. this method is
526
- * hardcoded to return `None`). Only useful in an offchain context.
527
- *
528
- * @callname: GrandpaApi_submit_report_equivocation_unsigned_extrinsic
529
- * @param {SpConsensusGrandpaEquivocationProof} equivocation_proof
530
- * @param {SpConsensusGrandpaOpaqueKeyOwnershipProof} key_owner_proof
531
- **/
532
- submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<(equivocationProof: SpConsensusGrandpaEquivocationProof, keyOwnerProof: SpConsensusGrandpaOpaqueKeyOwnershipProof) => Promise<[] | undefined>>;
533
- /**
534
- * Generates a proof of key ownership for the given authority in the
535
- * given set. An example usage of this module is coupled with the
536
- * session historical module to prove that a given authority key is
537
- * tied to a given staking identity during a specific session. Proofs
538
- * of key ownership are necessary for submitting equivocation reports.
539
- * NOTE: even though the API takes a `set_id` as parameter the current
540
- * implementations ignore this parameter and instead rely on this
541
- * method being called at the correct block height, i.e. any point at
542
- * which the given set id is live on-chain. Future implementations will
543
- * instead use indexed data through an offchain worker, not requiring
544
- * older states to be available.
545
- *
546
- * @callname: GrandpaApi_generate_key_ownership_proof
547
- * @param {bigint} set_id
548
- * @param {SpConsensusGrandpaAppPublic} authority_id
549
- **/
550
- generateKeyOwnershipProof: GenericRuntimeApiMethod<(setId: bigint, authorityId: SpConsensusGrandpaAppPublic) => Promise<SpConsensusGrandpaOpaqueKeyOwnershipProof | undefined>>;
551
- /**
552
- * Get current GRANDPA authority set id.
553
- *
554
- * @callname: GrandpaApi_current_set_id
555
- **/
556
- currentSetId: GenericRuntimeApiMethod<() => Promise<bigint>>;
557
- /**
558
- * Generic runtime api call
559
- **/
560
- [method: string]: GenericRuntimeApiMethod;
561
- };
562
- /**
563
- * @runtimeapi: BabeApi - 0xcbca25e39f142387
564
- **/
565
- babeApi: {
566
- /**
567
- * Return the configuration for BABE.
568
- *
569
- * @callname: BabeApi_configuration
570
- **/
571
- configuration: GenericRuntimeApiMethod<() => Promise<SpConsensusBabeBabeConfiguration>>;
572
- /**
573
- * Returns the slot that started the current epoch.
574
- *
575
- * @callname: BabeApi_current_epoch_start
576
- **/
577
- currentEpochStart: GenericRuntimeApiMethod<() => Promise<SpConsensusSlotsSlot>>;
578
- /**
579
- * Returns information regarding the current epoch.
580
- *
581
- * @callname: BabeApi_current_epoch
582
- **/
583
- currentEpoch: GenericRuntimeApiMethod<() => Promise<SpConsensusBabeEpoch>>;
584
- /**
585
- * Returns information regarding the next epoch (which was already
586
- * previously announced).
587
- *
588
- * @callname: BabeApi_next_epoch
589
- **/
590
- nextEpoch: GenericRuntimeApiMethod<() => Promise<SpConsensusBabeEpoch>>;
591
- /**
592
- * Generates a proof of key ownership for the given authority in the
593
- * current epoch. An example usage of this module is coupled with the
594
- * session historical module to prove that a given authority key is
595
- * tied to a given staking identity during a specific session. Proofs
596
- * of key ownership are necessary for submitting equivocation reports.
597
- * NOTE: even though the API takes a `slot` as parameter the current
598
- * implementations ignores this parameter and instead relies on this
599
- * method being called at the correct block height, i.e. any point at
600
- * which the epoch for the given slot is live on-chain. Future
601
- * implementations will instead use indexed data through an offchain
602
- * worker, not requiring older states to be available.
603
- *
604
- * @callname: BabeApi_generate_key_ownership_proof
605
- * @param {SpConsensusSlotsSlot} slot
606
- * @param {SpConsensusBabeAppPublic} authority_id
607
- **/
608
- generateKeyOwnershipProof: GenericRuntimeApiMethod<(slot: SpConsensusSlotsSlot, authorityId: SpConsensusBabeAppPublic) => Promise<SpConsensusBabeOpaqueKeyOwnershipProof | undefined>>;
609
- /**
610
- * Submits an unsigned extrinsic to report an equivocation. The caller
611
- * must provide the equivocation proof and a key ownership proof
612
- * (should be obtained using `generate_key_ownership_proof`). The
613
- * extrinsic will be unsigned and should only be accepted for local
614
- * authorship (not to be broadcast to the network). This method returns
615
- * `None` when creation of the extrinsic fails, e.g. if equivocation
616
- * reporting is disabled for the given runtime (i.e. this method is
617
- * hardcoded to return `None`). Only useful in an offchain context.
618
- *
619
- * @callname: BabeApi_submit_report_equivocation_unsigned_extrinsic
620
- * @param {SpConsensusSlotsEquivocationProof} equivocation_proof
621
- * @param {SpConsensusBabeOpaqueKeyOwnershipProof} key_owner_proof
622
- **/
623
- submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<(equivocationProof: SpConsensusSlotsEquivocationProof, keyOwnerProof: SpConsensusBabeOpaqueKeyOwnershipProof) => Promise<[] | undefined>>;
624
- /**
625
- * Generic runtime api call
626
- **/
627
- [method: string]: GenericRuntimeApiMethod;
628
- };
629
- /**
630
- * @runtimeapi: AuthorityDiscoveryApi - 0x687ad44ad37f03c2
631
- **/
632
- authorityDiscoveryApi: {
633
- /**
634
- * Retrieve authority identifiers of the current and next authority set.
635
- *
636
- * @callname: AuthorityDiscoveryApi_authorities
637
- **/
638
- authorities: GenericRuntimeApiMethod<() => Promise<Array<SpAuthorityDiscoveryAppPublic>>>;
639
- /**
640
- * Generic runtime api call
641
- **/
642
- [method: string]: GenericRuntimeApiMethod;
643
- };
644
- /**
645
- * @runtimeapi: SessionKeys - 0xab3c0572291feb8b
646
- **/
647
- sessionKeys: {
648
- /**
649
- * Generate a set of session keys with optionally using the given seed.
650
- * The keys should be stored within the keystore exposed via runtime
651
- * externalities.
652
- *
653
- * The seed needs to be a valid `utf8` string.
654
- *
655
- * Returns the concatenated SCALE encoded public keys.
656
- *
657
- * @callname: SessionKeys_generate_session_keys
658
- * @param {BytesLike | undefined} seed
659
- **/
660
- generateSessionKeys: GenericRuntimeApiMethod<(seed?: BytesLike | undefined) => Promise<Bytes>>;
661
- /**
662
- * Decode the given public session keys.
663
- *
664
- * Returns the list of public raw public keys + key type.
665
- *
666
- * @callname: SessionKeys_decode_session_keys
667
- * @param {BytesLike} encoded
668
- **/
669
- decodeSessionKeys: GenericRuntimeApiMethod<(encoded: BytesLike) => Promise<Array<[Bytes, SpCoreCryptoKeyTypeId]> | undefined>>;
670
- /**
671
- * Generic runtime api call
672
- **/
673
- [method: string]: GenericRuntimeApiMethod;
674
- };
675
- /**
676
- * @runtimeapi: AccountNonceApi - 0xbc9d89904f5b923f
677
- **/
678
- accountNonceApi: {
679
- /**
680
- * Get current account nonce of given `AccountId`.
681
- *
682
- * @callname: AccountNonceApi_account_nonce
683
- * @param {AccountId32Like} account
684
- **/
685
- accountNonce: GenericRuntimeApiMethod<(account: AccountId32Like) => Promise<number>>;
686
- /**
687
- * Generic runtime api call
688
- **/
689
- [method: string]: GenericRuntimeApiMethod;
690
- };
691
- /**
692
- * @runtimeapi: TransactionPaymentApi - 0x37c8bb1350a9a2a8
693
- **/
694
- transactionPaymentApi: {
695
- /**
696
- *
697
- * @callname: TransactionPaymentApi_query_info
698
- * @param {UncheckedExtrinsicLike} uxt
699
- * @param {number} len
700
- **/
701
- queryInfo: GenericRuntimeApiMethod<(uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>>;
702
- /**
703
- *
704
- * @callname: TransactionPaymentApi_query_fee_details
705
- * @param {UncheckedExtrinsicLike} uxt
706
- * @param {number} len
707
- **/
708
- queryFeeDetails: GenericRuntimeApiMethod<(uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>>;
709
- /**
710
- *
711
- * @callname: TransactionPaymentApi_query_weight_to_fee
712
- * @param {SpWeightsWeightV2Weight} weight
713
- **/
714
- queryWeightToFee: GenericRuntimeApiMethod<(weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
715
- /**
716
- *
717
- * @callname: TransactionPaymentApi_query_length_to_fee
718
- * @param {number} length
719
- **/
720
- queryLengthToFee: GenericRuntimeApiMethod<(length: number) => Promise<bigint>>;
721
- /**
722
- * Generic runtime api call
723
- **/
724
- [method: string]: GenericRuntimeApiMethod;
725
- };
726
- /**
727
- * @runtimeapi: TransactionPaymentCallApi - 0xf3ff14d5ab527059
728
- **/
729
- transactionPaymentCallApi: {
730
- /**
731
- * Query information of a dispatch class, weight, and fee of a given encoded `Call`.
732
- *
733
- * @callname: TransactionPaymentCallApi_query_call_info
734
- * @param {StagingKusamaRuntimeRuntimeCallLike} call
735
- * @param {number} len
736
- **/
737
- queryCallInfo: GenericRuntimeApiMethod<(call: StagingKusamaRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>>;
738
- /**
739
- * Query fee details of a given encoded `Call`.
740
- *
741
- * @callname: TransactionPaymentCallApi_query_call_fee_details
742
- * @param {StagingKusamaRuntimeRuntimeCallLike} call
743
- * @param {number} len
744
- **/
745
- queryCallFeeDetails: GenericRuntimeApiMethod<(call: StagingKusamaRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>>;
746
- /**
747
- * Query the output of the current `WeightToFee` given some input.
748
- *
749
- * @callname: TransactionPaymentCallApi_query_weight_to_fee
750
- * @param {SpWeightsWeightV2Weight} weight
751
- **/
752
- queryWeightToFee: GenericRuntimeApiMethod<(weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
753
- /**
754
- * Query the output of the current `LengthToFee` given some input.
755
- *
756
- * @callname: TransactionPaymentCallApi_query_length_to_fee
757
- * @param {number} length
758
- **/
759
- queryLengthToFee: GenericRuntimeApiMethod<(length: number) => Promise<bigint>>;
760
- /**
761
- * Generic runtime api call
762
- **/
763
- [method: string]: GenericRuntimeApiMethod;
764
- };
765
- /**
766
- * @runtimeapi: NominationPoolsApi - 0x17a6bc0d0062aeb3
767
- **/
768
- nominationPoolsApi: {
769
- /**
770
- * Returns the pending rewards for the member that the AccountId was given for.
771
- *
772
- * @callname: NominationPoolsApi_pending_rewards
773
- * @param {AccountId32Like} who
774
- **/
775
- pendingRewards: GenericRuntimeApiMethod<(who: AccountId32Like) => Promise<bigint>>;
776
- /**
777
- * Returns the equivalent balance of `points` for a given pool.
778
- *
779
- * @callname: NominationPoolsApi_points_to_balance
780
- * @param {number} pool_id
781
- * @param {bigint} points
782
- **/
783
- pointsToBalance: GenericRuntimeApiMethod<(poolId: number, points: bigint) => Promise<bigint>>;
784
- /**
785
- * Returns the equivalent points of `new_funds` for a given pool.
786
- *
787
- * @callname: NominationPoolsApi_balance_to_points
788
- * @param {number} pool_id
789
- * @param {bigint} new_funds
790
- **/
791
- balanceToPoints: GenericRuntimeApiMethod<(poolId: number, newFunds: bigint) => Promise<bigint>>;
792
- /**
793
- * Generic runtime api call
794
- **/
795
- [method: string]: GenericRuntimeApiMethod;
796
- };
797
- /**
798
- * @runtimeapi: StakingApi - 0x18ef58a3b67ba770
799
- **/
800
- stakingApi: {
801
- /**
802
- * Returns the nominations quota for a nominator with a given balance.
803
- *
804
- * @callname: StakingApi_nominations_quota
805
- * @param {bigint} balance
806
- **/
807
- nominationsQuota: GenericRuntimeApiMethod<(balance: bigint) => Promise<number>>;
808
- /**
809
- * Generic runtime api call
810
- **/
811
- [method: string]: GenericRuntimeApiMethod;
812
- };
813
- /**
814
- * @runtimeapi: GenesisBuilder - 0xfbc577b9d747efd6
815
- **/
816
- genesisBuilder: {
817
- /**
818
- * Creates the default `GenesisConfig` and returns it as a JSON blob.
819
- *
820
- * This function instantiates the default `GenesisConfig` struct for the runtime and serializes it into a JSON
821
- * blob. It returns a `Vec<u8>` containing the JSON representation of the default `GenesisConfig`.
822
- *
823
- * @callname: GenesisBuilder_create_default_config
824
- **/
825
- createDefaultConfig: GenericRuntimeApiMethod<() => Promise<Bytes>>;
826
- /**
827
- * Build `GenesisConfig` from a JSON blob not using any defaults and store it in the storage.
828
- *
829
- * This function deserializes the full `GenesisConfig` from the given JSON blob and puts it into the storage.
830
- * If the provided JSON blob is incorrect or incomplete or the deserialization fails, an error is returned.
831
- * It is recommended to log any errors encountered during the process.
832
- *
833
- * Please note that provided json blob must contain all `GenesisConfig` fields, no defaults will be used.
834
- *
835
- * @callname: GenesisBuilder_build_config
836
- * @param {BytesLike} json
837
- **/
838
- buildConfig: GenericRuntimeApiMethod<(json: BytesLike) => Promise<Result<[], string>>>;
839
- /**
840
- * Generic runtime api call
841
- **/
842
- [method: string]: GenericRuntimeApiMethod;
843
- };
1
+ // Generated by @dedot/codegen
2
+
3
+ import type { GenericRuntimeApis, GenericRuntimeApiMethod, RpcVersion } from 'dedot/types';
4
+ import type {
5
+ RuntimeVersion,
6
+ Header,
7
+ DispatchError,
8
+ Result,
9
+ UncheckedExtrinsicLike,
10
+ UncheckedExtrinsic,
11
+ H256,
12
+ BitSequence,
13
+ Bytes,
14
+ BytesLike,
15
+ AccountId32Like,
16
+ } from 'dedot/codecs';
17
+ import type {
18
+ SpRuntimeBlock,
19
+ SpCoreOpaqueMetadata,
20
+ SpRuntimeTransactionValidityTransactionValidityError,
21
+ SpInherentsInherentData,
22
+ SpInherentsCheckInherentsResult,
23
+ SpRuntimeTransactionValidityValidTransaction,
24
+ SpRuntimeTransactionValidityTransactionSource,
25
+ PolkadotPrimitivesV6ValidatorAppPublic,
26
+ PolkadotPrimitivesV6ValidatorIndex,
27
+ PolkadotPrimitivesV6GroupRotationInfo,
28
+ PolkadotPrimitivesV6CoreState,
29
+ PolkadotPrimitivesV6PersistedValidationData,
30
+ PolkadotParachainPrimitivesPrimitivesId,
31
+ PolkadotPrimitivesV6OccupiedCoreAssumption,
32
+ PolkadotParachainPrimitivesPrimitivesValidationCodeHash,
33
+ PolkadotPrimitivesV6CandidateCommitments,
34
+ PolkadotParachainPrimitivesPrimitivesValidationCode,
35
+ PolkadotPrimitivesV6CommittedCandidateReceipt,
36
+ PolkadotPrimitivesV6CandidateEvent,
37
+ PolkadotCorePrimitivesInboundDownwardMessage,
38
+ PolkadotCorePrimitivesInboundHrmpMessage,
39
+ PolkadotPrimitivesV6ScrapedOnChainVotes,
40
+ PolkadotPrimitivesV6SessionInfo,
41
+ PolkadotPrimitivesV6PvfCheckStatement,
42
+ PolkadotPrimitivesV6ValidatorAppSignature,
43
+ PolkadotCorePrimitivesCandidateHash,
44
+ PolkadotPrimitivesV6DisputeState,
45
+ PolkadotPrimitivesV6ExecutorParams,
46
+ PolkadotPrimitivesV6SlashingPendingSlashes,
47
+ PolkadotPrimitivesV6SlashingOpaqueKeyOwnershipProof,
48
+ PolkadotPrimitivesV6SlashingDisputeProof,
49
+ PolkadotPrimitivesV6AsyncBackingBackingState,
50
+ PolkadotPrimitivesV6AsyncBackingAsyncBackingParams,
51
+ PolkadotPrimitivesVstagingApprovalVotingParams,
52
+ SpConsensusBeefyValidatorSet,
53
+ SpConsensusBeefyEquivocationProof,
54
+ SpConsensusBeefyOpaqueKeyOwnershipProof,
55
+ SpConsensusBeefyEcdsaCryptoPublic,
56
+ SpMmrPrimitivesError,
57
+ SpMmrPrimitivesEncodableOpaqueLeaf,
58
+ SpMmrPrimitivesProof,
59
+ SpConsensusBeefyMmrBeefyAuthoritySet,
60
+ SpConsensusGrandpaAppPublic,
61
+ SpConsensusGrandpaEquivocationProof,
62
+ SpConsensusGrandpaOpaqueKeyOwnershipProof,
63
+ SpConsensusBabeBabeConfiguration,
64
+ SpConsensusSlotsSlot,
65
+ SpConsensusBabeEpoch,
66
+ SpConsensusBabeOpaqueKeyOwnershipProof,
67
+ SpConsensusBabeAppPublic,
68
+ SpConsensusSlotsEquivocationProof,
69
+ SpAuthorityDiscoveryAppPublic,
70
+ SpCoreCryptoKeyTypeId,
71
+ PalletTransactionPaymentRuntimeDispatchInfo,
72
+ PalletTransactionPaymentFeeDetails,
73
+ SpWeightsWeightV2Weight,
74
+ StagingKusamaRuntimeRuntimeCallLike,
75
+ } from './types';
76
+
77
+ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<Rv> {
78
+ /**
79
+ * @runtimeapi: Core - 0xdf6acb689907609b
80
+ **/
81
+ core: {
82
+ /**
83
+ * Returns the version of the runtime.
84
+ *
85
+ * @callname: Core_version
86
+ **/
87
+ version: GenericRuntimeApiMethod<Rv, () => Promise<RuntimeVersion>>;
88
+
89
+ /**
90
+ * Execute the given block.
91
+ *
92
+ * @callname: Core_execute_block
93
+ * @param {SpRuntimeBlock} block
94
+ **/
95
+ executeBlock: GenericRuntimeApiMethod<Rv, (block: SpRuntimeBlock) => Promise<[]>>;
96
+
97
+ /**
98
+ * Initialize a block with the given header.
99
+ *
100
+ * @callname: Core_initialize_block
101
+ * @param {Header} header
102
+ **/
103
+ initializeBlock: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<[]>>;
104
+
105
+ /**
106
+ * Generic runtime api call
107
+ **/
108
+ [method: string]: GenericRuntimeApiMethod<Rv>;
109
+ };
110
+ /**
111
+ * @runtimeapi: Metadata - 0x37e397fc7c91f5e4
112
+ **/
113
+ metadata: {
114
+ /**
115
+ * Returns the metadata of a runtime.
116
+ *
117
+ * @callname: Metadata_metadata
118
+ **/
119
+ metadata: GenericRuntimeApiMethod<Rv, () => Promise<SpCoreOpaqueMetadata>>;
120
+
121
+ /**
122
+ * Returns the metadata at a given version.
123
+ *
124
+ * If the given `version` isn't supported, this will return `None`.
125
+ * Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime.
126
+ *
127
+ * @callname: Metadata_metadata_at_version
128
+ * @param {number} version
129
+ **/
130
+ metadataAtVersion: GenericRuntimeApiMethod<Rv, (version: number) => Promise<SpCoreOpaqueMetadata | undefined>>;
131
+
132
+ /**
133
+ * Returns the supported metadata versions.
134
+ *
135
+ * This can be used to call `metadata_at_version`.
136
+ *
137
+ * @callname: Metadata_metadata_versions
138
+ **/
139
+ metadataVersions: GenericRuntimeApiMethod<Rv, () => Promise<Array<number>>>;
140
+
141
+ /**
142
+ * Generic runtime api call
143
+ **/
144
+ [method: string]: GenericRuntimeApiMethod<Rv>;
145
+ };
146
+ /**
147
+ * @runtimeapi: BlockBuilder - 0x40fe3ad401f8959a
148
+ **/
149
+ blockBuilder: {
150
+ /**
151
+ * Apply the given extrinsic.
152
+ *
153
+ * Returns an inclusion outcome which specifies if this extrinsic is included in
154
+ * this block or not.
155
+ *
156
+ * @callname: BlockBuilder_apply_extrinsic
157
+ * @param {UncheckedExtrinsicLike} extrinsic
158
+ **/
159
+ applyExtrinsic: GenericRuntimeApiMethod<
160
+ Rv,
161
+ (
162
+ extrinsic: UncheckedExtrinsicLike,
163
+ ) => Promise<Result<Result<[], DispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>
164
+ >;
165
+
166
+ /**
167
+ * Finish the current block.
168
+ *
169
+ * @callname: BlockBuilder_finalize_block
170
+ **/
171
+ finalizeBlock: GenericRuntimeApiMethod<Rv, () => Promise<Header>>;
172
+
173
+ /**
174
+ * Generate inherent extrinsics. The inherent data will vary from chain to chain.
175
+ *
176
+ * @callname: BlockBuilder_inherent_extrinsics
177
+ * @param {SpInherentsInherentData} inherent
178
+ **/
179
+ inherentExtrinsics: GenericRuntimeApiMethod<
180
+ Rv,
181
+ (inherent: SpInherentsInherentData) => Promise<Array<UncheckedExtrinsic>>
182
+ >;
183
+
184
+ /**
185
+ * Check that the inherents are valid. The inherent data will vary from chain to chain.
186
+ *
187
+ * @callname: BlockBuilder_check_inherents
188
+ * @param {SpRuntimeBlock} block
189
+ * @param {SpInherentsInherentData} data
190
+ **/
191
+ checkInherents: GenericRuntimeApiMethod<
192
+ Rv,
193
+ (block: SpRuntimeBlock, data: SpInherentsInherentData) => Promise<SpInherentsCheckInherentsResult>
194
+ >;
195
+
196
+ /**
197
+ * Generic runtime api call
198
+ **/
199
+ [method: string]: GenericRuntimeApiMethod<Rv>;
200
+ };
201
+ /**
202
+ * @runtimeapi: TaggedTransactionQueue - 0xd2bc9897eed08f15
203
+ **/
204
+ taggedTransactionQueue: {
205
+ /**
206
+ * Validate the transaction.
207
+ *
208
+ * This method is invoked by the transaction pool to learn details about given transaction.
209
+ * The implementation should make sure to verify the correctness of the transaction
210
+ * against current state. The given `block_hash` corresponds to the hash of the block
211
+ * that is used as current state.
212
+ *
213
+ * Note that this call may be performed by the pool multiple times and transactions
214
+ * might be verified in any possible order.
215
+ *
216
+ * @callname: TaggedTransactionQueue_validate_transaction
217
+ * @param {SpRuntimeTransactionValidityTransactionSource} source
218
+ * @param {UncheckedExtrinsicLike} tx
219
+ * @param {H256} block_hash
220
+ **/
221
+ validateTransaction: GenericRuntimeApiMethod<
222
+ Rv,
223
+ (
224
+ source: SpRuntimeTransactionValidityTransactionSource,
225
+ tx: UncheckedExtrinsicLike,
226
+ blockHash: H256,
227
+ ) => Promise<
228
+ Result<SpRuntimeTransactionValidityValidTransaction, SpRuntimeTransactionValidityTransactionValidityError>
229
+ >
230
+ >;
231
+
232
+ /**
233
+ * Generic runtime api call
234
+ **/
235
+ [method: string]: GenericRuntimeApiMethod<Rv>;
236
+ };
237
+ /**
238
+ * @runtimeapi: OffchainWorkerApi - 0xf78b278be53f454c
239
+ **/
240
+ offchainWorkerApi: {
241
+ /**
242
+ * Starts the off-chain task for given block header.
243
+ *
244
+ * @callname: OffchainWorkerApi_offchain_worker
245
+ * @param {Header} header
246
+ **/
247
+ offchainWorker: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<[]>>;
248
+
249
+ /**
250
+ * Generic runtime api call
251
+ **/
252
+ [method: string]: GenericRuntimeApiMethod<Rv>;
253
+ };
254
+ /**
255
+ * @runtimeapi: ParachainHost - 0xaf2c0297a23e6d3d
256
+ **/
257
+ parachainHost: {
258
+ /**
259
+ * Get the current validators.
260
+ *
261
+ * @callname: ParachainHost_validators
262
+ **/
263
+ validators: GenericRuntimeApiMethod<Rv, () => Promise<Array<PolkadotPrimitivesV6ValidatorAppPublic>>>;
264
+
265
+ /**
266
+ * Returns the validator groups and rotation info localized based on the hypothetical child
267
+ * of a block whose state this is invoked on. Note that `now` in the `GroupRotationInfo`
268
+ * should be the successor of the number of the block.
269
+ *
270
+ * @callname: ParachainHost_validator_groups
271
+ **/
272
+ validatorGroups: GenericRuntimeApiMethod<
273
+ Rv,
274
+ () => Promise<[Array<Array<PolkadotPrimitivesV6ValidatorIndex>>, PolkadotPrimitivesV6GroupRotationInfo]>
275
+ >;
276
+
277
+ /**
278
+ * Yields information on all availability cores as relevant to the child block.
279
+ * Cores are either free or occupied. Free cores can have paras assigned to them.
280
+ *
281
+ * @callname: ParachainHost_availability_cores
282
+ **/
283
+ availabilityCores: GenericRuntimeApiMethod<Rv, () => Promise<Array<PolkadotPrimitivesV6CoreState>>>;
284
+
285
+ /**
286
+ * Yields the persisted validation data for the given `ParaId` along with an assumption that
287
+ * should be used if the para currently occupies a core.
288
+ *
289
+ * Returns `None` if either the para is not registered or the assumption is `Freed`
290
+ * and the para already occupies a core.
291
+ *
292
+ * @callname: ParachainHost_persisted_validation_data
293
+ * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
294
+ * @param {PolkadotPrimitivesV6OccupiedCoreAssumption} assumption
295
+ **/
296
+ persistedValidationData: GenericRuntimeApiMethod<
297
+ Rv,
298
+ (
299
+ paraId: PolkadotParachainPrimitivesPrimitivesId,
300
+ assumption: PolkadotPrimitivesV6OccupiedCoreAssumption,
301
+ ) => Promise<PolkadotPrimitivesV6PersistedValidationData | undefined>
302
+ >;
303
+
304
+ /**
305
+ * Returns the persisted validation data for the given `ParaId` along with the corresponding
306
+ * validation code hash. Instead of accepting assumption about the para, matches the validation
307
+ * data hash against an expected one and yields `None` if they're not equal.
308
+ *
309
+ * @callname: ParachainHost_assumed_validation_data
310
+ * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
311
+ * @param {H256} expected_persisted_validation_data_hash
312
+ **/
313
+ assumedValidationData: GenericRuntimeApiMethod<
314
+ Rv,
315
+ (
316
+ paraId: PolkadotParachainPrimitivesPrimitivesId,
317
+ expectedPersistedValidationDataHash: H256,
318
+ ) => Promise<
319
+ | [PolkadotPrimitivesV6PersistedValidationData, PolkadotParachainPrimitivesPrimitivesValidationCodeHash]
320
+ | undefined
321
+ >
322
+ >;
323
+
324
+ /**
325
+ * Checks if the given validation outputs pass the acceptance criteria.
326
+ *
327
+ * @callname: ParachainHost_check_validation_outputs
328
+ * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
329
+ * @param {PolkadotPrimitivesV6CandidateCommitments} outputs
330
+ **/
331
+ checkValidationOutputs: GenericRuntimeApiMethod<
332
+ Rv,
333
+ (
334
+ paraId: PolkadotParachainPrimitivesPrimitivesId,
335
+ outputs: PolkadotPrimitivesV6CandidateCommitments,
336
+ ) => Promise<boolean>
337
+ >;
338
+
339
+ /**
340
+ * Returns the session index expected at a child of the block.
341
+ *
342
+ * This can be used to instantiate a `SigningContext`.
343
+ *
344
+ * @callname: ParachainHost_session_index_for_child
345
+ **/
346
+ sessionIndexForChild: GenericRuntimeApiMethod<Rv, () => Promise<number>>;
347
+
348
+ /**
349
+ * Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.
350
+ *
351
+ * Returns `None` if either the para is not registered or the assumption is `Freed`
352
+ * and the para already occupies a core.
353
+ *
354
+ * @callname: ParachainHost_validation_code
355
+ * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
356
+ * @param {PolkadotPrimitivesV6OccupiedCoreAssumption} assumption
357
+ **/
358
+ validationCode: GenericRuntimeApiMethod<
359
+ Rv,
360
+ (
361
+ paraId: PolkadotParachainPrimitivesPrimitivesId,
362
+ assumption: PolkadotPrimitivesV6OccupiedCoreAssumption,
363
+ ) => Promise<PolkadotParachainPrimitivesPrimitivesValidationCode | undefined>
364
+ >;
365
+
366
+ /**
367
+ * Get the receipt of a candidate pending availability. This returns `Some` for any paras
368
+ * assigned to occupied cores in `availability_cores` and `None` otherwise.
369
+ *
370
+ * @callname: ParachainHost_candidate_pending_availability
371
+ * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
372
+ **/
373
+ candidatePendingAvailability: GenericRuntimeApiMethod<
374
+ Rv,
375
+ (
376
+ paraId: PolkadotParachainPrimitivesPrimitivesId,
377
+ ) => Promise<PolkadotPrimitivesV6CommittedCandidateReceipt | undefined>
378
+ >;
379
+
380
+ /**
381
+ * Get a vector of events concerning candidates that occurred within a block.
382
+ *
383
+ * @callname: ParachainHost_candidate_events
384
+ **/
385
+ candidateEvents: GenericRuntimeApiMethod<Rv, () => Promise<Array<PolkadotPrimitivesV6CandidateEvent>>>;
386
+
387
+ /**
388
+ * Get all the pending inbound messages in the downward message queue for a para.
389
+ *
390
+ * @callname: ParachainHost_dmq_contents
391
+ * @param {PolkadotParachainPrimitivesPrimitivesId} recipient
392
+ **/
393
+ dmqContents: GenericRuntimeApiMethod<
394
+ Rv,
395
+ (
396
+ recipient: PolkadotParachainPrimitivesPrimitivesId,
397
+ ) => Promise<Array<PolkadotCorePrimitivesInboundDownwardMessage>>
398
+ >;
399
+
400
+ /**
401
+ * Get the contents of all channels addressed to the given recipient. Channels that have no
402
+ * messages in them are also included.
403
+ *
404
+ * @callname: ParachainHost_inbound_hrmp_channels_contents
405
+ * @param {PolkadotParachainPrimitivesPrimitivesId} recipient
406
+ **/
407
+ inboundHrmpChannelsContents: GenericRuntimeApiMethod<
408
+ Rv,
409
+ (
410
+ recipient: PolkadotParachainPrimitivesPrimitivesId,
411
+ ) => Promise<Array<[PolkadotParachainPrimitivesPrimitivesId, Array<PolkadotCorePrimitivesInboundHrmpMessage>]>>
412
+ >;
413
+
414
+ /**
415
+ * Get the validation code from its hash.
416
+ *
417
+ * @callname: ParachainHost_validation_code_by_hash
418
+ * @param {PolkadotParachainPrimitivesPrimitivesValidationCodeHash} hash
419
+ **/
420
+ validationCodeByHash: GenericRuntimeApiMethod<
421
+ Rv,
422
+ (
423
+ hash: PolkadotParachainPrimitivesPrimitivesValidationCodeHash,
424
+ ) => Promise<PolkadotParachainPrimitivesPrimitivesValidationCode | undefined>
425
+ >;
426
+
427
+ /**
428
+ * Scrape dispute relevant from on-chain, backing votes and resolved disputes.
429
+ *
430
+ * @callname: ParachainHost_on_chain_votes
431
+ **/
432
+ onChainVotes: GenericRuntimeApiMethod<Rv, () => Promise<PolkadotPrimitivesV6ScrapedOnChainVotes | undefined>>;
433
+
434
+ /**
435
+ * Get the session info for the given session, if stored.
436
+ *
437
+ * NOTE: This function is only available since parachain host version 2.
438
+ *
439
+ * @callname: ParachainHost_session_info
440
+ * @param {number} index
441
+ **/
442
+ sessionInfo: GenericRuntimeApiMethod<Rv, (index: number) => Promise<PolkadotPrimitivesV6SessionInfo | undefined>>;
443
+
444
+ /**
445
+ * Submits a PVF pre-checking statement into the transaction pool.
446
+ *
447
+ * NOTE: This function is only available since parachain host version 2.
448
+ *
449
+ * @callname: ParachainHost_submit_pvf_check_statement
450
+ * @param {PolkadotPrimitivesV6PvfCheckStatement} stmt
451
+ * @param {PolkadotPrimitivesV6ValidatorAppSignature} signature
452
+ **/
453
+ submitPvfCheckStatement: GenericRuntimeApiMethod<
454
+ Rv,
455
+ (stmt: PolkadotPrimitivesV6PvfCheckStatement, signature: PolkadotPrimitivesV6ValidatorAppSignature) => Promise<[]>
456
+ >;
457
+
458
+ /**
459
+ * Returns code hashes of PVFs that require pre-checking by validators in the active set.
460
+ *
461
+ * NOTE: This function is only available since parachain host version 2.
462
+ *
463
+ * @callname: ParachainHost_pvfs_require_precheck
464
+ **/
465
+ pvfsRequirePrecheck: GenericRuntimeApiMethod<
466
+ Rv,
467
+ () => Promise<Array<PolkadotParachainPrimitivesPrimitivesValidationCodeHash>>
468
+ >;
469
+
470
+ /**
471
+ * Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`.
472
+ *
473
+ * NOTE: This function is only available since parachain host version 2.
474
+ *
475
+ * @callname: ParachainHost_validation_code_hash
476
+ * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
477
+ * @param {PolkadotPrimitivesV6OccupiedCoreAssumption} assumption
478
+ **/
479
+ validationCodeHash: GenericRuntimeApiMethod<
480
+ Rv,
481
+ (
482
+ paraId: PolkadotParachainPrimitivesPrimitivesId,
483
+ assumption: PolkadotPrimitivesV6OccupiedCoreAssumption,
484
+ ) => Promise<PolkadotParachainPrimitivesPrimitivesValidationCodeHash | undefined>
485
+ >;
486
+
487
+ /**
488
+ * Returns all onchain disputes.
489
+ *
490
+ * @callname: ParachainHost_disputes
491
+ **/
492
+ disputes: GenericRuntimeApiMethod<
493
+ Rv,
494
+ () => Promise<Array<[number, PolkadotCorePrimitivesCandidateHash, PolkadotPrimitivesV6DisputeState]>>
495
+ >;
496
+
497
+ /**
498
+ * Returns execution parameters for the session.
499
+ *
500
+ * @callname: ParachainHost_session_executor_params
501
+ * @param {number} session_index
502
+ **/
503
+ sessionExecutorParams: GenericRuntimeApiMethod<
504
+ Rv,
505
+ (sessionIndex: number) => Promise<PolkadotPrimitivesV6ExecutorParams | undefined>
506
+ >;
507
+
508
+ /**
509
+ * Returns a list of validators that lost a past session dispute and need to be slashed.
510
+ * NOTE: This function is only available since parachain host version 5.
511
+ *
512
+ * @callname: ParachainHost_unapplied_slashes
513
+ **/
514
+ unappliedSlashes: GenericRuntimeApiMethod<
515
+ Rv,
516
+ () => Promise<Array<[number, PolkadotCorePrimitivesCandidateHash, PolkadotPrimitivesV6SlashingPendingSlashes]>>
517
+ >;
518
+
519
+ /**
520
+ * Returns a merkle proof of a validator session key.
521
+ * NOTE: This function is only available since parachain host version 5.
522
+ *
523
+ * @callname: ParachainHost_key_ownership_proof
524
+ * @param {PolkadotPrimitivesV6ValidatorAppPublic} validator_id
525
+ **/
526
+ keyOwnershipProof: GenericRuntimeApiMethod<
527
+ Rv,
528
+ (
529
+ validatorId: PolkadotPrimitivesV6ValidatorAppPublic,
530
+ ) => Promise<PolkadotPrimitivesV6SlashingOpaqueKeyOwnershipProof | undefined>
531
+ >;
532
+
533
+ /**
534
+ * Submit an unsigned extrinsic to slash validators who lost a dispute about
535
+ * a candidate of a past session.
536
+ * NOTE: This function is only available since parachain host version 5.
537
+ *
538
+ * @callname: ParachainHost_submit_report_dispute_lost
539
+ * @param {PolkadotPrimitivesV6SlashingDisputeProof} dispute_proof
540
+ * @param {PolkadotPrimitivesV6SlashingOpaqueKeyOwnershipProof} key_ownership_proof
541
+ **/
542
+ submitReportDisputeLost: GenericRuntimeApiMethod<
543
+ Rv,
544
+ (
545
+ disputeProof: PolkadotPrimitivesV6SlashingDisputeProof,
546
+ keyOwnershipProof: PolkadotPrimitivesV6SlashingOpaqueKeyOwnershipProof,
547
+ ) => Promise<[] | undefined>
548
+ >;
549
+
550
+ /**
551
+ * Get the minimum number of backing votes for a parachain candidate.
552
+ * This is a staging method! Do not use on production runtimes!
553
+ *
554
+ * @callname: ParachainHost_minimum_backing_votes
555
+ **/
556
+ minimumBackingVotes: GenericRuntimeApiMethod<Rv, () => Promise<number>>;
557
+
558
+ /**
559
+ * Returns the state of parachain backing for a given para.
560
+ *
561
+ * @callname: ParachainHost_para_backing_state
562
+ * @param {PolkadotParachainPrimitivesPrimitivesId} _
563
+ **/
564
+ paraBackingState: GenericRuntimeApiMethod<
565
+ Rv,
566
+ (
567
+ undefined: PolkadotParachainPrimitivesPrimitivesId,
568
+ ) => Promise<PolkadotPrimitivesV6AsyncBackingBackingState | undefined>
569
+ >;
570
+
571
+ /**
572
+ * Returns candidate's acceptance limitations for asynchronous backing for a relay parent.
573
+ *
574
+ * @callname: ParachainHost_async_backing_params
575
+ **/
576
+ asyncBackingParams: GenericRuntimeApiMethod<Rv, () => Promise<PolkadotPrimitivesV6AsyncBackingAsyncBackingParams>>;
577
+
578
+ /**
579
+ * Returns a list of all disabled validators at the given block.
580
+ *
581
+ * @callname: ParachainHost_disabled_validators
582
+ **/
583
+ disabledValidators: GenericRuntimeApiMethod<Rv, () => Promise<Array<PolkadotPrimitivesV6ValidatorIndex>>>;
584
+
585
+ /**
586
+ * Get node features.
587
+ * This is a staging method! Do not use on production runtimes!
588
+ *
589
+ * @callname: ParachainHost_node_features
590
+ **/
591
+ nodeFeatures: GenericRuntimeApiMethod<Rv, () => Promise<BitSequence>>;
592
+
593
+ /**
594
+ * Approval voting configuration parameters
595
+ *
596
+ * @callname: ParachainHost_approval_voting_params
597
+ **/
598
+ approvalVotingParams: GenericRuntimeApiMethod<Rv, () => Promise<PolkadotPrimitivesVstagingApprovalVotingParams>>;
599
+
600
+ /**
601
+ * Generic runtime api call
602
+ **/
603
+ [method: string]: GenericRuntimeApiMethod<Rv>;
604
+ };
605
+ /**
606
+ * @runtimeapi: BeefyApi - 0x49eaaf1b548a0cb0
607
+ **/
608
+ beefyApi: {
609
+ /**
610
+ * Return the block number where BEEFY consensus is enabled/started
611
+ *
612
+ * @callname: BeefyApi_beefy_genesis
613
+ **/
614
+ beefyGenesis: GenericRuntimeApiMethod<Rv, () => Promise<number | undefined>>;
615
+
616
+ /**
617
+ * Return the current active BEEFY validator set
618
+ *
619
+ * @callname: BeefyApi_validator_set
620
+ **/
621
+ validatorSet: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBeefyValidatorSet | undefined>>;
622
+
623
+ /**
624
+ * Submits an unsigned extrinsic to report an equivocation. The caller
625
+ * must provide the equivocation proof and a key ownership proof
626
+ * (should be obtained using `generate_key_ownership_proof`). The
627
+ * extrinsic will be unsigned and should only be accepted for local
628
+ * authorship (not to be broadcast to the network). This method returns
629
+ * `None` when creation of the extrinsic fails, e.g. if equivocation
630
+ * reporting is disabled for the given runtime (i.e. this method is
631
+ * hardcoded to return `None`). Only useful in an offchain context.
632
+ *
633
+ * @callname: BeefyApi_submit_report_equivocation_unsigned_extrinsic
634
+ * @param {SpConsensusBeefyEquivocationProof} equivocation_proof
635
+ * @param {SpConsensusBeefyOpaqueKeyOwnershipProof} key_owner_proof
636
+ **/
637
+ submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<
638
+ Rv,
639
+ (
640
+ equivocationProof: SpConsensusBeefyEquivocationProof,
641
+ keyOwnerProof: SpConsensusBeefyOpaqueKeyOwnershipProof,
642
+ ) => Promise<[] | undefined>
643
+ >;
644
+
645
+ /**
646
+ * Generates a proof of key ownership for the given authority in the
647
+ * given set. An example usage of this module is coupled with the
648
+ * session historical module to prove that a given authority key is
649
+ * tied to a given staking identity during a specific session. Proofs
650
+ * of key ownership are necessary for submitting equivocation reports.
651
+ * NOTE: even though the API takes a `set_id` as parameter the current
652
+ * implementations ignores this parameter and instead relies on this
653
+ * method being called at the correct block height, i.e. any point at
654
+ * which the given set id is live on-chain. Future implementations will
655
+ * instead use indexed data through an offchain worker, not requiring
656
+ * older states to be available.
657
+ *
658
+ * @callname: BeefyApi_generate_key_ownership_proof
659
+ * @param {bigint} set_id
660
+ * @param {SpConsensusBeefyEcdsaCryptoPublic} authority_id
661
+ **/
662
+ generateKeyOwnershipProof: GenericRuntimeApiMethod<
663
+ Rv,
664
+ (
665
+ setId: bigint,
666
+ authorityId: SpConsensusBeefyEcdsaCryptoPublic,
667
+ ) => Promise<SpConsensusBeefyOpaqueKeyOwnershipProof | undefined>
668
+ >;
669
+
670
+ /**
671
+ * Generic runtime api call
672
+ **/
673
+ [method: string]: GenericRuntimeApiMethod<Rv>;
674
+ };
675
+ /**
676
+ * @runtimeapi: MmrApi - 0x91d5df18b0d2cf58
677
+ **/
678
+ mmrApi: {
679
+ /**
680
+ * Return the on-chain MMR root hash.
681
+ *
682
+ * @callname: MmrApi_mmr_root
683
+ **/
684
+ mmrRoot: GenericRuntimeApiMethod<Rv, () => Promise<Result<H256, SpMmrPrimitivesError>>>;
685
+
686
+ /**
687
+ * Return the number of MMR blocks in the chain.
688
+ *
689
+ * @callname: MmrApi_mmr_leaf_count
690
+ **/
691
+ mmrLeafCount: GenericRuntimeApiMethod<Rv, () => Promise<Result<bigint, SpMmrPrimitivesError>>>;
692
+
693
+ /**
694
+ * Generate MMR proof for a series of block numbers. If `best_known_block_number = Some(n)`,
695
+ * use historical MMR state at given block height `n`. Else, use current MMR state.
696
+ *
697
+ * @callname: MmrApi_generate_proof
698
+ * @param {Array<number>} block_numbers
699
+ * @param {number | undefined} best_known_block_number
700
+ **/
701
+ generateProof: GenericRuntimeApiMethod<
702
+ Rv,
703
+ (
704
+ blockNumbers: Array<number>,
705
+ bestKnownBlockNumber?: number | undefined,
706
+ ) => Promise<Result<[Array<SpMmrPrimitivesEncodableOpaqueLeaf>, SpMmrPrimitivesProof], SpMmrPrimitivesError>>
707
+ >;
708
+
709
+ /**
710
+ * Verify MMR proof against on-chain MMR for a batch of leaves.
711
+ *
712
+ * Note this function will use on-chain MMR root hash and check if the proof matches the hash.
713
+ * Note, the leaves should be sorted such that corresponding leaves and leaf indices have the
714
+ * same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]
715
+ *
716
+ * @callname: MmrApi_verify_proof
717
+ * @param {Array<SpMmrPrimitivesEncodableOpaqueLeaf>} leaves
718
+ * @param {SpMmrPrimitivesProof} proof
719
+ **/
720
+ verifyProof: GenericRuntimeApiMethod<
721
+ Rv,
722
+ (
723
+ leaves: Array<SpMmrPrimitivesEncodableOpaqueLeaf>,
724
+ proof: SpMmrPrimitivesProof,
725
+ ) => Promise<Result<[], SpMmrPrimitivesError>>
726
+ >;
727
+
728
+ /**
729
+ * Verify MMR proof against given root hash for a batch of leaves.
730
+ *
731
+ * Note this function does not require any on-chain storage - the
732
+ * proof is verified against given MMR root hash.
733
+ *
734
+ * Note, the leaves should be sorted such that corresponding leaves and leaf indices have the
735
+ * same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]
736
+ *
737
+ * @callname: MmrApi_verify_proof_stateless
738
+ * @param {H256} root
739
+ * @param {Array<SpMmrPrimitivesEncodableOpaqueLeaf>} leaves
740
+ * @param {SpMmrPrimitivesProof} proof
741
+ **/
742
+ verifyProofStateless: GenericRuntimeApiMethod<
743
+ Rv,
744
+ (
745
+ root: H256,
746
+ leaves: Array<SpMmrPrimitivesEncodableOpaqueLeaf>,
747
+ proof: SpMmrPrimitivesProof,
748
+ ) => Promise<Result<[], SpMmrPrimitivesError>>
749
+ >;
750
+
751
+ /**
752
+ * Generic runtime api call
753
+ **/
754
+ [method: string]: GenericRuntimeApiMethod<Rv>;
755
+ };
756
+ /**
757
+ * @runtimeapi: BeefyMmrApi - 0x2a5e924655399e60
758
+ **/
759
+ beefyMmrApi: {
760
+ /**
761
+ * Return the currently active BEEFY authority set proof.
762
+ *
763
+ * @callname: BeefyMmrApi_authority_set_proof
764
+ **/
765
+ authoritySetProof: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBeefyMmrBeefyAuthoritySet>>;
766
+
767
+ /**
768
+ * Return the next/queued BEEFY authority set proof.
769
+ *
770
+ * @callname: BeefyMmrApi_next_authority_set_proof
771
+ **/
772
+ nextAuthoritySetProof: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBeefyMmrBeefyAuthoritySet>>;
773
+
774
+ /**
775
+ * Generic runtime api call
776
+ **/
777
+ [method: string]: GenericRuntimeApiMethod<Rv>;
778
+ };
779
+ /**
780
+ * @runtimeapi: GrandpaApi - 0xed99c5acb25eedf5
781
+ **/
782
+ grandpaApi: {
783
+ /**
784
+ * Get the current GRANDPA authorities and weights. This should not change except
785
+ * for when changes are scheduled and the corresponding delay has passed.
786
+ *
787
+ * When called at block B, it will return the set of authorities that should be
788
+ * used to finalize descendants of this block (B+1, B+2, ...). The block B itself
789
+ * is finalized by the authorities from block B-1.
790
+ *
791
+ * @callname: GrandpaApi_grandpa_authorities
792
+ **/
793
+ grandpaAuthorities: GenericRuntimeApiMethod<Rv, () => Promise<Array<[SpConsensusGrandpaAppPublic, bigint]>>>;
794
+
795
+ /**
796
+ * Submits an unsigned extrinsic to report an equivocation. The caller
797
+ * must provide the equivocation proof and a key ownership proof
798
+ * (should be obtained using `generate_key_ownership_proof`). The
799
+ * extrinsic will be unsigned and should only be accepted for local
800
+ * authorship (not to be broadcast to the network). This method returns
801
+ * `None` when creation of the extrinsic fails, e.g. if equivocation
802
+ * reporting is disabled for the given runtime (i.e. this method is
803
+ * hardcoded to return `None`). Only useful in an offchain context.
804
+ *
805
+ * @callname: GrandpaApi_submit_report_equivocation_unsigned_extrinsic
806
+ * @param {SpConsensusGrandpaEquivocationProof} equivocation_proof
807
+ * @param {SpConsensusGrandpaOpaqueKeyOwnershipProof} key_owner_proof
808
+ **/
809
+ submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<
810
+ Rv,
811
+ (
812
+ equivocationProof: SpConsensusGrandpaEquivocationProof,
813
+ keyOwnerProof: SpConsensusGrandpaOpaqueKeyOwnershipProof,
814
+ ) => Promise<[] | undefined>
815
+ >;
816
+
817
+ /**
818
+ * Generates a proof of key ownership for the given authority in the
819
+ * given set. An example usage of this module is coupled with the
820
+ * session historical module to prove that a given authority key is
821
+ * tied to a given staking identity during a specific session. Proofs
822
+ * of key ownership are necessary for submitting equivocation reports.
823
+ * NOTE: even though the API takes a `set_id` as parameter the current
824
+ * implementations ignore this parameter and instead rely on this
825
+ * method being called at the correct block height, i.e. any point at
826
+ * which the given set id is live on-chain. Future implementations will
827
+ * instead use indexed data through an offchain worker, not requiring
828
+ * older states to be available.
829
+ *
830
+ * @callname: GrandpaApi_generate_key_ownership_proof
831
+ * @param {bigint} set_id
832
+ * @param {SpConsensusGrandpaAppPublic} authority_id
833
+ **/
834
+ generateKeyOwnershipProof: GenericRuntimeApiMethod<
835
+ Rv,
836
+ (
837
+ setId: bigint,
838
+ authorityId: SpConsensusGrandpaAppPublic,
839
+ ) => Promise<SpConsensusGrandpaOpaqueKeyOwnershipProof | undefined>
840
+ >;
841
+
842
+ /**
843
+ * Get current GRANDPA authority set id.
844
+ *
845
+ * @callname: GrandpaApi_current_set_id
846
+ **/
847
+ currentSetId: GenericRuntimeApiMethod<Rv, () => Promise<bigint>>;
848
+
849
+ /**
850
+ * Generic runtime api call
851
+ **/
852
+ [method: string]: GenericRuntimeApiMethod<Rv>;
853
+ };
854
+ /**
855
+ * @runtimeapi: BabeApi - 0xcbca25e39f142387
856
+ **/
857
+ babeApi: {
858
+ /**
859
+ * Return the configuration for BABE.
860
+ *
861
+ * @callname: BabeApi_configuration
862
+ **/
863
+ configuration: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBabeBabeConfiguration>>;
864
+
865
+ /**
866
+ * Returns the slot that started the current epoch.
867
+ *
868
+ * @callname: BabeApi_current_epoch_start
869
+ **/
870
+ currentEpochStart: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusSlotsSlot>>;
871
+
872
+ /**
873
+ * Returns information regarding the current epoch.
874
+ *
875
+ * @callname: BabeApi_current_epoch
876
+ **/
877
+ currentEpoch: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBabeEpoch>>;
878
+
879
+ /**
880
+ * Returns information regarding the next epoch (which was already
881
+ * previously announced).
882
+ *
883
+ * @callname: BabeApi_next_epoch
884
+ **/
885
+ nextEpoch: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBabeEpoch>>;
886
+
887
+ /**
888
+ * Generates a proof of key ownership for the given authority in the
889
+ * current epoch. An example usage of this module is coupled with the
890
+ * session historical module to prove that a given authority key is
891
+ * tied to a given staking identity during a specific session. Proofs
892
+ * of key ownership are necessary for submitting equivocation reports.
893
+ * NOTE: even though the API takes a `slot` as parameter the current
894
+ * implementations ignores this parameter and instead relies on this
895
+ * method being called at the correct block height, i.e. any point at
896
+ * which the epoch for the given slot is live on-chain. Future
897
+ * implementations will instead use indexed data through an offchain
898
+ * worker, not requiring older states to be available.
899
+ *
900
+ * @callname: BabeApi_generate_key_ownership_proof
901
+ * @param {SpConsensusSlotsSlot} slot
902
+ * @param {SpConsensusBabeAppPublic} authority_id
903
+ **/
904
+ generateKeyOwnershipProof: GenericRuntimeApiMethod<
905
+ Rv,
906
+ (
907
+ slot: SpConsensusSlotsSlot,
908
+ authorityId: SpConsensusBabeAppPublic,
909
+ ) => Promise<SpConsensusBabeOpaqueKeyOwnershipProof | undefined>
910
+ >;
911
+
912
+ /**
913
+ * Submits an unsigned extrinsic to report an equivocation. The caller
914
+ * must provide the equivocation proof and a key ownership proof
915
+ * (should be obtained using `generate_key_ownership_proof`). The
916
+ * extrinsic will be unsigned and should only be accepted for local
917
+ * authorship (not to be broadcast to the network). This method returns
918
+ * `None` when creation of the extrinsic fails, e.g. if equivocation
919
+ * reporting is disabled for the given runtime (i.e. this method is
920
+ * hardcoded to return `None`). Only useful in an offchain context.
921
+ *
922
+ * @callname: BabeApi_submit_report_equivocation_unsigned_extrinsic
923
+ * @param {SpConsensusSlotsEquivocationProof} equivocation_proof
924
+ * @param {SpConsensusBabeOpaqueKeyOwnershipProof} key_owner_proof
925
+ **/
926
+ submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<
927
+ Rv,
928
+ (
929
+ equivocationProof: SpConsensusSlotsEquivocationProof,
930
+ keyOwnerProof: SpConsensusBabeOpaqueKeyOwnershipProof,
931
+ ) => Promise<[] | undefined>
932
+ >;
933
+
934
+ /**
935
+ * Generic runtime api call
936
+ **/
937
+ [method: string]: GenericRuntimeApiMethod<Rv>;
938
+ };
939
+ /**
940
+ * @runtimeapi: AuthorityDiscoveryApi - 0x687ad44ad37f03c2
941
+ **/
942
+ authorityDiscoveryApi: {
943
+ /**
944
+ * Retrieve authority identifiers of the current and next authority set.
945
+ *
946
+ * @callname: AuthorityDiscoveryApi_authorities
947
+ **/
948
+ authorities: GenericRuntimeApiMethod<Rv, () => Promise<Array<SpAuthorityDiscoveryAppPublic>>>;
949
+
950
+ /**
951
+ * Generic runtime api call
952
+ **/
953
+ [method: string]: GenericRuntimeApiMethod<Rv>;
954
+ };
955
+ /**
956
+ * @runtimeapi: SessionKeys - 0xab3c0572291feb8b
957
+ **/
958
+ sessionKeys: {
959
+ /**
960
+ * Generate a set of session keys with optionally using the given seed.
961
+ * The keys should be stored within the keystore exposed via runtime
962
+ * externalities.
963
+ *
964
+ * The seed needs to be a valid `utf8` string.
965
+ *
966
+ * Returns the concatenated SCALE encoded public keys.
967
+ *
968
+ * @callname: SessionKeys_generate_session_keys
969
+ * @param {BytesLike | undefined} seed
970
+ **/
971
+ generateSessionKeys: GenericRuntimeApiMethod<Rv, (seed?: BytesLike | undefined) => Promise<Bytes>>;
972
+
973
+ /**
974
+ * Decode the given public session keys.
975
+ *
976
+ * Returns the list of public raw public keys + key type.
977
+ *
978
+ * @callname: SessionKeys_decode_session_keys
979
+ * @param {BytesLike} encoded
980
+ **/
981
+ decodeSessionKeys: GenericRuntimeApiMethod<
982
+ Rv,
983
+ (encoded: BytesLike) => Promise<Array<[Bytes, SpCoreCryptoKeyTypeId]> | undefined>
984
+ >;
985
+
986
+ /**
987
+ * Generic runtime api call
988
+ **/
989
+ [method: string]: GenericRuntimeApiMethod<Rv>;
990
+ };
991
+ /**
992
+ * @runtimeapi: AccountNonceApi - 0xbc9d89904f5b923f
993
+ **/
994
+ accountNonceApi: {
995
+ /**
996
+ * Get current account nonce of given `AccountId`.
997
+ *
998
+ * @callname: AccountNonceApi_account_nonce
999
+ * @param {AccountId32Like} account
1000
+ **/
1001
+ accountNonce: GenericRuntimeApiMethod<Rv, (account: AccountId32Like) => Promise<number>>;
1002
+
1003
+ /**
1004
+ * Generic runtime api call
1005
+ **/
1006
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1007
+ };
1008
+ /**
1009
+ * @runtimeapi: TransactionPaymentApi - 0x37c8bb1350a9a2a8
1010
+ **/
1011
+ transactionPaymentApi: {
1012
+ /**
1013
+ *
1014
+ * @callname: TransactionPaymentApi_query_info
1015
+ * @param {UncheckedExtrinsicLike} uxt
1016
+ * @param {number} len
1017
+ **/
1018
+ queryInfo: GenericRuntimeApiMethod<
1019
+ Rv,
1020
+ (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
1021
+ >;
1022
+
1023
+ /**
1024
+ *
1025
+ * @callname: TransactionPaymentApi_query_fee_details
1026
+ * @param {UncheckedExtrinsicLike} uxt
1027
+ * @param {number} len
1028
+ **/
1029
+ queryFeeDetails: GenericRuntimeApiMethod<
1030
+ Rv,
1031
+ (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
1032
+ >;
1033
+
1034
+ /**
1035
+ *
1036
+ * @callname: TransactionPaymentApi_query_weight_to_fee
1037
+ * @param {SpWeightsWeightV2Weight} weight
1038
+ **/
1039
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
1040
+
1041
+ /**
1042
+ *
1043
+ * @callname: TransactionPaymentApi_query_length_to_fee
1044
+ * @param {number} length
1045
+ **/
1046
+ queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
1047
+
1048
+ /**
1049
+ * Generic runtime api call
1050
+ **/
1051
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1052
+ };
1053
+ /**
1054
+ * @runtimeapi: TransactionPaymentCallApi - 0xf3ff14d5ab527059
1055
+ **/
1056
+ transactionPaymentCallApi: {
1057
+ /**
1058
+ * Query information of a dispatch class, weight, and fee of a given encoded `Call`.
1059
+ *
1060
+ * @callname: TransactionPaymentCallApi_query_call_info
1061
+ * @param {StagingKusamaRuntimeRuntimeCallLike} call
1062
+ * @param {number} len
1063
+ **/
1064
+ queryCallInfo: GenericRuntimeApiMethod<
1065
+ Rv,
1066
+ (call: StagingKusamaRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
1067
+ >;
1068
+
1069
+ /**
1070
+ * Query fee details of a given encoded `Call`.
1071
+ *
1072
+ * @callname: TransactionPaymentCallApi_query_call_fee_details
1073
+ * @param {StagingKusamaRuntimeRuntimeCallLike} call
1074
+ * @param {number} len
1075
+ **/
1076
+ queryCallFeeDetails: GenericRuntimeApiMethod<
1077
+ Rv,
1078
+ (call: StagingKusamaRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
1079
+ >;
1080
+
1081
+ /**
1082
+ * Query the output of the current `WeightToFee` given some input.
1083
+ *
1084
+ * @callname: TransactionPaymentCallApi_query_weight_to_fee
1085
+ * @param {SpWeightsWeightV2Weight} weight
1086
+ **/
1087
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
1088
+
1089
+ /**
1090
+ * Query the output of the current `LengthToFee` given some input.
1091
+ *
1092
+ * @callname: TransactionPaymentCallApi_query_length_to_fee
1093
+ * @param {number} length
1094
+ **/
1095
+ queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
1096
+
1097
+ /**
1098
+ * Generic runtime api call
1099
+ **/
1100
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1101
+ };
1102
+ /**
1103
+ * @runtimeapi: NominationPoolsApi - 0x17a6bc0d0062aeb3
1104
+ **/
1105
+ nominationPoolsApi: {
1106
+ /**
1107
+ * Returns the pending rewards for the member that the AccountId was given for.
1108
+ *
1109
+ * @callname: NominationPoolsApi_pending_rewards
1110
+ * @param {AccountId32Like} who
1111
+ **/
1112
+ pendingRewards: GenericRuntimeApiMethod<Rv, (who: AccountId32Like) => Promise<bigint>>;
1113
+
1114
+ /**
1115
+ * Returns the equivalent balance of `points` for a given pool.
1116
+ *
1117
+ * @callname: NominationPoolsApi_points_to_balance
1118
+ * @param {number} pool_id
1119
+ * @param {bigint} points
1120
+ **/
1121
+ pointsToBalance: GenericRuntimeApiMethod<Rv, (poolId: number, points: bigint) => Promise<bigint>>;
1122
+
1123
+ /**
1124
+ * Returns the equivalent points of `new_funds` for a given pool.
1125
+ *
1126
+ * @callname: NominationPoolsApi_balance_to_points
1127
+ * @param {number} pool_id
1128
+ * @param {bigint} new_funds
1129
+ **/
1130
+ balanceToPoints: GenericRuntimeApiMethod<Rv, (poolId: number, newFunds: bigint) => Promise<bigint>>;
1131
+
1132
+ /**
1133
+ * Generic runtime api call
1134
+ **/
1135
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1136
+ };
1137
+ /**
1138
+ * @runtimeapi: StakingApi - 0x18ef58a3b67ba770
1139
+ **/
1140
+ stakingApi: {
1141
+ /**
1142
+ * Returns the nominations quota for a nominator with a given balance.
1143
+ *
1144
+ * @callname: StakingApi_nominations_quota
1145
+ * @param {bigint} balance
1146
+ **/
1147
+ nominationsQuota: GenericRuntimeApiMethod<Rv, (balance: bigint) => Promise<number>>;
1148
+
1149
+ /**
1150
+ * Returns the page count of exposures for a validator in a given era.
1151
+ *
1152
+ * @callname: StakingApi_eras_stakers_page_count
1153
+ * @param {number} era
1154
+ * @param {AccountId32Like} account
1155
+ **/
1156
+ erasStakersPageCount: GenericRuntimeApiMethod<Rv, (era: number, account: AccountId32Like) => Promise<number>>;
1157
+
1158
+ /**
1159
+ * Generic runtime api call
1160
+ **/
1161
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1162
+ };
1163
+ /**
1164
+ * @runtimeapi: GenesisBuilder - 0xfbc577b9d747efd6
1165
+ **/
1166
+ genesisBuilder: {
1167
+ /**
1168
+ * Creates the default `GenesisConfig` and returns it as a JSON blob.
1169
+ *
1170
+ * This function instantiates the default `GenesisConfig` struct for the runtime and serializes it into a JSON
1171
+ * blob. It returns a `Vec<u8>` containing the JSON representation of the default `GenesisConfig`.
1172
+ *
1173
+ * @callname: GenesisBuilder_create_default_config
1174
+ **/
1175
+ createDefaultConfig: GenericRuntimeApiMethod<Rv, () => Promise<Bytes>>;
1176
+
1177
+ /**
1178
+ * Build `GenesisConfig` from a JSON blob not using any defaults and store it in the storage.
1179
+ *
1180
+ * This function deserializes the full `GenesisConfig` from the given JSON blob and puts it into the storage.
1181
+ * If the provided JSON blob is incorrect or incomplete or the deserialization fails, an error is returned.
1182
+ * It is recommended to log any errors encountered during the process.
1183
+ *
1184
+ * Please note that provided json blob must contain all `GenesisConfig` fields, no defaults will be used.
1185
+ *
1186
+ * @callname: GenesisBuilder_build_config
1187
+ * @param {BytesLike} json
1188
+ **/
1189
+ buildConfig: GenericRuntimeApiMethod<Rv, (json: BytesLike) => Promise<Result<[], string>>>;
1190
+
1191
+ /**
1192
+ * Generic runtime api call
1193
+ **/
1194
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1195
+ };
844
1196
  }