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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/aleph/consts.d.ts +590 -528
  2. package/aleph/errors.d.ts +981 -818
  3. package/aleph/events.d.ts +924 -937
  4. package/aleph/index.d.ts +11 -8
  5. package/aleph/query.d.ts +1477 -1268
  6. package/aleph/rpc.d.ts +725 -573
  7. package/aleph/runtime.d.ts +541 -406
  8. package/aleph/tx.d.ts +2664 -2202
  9. package/aleph/types.d.ts +3474 -5388
  10. package/astar/consts.d.ts +753 -674
  11. package/astar/errors.d.ts +1576 -1313
  12. package/astar/events.d.ts +1709 -1628
  13. package/astar/index.d.ts +11 -8
  14. package/astar/query.d.ts +1756 -1471
  15. package/astar/rpc.d.ts +972 -773
  16. package/astar/runtime.d.ts +310 -258
  17. package/astar/tx.d.ts +5474 -4806
  18. package/astar/types.d.ts +8848 -12108
  19. package/index.ts +10 -0
  20. package/kusama/consts.d.ts +1573 -1422
  21. package/kusama/errors.d.ts +2995 -2490
  22. package/kusama/events.d.ts +2996 -2723
  23. package/kusama/index.d.ts +11 -8
  24. package/kusama/query.d.ts +3828 -3248
  25. package/kusama/rpc.d.ts +902 -724
  26. package/kusama/runtime.d.ts +1130 -840
  27. package/kusama/tx.d.ts +7073 -6010
  28. package/kusama/types.d.ts +10151 -15344
  29. package/kusamaAssetHub/consts.d.ts +714 -627
  30. package/kusamaAssetHub/errors.d.ts +1405 -1160
  31. package/kusamaAssetHub/events.d.ts +2149 -2060
  32. package/kusamaAssetHub/index.d.ts +11 -8
  33. package/kusamaAssetHub/query.d.ts +1551 -1298
  34. package/kusamaAssetHub/rpc.d.ts +744 -588
  35. package/kusamaAssetHub/runtime.d.ts +510 -398
  36. package/kusamaAssetHub/tx.d.ts +5050 -4212
  37. package/kusamaAssetHub/types.d.ts +5976 -10009
  38. package/moonbeam/consts.d.ts +1075 -956
  39. package/moonbeam/errors.d.ts +2131 -1793
  40. package/moonbeam/events.d.ts +2932 -2681
  41. package/moonbeam/index.d.ts +11 -8
  42. package/moonbeam/query.d.ts +2391 -2024
  43. package/moonbeam/rpc.d.ts +1013 -807
  44. package/moonbeam/runtime.d.ts +665 -502
  45. package/moonbeam/tx.d.ts +6152 -5201
  46. package/moonbeam/types.d.ts +7731 -12035
  47. package/package.json +9 -8
  48. package/packageInfo.js +1 -1
  49. package/packageInfo.ts +3 -0
  50. package/polkadot/consts.d.ts +1272 -1155
  51. package/polkadot/errors.d.ts +2420 -2016
  52. package/polkadot/events.d.ts +2314 -2092
  53. package/polkadot/index.d.ts +11 -8
  54. package/polkadot/query.d.ts +3319 -2808
  55. package/polkadot/rpc.d.ts +902 -724
  56. package/polkadot/runtime.d.ts +1130 -840
  57. package/polkadot/tx.d.ts +5909 -5005
  58. package/polkadot/types.d.ts +8742 -13290
  59. package/polkadotAssetHub/consts.d.ts +586 -519
  60. package/polkadotAssetHub/errors.d.ts +1115 -921
  61. package/polkadotAssetHub/events.d.ts +1850 -1782
  62. package/polkadotAssetHub/index.d.ts +11 -8
  63. package/polkadotAssetHub/query.d.ts +1457 -1219
  64. package/polkadotAssetHub/rpc.d.ts +744 -588
  65. package/polkadotAssetHub/runtime.d.ts +447 -355
  66. package/polkadotAssetHub/tx.d.ts +4184 -3487
  67. package/polkadotAssetHub/types.d.ts +5183 -8808
  68. package/rococoAssetHub/consts.d.ts +745 -653
  69. package/rococoAssetHub/errors.d.ts +1490 -1227
  70. package/rococoAssetHub/events.d.ts +2127 -2047
  71. package/rococoAssetHub/index.d.ts +11 -8
  72. package/rococoAssetHub/query.d.ts +1513 -1266
  73. package/rococoAssetHub/rpc.d.ts +744 -588
  74. package/rococoAssetHub/runtime.d.ts +538 -424
  75. package/rococoAssetHub/tx.d.ts +5164 -4302
  76. package/rococoAssetHub/types.d.ts +6321 -10636
  77. package/substrate/consts.d.ts +2218 -1966
  78. package/substrate/errors.d.ts +4019 -3333
  79. package/substrate/events.d.ts +4585 -4255
  80. package/substrate/index.d.ts +11 -8
  81. package/substrate/query.d.ts +3887 -3347
  82. package/substrate/rpc.d.ts +892 -716
  83. package/substrate/runtime.d.ts +937 -704
  84. package/substrate/tx.d.ts +10387 -8796
  85. package/substrate/types.d.ts +12809 -19761
  86. package/westendAssetHub/consts.d.ts +745 -653
  87. package/westendAssetHub/errors.d.ts +1490 -1227
  88. package/westendAssetHub/events.d.ts +2127 -2047
  89. package/westendAssetHub/index.d.ts +11 -8
  90. package/westendAssetHub/query.d.ts +1513 -1266
  91. package/westendAssetHub/rpc.d.ts +744 -588
  92. package/westendAssetHub/runtime.d.ts +577 -452
  93. package/westendAssetHub/tx.d.ts +5164 -4302
  94. package/westendAssetHub/types.d.ts +6321 -10633
  95. package/aleph/consts.js +0 -2
  96. package/aleph/errors.js +0 -2
  97. package/aleph/events.js +0 -2
  98. package/aleph/index.js +0 -3
  99. package/aleph/query.js +0 -2
  100. package/aleph/rpc.js +0 -2
  101. package/aleph/runtime.js +0 -2
  102. package/aleph/tx.js +0 -2
  103. package/aleph/types.js +0 -2
  104. package/astar/consts.js +0 -2
  105. package/astar/errors.js +0 -2
  106. package/astar/events.js +0 -2
  107. package/astar/index.js +0 -3
  108. package/astar/query.js +0 -2
  109. package/astar/rpc.js +0 -2
  110. package/astar/runtime.js +0 -2
  111. package/astar/tx.js +0 -2
  112. package/astar/types.js +0 -2
  113. package/cjs/aleph/consts.js +0 -3
  114. package/cjs/aleph/errors.js +0 -3
  115. package/cjs/aleph/events.js +0 -3
  116. package/cjs/aleph/index.js +0 -19
  117. package/cjs/aleph/query.js +0 -3
  118. package/cjs/aleph/rpc.js +0 -3
  119. package/cjs/aleph/runtime.js +0 -3
  120. package/cjs/aleph/tx.js +0 -3
  121. package/cjs/aleph/types.js +0 -3
  122. package/cjs/astar/consts.js +0 -3
  123. package/cjs/astar/errors.js +0 -3
  124. package/cjs/astar/events.js +0 -3
  125. package/cjs/astar/index.js +0 -19
  126. package/cjs/astar/query.js +0 -3
  127. package/cjs/astar/rpc.js +0 -3
  128. package/cjs/astar/runtime.js +0 -3
  129. package/cjs/astar/tx.js +0 -3
  130. package/cjs/astar/types.js +0 -3
  131. package/cjs/index.js +0 -2
  132. package/cjs/kusama/consts.js +0 -3
  133. package/cjs/kusama/errors.js +0 -3
  134. package/cjs/kusama/events.js +0 -3
  135. package/cjs/kusama/index.js +0 -19
  136. package/cjs/kusama/query.js +0 -3
  137. package/cjs/kusama/rpc.js +0 -3
  138. package/cjs/kusama/runtime.js +0 -3
  139. package/cjs/kusama/tx.js +0 -3
  140. package/cjs/kusama/types.js +0 -3
  141. package/cjs/kusamaAssetHub/consts.js +0 -3
  142. package/cjs/kusamaAssetHub/errors.js +0 -3
  143. package/cjs/kusamaAssetHub/events.js +0 -3
  144. package/cjs/kusamaAssetHub/index.js +0 -19
  145. package/cjs/kusamaAssetHub/query.js +0 -3
  146. package/cjs/kusamaAssetHub/rpc.js +0 -3
  147. package/cjs/kusamaAssetHub/runtime.js +0 -3
  148. package/cjs/kusamaAssetHub/tx.js +0 -3
  149. package/cjs/kusamaAssetHub/types.js +0 -3
  150. package/cjs/moonbeam/consts.js +0 -3
  151. package/cjs/moonbeam/errors.js +0 -3
  152. package/cjs/moonbeam/events.js +0 -3
  153. package/cjs/moonbeam/index.js +0 -19
  154. package/cjs/moonbeam/query.js +0 -3
  155. package/cjs/moonbeam/rpc.js +0 -3
  156. package/cjs/moonbeam/runtime.js +0 -3
  157. package/cjs/moonbeam/tx.js +0 -3
  158. package/cjs/moonbeam/types.js +0 -3
  159. package/cjs/package.json +0 -1
  160. package/cjs/packageInfo.js +0 -5
  161. package/cjs/polkadot/consts.js +0 -3
  162. package/cjs/polkadot/errors.js +0 -3
  163. package/cjs/polkadot/events.js +0 -3
  164. package/cjs/polkadot/index.js +0 -19
  165. package/cjs/polkadot/query.js +0 -3
  166. package/cjs/polkadot/rpc.js +0 -3
  167. package/cjs/polkadot/runtime.js +0 -3
  168. package/cjs/polkadot/tx.js +0 -3
  169. package/cjs/polkadot/types.js +0 -3
  170. package/cjs/polkadotAssetHub/consts.js +0 -3
  171. package/cjs/polkadotAssetHub/errors.js +0 -3
  172. package/cjs/polkadotAssetHub/events.js +0 -3
  173. package/cjs/polkadotAssetHub/index.js +0 -19
  174. package/cjs/polkadotAssetHub/query.js +0 -3
  175. package/cjs/polkadotAssetHub/rpc.js +0 -3
  176. package/cjs/polkadotAssetHub/runtime.js +0 -3
  177. package/cjs/polkadotAssetHub/tx.js +0 -3
  178. package/cjs/polkadotAssetHub/types.js +0 -3
  179. package/cjs/rococoAssetHub/consts.js +0 -3
  180. package/cjs/rococoAssetHub/errors.js +0 -3
  181. package/cjs/rococoAssetHub/events.js +0 -3
  182. package/cjs/rococoAssetHub/index.js +0 -19
  183. package/cjs/rococoAssetHub/query.js +0 -3
  184. package/cjs/rococoAssetHub/rpc.js +0 -3
  185. package/cjs/rococoAssetHub/runtime.js +0 -3
  186. package/cjs/rococoAssetHub/tx.js +0 -3
  187. package/cjs/rococoAssetHub/types.js +0 -3
  188. package/cjs/substrate/consts.js +0 -3
  189. package/cjs/substrate/errors.js +0 -3
  190. package/cjs/substrate/events.js +0 -3
  191. package/cjs/substrate/index.js +0 -19
  192. package/cjs/substrate/query.js +0 -3
  193. package/cjs/substrate/rpc.js +0 -3
  194. package/cjs/substrate/runtime.js +0 -3
  195. package/cjs/substrate/tx.js +0 -3
  196. package/cjs/substrate/types.js +0 -3
  197. package/cjs/westendAssetHub/consts.js +0 -3
  198. package/cjs/westendAssetHub/errors.js +0 -3
  199. package/cjs/westendAssetHub/events.js +0 -3
  200. package/cjs/westendAssetHub/index.js +0 -19
  201. package/cjs/westendAssetHub/query.js +0 -3
  202. package/cjs/westendAssetHub/rpc.js +0 -3
  203. package/cjs/westendAssetHub/runtime.js +0 -3
  204. package/cjs/westendAssetHub/tx.js +0 -3
  205. package/cjs/westendAssetHub/types.js +0 -3
  206. package/kusama/consts.js +0 -2
  207. package/kusama/errors.js +0 -2
  208. package/kusama/events.js +0 -2
  209. package/kusama/index.js +0 -3
  210. package/kusama/query.js +0 -2
  211. package/kusama/rpc.js +0 -2
  212. package/kusama/runtime.js +0 -2
  213. package/kusama/tx.js +0 -2
  214. package/kusama/types.js +0 -2
  215. package/kusamaAssetHub/consts.js +0 -2
  216. package/kusamaAssetHub/errors.js +0 -2
  217. package/kusamaAssetHub/events.js +0 -2
  218. package/kusamaAssetHub/index.js +0 -3
  219. package/kusamaAssetHub/query.js +0 -2
  220. package/kusamaAssetHub/rpc.js +0 -2
  221. package/kusamaAssetHub/runtime.js +0 -2
  222. package/kusamaAssetHub/tx.js +0 -2
  223. package/kusamaAssetHub/types.js +0 -2
  224. package/moonbeam/consts.js +0 -2
  225. package/moonbeam/errors.js +0 -2
  226. package/moonbeam/events.js +0 -2
  227. package/moonbeam/index.js +0 -3
  228. package/moonbeam/query.js +0 -2
  229. package/moonbeam/rpc.js +0 -2
  230. package/moonbeam/runtime.js +0 -2
  231. package/moonbeam/tx.js +0 -2
  232. package/moonbeam/types.js +0 -2
  233. package/polkadot/consts.js +0 -2
  234. package/polkadot/errors.js +0 -2
  235. package/polkadot/events.js +0 -2
  236. package/polkadot/index.js +0 -3
  237. package/polkadot/query.js +0 -2
  238. package/polkadot/rpc.js +0 -2
  239. package/polkadot/runtime.js +0 -2
  240. package/polkadot/tx.js +0 -2
  241. package/polkadot/types.js +0 -2
  242. package/polkadotAssetHub/consts.js +0 -2
  243. package/polkadotAssetHub/errors.js +0 -2
  244. package/polkadotAssetHub/events.js +0 -2
  245. package/polkadotAssetHub/index.js +0 -3
  246. package/polkadotAssetHub/query.js +0 -2
  247. package/polkadotAssetHub/rpc.js +0 -2
  248. package/polkadotAssetHub/runtime.js +0 -2
  249. package/polkadotAssetHub/tx.js +0 -2
  250. package/polkadotAssetHub/types.js +0 -2
  251. package/rococoAssetHub/consts.js +0 -2
  252. package/rococoAssetHub/errors.js +0 -2
  253. package/rococoAssetHub/events.js +0 -2
  254. package/rococoAssetHub/index.js +0 -3
  255. package/rococoAssetHub/query.js +0 -2
  256. package/rococoAssetHub/rpc.js +0 -2
  257. package/rococoAssetHub/runtime.js +0 -2
  258. package/rococoAssetHub/tx.js +0 -2
  259. package/rococoAssetHub/types.js +0 -2
  260. package/substrate/consts.js +0 -2
  261. package/substrate/errors.js +0 -2
  262. package/substrate/events.js +0 -2
  263. package/substrate/index.js +0 -3
  264. package/substrate/query.js +0 -2
  265. package/substrate/rpc.js +0 -2
  266. package/substrate/runtime.js +0 -2
  267. package/substrate/tx.js +0 -2
  268. package/substrate/types.js +0 -2
  269. package/westendAssetHub/consts.js +0 -2
  270. package/westendAssetHub/errors.js +0 -2
  271. package/westendAssetHub/events.js +0 -2
  272. package/westendAssetHub/index.js +0 -3
  273. package/westendAssetHub/query.js +0 -2
  274. package/westendAssetHub/rpc.js +0 -2
  275. package/westendAssetHub/runtime.js +0 -2
  276. package/westendAssetHub/tx.js +0 -2
  277. package/westendAssetHub/types.js +0 -2
