@dedot/api 0.0.1-alpha.32

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 (202) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +1 -0
  3. package/chaintypes/index.d.ts +1 -0
  4. package/chaintypes/index.js +1 -0
  5. package/chaintypes/substrate/consts.d.ts +2132 -0
  6. package/chaintypes/substrate/consts.js +2 -0
  7. package/chaintypes/substrate/errors.d.ts +3490 -0
  8. package/chaintypes/substrate/errors.js +2 -0
  9. package/chaintypes/substrate/events.d.ts +5187 -0
  10. package/chaintypes/substrate/events.js +2 -0
  11. package/chaintypes/substrate/index.d.ts +22 -0
  12. package/chaintypes/substrate/index.js +2 -0
  13. package/chaintypes/substrate/json-rpc.d.ts +3 -0
  14. package/chaintypes/substrate/json-rpc.js +2 -0
  15. package/chaintypes/substrate/query.d.ts +3829 -0
  16. package/chaintypes/substrate/query.js +2 -0
  17. package/chaintypes/substrate/runtime.d.ts +850 -0
  18. package/chaintypes/substrate/runtime.js +2 -0
  19. package/chaintypes/substrate/tx.d.ts +14269 -0
  20. package/chaintypes/substrate/tx.js +2 -0
  21. package/chaintypes/substrate/types.d.ts +30457 -0
  22. package/chaintypes/substrate/types.js +2 -0
  23. package/cjs/chaintypes/index.js +17 -0
  24. package/cjs/chaintypes/substrate/consts.js +3 -0
  25. package/cjs/chaintypes/substrate/errors.js +3 -0
  26. package/cjs/chaintypes/substrate/events.js +3 -0
  27. package/cjs/chaintypes/substrate/index.js +18 -0
  28. package/cjs/chaintypes/substrate/json-rpc.js +3 -0
  29. package/cjs/chaintypes/substrate/query.js +3 -0
  30. package/cjs/chaintypes/substrate/runtime.js +3 -0
  31. package/cjs/chaintypes/substrate/tx.js +3 -0
  32. package/cjs/chaintypes/substrate/types.js +3 -0
  33. package/cjs/client/BaseSubstrateClient.js +257 -0
  34. package/cjs/client/Dedot.js +250 -0
  35. package/cjs/client/DedotClient.js +186 -0
  36. package/cjs/client/index.js +18 -0
  37. package/cjs/executor/ConstantExecutor.js +20 -0
  38. package/cjs/executor/ErrorExecutor.js +46 -0
  39. package/cjs/executor/EventExecutor.js +52 -0
  40. package/cjs/executor/Executor.js +42 -0
  41. package/cjs/executor/RuntimeApiExecutor.js +121 -0
  42. package/cjs/executor/StorageQueryExecutor.js +115 -0
  43. package/cjs/executor/TxExecutor.js +55 -0
  44. package/cjs/executor/index.js +26 -0
  45. package/cjs/executor/v2/RuntimeApiExecutorV2.js +21 -0
  46. package/cjs/executor/v2/StorageQueryExecutorV2.js +65 -0
  47. package/cjs/executor/v2/TxExecutorV2.js +20 -0
  48. package/cjs/extrinsic/extensions/ExtraSignedExtension.js +87 -0
  49. package/cjs/extrinsic/extensions/SignedExtension.js +41 -0
  50. package/cjs/extrinsic/extensions/index.js +19 -0
  51. package/cjs/extrinsic/extensions/known/ChargeAssetTxPayment.js +43 -0
  52. package/cjs/extrinsic/extensions/known/ChargeTransactionPayment.js +16 -0
  53. package/cjs/extrinsic/extensions/known/CheckGenesis.js +19 -0
  54. package/cjs/extrinsic/extensions/known/CheckMortality.js +90 -0
  55. package/cjs/extrinsic/extensions/known/CheckNonZeroSender.js +10 -0
  56. package/cjs/extrinsic/extensions/known/CheckNonce.js +33 -0
  57. package/cjs/extrinsic/extensions/known/CheckSpecVersion.js +19 -0
  58. package/cjs/extrinsic/extensions/known/CheckTxVersion.js +19 -0
  59. package/cjs/extrinsic/extensions/known/CheckWeight.js +10 -0
  60. package/cjs/extrinsic/extensions/known/PrevalidateAttests.js +11 -0
  61. package/cjs/extrinsic/extensions/known/index.js +25 -0
  62. package/cjs/extrinsic/index.js +18 -0
  63. package/cjs/extrinsic/submittable/BaseSubmittableExtrinsic.js +70 -0
  64. package/cjs/extrinsic/submittable/SubmittableExtrinsic.js +47 -0
  65. package/cjs/extrinsic/submittable/SubmittableExtrinsicV2.js +204 -0
  66. package/cjs/extrinsic/submittable/SubmittableResult.js +33 -0
  67. package/cjs/extrinsic/submittable/errors.js +16 -0
  68. package/cjs/extrinsic/submittable/fakeSigner.js +13 -0
  69. package/cjs/extrinsic/submittable/index.js +20 -0
  70. package/cjs/extrinsic/submittable/utils.js +20 -0
  71. package/cjs/index.js +21 -0
  72. package/cjs/json-rpc/JsonRpcClient.js +165 -0
  73. package/cjs/json-rpc/group/ChainHead/BlockUsage.js +24 -0
  74. package/cjs/json-rpc/group/ChainHead/ChainHead.js +603 -0
  75. package/cjs/json-rpc/group/ChainHead/error.js +59 -0
  76. package/cjs/json-rpc/group/ChainHead/index.js +18 -0
  77. package/cjs/json-rpc/group/ChainSpec.js +19 -0
  78. package/cjs/json-rpc/group/JsonRpcGroup.js +89 -0
  79. package/cjs/json-rpc/group/Transaction.js +25 -0
  80. package/cjs/json-rpc/group/TransactionWatch.js +17 -0
  81. package/cjs/json-rpc/group/index.js +21 -0
  82. package/cjs/json-rpc/index.js +20 -0
  83. package/cjs/json-rpc/scaledResponses.js +15 -0
  84. package/cjs/json-rpc/subscriptionsInfo.js +20 -0
  85. package/cjs/package.json +1 -0
  86. package/cjs/proxychain.js +27 -0
  87. package/cjs/storage/QueryableStorage.js +161 -0
  88. package/cjs/storage/index.js +17 -0
  89. package/cjs/types.js +2 -0
  90. package/client/BaseSubstrateClient.d.ts +65 -0
  91. package/client/BaseSubstrateClient.js +252 -0
  92. package/client/Dedot.d.ts +131 -0
  93. package/client/Dedot.js +246 -0
  94. package/client/DedotClient.d.ts +61 -0
  95. package/client/DedotClient.js +182 -0
  96. package/client/index.d.ts +2 -0
  97. package/client/index.js +2 -0
  98. package/executor/ConstantExecutor.d.ts +10 -0
  99. package/executor/ConstantExecutor.js +16 -0
  100. package/executor/ErrorExecutor.d.ts +10 -0
  101. package/executor/ErrorExecutor.js +42 -0
  102. package/executor/EventExecutor.d.ts +10 -0
  103. package/executor/EventExecutor.js +48 -0
  104. package/executor/Executor.d.ts +149 -0
  105. package/executor/Executor.js +38 -0
  106. package/executor/RuntimeApiExecutor.d.ts +27 -0
  107. package/executor/RuntimeApiExecutor.js +117 -0
  108. package/executor/StorageQueryExecutor.d.ts +14 -0
  109. package/executor/StorageQueryExecutor.js +111 -0
  110. package/executor/TxExecutor.d.ts +10 -0
  111. package/executor/TxExecutor.js +51 -0
  112. package/executor/index.d.ts +10 -0
  113. package/executor/index.js +10 -0
  114. package/executor/v2/RuntimeApiExecutorV2.d.ts +14 -0
  115. package/executor/v2/RuntimeApiExecutorV2.js +17 -0
  116. package/executor/v2/StorageQueryExecutorV2.d.ts +17 -0
  117. package/executor/v2/StorageQueryExecutorV2.js +61 -0
  118. package/executor/v2/TxExecutorV2.d.ts +11 -0
  119. package/executor/v2/TxExecutorV2.js +16 -0
  120. package/extrinsic/extensions/ExtraSignedExtension.d.ts +14 -0
  121. package/extrinsic/extensions/ExtraSignedExtension.js +60 -0
  122. package/extrinsic/extensions/SignedExtension.d.ts +40 -0
  123. package/extrinsic/extensions/SignedExtension.js +37 -0
  124. package/extrinsic/extensions/index.d.ts +3 -0
  125. package/extrinsic/extensions/index.js +3 -0
  126. package/extrinsic/extensions/known/ChargeAssetTxPayment.d.ts +14 -0
  127. package/extrinsic/extensions/known/ChargeAssetTxPayment.js +39 -0
  128. package/extrinsic/extensions/known/ChargeTransactionPayment.d.ts +6 -0
  129. package/extrinsic/extensions/known/ChargeTransactionPayment.js +12 -0
  130. package/extrinsic/extensions/known/CheckGenesis.d.ts +10 -0
  131. package/extrinsic/extensions/known/CheckGenesis.js +15 -0
  132. package/extrinsic/extensions/known/CheckMortality.d.ts +15 -0
  133. package/extrinsic/extensions/known/CheckMortality.js +86 -0
  134. package/extrinsic/extensions/known/CheckNonZeroSender.d.ts +6 -0
  135. package/extrinsic/extensions/known/CheckNonZeroSender.js +6 -0
  136. package/extrinsic/extensions/known/CheckNonce.d.ts +10 -0
  137. package/extrinsic/extensions/known/CheckNonce.js +29 -0
  138. package/extrinsic/extensions/known/CheckSpecVersion.d.ts +9 -0
  139. package/extrinsic/extensions/known/CheckSpecVersion.js +15 -0
  140. package/extrinsic/extensions/known/CheckTxVersion.d.ts +9 -0
  141. package/extrinsic/extensions/known/CheckTxVersion.js +15 -0
  142. package/extrinsic/extensions/known/CheckWeight.d.ts +6 -0
  143. package/extrinsic/extensions/known/CheckWeight.js +6 -0
  144. package/extrinsic/extensions/known/PrevalidateAttests.d.ts +7 -0
  145. package/extrinsic/extensions/known/PrevalidateAttests.js +7 -0
  146. package/extrinsic/extensions/known/index.d.ts +3 -0
  147. package/extrinsic/extensions/known/index.js +22 -0
  148. package/extrinsic/index.d.ts +2 -0
  149. package/extrinsic/index.js +2 -0
  150. package/extrinsic/submittable/BaseSubmittableExtrinsic.d.ts +17 -0
  151. package/extrinsic/submittable/BaseSubmittableExtrinsic.js +66 -0
  152. package/extrinsic/submittable/SubmittableExtrinsic.d.ts +12 -0
  153. package/extrinsic/submittable/SubmittableExtrinsic.js +43 -0
  154. package/extrinsic/submittable/SubmittableExtrinsicV2.d.ts +15 -0
  155. package/extrinsic/submittable/SubmittableExtrinsicV2.js +200 -0
  156. package/extrinsic/submittable/SubmittableResult.d.ts +19 -0
  157. package/extrinsic/submittable/SubmittableResult.js +29 -0
  158. package/extrinsic/submittable/errors.d.ts +11 -0
  159. package/extrinsic/submittable/errors.js +12 -0
  160. package/extrinsic/submittable/fakeSigner.d.ts +2 -0
  161. package/extrinsic/submittable/fakeSigner.js +10 -0
  162. package/extrinsic/submittable/index.d.ts +4 -0
  163. package/extrinsic/submittable/index.js +4 -0
  164. package/extrinsic/submittable/utils.d.ts +10 -0
  165. package/extrinsic/submittable/utils.js +15 -0
  166. package/index.d.ts +6 -0
  167. package/index.js +5 -0
  168. package/json-rpc/JsonRpcClient.d.ts +50 -0
  169. package/json-rpc/JsonRpcClient.js +160 -0
  170. package/json-rpc/group/ChainHead/BlockUsage.d.ts +11 -0
  171. package/json-rpc/group/ChainHead/BlockUsage.js +20 -0
  172. package/json-rpc/group/ChainHead/ChainHead.d.ts +70 -0
  173. package/json-rpc/group/ChainHead/ChainHead.js +599 -0
  174. package/json-rpc/group/ChainHead/error.d.ts +47 -0
  175. package/json-rpc/group/ChainHead/error.js +48 -0
  176. package/json-rpc/group/ChainHead/index.d.ts +2 -0
  177. package/json-rpc/group/ChainHead/index.js +2 -0
  178. package/json-rpc/group/ChainSpec.d.ts +10 -0
  179. package/json-rpc/group/ChainSpec.js +15 -0
  180. package/json-rpc/group/JsonRpcGroup.d.ts +74 -0
  181. package/json-rpc/group/JsonRpcGroup.js +85 -0
  182. package/json-rpc/group/Transaction.d.ts +11 -0
  183. package/json-rpc/group/Transaction.js +21 -0
  184. package/json-rpc/group/TransactionWatch.d.ts +10 -0
  185. package/json-rpc/group/TransactionWatch.js +13 -0
  186. package/json-rpc/group/index.d.ts +5 -0
  187. package/json-rpc/group/index.js +5 -0
  188. package/json-rpc/index.d.ts +4 -0
  189. package/json-rpc/index.js +4 -0
  190. package/json-rpc/scaledResponses.d.ts +2 -0
  191. package/json-rpc/scaledResponses.js +12 -0
  192. package/json-rpc/subscriptionsInfo.d.ts +2 -0
  193. package/json-rpc/subscriptionsInfo.js +17 -0
  194. package/package.json +54 -0
  195. package/proxychain.d.ts +14 -0
  196. package/proxychain.js +23 -0
  197. package/storage/QueryableStorage.d.ts +35 -0
  198. package/storage/QueryableStorage.js +157 -0
  199. package/storage/index.d.ts +1 -0
  200. package/storage/index.js +1 -0
  201. package/types.d.ts +120 -0
  202. package/types.js +1 -0