@@ -1,708 +1,941 @@
1
+ // Generated by @dedot/codegen
2
+
1
3
  import type { GenericRuntimeApis, GenericRuntimeApiMethod } from '@dedot/types';
2
- import type { RuntimeVersion, Header, DispatchError, Result, UncheckedExtrinsicLike, UncheckedExtrinsic, H256, AccountId32Like, BytesLike, Bytes, AccountId32 } from '@dedot/codecs';
3
- import type { SpRuntimeBlock, SpCoreOpaqueMetadata, SpRuntimeTransactionValidityTransactionValidityError, SpInherentsInherentData, SpInherentsCheckInherentsResult, SpRuntimeTransactionValidityValidTransaction, SpRuntimeTransactionValidityTransactionSource, SpStatementStoreRuntimeApiValidStatement, SpStatementStoreRuntimeApiInvalidStatement, SpStatementStoreRuntimeApiStatementSource, SpStatementStoreStatement, SpConsensusGrandpaAppPublic, SpConsensusGrandpaEquivocationProof, SpConsensusGrandpaOpaqueKeyOwnershipProof, SpConsensusBabeBabeConfiguration, SpConsensusSlotsSlot, SpConsensusBabeEpoch, SpConsensusBabeOpaqueKeyOwnershipProof, SpConsensusBabeAppPublic, SpConsensusSlotsEquivocationProof, SpAuthorityDiscoveryAppPublic, PalletContractsPrimitivesContractResult, SpWeightsWeightV2Weight, PalletContractsPrimitivesContractResultResult, PalletContractsPrimitivesCode, PalletContractsPrimitivesCodeUploadReturnValue, PalletContractsWasmDeterminism, PalletContractsPrimitivesContractAccessError, PalletTransactionPaymentRuntimeDispatchInfo, PalletTransactionPaymentFeeDetails, PalletAssetConversionNativeOrAssetId, KitchensinkRuntimeRuntimeCallLike, SpMmrPrimitivesError, SpMmrPrimitivesEncodableOpaqueLeaf, SpMmrPrimitivesProof, SpCoreCryptoKeyTypeId } from './types';
4
+ import type {
5
+ RuntimeVersion,
6
+ Header,
7
+ DispatchError,
8
+ Result,
9
+ UncheckedExtrinsicLike,
10
+ UncheckedExtrinsic,
11
+ H256,
12
+ AccountId32Like,
13
+ BytesLike,
14
+ Bytes,
15
+ AccountId32,
16
+ } from '@dedot/codecs';
17
+ import type {
18
+ SpRuntimeBlock,
19
+ SpCoreOpaqueMetadata,
20
+ SpRuntimeTransactionValidityTransactionValidityError,
21
+ SpInherentsInherentData,
22
+ SpInherentsCheckInherentsResult,
23
+ SpRuntimeTransactionValidityValidTransaction,
24
+ SpRuntimeTransactionValidityTransactionSource,
25
+ SpStatementStoreRuntimeApiValidStatement,
26
+ SpStatementStoreRuntimeApiInvalidStatement,
27
+ SpStatementStoreRuntimeApiStatementSource,
28
+ SpStatementStoreStatement,
29
+ SpConsensusGrandpaAppPublic,
30
+ SpConsensusGrandpaEquivocationProof,
31
+ SpConsensusGrandpaOpaqueKeyOwnershipProof,
32
+ SpConsensusBabeBabeConfiguration,
33
+ SpConsensusSlotsSlot,
34
+ SpConsensusBabeEpoch,
35
+ SpConsensusBabeOpaqueKeyOwnershipProof,
36
+ SpConsensusBabeAppPublic,
37
+ SpConsensusSlotsEquivocationProof,
38
+ SpAuthorityDiscoveryAppPublic,
39
+ PalletContractsPrimitivesContractResult,
40
+ SpWeightsWeightV2Weight,
41
+ PalletContractsPrimitivesContractResultResult,
42
+ PalletContractsPrimitivesCode,
43
+ PalletContractsPrimitivesCodeUploadReturnValue,
44
+ PalletContractsWasmDeterminism,
45
+ PalletContractsPrimitivesContractAccessError,
46
+ PalletTransactionPaymentRuntimeDispatchInfo,
47
+ PalletTransactionPaymentFeeDetails,
48
+ PalletAssetConversionNativeOrAssetId,
49
+ KitchensinkRuntimeRuntimeCallLike,
50
+ SpMmrPrimitivesError,
51
+ SpMmrPrimitivesEncodableOpaqueLeaf,
52
+ SpMmrPrimitivesProof,
53
+ SpCoreCryptoKeyTypeId,
54
+ } from './types';
55
+
4
56
  export interface RuntimeApis extends GenericRuntimeApis {
57
+ /**
58
+ * @runtimeapi: Core - 0xdf6acb689907609b
59
+ **/
60
+ core: {
5
61
  /**
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: ValidateStatement - 0xbe9fb0c91a8046cf
135
- **/
136
- validateStatement: {
137
- /**
138
- * Validate the statement.
139
- *
140
- * @callname: ValidateStatement_validate_statement
141
- * @param {SpStatementStoreRuntimeApiStatementSource} source
142
- * @param {SpStatementStoreStatement} statement
143
- **/
144
- validateStatement: GenericRuntimeApiMethod<(source: SpStatementStoreRuntimeApiStatementSource, statement: SpStatementStoreStatement) => Promise<Result<SpStatementStoreRuntimeApiValidStatement, SpStatementStoreRuntimeApiInvalidStatement>>>;
145
- /**
146
- * Generic runtime api call
147
- **/
148
- [method: string]: GenericRuntimeApiMethod;
149
- };
150
- /**
151
- * @runtimeapi: OffchainWorkerApi - 0xf78b278be53f454c
152
- **/
153
- offchainWorkerApi: {
154
- /**
155
- * Starts the off-chain task for given block header.
156
- *
157
- * @callname: OffchainWorkerApi_offchain_worker
158
- * @param {Header} header
159
- **/
160
- offchainWorker: GenericRuntimeApiMethod<(header: Header) => Promise<[]>>;
161
- /**
162
- * Generic runtime api call
163
- **/
164
- [method: string]: GenericRuntimeApiMethod;
165
- };
166
- /**
167
- * @runtimeapi: GrandpaApi - 0xed99c5acb25eedf5
168
- **/
169
- grandpaApi: {
170
- /**
171
- * Get the current GRANDPA authorities and weights. This should not change except
172
- * for when changes are scheduled and the corresponding delay has passed.
173
- *
174
- * When called at block B, it will return the set of authorities that should be
175
- * used to finalize descendants of this block (B+1, B+2, ...). The block B itself
176
- * is finalized by the authorities from block B-1.
177
- *
178
- * @callname: GrandpaApi_grandpa_authorities
179
- **/
180
- grandpaAuthorities: GenericRuntimeApiMethod<() => Promise<Array<[SpConsensusGrandpaAppPublic, bigint]>>>;
181
- /**
182
- * Submits an unsigned extrinsic to report an equivocation. The caller
183
- * must provide the equivocation proof and a key ownership proof
184
- * (should be obtained using `generate_key_ownership_proof`). The
185
- * extrinsic will be unsigned and should only be accepted for local
186
- * authorship (not to be broadcast to the network). This method returns
187
- * `None` when creation of the extrinsic fails, e.g. if equivocation
188
- * reporting is disabled for the given runtime (i.e. this method is
189
- * hardcoded to return `None`). Only useful in an offchain context.
190
- *
191
- * @callname: GrandpaApi_submit_report_equivocation_unsigned_extrinsic
192
- * @param {SpConsensusGrandpaEquivocationProof} equivocation_proof
193
- * @param {SpConsensusGrandpaOpaqueKeyOwnershipProof} key_owner_proof
194
- **/
195
- submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<(equivocationProof: SpConsensusGrandpaEquivocationProof, keyOwnerProof: SpConsensusGrandpaOpaqueKeyOwnershipProof) => Promise<[] | undefined>>;
196
- /**
197
- * Generates a proof of key ownership for the given authority in the
198
- * given set. An example usage of this module is coupled with the
199
- * session historical module to prove that a given authority key is
200
- * tied to a given staking identity during a specific session. Proofs
201
- * of key ownership are necessary for submitting equivocation reports.
202
- * NOTE: even though the API takes a `set_id` as parameter the current
203
- * implementations ignore this parameter and instead rely on this
204
- * method being called at the correct block height, i.e. any point at
205
- * which the given set id is live on-chain. Future implementations will
206
- * instead use indexed data through an offchain worker, not requiring
207
- * older states to be available.
208
- *
209
- * @callname: GrandpaApi_generate_key_ownership_proof
210
- * @param {bigint} set_id
211
- * @param {SpConsensusGrandpaAppPublic} authority_id
212
- **/
213
- generateKeyOwnershipProof: GenericRuntimeApiMethod<(setId: bigint, authorityId: SpConsensusGrandpaAppPublic) => Promise<SpConsensusGrandpaOpaqueKeyOwnershipProof | undefined>>;
214
- /**
215
- * Get current GRANDPA authority set id.
216
- *
217
- * @callname: GrandpaApi_current_set_id
218
- **/
219
- currentSetId: GenericRuntimeApiMethod<() => Promise<bigint>>;
220
- /**
221
- * Generic runtime api call
222
- **/
223
- [method: string]: GenericRuntimeApiMethod;
224
- };
225
- /**
226
- * @runtimeapi: NominationPoolsApi - 0x17a6bc0d0062aeb3
227
- **/
228
- nominationPoolsApi: {
229
- /**
230
- * Returns the pending rewards for the member that the AccountId was given for.
231
- *
232
- * @callname: NominationPoolsApi_pending_rewards
233
- * @param {AccountId32Like} who
234
- **/
235
- pendingRewards: GenericRuntimeApiMethod<(who: AccountId32Like) => Promise<bigint>>;
236
- /**
237
- * Returns the equivalent balance of `points` for a given pool.
238
- *
239
- * @callname: NominationPoolsApi_points_to_balance
240
- * @param {number} pool_id
241
- * @param {bigint} points
242
- **/
243
- pointsToBalance: GenericRuntimeApiMethod<(poolId: number, points: bigint) => Promise<bigint>>;
244
- /**
245
- * Returns the equivalent points of `new_funds` for a given pool.
246
- *
247
- * @callname: NominationPoolsApi_balance_to_points
248
- * @param {number} pool_id
249
- * @param {bigint} new_funds
250
- **/
251
- balanceToPoints: GenericRuntimeApiMethod<(poolId: number, newFunds: bigint) => Promise<bigint>>;
252
- /**
253
- * Generic runtime api call
254
- **/
255
- [method: string]: GenericRuntimeApiMethod;
256
- };
257
- /**
258
- * @runtimeapi: StakingApi - 0x18ef58a3b67ba770
259
- **/
260
- stakingApi: {
261
- /**
262
- * Returns the nominations quota for a nominator with a given balance.
263
- *
264
- * @callname: StakingApi_nominations_quota
265
- * @param {bigint} balance
266
- **/
267
- nominationsQuota: GenericRuntimeApiMethod<(balance: bigint) => Promise<number>>;
268
- /**
269
- * Generic runtime api call
270
- **/
271
- [method: string]: GenericRuntimeApiMethod;
272
- };
273
- /**
274
- * @runtimeapi: BabeApi - 0xcbca25e39f142387
275
- **/
276
- babeApi: {
277
- /**
278
- * Return the configuration for BABE.
279
- *
280
- * @callname: BabeApi_configuration
281
- **/
282
- configuration: GenericRuntimeApiMethod<() => Promise<SpConsensusBabeBabeConfiguration>>;
283
- /**
284
- * Returns the slot that started the current epoch.
285
- *
286
- * @callname: BabeApi_current_epoch_start
287
- **/
288
- currentEpochStart: GenericRuntimeApiMethod<() => Promise<SpConsensusSlotsSlot>>;
289
- /**
290
- * Returns information regarding the current epoch.
291
- *
292
- * @callname: BabeApi_current_epoch
293
- **/
294
- currentEpoch: GenericRuntimeApiMethod<() => Promise<SpConsensusBabeEpoch>>;
295
- /**
296
- * Returns information regarding the next epoch (which was already
297
- * previously announced).
298
- *
299
- * @callname: BabeApi_next_epoch
300
- **/
301
- nextEpoch: GenericRuntimeApiMethod<() => Promise<SpConsensusBabeEpoch>>;
302
- /**
303
- * Generates a proof of key ownership for the given authority in the
304
- * current epoch. An example usage of this module is coupled with the
305
- * session historical module to prove that a given authority key is
306
- * tied to a given staking identity during a specific session. Proofs
307
- * of key ownership are necessary for submitting equivocation reports.
308
- * NOTE: even though the API takes a `slot` as parameter the current
309
- * implementations ignores this parameter and instead relies on this
310
- * method being called at the correct block height, i.e. any point at
311
- * which the epoch for the given slot is live on-chain. Future
312
- * implementations will instead use indexed data through an offchain
313
- * worker, not requiring older states to be available.
314
- *
315
- * @callname: BabeApi_generate_key_ownership_proof
316
- * @param {SpConsensusSlotsSlot} slot
317
- * @param {SpConsensusBabeAppPublic} authority_id
318
- **/
319
- generateKeyOwnershipProof: GenericRuntimeApiMethod<(slot: SpConsensusSlotsSlot, authorityId: SpConsensusBabeAppPublic) => Promise<SpConsensusBabeOpaqueKeyOwnershipProof | undefined>>;
320
- /**
321
- * Submits an unsigned extrinsic to report an equivocation. The caller
322
- * must provide the equivocation proof and a key ownership proof
323
- * (should be obtained using `generate_key_ownership_proof`). The
324
- * extrinsic will be unsigned and should only be accepted for local
325
- * authorship (not to be broadcast to the network). This method returns
326
- * `None` when creation of the extrinsic fails, e.g. if equivocation
327
- * reporting is disabled for the given runtime (i.e. this method is
328
- * hardcoded to return `None`). Only useful in an offchain context.
329
- *
330
- * @callname: BabeApi_submit_report_equivocation_unsigned_extrinsic
331
- * @param {SpConsensusSlotsEquivocationProof} equivocation_proof
332
- * @param {SpConsensusBabeOpaqueKeyOwnershipProof} key_owner_proof
333
- **/
334
- submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<(equivocationProof: SpConsensusSlotsEquivocationProof, keyOwnerProof: SpConsensusBabeOpaqueKeyOwnershipProof) => Promise<[] | undefined>>;
335
- /**
336
- * Generic runtime api call
337
- **/
338
- [method: string]: GenericRuntimeApiMethod;
339
- };
340
- /**
341
- * @runtimeapi: AuthorityDiscoveryApi - 0x687ad44ad37f03c2
342
- **/
343
- authorityDiscoveryApi: {
344
- /**
345
- * Retrieve authority identifiers of the current and next authority set.
346
- *
347
- * @callname: AuthorityDiscoveryApi_authorities
348
- **/
349
- authorities: GenericRuntimeApiMethod<() => Promise<Array<SpAuthorityDiscoveryAppPublic>>>;
350
- /**
351
- * Generic runtime api call
352
- **/
353
- [method: string]: GenericRuntimeApiMethod;
354
- };
355
- /**
356
- * @runtimeapi: AccountNonceApi - 0xbc9d89904f5b923f
357
- **/
358
- accountNonceApi: {
359
- /**
360
- * Get current account nonce of given `AccountId`.
361
- *
362
- * @callname: AccountNonceApi_account_nonce
363
- * @param {AccountId32Like} account
364
- **/
365
- accountNonce: GenericRuntimeApiMethod<(account: AccountId32Like) => Promise<number>>;
366
- /**
367
- * Generic runtime api call
368
- **/
369
- [method: string]: GenericRuntimeApiMethod;
370
- };
371
- /**
372
- * @runtimeapi: AssetsApi - 0x8453b50b22293977
373
- **/
374
- assetsApi: {
375
- /**
376
- * Returns the list of `AssetId`s and corresponding balance that an `AccountId` has.
377
- *
378
- * @callname: AssetsApi_account_balances
379
- * @param {AccountId32Like} account
380
- **/
381
- accountBalances: GenericRuntimeApiMethod<(account: AccountId32Like) => Promise<Array<[number, bigint]>>>;
382
- /**
383
- * Generic runtime api call
384
- **/
385
- [method: string]: GenericRuntimeApiMethod;
386
- };
387
- /**
388
- * @runtimeapi: ContractsApi - 0x68b66ba122c93fa7
389
- **/
390
- contractsApi: {
391
- /**
392
- * Perform a call from a specified account to a given contract.
393
- *
394
- * See [`crate::Pallet::bare_call`].
395
- *
396
- * @callname: ContractsApi_call
397
- * @param {AccountId32Like} origin
398
- * @param {AccountId32Like} dest
399
- * @param {bigint} value
400
- * @param {SpWeightsWeightV2Weight | undefined} gas_limit
401
- * @param {bigint | undefined} storage_deposit_limit
402
- * @param {BytesLike} input_data
403
- **/
404
- call: GenericRuntimeApiMethod<(origin: AccountId32Like, dest: AccountId32Like, value: bigint, gasLimit: SpWeightsWeightV2Weight | undefined, storageDepositLimit: bigint | undefined, inputData: BytesLike) => Promise<PalletContractsPrimitivesContractResult>>;
405
- /**
406
- * Instantiate a new contract.
407
- *
408
- * See `[crate::Pallet::bare_instantiate]`.
409
- *
410
- * @callname: ContractsApi_instantiate
411
- * @param {AccountId32Like} origin
412
- * @param {bigint} value
413
- * @param {SpWeightsWeightV2Weight | undefined} gas_limit
414
- * @param {bigint | undefined} storage_deposit_limit
415
- * @param {PalletContractsPrimitivesCode} code
416
- * @param {BytesLike} data
417
- * @param {BytesLike} salt
418
- **/
419
- instantiate: GenericRuntimeApiMethod<(origin: AccountId32Like, value: bigint, gasLimit: SpWeightsWeightV2Weight | undefined, storageDepositLimit: bigint | undefined, code: PalletContractsPrimitivesCode, data: BytesLike, salt: BytesLike) => Promise<PalletContractsPrimitivesContractResultResult>>;
420
- /**
421
- * Upload new code without instantiating a contract from it.
422
- *
423
- * See [`crate::Pallet::bare_upload_code`].
424
- *
425
- * @callname: ContractsApi_upload_code
426
- * @param {AccountId32Like} origin
427
- * @param {BytesLike} code
428
- * @param {bigint | undefined} storage_deposit_limit
429
- * @param {PalletContractsWasmDeterminism} determinism
430
- **/
431
- uploadCode: GenericRuntimeApiMethod<(origin: AccountId32Like, code: BytesLike, storageDepositLimit: bigint | undefined, determinism: PalletContractsWasmDeterminism) => Promise<Result<PalletContractsPrimitivesCodeUploadReturnValue, DispatchError>>>;
432
- /**
433
- * Query a given storage key in a given contract.
434
- *
435
- * Returns `Ok(Some(Vec<u8>))` if the storage value exists under the given key in the
436
- * specified account and `Ok(None)` if it doesn't. If the account specified by the address
437
- * doesn't exist, or doesn't have a contract then `Err` is returned.
438
- *
439
- * @callname: ContractsApi_get_storage
440
- * @param {AccountId32Like} address
441
- * @param {BytesLike} key
442
- **/
443
- getStorage: GenericRuntimeApiMethod<(address: AccountId32Like, key: BytesLike) => Promise<Result<Bytes | undefined, PalletContractsPrimitivesContractAccessError>>>;
444
- /**
445
- * Generic runtime api call
446
- **/
447
- [method: string]: GenericRuntimeApiMethod;
448
- };
449
- /**
450
- * @runtimeapi: TransactionPaymentApi - 0x37c8bb1350a9a2a8
451
- **/
452
- transactionPaymentApi: {
453
- /**
454
- *
455
- * @callname: TransactionPaymentApi_query_info
456
- * @param {UncheckedExtrinsicLike} uxt
457
- * @param {number} len
458
- **/
459
- queryInfo: GenericRuntimeApiMethod<(uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>>;
460
- /**
461
- *
462
- * @callname: TransactionPaymentApi_query_fee_details
463
- * @param {UncheckedExtrinsicLike} uxt
464
- * @param {number} len
465
- **/
466
- queryFeeDetails: GenericRuntimeApiMethod<(uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>>;
467
- /**
468
- *
469
- * @callname: TransactionPaymentApi_query_weight_to_fee
470
- * @param {SpWeightsWeightV2Weight} weight
471
- **/
472
- queryWeightToFee: GenericRuntimeApiMethod<(weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
473
- /**
474
- *
475
- * @callname: TransactionPaymentApi_query_length_to_fee
476
- * @param {number} length
477
- **/
478
- queryLengthToFee: GenericRuntimeApiMethod<(length: number) => Promise<bigint>>;
479
- /**
480
- * Generic runtime api call
481
- **/
482
- [method: string]: GenericRuntimeApiMethod;
483
- };
484
- /**
485
- * @runtimeapi: AssetConversionApi - 0x8a8047a53a8277ec
486
- **/
487
- assetConversionApi: {
488
- /**
489
- * Provides a quote for [`Pallet::swap_tokens_for_exact_tokens`].
490
- *
491
- * Note that the price may have changed by the time the transaction is executed.
492
- * (Use `amount_in_max` to control slippage.)
493
- *
494
- * @callname: AssetConversionApi_quote_price_tokens_for_exact_tokens
495
- * @param {PalletAssetConversionNativeOrAssetId} asset1
496
- * @param {PalletAssetConversionNativeOrAssetId} asset2
497
- * @param {bigint} amount
498
- * @param {boolean} include_fee
499
- **/
500
- quotePriceTokensForExactTokens: GenericRuntimeApiMethod<(asset1: PalletAssetConversionNativeOrAssetId, asset2: PalletAssetConversionNativeOrAssetId, amount: bigint, includeFee: boolean) => Promise<bigint | undefined>>;
501
- /**
502
- * Provides a quote for [`Pallet::swap_exact_tokens_for_tokens`].
503
- *
504
- * Note that the price may have changed by the time the transaction is executed.
505
- * (Use `amount_out_min` to control slippage.)
506
- *
507
- * @callname: AssetConversionApi_quote_price_exact_tokens_for_tokens
508
- * @param {PalletAssetConversionNativeOrAssetId} asset1
509
- * @param {PalletAssetConversionNativeOrAssetId} asset2
510
- * @param {bigint} amount
511
- * @param {boolean} include_fee
512
- **/
513
- quotePriceExactTokensForTokens: GenericRuntimeApiMethod<(asset1: PalletAssetConversionNativeOrAssetId, asset2: PalletAssetConversionNativeOrAssetId, amount: bigint, includeFee: boolean) => Promise<bigint | undefined>>;
514
- /**
515
- * Returns the size of the liquidity pool for the given asset pair.
516
- *
517
- * @callname: AssetConversionApi_get_reserves
518
- * @param {PalletAssetConversionNativeOrAssetId} asset1
519
- * @param {PalletAssetConversionNativeOrAssetId} asset2
520
- **/
521
- getReserves: GenericRuntimeApiMethod<(asset1: PalletAssetConversionNativeOrAssetId, asset2: PalletAssetConversionNativeOrAssetId) => Promise<[bigint, bigint] | undefined>>;
522
- /**
523
- * Generic runtime api call
524
- **/
525
- [method: string]: GenericRuntimeApiMethod;
526
- };
527
- /**
528
- * @runtimeapi: TransactionPaymentCallApi - 0xf3ff14d5ab527059
529
- **/
530
- transactionPaymentCallApi: {
531
- /**
532
- * Query information of a dispatch class, weight, and fee of a given encoded `Call`.
533
- *
534
- * @callname: TransactionPaymentCallApi_query_call_info
535
- * @param {KitchensinkRuntimeRuntimeCallLike} call
536
- * @param {number} len
537
- **/
538
- queryCallInfo: GenericRuntimeApiMethod<(call: KitchensinkRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>>;
539
- /**
540
- * Query fee details of a given encoded `Call`.
541
- *
542
- * @callname: TransactionPaymentCallApi_query_call_fee_details
543
- * @param {KitchensinkRuntimeRuntimeCallLike} call
544
- * @param {number} len
545
- **/
546
- queryCallFeeDetails: GenericRuntimeApiMethod<(call: KitchensinkRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>>;
547
- /**
548
- * Query the output of the current `WeightToFee` given some input.
549
- *
550
- * @callname: TransactionPaymentCallApi_query_weight_to_fee
551
- * @param {SpWeightsWeightV2Weight} weight
552
- **/
553
- queryWeightToFee: GenericRuntimeApiMethod<(weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
554
- /**
555
- * Query the output of the current `LengthToFee` given some input.
556
- *
557
- * @callname: TransactionPaymentCallApi_query_length_to_fee
558
- * @param {number} length
559
- **/
560
- queryLengthToFee: GenericRuntimeApiMethod<(length: number) => Promise<bigint>>;
561
- /**
562
- * Generic runtime api call
563
- **/
564
- [method: string]: GenericRuntimeApiMethod;
565
- };
566
- /**
567
- * @runtimeapi: NftsApi - 0x899a250cbe84f250
568
- **/
569
- nftsApi: {
570
- /**
571
- *
572
- * @callname: NftsApi_owner
573
- * @param {number} collection
574
- * @param {number} item
575
- **/
576
- owner: GenericRuntimeApiMethod<(collection: number, item: number) => Promise<AccountId32 | undefined>>;
577
- /**
578
- *
579
- * @callname: NftsApi_collection_owner
580
- * @param {number} collection
581
- **/
582
- collectionOwner: GenericRuntimeApiMethod<(collection: number) => Promise<AccountId32 | undefined>>;
583
- /**
584
- *
585
- * @callname: NftsApi_attribute
586
- * @param {number} collection
587
- * @param {number} item
588
- * @param {BytesLike} key
589
- **/
590
- attribute: GenericRuntimeApiMethod<(collection: number, item: number, key: BytesLike) => Promise<Bytes | undefined>>;
591
- /**
592
- *
593
- * @callname: NftsApi_custom_attribute
594
- * @param {AccountId32Like} account
595
- * @param {number} collection
596
- * @param {number} item
597
- * @param {BytesLike} key
598
- **/
599
- customAttribute: GenericRuntimeApiMethod<(account: AccountId32Like, collection: number, item: number, key: BytesLike) => Promise<Bytes | undefined>>;
600
- /**
601
- *
602
- * @callname: NftsApi_system_attribute
603
- * @param {number} collection
604
- * @param {number} item
605
- * @param {BytesLike} key
606
- **/
607
- systemAttribute: GenericRuntimeApiMethod<(collection: number, item: number, key: BytesLike) => Promise<Bytes | undefined>>;
608
- /**
609
- *
610
- * @callname: NftsApi_collection_attribute
611
- * @param {number} collection
612
- * @param {BytesLike} key
613
- **/
614
- collectionAttribute: GenericRuntimeApiMethod<(collection: number, key: BytesLike) => Promise<Bytes | undefined>>;
615
- /**
616
- * Generic runtime api call
617
- **/
618
- [method: string]: GenericRuntimeApiMethod;
619
- };
620
- /**
621
- * @runtimeapi: MmrApi - 0x91d5df18b0d2cf58
622
- **/
623
- mmrApi: {
624
- /**
625
- * Return the on-chain MMR root hash.
626
- *
627
- * @callname: MmrApi_mmr_root
628
- **/
629
- mmrRoot: GenericRuntimeApiMethod<() => Promise<Result<H256, SpMmrPrimitivesError>>>;
630
- /**
631
- * Return the number of MMR blocks in the chain.
632
- *
633
- * @callname: MmrApi_mmr_leaf_count
634
- **/
635
- mmrLeafCount: GenericRuntimeApiMethod<() => Promise<Result<bigint, SpMmrPrimitivesError>>>;
636
- /**
637
- * Generate MMR proof for a series of block numbers. If `best_known_block_number = Some(n)`,
638
- * use historical MMR state at given block height `n`. Else, use current MMR state.
639
- *
640
- * @callname: MmrApi_generate_proof
641
- * @param {Array<number>} block_numbers
642
- * @param {number | undefined} best_known_block_number
643
- **/
644
- generateProof: GenericRuntimeApiMethod<(blockNumbers: Array<number>, bestKnownBlockNumber?: number | undefined) => Promise<Result<[Array<SpMmrPrimitivesEncodableOpaqueLeaf>, SpMmrPrimitivesProof], SpMmrPrimitivesError>>>;
645
- /**
646
- * Verify MMR proof against on-chain MMR for a batch of leaves.
647
- *
648
- * Note this function will use on-chain MMR root hash and check if the proof matches the hash.
649
- * Note, the leaves should be sorted such that corresponding leaves and leaf indices have the
650
- * same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]
651
- *
652
- * @callname: MmrApi_verify_proof
653
- * @param {Array<SpMmrPrimitivesEncodableOpaqueLeaf>} leaves
654
- * @param {SpMmrPrimitivesProof} proof
655
- **/
656
- verifyProof: GenericRuntimeApiMethod<(leaves: Array<SpMmrPrimitivesEncodableOpaqueLeaf>, proof: SpMmrPrimitivesProof) => Promise<Result<[], SpMmrPrimitivesError>>>;
657
- /**
658
- * Verify MMR proof against given root hash for a batch of leaves.
659
- *
660
- * Note this function does not require any on-chain storage - the
661
- * proof is verified against given MMR root hash.
662
- *
663
- * Note, the leaves should be sorted such that corresponding leaves and leaf indices have the
664
- * same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]
665
- *
666
- * @callname: MmrApi_verify_proof_stateless
667
- * @param {H256} root
668
- * @param {Array<SpMmrPrimitivesEncodableOpaqueLeaf>} leaves
669
- * @param {SpMmrPrimitivesProof} proof
670
- **/
671
- verifyProofStateless: GenericRuntimeApiMethod<(root: H256, leaves: Array<SpMmrPrimitivesEncodableOpaqueLeaf>, proof: SpMmrPrimitivesProof) => Promise<Result<[], SpMmrPrimitivesError>>>;
672
- /**
673
- * Generic runtime api call
674
- **/
675
- [method: string]: GenericRuntimeApiMethod;
676
- };
677
- /**
678
- * @runtimeapi: SessionKeys - 0xab3c0572291feb8b
679
- **/
680
- sessionKeys: {
681
- /**
682
- * Generate a set of session keys with optionally using the given seed.
683
- * The keys should be stored within the keystore exposed via runtime
684
- * externalities.
685
- *
686
- * The seed needs to be a valid `utf8` string.
687
- *
688
- * Returns the concatenated SCALE encoded public keys.
689
- *
690
- * @callname: SessionKeys_generate_session_keys
691
- * @param {BytesLike | undefined} seed
692
- **/
693
- generateSessionKeys: GenericRuntimeApiMethod<(seed?: BytesLike | undefined) => Promise<Bytes>>;
694
- /**
695
- * Decode the given public session keys.
696
- *
697
- * Returns the list of public raw public keys + key type.
698
- *
699
- * @callname: SessionKeys_decode_session_keys
700
- * @param {BytesLike} encoded
701
- **/
702
- decodeSessionKeys: GenericRuntimeApiMethod<(encoded: BytesLike) => Promise<Array<[Bytes, SpCoreCryptoKeyTypeId]> | undefined>>;
703
- /**
704
- * Generic runtime api call
705
- **/
706
- [method: string]: GenericRuntimeApiMethod;
707
- };
62
+ * Returns the version of the runtime.
63
+ *
64
+ * @callname: Core_version
65
+ **/
66
+ version: GenericRuntimeApiMethod<() => Promise<RuntimeVersion>>;
67
+
68
+ /**
69
+ * Execute the given block.
70
+ *
71
+ * @callname: Core_execute_block
72
+ * @param {SpRuntimeBlock} block
73
+ **/
74
+ executeBlock: GenericRuntimeApiMethod<(block: SpRuntimeBlock) => Promise<[]>>;
75
+
76
+ /**
77
+ * Initialize a block with the given header.
78
+ *
79
+ * @callname: Core_initialize_block
80
+ * @param {Header} header
81
+ **/
82
+ initializeBlock: GenericRuntimeApiMethod<(header: Header) => Promise<[]>>;
83
+
84
+ /**
85
+ * Generic runtime api call
86
+ **/
87
+ [method: string]: GenericRuntimeApiMethod;
88
+ };
89
+ /**
90
+ * @runtimeapi: Metadata - 0x37e397fc7c91f5e4
91
+ **/
92
+ metadata: {
93
+ /**
94
+ * Returns the metadata of a runtime.
95
+ *
96
+ * @callname: Metadata_metadata
97
+ **/
98
+ metadata: GenericRuntimeApiMethod<() => Promise<SpCoreOpaqueMetadata>>;
99
+
100
+ /**
101
+ * Returns the metadata at a given version.
102
+ *
103
+ * If the given `version` isn't supported, this will return `None`.
104
+ * Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime.
105
+ *
106
+ * @callname: Metadata_metadata_at_version
107
+ * @param {number} version
108
+ **/
109
+ metadataAtVersion: GenericRuntimeApiMethod<(version: number) => Promise<SpCoreOpaqueMetadata | undefined>>;
110
+
111
+ /**
112
+ * Returns the supported metadata versions.
113
+ *
114
+ * This can be used to call `metadata_at_version`.
115
+ *
116
+ * @callname: Metadata_metadata_versions
117
+ **/
118
+ metadataVersions: GenericRuntimeApiMethod<() => Promise<Array<number>>>;
119
+
120
+ /**
121
+ * Generic runtime api call
122
+ **/
123
+ [method: string]: GenericRuntimeApiMethod;
124
+ };
125
+ /**
126
+ * @runtimeapi: BlockBuilder - 0x40fe3ad401f8959a
127
+ **/
128
+ blockBuilder: {
129
+ /**
130
+ * Apply the given extrinsic.
131
+ *
132
+ * Returns an inclusion outcome which specifies if this extrinsic is included in
133
+ * this block or not.
134
+ *
135
+ * @callname: BlockBuilder_apply_extrinsic
136
+ * @param {UncheckedExtrinsicLike} extrinsic
137
+ **/
138
+ applyExtrinsic: GenericRuntimeApiMethod<
139
+ (
140
+ extrinsic: UncheckedExtrinsicLike,
141
+ ) => Promise<Result<Result<[], DispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>
142
+ >;
143
+
144
+ /**
145
+ * Finish the current block.
146
+ *
147
+ * @callname: BlockBuilder_finalize_block
148
+ **/
149
+ finalizeBlock: GenericRuntimeApiMethod<() => Promise<Header>>;
150
+
151
+ /**
152
+ * Generate inherent extrinsics. The inherent data will vary from chain to chain.
153
+ *
154
+ * @callname: BlockBuilder_inherent_extrinsics
155
+ * @param {SpInherentsInherentData} inherent
156
+ **/
157
+ inherentExtrinsics: GenericRuntimeApiMethod<
158
+ (inherent: SpInherentsInherentData) => Promise<Array<UncheckedExtrinsic>>
159
+ >;
160
+
161
+ /**
162
+ * Check that the inherents are valid. The inherent data will vary from chain to chain.
163
+ *
164
+ * @callname: BlockBuilder_check_inherents
165
+ * @param {SpRuntimeBlock} block
166
+ * @param {SpInherentsInherentData} data
167
+ **/
168
+ checkInherents: GenericRuntimeApiMethod<
169
+ (block: SpRuntimeBlock, data: SpInherentsInherentData) => Promise<SpInherentsCheckInherentsResult>
170
+ >;
171
+
172
+ /**
173
+ * Generic runtime api call
174
+ **/
175
+ [method: string]: GenericRuntimeApiMethod;
176
+ };
177
+ /**
178
+ * @runtimeapi: TaggedTransactionQueue - 0xd2bc9897eed08f15
179
+ **/
180
+ taggedTransactionQueue: {
181
+ /**
182
+ * Validate the transaction.
183
+ *
184
+ * This method is invoked by the transaction pool to learn details about given transaction.
185
+ * The implementation should make sure to verify the correctness of the transaction
186
+ * against current state. The given `block_hash` corresponds to the hash of the block
187
+ * that is used as current state.
188
+ *
189
+ * Note that this call may be performed by the pool multiple times and transactions
190
+ * might be verified in any possible order.
191
+ *
192
+ * @callname: TaggedTransactionQueue_validate_transaction
193
+ * @param {SpRuntimeTransactionValidityTransactionSource} source
194
+ * @param {UncheckedExtrinsicLike} tx
195
+ * @param {H256} block_hash
196
+ **/
197
+ validateTransaction: GenericRuntimeApiMethod<
198
+ (
199
+ source: SpRuntimeTransactionValidityTransactionSource,
200
+ tx: UncheckedExtrinsicLike,
201
+ blockHash: H256,
202
+ ) => Promise<
203
+ Result<SpRuntimeTransactionValidityValidTransaction, SpRuntimeTransactionValidityTransactionValidityError>
204
+ >
205
+ >;
206
+
207
+ /**
208
+ * Generic runtime api call
209
+ **/
210
+ [method: string]: GenericRuntimeApiMethod;
211
+ };
212
+ /**
213
+ * @runtimeapi: ValidateStatement - 0xbe9fb0c91a8046cf
214
+ **/
215
+ validateStatement: {
216
+ /**
217
+ * Validate the statement.
218
+ *
219
+ * @callname: ValidateStatement_validate_statement
220
+ * @param {SpStatementStoreRuntimeApiStatementSource} source
221
+ * @param {SpStatementStoreStatement} statement
222
+ **/
223
+ validateStatement: GenericRuntimeApiMethod<
224
+ (
225
+ source: SpStatementStoreRuntimeApiStatementSource,
226
+ statement: SpStatementStoreStatement,
227
+ ) => Promise<Result<SpStatementStoreRuntimeApiValidStatement, SpStatementStoreRuntimeApiInvalidStatement>>
228
+ >;
229
+
230
+ /**
231
+ * Generic runtime api call
232
+ **/
233
+ [method: string]: GenericRuntimeApiMethod;
234
+ };
235
+ /**
236
+ * @runtimeapi: OffchainWorkerApi - 0xf78b278be53f454c
237
+ **/
238
+ offchainWorkerApi: {
239
+ /**
240
+ * Starts the off-chain task for given block header.
241
+ *
242
+ * @callname: OffchainWorkerApi_offchain_worker
243
+ * @param {Header} header
244
+ **/
245
+ offchainWorker: GenericRuntimeApiMethod<(header: Header) => Promise<[]>>;
246
+
247
+ /**
248
+ * Generic runtime api call
249
+ **/
250
+ [method: string]: GenericRuntimeApiMethod;
251
+ };
252
+ /**
253
+ * @runtimeapi: GrandpaApi - 0xed99c5acb25eedf5
254
+ **/
255
+ grandpaApi: {
256
+ /**
257
+ * Get the current GRANDPA authorities and weights. This should not change except
258
+ * for when changes are scheduled and the corresponding delay has passed.
259
+ *
260
+ * When called at block B, it will return the set of authorities that should be
261
+ * used to finalize descendants of this block (B+1, B+2, ...). The block B itself
262
+ * is finalized by the authorities from block B-1.
263
+ *
264
+ * @callname: GrandpaApi_grandpa_authorities
265
+ **/
266
+ grandpaAuthorities: GenericRuntimeApiMethod<() => Promise<Array<[SpConsensusGrandpaAppPublic, bigint]>>>;
267
+
268
+ /**
269
+ * Submits an unsigned extrinsic to report an equivocation. The caller
270
+ * must provide the equivocation proof and a key ownership proof
271
+ * (should be obtained using `generate_key_ownership_proof`). The
272
+ * extrinsic will be unsigned and should only be accepted for local
273
+ * authorship (not to be broadcast to the network). This method returns
274
+ * `None` when creation of the extrinsic fails, e.g. if equivocation
275
+ * reporting is disabled for the given runtime (i.e. this method is
276
+ * hardcoded to return `None`). Only useful in an offchain context.
277
+ *
278
+ * @callname: GrandpaApi_submit_report_equivocation_unsigned_extrinsic
279
+ * @param {SpConsensusGrandpaEquivocationProof} equivocation_proof
280
+ * @param {SpConsensusGrandpaOpaqueKeyOwnershipProof} key_owner_proof
281
+ **/
282
+ submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<
283
+ (
284
+ equivocationProof: SpConsensusGrandpaEquivocationProof,
285
+ keyOwnerProof: SpConsensusGrandpaOpaqueKeyOwnershipProof,
286
+ ) => Promise<[] | undefined>
287
+ >;
288
+
289
+ /**
290
+ * Generates a proof of key ownership for the given authority in the
291
+ * given set. An example usage of this module is coupled with the
292
+ * session historical module to prove that a given authority key is
293
+ * tied to a given staking identity during a specific session. Proofs
294
+ * of key ownership are necessary for submitting equivocation reports.
295
+ * NOTE: even though the API takes a `set_id` as parameter the current
296
+ * implementations ignore this parameter and instead rely on this
297
+ * method being called at the correct block height, i.e. any point at
298
+ * which the given set id is live on-chain. Future implementations will
299
+ * instead use indexed data through an offchain worker, not requiring
300
+ * older states to be available.
301
+ *
302
+ * @callname: GrandpaApi_generate_key_ownership_proof
303
+ * @param {bigint} set_id
304
+ * @param {SpConsensusGrandpaAppPublic} authority_id
305
+ **/
306
+ generateKeyOwnershipProof: GenericRuntimeApiMethod<
307
+ (
308
+ setId: bigint,
309
+ authorityId: SpConsensusGrandpaAppPublic,
310
+ ) => Promise<SpConsensusGrandpaOpaqueKeyOwnershipProof | undefined>
311
+ >;
312
+
313
+ /**
314
+ * Get current GRANDPA authority set id.
315
+ *
316
+ * @callname: GrandpaApi_current_set_id
317
+ **/
318
+ currentSetId: GenericRuntimeApiMethod<() => Promise<bigint>>;
319
+
320
+ /**
321
+ * Generic runtime api call
322
+ **/
323
+ [method: string]: GenericRuntimeApiMethod;
324
+ };
325
+ /**
326
+ * @runtimeapi: NominationPoolsApi - 0x17a6bc0d0062aeb3
327
+ **/
328
+ nominationPoolsApi: {
329
+ /**
330
+ * Returns the pending rewards for the member that the AccountId was given for.
331
+ *
332
+ * @callname: NominationPoolsApi_pending_rewards
333
+ * @param {AccountId32Like} who
334
+ **/
335
+ pendingRewards: GenericRuntimeApiMethod<(who: AccountId32Like) => Promise<bigint>>;
336
+
337
+ /**
338
+ * Returns the equivalent balance of `points` for a given pool.
339
+ *
340
+ * @callname: NominationPoolsApi_points_to_balance
341
+ * @param {number} pool_id
342
+ * @param {bigint} points
343
+ **/
344
+ pointsToBalance: GenericRuntimeApiMethod<(poolId: number, points: bigint) => Promise<bigint>>;
345
+
346
+ /**
347
+ * Returns the equivalent points of `new_funds` for a given pool.
348
+ *
349
+ * @callname: NominationPoolsApi_balance_to_points
350
+ * @param {number} pool_id
351
+ * @param {bigint} new_funds
352
+ **/
353
+ balanceToPoints: GenericRuntimeApiMethod<(poolId: number, newFunds: bigint) => Promise<bigint>>;
354
+
355
+ /**
356
+ * Generic runtime api call
357
+ **/
358
+ [method: string]: GenericRuntimeApiMethod;
359
+ };
360
+ /**
361
+ * @runtimeapi: StakingApi - 0x18ef58a3b67ba770
362
+ **/
363
+ stakingApi: {
364
+ /**
365
+ * Returns the nominations quota for a nominator with a given balance.
366
+ *
367
+ * @callname: StakingApi_nominations_quota
368
+ * @param {bigint} balance
369
+ **/
370
+ nominationsQuota: GenericRuntimeApiMethod<(balance: bigint) => Promise<number>>;
371
+
372
+ /**
373
+ * Generic runtime api call
374
+ **/
375
+ [method: string]: GenericRuntimeApiMethod;
376
+ };
377
+ /**
378
+ * @runtimeapi: BabeApi - 0xcbca25e39f142387
379
+ **/
380
+ babeApi: {
381
+ /**
382
+ * Return the configuration for BABE.
383
+ *
384
+ * @callname: BabeApi_configuration
385
+ **/
386
+ configuration: GenericRuntimeApiMethod<() => Promise<SpConsensusBabeBabeConfiguration>>;
387
+
388
+ /**
389
+ * Returns the slot that started the current epoch.
390
+ *
391
+ * @callname: BabeApi_current_epoch_start
392
+ **/
393
+ currentEpochStart: GenericRuntimeApiMethod<() => Promise<SpConsensusSlotsSlot>>;
394
+
395
+ /**
396
+ * Returns information regarding the current epoch.
397
+ *
398
+ * @callname: BabeApi_current_epoch
399
+ **/
400
+ currentEpoch: GenericRuntimeApiMethod<() => Promise<SpConsensusBabeEpoch>>;
401
+
402
+ /**
403
+ * Returns information regarding the next epoch (which was already
404
+ * previously announced).
405
+ *
406
+ * @callname: BabeApi_next_epoch
407
+ **/
408
+ nextEpoch: GenericRuntimeApiMethod<() => Promise<SpConsensusBabeEpoch>>;
409
+
410
+ /**
411
+ * Generates a proof of key ownership for the given authority in the
412
+ * current epoch. An example usage of this module is coupled with the
413
+ * session historical module to prove that a given authority key is
414
+ * tied to a given staking identity during a specific session. Proofs
415
+ * of key ownership are necessary for submitting equivocation reports.
416
+ * NOTE: even though the API takes a `slot` as parameter the current
417
+ * implementations ignores this parameter and instead relies on this
418
+ * method being called at the correct block height, i.e. any point at
419
+ * which the epoch for the given slot is live on-chain. Future
420
+ * implementations will instead use indexed data through an offchain
421
+ * worker, not requiring older states to be available.
422
+ *
423
+ * @callname: BabeApi_generate_key_ownership_proof
424
+ * @param {SpConsensusSlotsSlot} slot
425
+ * @param {SpConsensusBabeAppPublic} authority_id
426
+ **/
427
+ generateKeyOwnershipProof: GenericRuntimeApiMethod<
428
+ (
429
+ slot: SpConsensusSlotsSlot,
430
+ authorityId: SpConsensusBabeAppPublic,
431
+ ) => Promise<SpConsensusBabeOpaqueKeyOwnershipProof | undefined>
432
+ >;
433
+
434
+ /**
435
+ * Submits an unsigned extrinsic to report an equivocation. The caller
436
+ * must provide the equivocation proof and a key ownership proof
437
+ * (should be obtained using `generate_key_ownership_proof`). The
438
+ * extrinsic will be unsigned and should only be accepted for local
439
+ * authorship (not to be broadcast to the network). This method returns
440
+ * `None` when creation of the extrinsic fails, e.g. if equivocation
441
+ * reporting is disabled for the given runtime (i.e. this method is
442
+ * hardcoded to return `None`). Only useful in an offchain context.
443
+ *
444
+ * @callname: BabeApi_submit_report_equivocation_unsigned_extrinsic
445
+ * @param {SpConsensusSlotsEquivocationProof} equivocation_proof
446
+ * @param {SpConsensusBabeOpaqueKeyOwnershipProof} key_owner_proof
447
+ **/
448
+ submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<
449
+ (
450
+ equivocationProof: SpConsensusSlotsEquivocationProof,
451
+ keyOwnerProof: SpConsensusBabeOpaqueKeyOwnershipProof,
452
+ ) => Promise<[] | undefined>
453
+ >;
454
+
455
+ /**
456
+ * Generic runtime api call
457
+ **/
458
+ [method: string]: GenericRuntimeApiMethod;
459
+ };
460
+ /**
461
+ * @runtimeapi: AuthorityDiscoveryApi - 0x687ad44ad37f03c2
462
+ **/
463
+ authorityDiscoveryApi: {
464
+ /**
465
+ * Retrieve authority identifiers of the current and next authority set.
466
+ *
467
+ * @callname: AuthorityDiscoveryApi_authorities
468
+ **/
469
+ authorities: GenericRuntimeApiMethod<() => Promise<Array<SpAuthorityDiscoveryAppPublic>>>;
470
+
471
+ /**
472
+ * Generic runtime api call
473
+ **/
474
+ [method: string]: GenericRuntimeApiMethod;
475
+ };
476
+ /**
477
+ * @runtimeapi: AccountNonceApi - 0xbc9d89904f5b923f
478
+ **/
479
+ accountNonceApi: {
480
+ /**
481
+ * Get current account nonce of given `AccountId`.
482
+ *
483
+ * @callname: AccountNonceApi_account_nonce
484
+ * @param {AccountId32Like} account
485
+ **/
486
+ accountNonce: GenericRuntimeApiMethod<(account: AccountId32Like) => Promise<number>>;
487
+
488
+ /**
489
+ * Generic runtime api call
490
+ **/
491
+ [method: string]: GenericRuntimeApiMethod;
492
+ };
493
+ /**
494
+ * @runtimeapi: AssetsApi - 0x8453b50b22293977
495
+ **/
496
+ assetsApi: {
497
+ /**
498
+ * Returns the list of `AssetId`s and corresponding balance that an `AccountId` has.
499
+ *
500
+ * @callname: AssetsApi_account_balances
501
+ * @param {AccountId32Like} account
502
+ **/
503
+ accountBalances: GenericRuntimeApiMethod<(account: AccountId32Like) => Promise<Array<[number, bigint]>>>;
504
+
505
+ /**
506
+ * Generic runtime api call
507
+ **/
508
+ [method: string]: GenericRuntimeApiMethod;
509
+ };
510
+ /**
511
+ * @runtimeapi: ContractsApi - 0x68b66ba122c93fa7
512
+ **/
513
+ contractsApi: {
514
+ /**
515
+ * Perform a call from a specified account to a given contract.
516
+ *
517
+ * See [`crate::Pallet::bare_call`].
518
+ *
519
+ * @callname: ContractsApi_call
520
+ * @param {AccountId32Like} origin
521
+ * @param {AccountId32Like} dest
522
+ * @param {bigint} value
523
+ * @param {SpWeightsWeightV2Weight | undefined} gas_limit
524
+ * @param {bigint | undefined} storage_deposit_limit
525
+ * @param {BytesLike} input_data
526
+ **/
527
+ call: GenericRuntimeApiMethod<
528
+ (
529
+ origin: AccountId32Like,
530
+ dest: AccountId32Like,
531
+ value: bigint,
532
+ gasLimit: SpWeightsWeightV2Weight | undefined,
533
+ storageDepositLimit: bigint | undefined,
534
+ inputData: BytesLike,
535
+ ) => Promise<PalletContractsPrimitivesContractResult>
536
+ >;
537
+
538
+ /**
539
+ * Instantiate a new contract.
540
+ *
541
+ * See `[crate::Pallet::bare_instantiate]`.
542
+ *
543
+ * @callname: ContractsApi_instantiate
544
+ * @param {AccountId32Like} origin
545
+ * @param {bigint} value
546
+ * @param {SpWeightsWeightV2Weight | undefined} gas_limit
547
+ * @param {bigint | undefined} storage_deposit_limit
548
+ * @param {PalletContractsPrimitivesCode} code
549
+ * @param {BytesLike} data
550
+ * @param {BytesLike} salt
551
+ **/
552
+ instantiate: GenericRuntimeApiMethod<
553
+ (
554
+ origin: AccountId32Like,
555
+ value: bigint,
556
+ gasLimit: SpWeightsWeightV2Weight | undefined,
557
+ storageDepositLimit: bigint | undefined,
558
+ code: PalletContractsPrimitivesCode,
559
+ data: BytesLike,
560
+ salt: BytesLike,
561
+ ) => Promise<PalletContractsPrimitivesContractResultResult>
562
+ >;
563
+
564
+ /**
565
+ * Upload new code without instantiating a contract from it.
566
+ *
567
+ * See [`crate::Pallet::bare_upload_code`].
568
+ *
569
+ * @callname: ContractsApi_upload_code
570
+ * @param {AccountId32Like} origin
571
+ * @param {BytesLike} code
572
+ * @param {bigint | undefined} storage_deposit_limit
573
+ * @param {PalletContractsWasmDeterminism} determinism
574
+ **/
575
+ uploadCode: GenericRuntimeApiMethod<
576
+ (
577
+ origin: AccountId32Like,
578
+ code: BytesLike,
579
+ storageDepositLimit: bigint | undefined,
580
+ determinism: PalletContractsWasmDeterminism,
581
+ ) => Promise<Result<PalletContractsPrimitivesCodeUploadReturnValue, DispatchError>>
582
+ >;
583
+
584
+ /**
585
+ * Query a given storage key in a given contract.
586
+ *
587
+ * Returns `Ok(Some(Vec<u8>))` if the storage value exists under the given key in the
588
+ * specified account and `Ok(None)` if it doesn't. If the account specified by the address
589
+ * doesn't exist, or doesn't have a contract then `Err` is returned.
590
+ *
591
+ * @callname: ContractsApi_get_storage
592
+ * @param {AccountId32Like} address
593
+ * @param {BytesLike} key
594
+ **/
595
+ getStorage: GenericRuntimeApiMethod<
596
+ (
597
+ address: AccountId32Like,
598
+ key: BytesLike,
599
+ ) => Promise<Result<Bytes | undefined, PalletContractsPrimitivesContractAccessError>>
600
+ >;
601
+
602
+ /**
603
+ * Generic runtime api call
604
+ **/
605
+ [method: string]: GenericRuntimeApiMethod;
606
+ };
607
+ /**
608
+ * @runtimeapi: TransactionPaymentApi - 0x37c8bb1350a9a2a8
609
+ **/
610
+ transactionPaymentApi: {
611
+ /**
612
+ *
613
+ * @callname: TransactionPaymentApi_query_info
614
+ * @param {UncheckedExtrinsicLike} uxt
615
+ * @param {number} len
616
+ **/
617
+ queryInfo: GenericRuntimeApiMethod<
618
+ (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
619
+ >;
620
+
621
+ /**
622
+ *
623
+ * @callname: TransactionPaymentApi_query_fee_details
624
+ * @param {UncheckedExtrinsicLike} uxt
625
+ * @param {number} len
626
+ **/
627
+ queryFeeDetails: GenericRuntimeApiMethod<
628
+ (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
629
+ >;
630
+
631
+ /**
632
+ *
633
+ * @callname: TransactionPaymentApi_query_weight_to_fee
634
+ * @param {SpWeightsWeightV2Weight} weight
635
+ **/
636
+ queryWeightToFee: GenericRuntimeApiMethod<(weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
637
+
638
+ /**
639
+ *
640
+ * @callname: TransactionPaymentApi_query_length_to_fee
641
+ * @param {number} length
642
+ **/
643
+ queryLengthToFee: GenericRuntimeApiMethod<(length: number) => Promise<bigint>>;
644
+
645
+ /**
646
+ * Generic runtime api call
647
+ **/
648
+ [method: string]: GenericRuntimeApiMethod;
649
+ };
650
+ /**
651
+ * @runtimeapi: AssetConversionApi - 0x8a8047a53a8277ec
652
+ **/
653
+ assetConversionApi: {
654
+ /**
655
+ * Provides a quote for [`Pallet::swap_tokens_for_exact_tokens`].
656
+ *
657
+ * Note that the price may have changed by the time the transaction is executed.
658
+ * (Use `amount_in_max` to control slippage.)
659
+ *
660
+ * @callname: AssetConversionApi_quote_price_tokens_for_exact_tokens
661
+ * @param {PalletAssetConversionNativeOrAssetId} asset1
662
+ * @param {PalletAssetConversionNativeOrAssetId} asset2
663
+ * @param {bigint} amount
664
+ * @param {boolean} include_fee
665
+ **/
666
+ quotePriceTokensForExactTokens: GenericRuntimeApiMethod<
667
+ (
668
+ asset1: PalletAssetConversionNativeOrAssetId,
669
+ asset2: PalletAssetConversionNativeOrAssetId,
670
+ amount: bigint,
671
+ includeFee: boolean,
672
+ ) => Promise<bigint | undefined>
673
+ >;
674
+
675
+ /**
676
+ * Provides a quote for [`Pallet::swap_exact_tokens_for_tokens`].
677
+ *
678
+ * Note that the price may have changed by the time the transaction is executed.
679
+ * (Use `amount_out_min` to control slippage.)
680
+ *
681
+ * @callname: AssetConversionApi_quote_price_exact_tokens_for_tokens
682
+ * @param {PalletAssetConversionNativeOrAssetId} asset1
683
+ * @param {PalletAssetConversionNativeOrAssetId} asset2
684
+ * @param {bigint} amount
685
+ * @param {boolean} include_fee
686
+ **/
687
+ quotePriceExactTokensForTokens: GenericRuntimeApiMethod<
688
+ (
689
+ asset1: PalletAssetConversionNativeOrAssetId,
690
+ asset2: PalletAssetConversionNativeOrAssetId,
691
+ amount: bigint,
692
+ includeFee: boolean,
693
+ ) => Promise<bigint | undefined>
694
+ >;
695
+
696
+ /**
697
+ * Returns the size of the liquidity pool for the given asset pair.
698
+ *
699
+ * @callname: AssetConversionApi_get_reserves
700
+ * @param {PalletAssetConversionNativeOrAssetId} asset1
701
+ * @param {PalletAssetConversionNativeOrAssetId} asset2
702
+ **/
703
+ getReserves: GenericRuntimeApiMethod<
704
+ (
705
+ asset1: PalletAssetConversionNativeOrAssetId,
706
+ asset2: PalletAssetConversionNativeOrAssetId,
707
+ ) => Promise<[bigint, bigint] | undefined>
708
+ >;
709
+
710
+ /**
711
+ * Generic runtime api call
712
+ **/
713
+ [method: string]: GenericRuntimeApiMethod;
714
+ };
715
+ /**
716
+ * @runtimeapi: TransactionPaymentCallApi - 0xf3ff14d5ab527059
717
+ **/
718
+ transactionPaymentCallApi: {
719
+ /**
720
+ * Query information of a dispatch class, weight, and fee of a given encoded `Call`.
721
+ *
722
+ * @callname: TransactionPaymentCallApi_query_call_info
723
+ * @param {KitchensinkRuntimeRuntimeCallLike} call
724
+ * @param {number} len
725
+ **/
726
+ queryCallInfo: GenericRuntimeApiMethod<
727
+ (call: KitchensinkRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
728
+ >;
729
+
730
+ /**
731
+ * Query fee details of a given encoded `Call`.
732
+ *
733
+ * @callname: TransactionPaymentCallApi_query_call_fee_details
734
+ * @param {KitchensinkRuntimeRuntimeCallLike} call
735
+ * @param {number} len
736
+ **/
737
+ queryCallFeeDetails: GenericRuntimeApiMethod<
738
+ (call: KitchensinkRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
739
+ >;
740
+
741
+ /**
742
+ * Query the output of the current `WeightToFee` given some input.
743
+ *
744
+ * @callname: TransactionPaymentCallApi_query_weight_to_fee
745
+ * @param {SpWeightsWeightV2Weight} weight
746
+ **/
747
+ queryWeightToFee: GenericRuntimeApiMethod<(weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
748
+
749
+ /**
750
+ * Query the output of the current `LengthToFee` given some input.
751
+ *
752
+ * @callname: TransactionPaymentCallApi_query_length_to_fee
753
+ * @param {number} length
754
+ **/
755
+ queryLengthToFee: GenericRuntimeApiMethod<(length: number) => Promise<bigint>>;
756
+
757
+ /**
758
+ * Generic runtime api call
759
+ **/
760
+ [method: string]: GenericRuntimeApiMethod;
761
+ };
762
+ /**
763
+ * @runtimeapi: NftsApi - 0x899a250cbe84f250
764
+ **/
765
+ nftsApi: {
766
+ /**
767
+ *
768
+ * @callname: NftsApi_owner
769
+ * @param {number} collection
770
+ * @param {number} item
771
+ **/
772
+ owner: GenericRuntimeApiMethod<(collection: number, item: number) => Promise<AccountId32 | undefined>>;
773
+
774
+ /**
775
+ *
776
+ * @callname: NftsApi_collection_owner
777
+ * @param {number} collection
778
+ **/
779
+ collectionOwner: GenericRuntimeApiMethod<(collection: number) => Promise<AccountId32 | undefined>>;
780
+
781
+ /**
782
+ *
783
+ * @callname: NftsApi_attribute
784
+ * @param {number} collection
785
+ * @param {number} item
786
+ * @param {BytesLike} key
787
+ **/
788
+ attribute: GenericRuntimeApiMethod<
789
+ (collection: number, item: number, key: BytesLike) => Promise<Bytes | undefined>
790
+ >;
791
+
792
+ /**
793
+ *
794
+ * @callname: NftsApi_custom_attribute
795
+ * @param {AccountId32Like} account
796
+ * @param {number} collection
797
+ * @param {number} item
798
+ * @param {BytesLike} key
799
+ **/
800
+ customAttribute: GenericRuntimeApiMethod<
801
+ (account: AccountId32Like, collection: number, item: number, key: BytesLike) => Promise<Bytes | undefined>
802
+ >;
803
+
804
+ /**
805
+ *
806
+ * @callname: NftsApi_system_attribute
807
+ * @param {number} collection
808
+ * @param {number} item
809
+ * @param {BytesLike} key
810
+ **/
811
+ systemAttribute: GenericRuntimeApiMethod<
812
+ (collection: number, item: number, key: BytesLike) => Promise<Bytes | undefined>
813
+ >;
814
+
815
+ /**
816
+ *
817
+ * @callname: NftsApi_collection_attribute
818
+ * @param {number} collection
819
+ * @param {BytesLike} key
820
+ **/
821
+ collectionAttribute: GenericRuntimeApiMethod<(collection: number, key: BytesLike) => Promise<Bytes | undefined>>;
822
+
823
+ /**
824
+ * Generic runtime api call
825
+ **/
826
+ [method: string]: GenericRuntimeApiMethod;
827
+ };
828
+ /**
829
+ * @runtimeapi: MmrApi - 0x91d5df18b0d2cf58
830
+ **/
831
+ mmrApi: {
832
+ /**
833
+ * Return the on-chain MMR root hash.
834
+ *
835
+ * @callname: MmrApi_mmr_root
836
+ **/
837
+ mmrRoot: GenericRuntimeApiMethod<() => Promise<Result<H256, SpMmrPrimitivesError>>>;
838
+
839
+ /**
840
+ * Return the number of MMR blocks in the chain.
841
+ *
842
+ * @callname: MmrApi_mmr_leaf_count
843
+ **/
844
+ mmrLeafCount: GenericRuntimeApiMethod<() => Promise<Result<bigint, SpMmrPrimitivesError>>>;
845
+
846
+ /**
847
+ * Generate MMR proof for a series of block numbers. If `best_known_block_number = Some(n)`,
848
+ * use historical MMR state at given block height `n`. Else, use current MMR state.
849
+ *
850
+ * @callname: MmrApi_generate_proof
851
+ * @param {Array<number>} block_numbers
852
+ * @param {number | undefined} best_known_block_number
853
+ **/
854
+ generateProof: GenericRuntimeApiMethod<
855
+ (
856
+ blockNumbers: Array<number>,
857
+ bestKnownBlockNumber?: number | undefined,
858
+ ) => Promise<Result<[Array<SpMmrPrimitivesEncodableOpaqueLeaf>, SpMmrPrimitivesProof], SpMmrPrimitivesError>>
859
+ >;
860
+
861
+ /**
862
+ * Verify MMR proof against on-chain MMR for a batch of leaves.
863
+ *
864
+ * Note this function will use on-chain MMR root hash and check if the proof matches the hash.
865
+ * Note, the leaves should be sorted such that corresponding leaves and leaf indices have the
866
+ * same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]
867
+ *
868
+ * @callname: MmrApi_verify_proof
869
+ * @param {Array<SpMmrPrimitivesEncodableOpaqueLeaf>} leaves
870
+ * @param {SpMmrPrimitivesProof} proof
871
+ **/
872
+ verifyProof: GenericRuntimeApiMethod<
873
+ (
874
+ leaves: Array<SpMmrPrimitivesEncodableOpaqueLeaf>,
875
+ proof: SpMmrPrimitivesProof,
876
+ ) => Promise<Result<[], SpMmrPrimitivesError>>
877
+ >;
878
+
879
+ /**
880
+ * Verify MMR proof against given root hash for a batch of leaves.
881
+ *
882
+ * Note this function does not require any on-chain storage - the
883
+ * proof is verified against given MMR root hash.
884
+ *
885
+ * Note, the leaves should be sorted such that corresponding leaves and leaf indices have the
886
+ * same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]
887
+ *
888
+ * @callname: MmrApi_verify_proof_stateless
889
+ * @param {H256} root
890
+ * @param {Array<SpMmrPrimitivesEncodableOpaqueLeaf>} leaves
891
+ * @param {SpMmrPrimitivesProof} proof
892
+ **/
893
+ verifyProofStateless: GenericRuntimeApiMethod<
894
+ (
895
+ root: H256,
896
+ leaves: Array<SpMmrPrimitivesEncodableOpaqueLeaf>,
897
+ proof: SpMmrPrimitivesProof,
898
+ ) => Promise<Result<[], SpMmrPrimitivesError>>
899
+ >;
900
+
901
+ /**
902
+ * Generic runtime api call
903
+ **/
904
+ [method: string]: GenericRuntimeApiMethod;
905
+ };
906
+ /**
907
+ * @runtimeapi: SessionKeys - 0xab3c0572291feb8b
908
+ **/
909
+ sessionKeys: {
910
+ /**
911
+ * Generate a set of session keys with optionally using the given seed.
912
+ * The keys should be stored within the keystore exposed via runtime
913
+ * externalities.
914
+ *
915
+ * The seed needs to be a valid `utf8` string.
916
+ *
917
+ * Returns the concatenated SCALE encoded public keys.
918
+ *
919
+ * @callname: SessionKeys_generate_session_keys
920
+ * @param {BytesLike | undefined} seed
921
+ **/
922
+ generateSessionKeys: GenericRuntimeApiMethod<(seed?: BytesLike | undefined) => Promise<Bytes>>;
923
+
924
+ /**
925
+ * Decode the given public session keys.
926
+ *
927
+ * Returns the list of public raw public keys + key type.
928
+ *
929
+ * @callname: SessionKeys_decode_session_keys
930
+ * @param {BytesLike} encoded
931
+ **/
932
+ decodeSessionKeys: GenericRuntimeApiMethod<
933
+ (encoded: BytesLike) => Promise<Array<[Bytes, SpCoreCryptoKeyTypeId]> | undefined>
934
+ >;
935
+
936
+ /**
937
+ * Generic runtime api call
938
+ **/
939
+ [method: string]: GenericRuntimeApiMethod;
940
+ };
708
941
  }