@@ -0,0 +1,850 @@
1
+ import type { AccountId32, AccountId32Like, Bytes, BytesLike, DispatchError, H256, Header, Result, RuntimeVersion, UncheckedExtrinsic, UncheckedExtrinsicLike } from '@dedot/codecs';
2
+ import type { GenericRuntimeApiMethod, GenericRuntimeApis, RpcVersion } from '@dedot/types';
3
+ import type { FrameSupportTokensFungibleUnionOfNativeOrWithId, KitchensinkRuntimeRuntimeCallLike, PalletContractsPrimitivesCode, PalletContractsPrimitivesCodeUploadReturnValue, PalletContractsPrimitivesContractAccessError, PalletContractsPrimitivesContractResult, PalletContractsPrimitivesContractResultResult, PalletContractsWasmDeterminism, PalletTransactionPaymentFeeDetails, PalletTransactionPaymentRuntimeDispatchInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeConfiguration, SpConsensusBabeEpoch, SpConsensusBabeOpaqueKeyOwnershipProof, SpConsensusBeefyEcdsaCryptoPublic, SpConsensusBeefyEquivocationProof, SpConsensusBeefyOpaqueKeyOwnershipProof, SpConsensusBeefyValidatorSet, SpConsensusGrandpaAppPublic, SpConsensusGrandpaEquivocationProof, SpConsensusGrandpaOpaqueKeyOwnershipProof, SpConsensusSlotsEquivocationProof, SpConsensusSlotsSlot, SpCoreCryptoKeyTypeId, SpCoreOpaqueMetadata, SpInherentsCheckInherentsResult, SpInherentsInherentData, SpMixnetMixnode, SpMixnetMixnodesErr, SpMixnetSessionStatus, SpMmrPrimitivesEncodableOpaqueLeaf, SpMmrPrimitivesError, SpMmrPrimitivesProof, SpRuntimeBlock, SpRuntimeExtrinsicInclusionMode, SpRuntimeTransactionValidityTransactionSource, SpRuntimeTransactionValidityTransactionValidityError, SpRuntimeTransactionValidityValidTransaction, SpStatementStoreRuntimeApiInvalidStatement, SpStatementStoreRuntimeApiStatementSource, SpStatementStoreRuntimeApiValidStatement, SpStatementStoreStatement, SpWeightsWeightV2Weight } from './types.js';
4
+ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<Rv> {
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<Rv, () => Promise<RuntimeVersion>>;
15
+ /**
16
+ * Execute the given block.
17
+ *
18
+ * @callname: Core_execute_block
19
+ * @param {SpRuntimeBlock} block
20
+ **/
21
+ executeBlock: GenericRuntimeApiMethod<Rv, (block: SpRuntimeBlock) => Promise<[]>>;
22
+ /**
23
+ * Initialize a block with the given header and return the runtime executive mode.
24
+ *
25
+ * @callname: Core_initialize_block
26
+ * @param {Header} header
27
+ **/
28
+ initializeBlock: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<SpRuntimeExtrinsicInclusionMode>>;
29
+ /**
30
+ * Generic runtime api call
31
+ **/
32
+ [method: string]: GenericRuntimeApiMethod<Rv>;
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<Rv, () => 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<Rv, (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<Rv, () => Promise<Array<number>>>;
62
+ /**
63
+ * Generic runtime api call
64
+ **/
65
+ [method: string]: GenericRuntimeApiMethod<Rv>;
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<Rv, (extrinsic: UncheckedExtrinsicLike) => Promise<Result<Result<[], DispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>>;
81
+ /**
82
+ * Finish the current block.
83
+ *
84
+ * @callname: BlockBuilder_finalize_block
85
+ **/
86
+ finalizeBlock: GenericRuntimeApiMethod<Rv, () => 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<Rv, (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<Rv, (block: SpRuntimeBlock, data: SpInherentsInherentData) => Promise<SpInherentsCheckInherentsResult>>;
102
+ /**
103
+ * Generic runtime api call
104
+ **/
105
+ [method: string]: GenericRuntimeApiMethod<Rv>;
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<Rv, (source: SpRuntimeTransactionValidityTransactionSource, tx: UncheckedExtrinsicLike, blockHash: H256) => Promise<Result<SpRuntimeTransactionValidityValidTransaction, SpRuntimeTransactionValidityTransactionValidityError>>>;
128
+ /**
129
+ * Generic runtime api call
130
+ **/
131
+ [method: string]: GenericRuntimeApiMethod<Rv>;
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<Rv, (source: SpStatementStoreRuntimeApiStatementSource, statement: SpStatementStoreStatement) => Promise<Result<SpStatementStoreRuntimeApiValidStatement, SpStatementStoreRuntimeApiInvalidStatement>>>;
145
+ /**
146
+ * Generic runtime api call
147
+ **/
148
+ [method: string]: GenericRuntimeApiMethod<Rv>;
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<Rv, (header: Header) => Promise<[]>>;
161
+ /**
162
+ * Generic runtime api call
163
+ **/
164
+ [method: string]: GenericRuntimeApiMethod<Rv>;
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<Rv, () => 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<Rv, (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<Rv, (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<Rv, () => Promise<bigint>>;
220
+ /**
221
+ * Generic runtime api call
222
+ **/
223
+ [method: string]: GenericRuntimeApiMethod<Rv>;
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<Rv, (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<Rv, (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<Rv, (poolId: number, newFunds: bigint) => Promise<bigint>>;
252
+ /**
253
+ * Generic runtime api call
254
+ **/
255
+ [method: string]: GenericRuntimeApiMethod<Rv>;
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<Rv, (balance: bigint) => Promise<number>>;
268
+ /**
269
+ * Returns the page count of exposures for a validator in a given era.
270
+ *
271
+ * @callname: StakingApi_eras_stakers_page_count
272
+ * @param {number} era
273
+ * @param {AccountId32Like} account
274
+ **/
275
+ erasStakersPageCount: GenericRuntimeApiMethod<Rv, (era: number, account: AccountId32Like) => Promise<number>>;
276
+ /**
277
+ * Generic runtime api call
278
+ **/
279
+ [method: string]: GenericRuntimeApiMethod<Rv>;
280
+ };
281
+ /**
282
+ * @runtimeapi: BabeApi - 0xcbca25e39f142387
283
+ **/
284
+ babeApi: {
285
+ /**
286
+ * Return the configuration for BABE.
287
+ *
288
+ * @callname: BabeApi_configuration
289
+ **/
290
+ configuration: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBabeBabeConfiguration>>;
291
+ /**
292
+ * Returns the slot that started the current epoch.
293
+ *
294
+ * @callname: BabeApi_current_epoch_start
295
+ **/
296
+ currentEpochStart: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusSlotsSlot>>;
297
+ /**
298
+ * Returns information regarding the current epoch.
299
+ *
300
+ * @callname: BabeApi_current_epoch
301
+ **/
302
+ currentEpoch: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBabeEpoch>>;
303
+ /**
304
+ * Returns information regarding the next epoch (which was already
305
+ * previously announced).
306
+ *
307
+ * @callname: BabeApi_next_epoch
308
+ **/
309
+ nextEpoch: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBabeEpoch>>;
310
+ /**
311
+ * Generates a proof of key ownership for the given authority in the
312
+ * current epoch. An example usage of this module is coupled with the
313
+ * session historical module to prove that a given authority key is
314
+ * tied to a given staking identity during a specific session. Proofs
315
+ * of key ownership are necessary for submitting equivocation reports.
316
+ * NOTE: even though the API takes a `slot` as parameter the current
317
+ * implementations ignores this parameter and instead relies on this
318
+ * method being called at the correct block height, i.e. any point at
319
+ * which the epoch for the given slot is live on-chain. Future
320
+ * implementations will instead use indexed data through an offchain
321
+ * worker, not requiring older states to be available.
322
+ *
323
+ * @callname: BabeApi_generate_key_ownership_proof
324
+ * @param {SpConsensusSlotsSlot} slot
325
+ * @param {SpConsensusBabeAppPublic} authority_id
326
+ **/
327
+ generateKeyOwnershipProof: GenericRuntimeApiMethod<Rv, (slot: SpConsensusSlotsSlot, authorityId: SpConsensusBabeAppPublic) => Promise<SpConsensusBabeOpaqueKeyOwnershipProof | undefined>>;
328
+ /**
329
+ * Submits an unsigned extrinsic to report an equivocation. The caller
330
+ * must provide the equivocation proof and a key ownership proof
331
+ * (should be obtained using `generate_key_ownership_proof`). The
332
+ * extrinsic will be unsigned and should only be accepted for local
333
+ * authorship (not to be broadcast to the network). This method returns
334
+ * `None` when creation of the extrinsic fails, e.g. if equivocation
335
+ * reporting is disabled for the given runtime (i.e. this method is
336
+ * hardcoded to return `None`). Only useful in an offchain context.
337
+ *
338
+ * @callname: BabeApi_submit_report_equivocation_unsigned_extrinsic
339
+ * @param {SpConsensusSlotsEquivocationProof} equivocation_proof
340
+ * @param {SpConsensusBabeOpaqueKeyOwnershipProof} key_owner_proof
341
+ **/
342
+ submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<Rv, (equivocationProof: SpConsensusSlotsEquivocationProof, keyOwnerProof: SpConsensusBabeOpaqueKeyOwnershipProof) => Promise<[] | undefined>>;
343
+ /**
344
+ * Generic runtime api call
345
+ **/
346
+ [method: string]: GenericRuntimeApiMethod<Rv>;
347
+ };
348
+ /**
349
+ * @runtimeapi: AuthorityDiscoveryApi - 0x687ad44ad37f03c2
350
+ **/
351
+ authorityDiscoveryApi: {
352
+ /**
353
+ * Retrieve authority identifiers of the current and next authority set.
354
+ *
355
+ * @callname: AuthorityDiscoveryApi_authorities
356
+ **/
357
+ authorities: GenericRuntimeApiMethod<Rv, () => Promise<Array<SpAuthorityDiscoveryAppPublic>>>;
358
+ /**
359
+ * Generic runtime api call
360
+ **/
361
+ [method: string]: GenericRuntimeApiMethod<Rv>;
362
+ };
363
+ /**
364
+ * @runtimeapi: AccountNonceApi - 0xbc9d89904f5b923f
365
+ **/
366
+ accountNonceApi: {
367
+ /**
368
+ * Get current account nonce of given `AccountId`.
369
+ *
370
+ * @callname: AccountNonceApi_account_nonce
371
+ * @param {AccountId32Like} account
372
+ **/
373
+ accountNonce: GenericRuntimeApiMethod<Rv, (account: AccountId32Like) => Promise<number>>;
374
+ /**
375
+ * Generic runtime api call
376
+ **/
377
+ [method: string]: GenericRuntimeApiMethod<Rv>;
378
+ };
379
+ /**
380
+ * @runtimeapi: AssetsApi - 0x8453b50b22293977
381
+ **/
382
+ assetsApi: {
383
+ /**
384
+ * Returns the list of `AssetId`s and corresponding balance that an `AccountId` has.
385
+ *
386
+ * @callname: AssetsApi_account_balances
387
+ * @param {AccountId32Like} account
388
+ **/
389
+ accountBalances: GenericRuntimeApiMethod<Rv, (account: AccountId32Like) => Promise<Array<[number, bigint]>>>;
390
+ /**
391
+ * Generic runtime api call
392
+ **/
393
+ [method: string]: GenericRuntimeApiMethod<Rv>;
394
+ };
395
+ /**
396
+ * @runtimeapi: ContractsApi - 0x68b66ba122c93fa7
397
+ **/
398
+ contractsApi: {
399
+ /**
400
+ * Perform a call from a specified account to a given contract.
401
+ *
402
+ * See [`crate::Pallet::bare_call`].
403
+ *
404
+ * @callname: ContractsApi_call
405
+ * @param {AccountId32Like} origin
406
+ * @param {AccountId32Like} dest
407
+ * @param {bigint} value
408
+ * @param {SpWeightsWeightV2Weight | undefined} gas_limit
409
+ * @param {bigint | undefined} storage_deposit_limit
410
+ * @param {BytesLike} input_data
411
+ **/
412
+ call: GenericRuntimeApiMethod<Rv, (origin: AccountId32Like, dest: AccountId32Like, value: bigint, gasLimit: SpWeightsWeightV2Weight | undefined, storageDepositLimit: bigint | undefined, inputData: BytesLike) => Promise<PalletContractsPrimitivesContractResult>>;
413
+ /**
414
+ * Instantiate a new contract.
415
+ *
416
+ * See `[crate::Pallet::bare_instantiate]`.
417
+ *
418
+ * @callname: ContractsApi_instantiate
419
+ * @param {AccountId32Like} origin
420
+ * @param {bigint} value
421
+ * @param {SpWeightsWeightV2Weight | undefined} gas_limit
422
+ * @param {bigint | undefined} storage_deposit_limit
423
+ * @param {PalletContractsPrimitivesCode} code
424
+ * @param {BytesLike} data
425
+ * @param {BytesLike} salt
426
+ **/
427
+ instantiate: GenericRuntimeApiMethod<Rv, (origin: AccountId32Like, value: bigint, gasLimit: SpWeightsWeightV2Weight | undefined, storageDepositLimit: bigint | undefined, code: PalletContractsPrimitivesCode, data: BytesLike, salt: BytesLike) => Promise<PalletContractsPrimitivesContractResultResult>>;
428
+ /**
429
+ * Upload new code without instantiating a contract from it.
430
+ *
431
+ * See [`crate::Pallet::bare_upload_code`].
432
+ *
433
+ * @callname: ContractsApi_upload_code
434
+ * @param {AccountId32Like} origin
435
+ * @param {BytesLike} code
436
+ * @param {bigint | undefined} storage_deposit_limit
437
+ * @param {PalletContractsWasmDeterminism} determinism
438
+ **/
439
+ uploadCode: GenericRuntimeApiMethod<Rv, (origin: AccountId32Like, code: BytesLike, storageDepositLimit: bigint | undefined, determinism: PalletContractsWasmDeterminism) => Promise<Result<PalletContractsPrimitivesCodeUploadReturnValue, DispatchError>>>;
440
+ /**
441
+ * Query a given storage key in a given contract.
442
+ *
443
+ * Returns `Ok(Some(Vec<u8>))` if the storage value exists under the given key in the
444
+ * specified account and `Ok(None)` if it doesn't. If the account specified by the address
445
+ * doesn't exist, or doesn't have a contract then `Err` is returned.
446
+ *
447
+ * @callname: ContractsApi_get_storage
448
+ * @param {AccountId32Like} address
449
+ * @param {BytesLike} key
450
+ **/
451
+ getStorage: GenericRuntimeApiMethod<Rv, (address: AccountId32Like, key: BytesLike) => Promise<Result<Bytes | undefined, PalletContractsPrimitivesContractAccessError>>>;
452
+ /**
453
+ * Generic runtime api call
454
+ **/
455
+ [method: string]: GenericRuntimeApiMethod<Rv>;
456
+ };
457
+ /**
458
+ * @runtimeapi: TransactionPaymentApi - 0x37c8bb1350a9a2a8
459
+ **/
460
+ transactionPaymentApi: {
461
+ /**
462
+ *
463
+ * @callname: TransactionPaymentApi_query_info
464
+ * @param {UncheckedExtrinsicLike} uxt
465
+ * @param {number} len
466
+ **/
467
+ queryInfo: GenericRuntimeApiMethod<Rv, (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>>;
468
+ /**
469
+ *
470
+ * @callname: TransactionPaymentApi_query_fee_details
471
+ * @param {UncheckedExtrinsicLike} uxt
472
+ * @param {number} len
473
+ **/
474
+ queryFeeDetails: GenericRuntimeApiMethod<Rv, (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>>;
475
+ /**
476
+ *
477
+ * @callname: TransactionPaymentApi_query_weight_to_fee
478
+ * @param {SpWeightsWeightV2Weight} weight
479
+ **/
480
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
481
+ /**
482
+ *
483
+ * @callname: TransactionPaymentApi_query_length_to_fee
484
+ * @param {number} length
485
+ **/
486
+ queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
487
+ /**
488
+ * Generic runtime api call
489
+ **/
490
+ [method: string]: GenericRuntimeApiMethod<Rv>;
491
+ };
492
+ /**
493
+ * @runtimeapi: AssetConversionApi - 0x8a8047a53a8277ec
494
+ **/
495
+ assetConversionApi: {
496
+ /**
497
+ * Provides a quote for [`Pallet::swap_tokens_for_exact_tokens`].
498
+ *
499
+ * Note that the price may have changed by the time the transaction is executed.
500
+ * (Use `amount_in_max` to control slippage.)
501
+ *
502
+ * @callname: AssetConversionApi_quote_price_tokens_for_exact_tokens
503
+ * @param {FrameSupportTokensFungibleUnionOfNativeOrWithId} asset1
504
+ * @param {FrameSupportTokensFungibleUnionOfNativeOrWithId} asset2
505
+ * @param {bigint} amount
506
+ * @param {boolean} include_fee
507
+ **/
508
+ quotePriceTokensForExactTokens: GenericRuntimeApiMethod<Rv, (asset1: FrameSupportTokensFungibleUnionOfNativeOrWithId, asset2: FrameSupportTokensFungibleUnionOfNativeOrWithId, amount: bigint, includeFee: boolean) => Promise<bigint | undefined>>;
509
+ /**
510
+ * Provides a quote for [`Pallet::swap_exact_tokens_for_tokens`].
511
+ *
512
+ * Note that the price may have changed by the time the transaction is executed.
513
+ * (Use `amount_out_min` to control slippage.)
514
+ *
515
+ * @callname: AssetConversionApi_quote_price_exact_tokens_for_tokens
516
+ * @param {FrameSupportTokensFungibleUnionOfNativeOrWithId} asset1
517
+ * @param {FrameSupportTokensFungibleUnionOfNativeOrWithId} asset2
518
+ * @param {bigint} amount
519
+ * @param {boolean} include_fee
520
+ **/
521
+ quotePriceExactTokensForTokens: GenericRuntimeApiMethod<Rv, (asset1: FrameSupportTokensFungibleUnionOfNativeOrWithId, asset2: FrameSupportTokensFungibleUnionOfNativeOrWithId, amount: bigint, includeFee: boolean) => Promise<bigint | undefined>>;
522
+ /**
523
+ * Returns the size of the liquidity pool for the given asset pair.
524
+ *
525
+ * @callname: AssetConversionApi_get_reserves
526
+ * @param {FrameSupportTokensFungibleUnionOfNativeOrWithId} asset1
527
+ * @param {FrameSupportTokensFungibleUnionOfNativeOrWithId} asset2
528
+ **/
529
+ getReserves: GenericRuntimeApiMethod<Rv, (asset1: FrameSupportTokensFungibleUnionOfNativeOrWithId, asset2: FrameSupportTokensFungibleUnionOfNativeOrWithId) => Promise<[bigint, bigint] | undefined>>;
530
+ /**
531
+ * Generic runtime api call
532
+ **/
533
+ [method: string]: GenericRuntimeApiMethod<Rv>;
534
+ };
535
+ /**
536
+ * @runtimeapi: TransactionPaymentCallApi - 0xf3ff14d5ab527059
537
+ **/
538
+ transactionPaymentCallApi: {
539
+ /**
540
+ * Query information of a dispatch class, weight, and fee of a given encoded `Call`.
541
+ *
542
+ * @callname: TransactionPaymentCallApi_query_call_info
543
+ * @param {KitchensinkRuntimeRuntimeCallLike} call
544
+ * @param {number} len
545
+ **/
546
+ queryCallInfo: GenericRuntimeApiMethod<Rv, (call: KitchensinkRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>>;
547
+ /**
548
+ * Query fee details of a given encoded `Call`.
549
+ *
550
+ * @callname: TransactionPaymentCallApi_query_call_fee_details
551
+ * @param {KitchensinkRuntimeRuntimeCallLike} call
552
+ * @param {number} len
553
+ **/
554
+ queryCallFeeDetails: GenericRuntimeApiMethod<Rv, (call: KitchensinkRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>>;
555
+ /**
556
+ * Query the output of the current `WeightToFee` given some input.
557
+ *
558
+ * @callname: TransactionPaymentCallApi_query_weight_to_fee
559
+ * @param {SpWeightsWeightV2Weight} weight
560
+ **/
561
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
562
+ /**
563
+ * Query the output of the current `LengthToFee` given some input.
564
+ *
565
+ * @callname: TransactionPaymentCallApi_query_length_to_fee
566
+ * @param {number} length
567
+ **/
568
+ queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
569
+ /**
570
+ * Generic runtime api call
571
+ **/
572
+ [method: string]: GenericRuntimeApiMethod<Rv>;
573
+ };
574
+ /**
575
+ * @runtimeapi: NftsApi - 0x899a250cbe84f250
576
+ **/
577
+ nftsApi: {
578
+ /**
579
+ *
580
+ * @callname: NftsApi_owner
581
+ * @param {number} collection
582
+ * @param {number} item
583
+ **/
584
+ owner: GenericRuntimeApiMethod<Rv, (collection: number, item: number) => Promise<AccountId32 | undefined>>;
585
+ /**
586
+ *
587
+ * @callname: NftsApi_collection_owner
588
+ * @param {number} collection
589
+ **/
590
+ collectionOwner: GenericRuntimeApiMethod<Rv, (collection: number) => Promise<AccountId32 | undefined>>;
591
+ /**
592
+ *
593
+ * @callname: NftsApi_attribute
594
+ * @param {number} collection
595
+ * @param {number} item
596
+ * @param {BytesLike} key
597
+ **/
598
+ attribute: GenericRuntimeApiMethod<Rv, (collection: number, item: number, key: BytesLike) => Promise<Bytes | undefined>>;
599
+ /**
600
+ *
601
+ * @callname: NftsApi_custom_attribute
602
+ * @param {AccountId32Like} account
603
+ * @param {number} collection
604
+ * @param {number} item
605
+ * @param {BytesLike} key
606
+ **/
607
+ customAttribute: GenericRuntimeApiMethod<Rv, (account: AccountId32Like, collection: number, item: number, key: BytesLike) => Promise<Bytes | undefined>>;
608
+ /**
609
+ *
610
+ * @callname: NftsApi_system_attribute
611
+ * @param {number} collection
612
+ * @param {number | undefined} item
613
+ * @param {BytesLike} key
614
+ **/
615
+ systemAttribute: GenericRuntimeApiMethod<Rv, (collection: number, item: number | undefined, key: BytesLike) => Promise<Bytes | undefined>>;
616
+ /**
617
+ *
618
+ * @callname: NftsApi_collection_attribute
619
+ * @param {number} collection
620
+ * @param {BytesLike} key
621
+ **/
622
+ collectionAttribute: GenericRuntimeApiMethod<Rv, (collection: number, key: BytesLike) => Promise<Bytes | undefined>>;
623
+ /**
624
+ * Generic runtime api call
625
+ **/
626
+ [method: string]: GenericRuntimeApiMethod<Rv>;
627
+ };
628
+ /**
629
+ * @runtimeapi: BeefyApi - 0x49eaaf1b548a0cb0
630
+ **/
631
+ beefyApi: {
632
+ /**
633
+ * Return the block number where BEEFY consensus is enabled/started
634
+ *
635
+ * @callname: BeefyApi_beefy_genesis
636
+ **/
637
+ beefyGenesis: GenericRuntimeApiMethod<Rv, () => Promise<number | undefined>>;
638
+ /**
639
+ * Return the current active BEEFY validator set
640
+ *
641
+ * @callname: BeefyApi_validator_set
642
+ **/
643
+ validatorSet: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBeefyValidatorSet | undefined>>;
644
+ /**
645
+ * Submits an unsigned extrinsic to report an equivocation. The caller
646
+ * must provide the equivocation proof and a key ownership proof
647
+ * (should be obtained using `generate_key_ownership_proof`). The
648
+ * extrinsic will be unsigned and should only be accepted for local
649
+ * authorship (not to be broadcast to the network). This method returns
650
+ * `None` when creation of the extrinsic fails, e.g. if equivocation
651
+ * reporting is disabled for the given runtime (i.e. this method is
652
+ * hardcoded to return `None`). Only useful in an offchain context.
653
+ *
654
+ * @callname: BeefyApi_submit_report_equivocation_unsigned_extrinsic
655
+ * @param {SpConsensusBeefyEquivocationProof} equivocation_proof
656
+ * @param {SpConsensusBeefyOpaqueKeyOwnershipProof} key_owner_proof
657
+ **/
658
+ submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<Rv, (equivocationProof: SpConsensusBeefyEquivocationProof, keyOwnerProof: SpConsensusBeefyOpaqueKeyOwnershipProof) => Promise<[] | undefined>>;
659
+ /**
660
+ * Generates a proof of key ownership for the given authority in the
661
+ * given set. An example usage of this module is coupled with the
662
+ * session historical module to prove that a given authority key is
663
+ * tied to a given staking identity during a specific session. Proofs
664
+ * of key ownership are necessary for submitting equivocation reports.
665
+ * NOTE: even though the API takes a `set_id` as parameter the current
666
+ * implementations ignores this parameter and instead relies on this
667
+ * method being called at the correct block height, i.e. any point at
668
+ * which the given set id is live on-chain. Future implementations will
669
+ * instead use indexed data through an offchain worker, not requiring
670
+ * older states to be available.
671
+ *
672
+ * @callname: BeefyApi_generate_key_ownership_proof
673
+ * @param {bigint} set_id
674
+ * @param {SpConsensusBeefyEcdsaCryptoPublic} authority_id
675
+ **/
676
+ generateKeyOwnershipProof: GenericRuntimeApiMethod<Rv, (setId: bigint, authorityId: SpConsensusBeefyEcdsaCryptoPublic) => Promise<SpConsensusBeefyOpaqueKeyOwnershipProof | undefined>>;
677
+ /**
678
+ * Generic runtime api call
679
+ **/
680
+ [method: string]: GenericRuntimeApiMethod<Rv>;
681
+ };
682
+ /**
683
+ * @runtimeapi: MmrApi - 0x91d5df18b0d2cf58
684
+ **/
685
+ mmrApi: {
686
+ /**
687
+ * Return the on-chain MMR root hash.
688
+ *
689
+ * @callname: MmrApi_mmr_root
690
+ **/
691
+ mmrRoot: GenericRuntimeApiMethod<Rv, () => Promise<Result<H256, SpMmrPrimitivesError>>>;
692
+ /**
693
+ * Return the number of MMR blocks in the chain.
694
+ *
695
+ * @callname: MmrApi_mmr_leaf_count
696
+ **/
697
+ mmrLeafCount: GenericRuntimeApiMethod<Rv, () => Promise<Result<bigint, SpMmrPrimitivesError>>>;
698
+ /**
699
+ * Generate MMR proof for a series of block numbers. If `best_known_block_number = Some(n)`,
700
+ * use historical MMR state at given block height `n`. Else, use current MMR state.
701
+ *
702
+ * @callname: MmrApi_generate_proof
703
+ * @param {Array<number>} block_numbers
704
+ * @param {number | undefined} best_known_block_number
705
+ **/
706
+ generateProof: GenericRuntimeApiMethod<Rv, (blockNumbers: Array<number>, bestKnownBlockNumber?: number | undefined) => Promise<Result<[Array<SpMmrPrimitivesEncodableOpaqueLeaf>, SpMmrPrimitivesProof], SpMmrPrimitivesError>>>;
707
+ /**
708
+ * Verify MMR proof against on-chain MMR for a batch of leaves.
709
+ *
710
+ * Note this function will use on-chain MMR root hash and check if the proof matches the hash.
711
+ * Note, the leaves should be sorted such that corresponding leaves and leaf indices have the
712
+ * same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]
713
+ *
714
+ * @callname: MmrApi_verify_proof
715
+ * @param {Array<SpMmrPrimitivesEncodableOpaqueLeaf>} leaves
716
+ * @param {SpMmrPrimitivesProof} proof
717
+ **/
718
+ verifyProof: GenericRuntimeApiMethod<Rv, (leaves: Array<SpMmrPrimitivesEncodableOpaqueLeaf>, proof: SpMmrPrimitivesProof) => Promise<Result<[], SpMmrPrimitivesError>>>;
719
+ /**
720
+ * Verify MMR proof against given root hash for a batch of leaves.
721
+ *
722
+ * Note this function does not require any on-chain storage - the
723
+ * proof is verified against given MMR root hash.
724
+ *
725
+ * Note, the leaves should be sorted such that corresponding leaves and leaf indices have the
726
+ * same position in both the `leaves` vector and the `leaf_indices` vector contained in the [Proof]
727
+ *
728
+ * @callname: MmrApi_verify_proof_stateless
729
+ * @param {H256} root
730
+ * @param {Array<SpMmrPrimitivesEncodableOpaqueLeaf>} leaves
731
+ * @param {SpMmrPrimitivesProof} proof
732
+ **/
733
+ verifyProofStateless: GenericRuntimeApiMethod<Rv, (root: H256, leaves: Array<SpMmrPrimitivesEncodableOpaqueLeaf>, proof: SpMmrPrimitivesProof) => Promise<Result<[], SpMmrPrimitivesError>>>;
734
+ /**
735
+ * Generic runtime api call
736
+ **/
737
+ [method: string]: GenericRuntimeApiMethod<Rv>;
738
+ };
739
+ /**
740
+ * @runtimeapi: MixnetApi - 0x6fd7c327202e4a8d
741
+ **/
742
+ mixnetApi: {
743
+ /**
744
+ * Get the index and phase of the current session.
745
+ *
746
+ * @callname: MixnetApi_session_status
747
+ **/
748
+ sessionStatus: GenericRuntimeApiMethod<Rv, () => Promise<SpMixnetSessionStatus>>;
749
+ /**
750
+ * Get the mixnode set for the previous session.
751
+ *
752
+ * @callname: MixnetApi_prev_mixnodes
753
+ **/
754
+ prevMixnodes: GenericRuntimeApiMethod<Rv, () => Promise<Result<Array<SpMixnetMixnode>, SpMixnetMixnodesErr>>>;
755
+ /**
756
+ * Get the mixnode set for the current session.
757
+ *
758
+ * @callname: MixnetApi_current_mixnodes
759
+ **/
760
+ currentMixnodes: GenericRuntimeApiMethod<Rv, () => Promise<Result<Array<SpMixnetMixnode>, SpMixnetMixnodesErr>>>;
761
+ /**
762
+ * Try to register a mixnode for the next session.
763
+ *
764
+ * If a registration extrinsic is submitted, `true` is returned. The caller should avoid
765
+ * calling `maybe_register` again for a few blocks, to give the submitted extrinsic a
766
+ * chance to get included.
767
+ *
768
+ * With the above exception, `maybe_register` is designed to be called every block. Most
769
+ * of the time it will not do anything, for example:
770
+ *
771
+ * - If it is not an appropriate time to submit a registration extrinsic.
772
+ * - If the local node has already registered a mixnode for the next session.
773
+ * - If the local node is not permitted to register a mixnode for the next session.
774
+ *
775
+ * `session_index` should match `session_status().current_index`; if it does not, `false`
776
+ * is returned immediately.
777
+ *
778
+ * @callname: MixnetApi_maybe_register
779
+ * @param {number} session_index
780
+ * @param {SpMixnetMixnode} mixnode
781
+ **/
782
+ maybeRegister: GenericRuntimeApiMethod<Rv, (sessionIndex: number, mixnode: SpMixnetMixnode) => Promise<boolean>>;
783
+ /**
784
+ * Generic runtime api call
785
+ **/
786
+ [method: string]: GenericRuntimeApiMethod<Rv>;
787
+ };
788
+ /**
789
+ * @runtimeapi: SessionKeys - 0xab3c0572291feb8b
790
+ **/
791
+ sessionKeys: {
792
+ /**
793
+ * Generate a set of session keys with optionally using the given seed.
794
+ * The keys should be stored within the keystore exposed via runtime
795
+ * externalities.
796
+ *
797
+ * The seed needs to be a valid `utf8` string.
798
+ *
799
+ * Returns the concatenated SCALE encoded public keys.
800
+ *
801
+ * @callname: SessionKeys_generate_session_keys
802
+ * @param {BytesLike | undefined} seed
803
+ **/
804
+ generateSessionKeys: GenericRuntimeApiMethod<Rv, (seed?: BytesLike | undefined) => Promise<Bytes>>;
805
+ /**
806
+ * Decode the given public session keys.
807
+ *
808
+ * Returns the list of public raw public keys + key type.
809
+ *
810
+ * @callname: SessionKeys_decode_session_keys
811
+ * @param {BytesLike} encoded
812
+ **/
813
+ decodeSessionKeys: GenericRuntimeApiMethod<Rv, (encoded: BytesLike) => Promise<Array<[Bytes, SpCoreCryptoKeyTypeId]> | undefined>>;
814
+ /**
815
+ * Generic runtime api call
816
+ **/
817
+ [method: string]: GenericRuntimeApiMethod<Rv>;
818
+ };
819
+ /**
820
+ * @runtimeapi: GenesisBuilder - 0xfbc577b9d747efd6
821
+ **/
822
+ genesisBuilder: {
823
+ /**
824
+ * Creates the default `RuntimeGenesisConfig` and returns it as a JSON blob.
825
+ *
826
+ * This function instantiates the default `RuntimeGenesisConfig` struct for the runtime and serializes it into a JSON
827
+ * blob. It returns a `Vec<u8>` containing the JSON representation of the default `RuntimeGenesisConfig`.
828
+ *
829
+ * @callname: GenesisBuilder_create_default_config
830
+ **/
831
+ createDefaultConfig: GenericRuntimeApiMethod<Rv, () => Promise<Bytes>>;
832
+ /**
833
+ * Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the storage.
834
+ *
835
+ * This function deserializes the full `RuntimeGenesisConfig` from the given JSON blob and puts it into the storage.
836
+ * If the provided JSON blob is incorrect or incomplete or the deserialization fails, an error is returned.
837
+ * It is recommended to log any errors encountered during the process.
838
+ *
839
+ * Please note that provided json blob must contain all `RuntimeGenesisConfig` fields, no defaults will be used.
840
+ *
841
+ * @callname: GenesisBuilder_build_config
842
+ * @param {BytesLike} json
843
+ **/
844
+ buildConfig: GenericRuntimeApiMethod<Rv, (json: BytesLike) => Promise<Result<[], string>>>;
845
+ /**
846
+ * Generic runtime api call
847
+ **/
848
+ [method: string]: GenericRuntimeApiMethod<Rv>;
849
+ };
850
+ }