@dedot/chaintypes 0.0.1-next.f5bf4fc2.1 → 0.1.0

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 (144) hide show
  1. package/README.md +3 -1
  2. package/aleph/consts.d.ts +94 -13
  3. package/aleph/errors.d.ts +251 -182
  4. package/aleph/events.d.ts +319 -102
  5. package/aleph/index.d.ts +16 -11
  6. package/aleph/json-rpc.d.ts +76 -0
  7. package/aleph/query.d.ts +261 -168
  8. package/aleph/runtime.d.ts +90 -39
  9. package/aleph/tx.d.ts +1822 -1052
  10. package/aleph/types.d.ts +458 -138
  11. package/astar/consts.d.ts +112 -116
  12. package/astar/errors.d.ts +342 -409
  13. package/astar/events.d.ts +449 -358
  14. package/astar/index.d.ts +16 -11
  15. package/astar/json-rpc.d.ts +131 -0
  16. package/astar/query.d.ts +459 -367
  17. package/astar/runtime.d.ts +591 -98
  18. package/astar/tx.d.ts +2485 -3430
  19. package/astar/types.d.ts +1530 -4436
  20. package/index.d.ts +3 -0
  21. package/index.ts +3 -0
  22. package/kusama/consts.d.ts +54 -115
  23. package/kusama/errors.d.ts +696 -682
  24. package/kusama/events.d.ts +592 -407
  25. package/kusama/index.d.ts +16 -11
  26. package/kusama/json-rpc.d.ts +103 -0
  27. package/kusama/query.d.ts +840 -538
  28. package/kusama/runtime.d.ts +136 -65
  29. package/kusama/tx.d.ts +4557 -3051
  30. package/kusama/types.d.ts +1437 -1161
  31. package/kusamaAssetHub/consts.d.ts +66 -20
  32. package/kusamaAssetHub/errors.d.ts +428 -308
  33. package/kusamaAssetHub/events.d.ts +497 -305
  34. package/kusamaAssetHub/index.d.ts +16 -11
  35. package/kusamaAssetHub/json-rpc.d.ts +89 -0
  36. package/kusamaAssetHub/query.d.ts +376 -253
  37. package/kusamaAssetHub/runtime.d.ts +82 -41
  38. package/kusamaAssetHub/tx.d.ts +3264 -1955
  39. package/kusamaAssetHub/types.d.ts +1262 -726
  40. package/moonbeam/consts.d.ts +115 -170
  41. package/moonbeam/errors.d.ts +564 -787
  42. package/moonbeam/events.d.ts +583 -746
  43. package/moonbeam/index.d.ts +16 -11
  44. package/moonbeam/json-rpc.d.ts +137 -0
  45. package/moonbeam/query.d.ts +507 -607
  46. package/moonbeam/runtime.d.ts +132 -47
  47. package/moonbeam/tx.d.ts +3309 -3268
  48. package/moonbeam/types.d.ts +1484 -1375
  49. package/package.json +4 -14
  50. package/paseo/consts.d.ts +1331 -0
  51. package/paseo/errors.d.ts +2644 -0
  52. package/paseo/events.d.ts +2821 -0
  53. package/paseo/index.d.ts +27 -0
  54. package/paseo/json-rpc.d.ts +103 -0
  55. package/paseo/query.d.ts +3709 -0
  56. package/paseo/runtime.d.ts +1205 -0
  57. package/paseo/tx.d.ts +8024 -0
  58. package/paseo/types.d.ts +10194 -0
  59. package/polkadot/consts.d.ts +95 -50
  60. package/polkadot/errors.d.ts +619 -468
  61. package/polkadot/events.d.ts +582 -257
  62. package/polkadot/index.d.ts +16 -11
  63. package/polkadot/json-rpc.d.ts +103 -0
  64. package/polkadot/query.d.ts +770 -399
  65. package/polkadot/runtime.d.ts +136 -65
  66. package/polkadot/tx.d.ts +4268 -2368
  67. package/polkadot/types.d.ts +1570 -745
  68. package/polkadotAssetHub/consts.d.ts +154 -15
  69. package/polkadotAssetHub/errors.d.ts +615 -234
  70. package/polkadotAssetHub/events.d.ts +829 -270
  71. package/polkadotAssetHub/index.d.ts +16 -11
  72. package/polkadotAssetHub/json-rpc.d.ts +89 -0
  73. package/polkadotAssetHub/query.d.ts +438 -243
  74. package/polkadotAssetHub/runtime.d.ts +147 -40
  75. package/polkadotAssetHub/tx.d.ts +3747 -1643
  76. package/polkadotAssetHub/types.d.ts +2096 -806
  77. package/rococo/consts.d.ts +51 -32
  78. package/rococo/errors.d.ts +549 -605
  79. package/rococo/events.d.ts +447 -238
  80. package/rococo/index.d.ts +16 -11
  81. package/rococo/json-rpc.d.ts +103 -0
  82. package/rococo/query.d.ts +724 -426
  83. package/rococo/runtime.d.ts +366 -144
  84. package/rococo/tx.d.ts +6850 -3079
  85. package/rococo/types.d.ts +5959 -1619
  86. package/rococoAssetHub/consts.d.ts +92 -7
  87. package/rococoAssetHub/errors.d.ts +381 -285
  88. package/rococoAssetHub/events.d.ts +461 -140
  89. package/rococoAssetHub/index.d.ts +16 -11
  90. package/rococoAssetHub/json-rpc.d.ts +89 -0
  91. package/rococoAssetHub/query.d.ts +487 -174
  92. package/rococoAssetHub/runtime.d.ts +235 -51
  93. package/rococoAssetHub/tx.d.ts +6005 -2163
  94. package/rococoAssetHub/types.d.ts +6683 -1003
  95. package/substrate/consts.d.ts +233 -52
  96. package/substrate/errors.d.ts +966 -781
  97. package/substrate/events.d.ts +1226 -381
  98. package/substrate/index.d.ts +16 -11
  99. package/substrate/json-rpc.d.ts +103 -0
  100. package/substrate/query.d.ts +1090 -460
  101. package/substrate/runtime.d.ts +274 -71
  102. package/substrate/tx.d.ts +12313 -4510
  103. package/substrate/types.d.ts +11036 -1432
  104. package/westend/consts.d.ts +1349 -0
  105. package/westend/errors.d.ts +2736 -0
  106. package/westend/events.d.ts +2906 -0
  107. package/westend/index.d.ts +27 -0
  108. package/westend/json-rpc.d.ts +103 -0
  109. package/westend/query.d.ts +3855 -0
  110. package/westend/runtime.d.ts +1437 -0
  111. package/westend/tx.d.ts +10248 -0
  112. package/westend/types.d.ts +14769 -0
  113. package/westendAssetHub/consts.d.ts +126 -7
  114. package/westendAssetHub/errors.d.ts +426 -285
  115. package/westendAssetHub/events.d.ts +498 -140
  116. package/westendAssetHub/index.d.ts +16 -11
  117. package/westendAssetHub/json-rpc.d.ts +89 -0
  118. package/westendAssetHub/query.d.ts +526 -174
  119. package/westendAssetHub/runtime.d.ts +245 -56
  120. package/westendAssetHub/tx.d.ts +6196 -2166
  121. package/westendAssetHub/types.d.ts +6913 -1002
  122. package/westendPeople/consts.d.ts +434 -0
  123. package/westendPeople/errors.d.ts +769 -0
  124. package/westendPeople/events.d.ts +1082 -0
  125. package/westendPeople/index.d.ts +27 -0
  126. package/westendPeople/json-rpc.d.ts +89 -0
  127. package/westendPeople/query.d.ts +1209 -0
  128. package/westendPeople/runtime.d.ts +636 -0
  129. package/westendPeople/tx.d.ts +2891 -0
  130. package/westendPeople/types.d.ts +4984 -0
  131. package/aleph/rpc.d.ts +0 -727
  132. package/astar/rpc.d.ts +0 -974
  133. package/kusama/rpc.d.ts +0 -904
  134. package/kusamaAssetHub/rpc.d.ts +0 -746
  135. package/moonbeam/rpc.d.ts +0 -1015
  136. package/packageInfo.d.ts +0 -4
  137. package/packageInfo.js +0 -2
  138. package/packageInfo.ts +0 -3
  139. package/polkadot/rpc.d.ts +0 -904
  140. package/polkadotAssetHub/rpc.d.ts +0 -746
  141. package/rococo/rpc.d.ts +0 -904
  142. package/rococoAssetHub/rpc.d.ts +0 -746
  143. package/substrate/rpc.d.ts +0 -894
  144. package/westendAssetHub/rpc.d.ts +0 -746
@@ -0,0 +1,1437 @@
1
+ // Generated by dedot cli
2
+
3
+ import type { GenericRuntimeApis, GenericRuntimeApiMethod, RpcVersion } from 'dedot/types';
4
+ import type {
5
+ RuntimeVersion,
6
+ Header,
7
+ DispatchError,
8
+ Result,
9
+ UncheckedExtrinsicLike,
10
+ UncheckedExtrinsic,
11
+ H256,
12
+ BitSequence,
13
+ Bytes,
14
+ BytesLike,
15
+ AccountId32Like,
16
+ AccountId32,
17
+ } from 'dedot/codecs';
18
+ import type {
19
+ SpRuntimeBlock,
20
+ SpRuntimeExtrinsicInclusionMode,
21
+ SpCoreOpaqueMetadata,
22
+ SpRuntimeTransactionValidityTransactionValidityError,
23
+ SpInherentsInherentData,
24
+ SpInherentsCheckInherentsResult,
25
+ SpRuntimeTransactionValidityValidTransaction,
26
+ SpRuntimeTransactionValidityTransactionSource,
27
+ PolkadotPrimitivesV7ValidatorAppPublic,
28
+ PolkadotPrimitivesV7ValidatorIndex,
29
+ PolkadotPrimitivesV7GroupRotationInfo,
30
+ PolkadotPrimitivesV7CoreState,
31
+ PolkadotPrimitivesV7PersistedValidationData,
32
+ PolkadotParachainPrimitivesPrimitivesId,
33
+ PolkadotPrimitivesV7OccupiedCoreAssumption,
34
+ PolkadotParachainPrimitivesPrimitivesValidationCodeHash,
35
+ PolkadotPrimitivesV7CandidateCommitments,
36
+ PolkadotParachainPrimitivesPrimitivesValidationCode,
37
+ PolkadotPrimitivesV7CommittedCandidateReceipt,
38
+ PolkadotPrimitivesV7CandidateEvent,
39
+ PolkadotCorePrimitivesInboundDownwardMessage,
40
+ PolkadotCorePrimitivesInboundHrmpMessage,
41
+ PolkadotPrimitivesV7ScrapedOnChainVotes,
42
+ PolkadotPrimitivesV7SessionInfo,
43
+ PolkadotPrimitivesV7PvfCheckStatement,
44
+ PolkadotPrimitivesV7ValidatorAppSignature,
45
+ PolkadotCorePrimitivesCandidateHash,
46
+ PolkadotPrimitivesV7DisputeState,
47
+ PolkadotPrimitivesV7ExecutorParams,
48
+ PolkadotPrimitivesV7SlashingPendingSlashes,
49
+ PolkadotPrimitivesV7SlashingOpaqueKeyOwnershipProof,
50
+ PolkadotPrimitivesV7SlashingDisputeProof,
51
+ PolkadotPrimitivesV7AsyncBackingBackingState,
52
+ PolkadotPrimitivesV7AsyncBackingAsyncBackingParams,
53
+ PolkadotPrimitivesV7ApprovalVotingParams,
54
+ PolkadotPrimitivesV7CoreIndex,
55
+ SpConsensusBeefyValidatorSet,
56
+ SpConsensusBeefyDoubleVotingProof,
57
+ SpRuntimeOpaqueValue,
58
+ SpConsensusBeefyEcdsaCryptoPublic,
59
+ SpMmrPrimitivesError,
60
+ SpMmrPrimitivesEncodableOpaqueLeaf,
61
+ SpMmrPrimitivesLeafProof,
62
+ SpConsensusBeefyMmrBeefyAuthoritySet,
63
+ SpConsensusGrandpaAppPublic,
64
+ SpConsensusGrandpaEquivocationProof,
65
+ SpConsensusBabeBabeConfiguration,
66
+ SpConsensusSlotsSlot,
67
+ SpConsensusBabeEpoch,
68
+ SpConsensusBabeOpaqueKeyOwnershipProof,
69
+ SpConsensusBabeAppPublic,
70
+ SpConsensusSlotsEquivocationProof,
71
+ SpAuthorityDiscoveryAppPublic,
72
+ SpCoreCryptoKeyTypeId,
73
+ PalletTransactionPaymentRuntimeDispatchInfo,
74
+ PalletTransactionPaymentFeeDetails,
75
+ SpWeightsWeightV2Weight,
76
+ WestendRuntimeRuntimeCallLike,
77
+ XcmVersionedAssetId,
78
+ XcmRuntimeApisFeesError,
79
+ XcmVersionedXcm,
80
+ XcmVersionedAssets,
81
+ XcmVersionedLocation,
82
+ XcmRuntimeApisDryRunCallDryRunEffects,
83
+ XcmRuntimeApisDryRunError,
84
+ WestendRuntimeOriginCaller,
85
+ XcmRuntimeApisDryRunXcmDryRunEffects,
86
+ XcmRuntimeApisConversionsError,
87
+ } from './types';
88
+
89
+ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<Rv> {
90
+ /**
91
+ * @runtimeapi: Core - 0xdf6acb689907609b
92
+ **/
93
+ core: {
94
+ /**
95
+ * Returns the version of the runtime.
96
+ *
97
+ * @callname: Core_version
98
+ **/
99
+ version: GenericRuntimeApiMethod<Rv, () => Promise<RuntimeVersion>>;
100
+
101
+ /**
102
+ * Execute the given block.
103
+ *
104
+ * @callname: Core_execute_block
105
+ * @param {SpRuntimeBlock} block
106
+ **/
107
+ executeBlock: GenericRuntimeApiMethod<Rv, (block: SpRuntimeBlock) => Promise<[]>>;
108
+
109
+ /**
110
+ * Initialize a block with the given header and return the runtime executive mode.
111
+ *
112
+ * @callname: Core_initialize_block
113
+ * @param {Header} header
114
+ **/
115
+ initializeBlock: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<SpRuntimeExtrinsicInclusionMode>>;
116
+
117
+ /**
118
+ * Generic runtime api call
119
+ **/
120
+ [method: string]: GenericRuntimeApiMethod<Rv>;
121
+ };
122
+ /**
123
+ * @runtimeapi: Metadata - 0x37e397fc7c91f5e4
124
+ **/
125
+ metadata: {
126
+ /**
127
+ * Returns the metadata of a runtime.
128
+ *
129
+ * @callname: Metadata_metadata
130
+ **/
131
+ metadata: GenericRuntimeApiMethod<Rv, () => Promise<SpCoreOpaqueMetadata>>;
132
+
133
+ /**
134
+ * Returns the metadata at a given version.
135
+ *
136
+ * If the given `version` isn't supported, this will return `None`.
137
+ * Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime.
138
+ *
139
+ * @callname: Metadata_metadata_at_version
140
+ * @param {number} version
141
+ **/
142
+ metadataAtVersion: GenericRuntimeApiMethod<Rv, (version: number) => Promise<SpCoreOpaqueMetadata | undefined>>;
143
+
144
+ /**
145
+ * Returns the supported metadata versions.
146
+ *
147
+ * This can be used to call `metadata_at_version`.
148
+ *
149
+ * @callname: Metadata_metadata_versions
150
+ **/
151
+ metadataVersions: GenericRuntimeApiMethod<Rv, () => Promise<Array<number>>>;
152
+
153
+ /**
154
+ * Generic runtime api call
155
+ **/
156
+ [method: string]: GenericRuntimeApiMethod<Rv>;
157
+ };
158
+ /**
159
+ * @runtimeapi: BlockBuilder - 0x40fe3ad401f8959a
160
+ **/
161
+ blockBuilder: {
162
+ /**
163
+ * Apply the given extrinsic.
164
+ *
165
+ * Returns an inclusion outcome which specifies if this extrinsic is included in
166
+ * this block or not.
167
+ *
168
+ * @callname: BlockBuilder_apply_extrinsic
169
+ * @param {UncheckedExtrinsicLike} extrinsic
170
+ **/
171
+ applyExtrinsic: GenericRuntimeApiMethod<
172
+ Rv,
173
+ (
174
+ extrinsic: UncheckedExtrinsicLike,
175
+ ) => Promise<Result<Result<[], DispatchError>, SpRuntimeTransactionValidityTransactionValidityError>>
176
+ >;
177
+
178
+ /**
179
+ * Finish the current block.
180
+ *
181
+ * @callname: BlockBuilder_finalize_block
182
+ **/
183
+ finalizeBlock: GenericRuntimeApiMethod<Rv, () => Promise<Header>>;
184
+
185
+ /**
186
+ * Generate inherent extrinsics. The inherent data will vary from chain to chain.
187
+ *
188
+ * @callname: BlockBuilder_inherent_extrinsics
189
+ * @param {SpInherentsInherentData} inherent
190
+ **/
191
+ inherentExtrinsics: GenericRuntimeApiMethod<
192
+ Rv,
193
+ (inherent: SpInherentsInherentData) => Promise<Array<UncheckedExtrinsic>>
194
+ >;
195
+
196
+ /**
197
+ * Check that the inherents are valid. The inherent data will vary from chain to chain.
198
+ *
199
+ * @callname: BlockBuilder_check_inherents
200
+ * @param {SpRuntimeBlock} block
201
+ * @param {SpInherentsInherentData} data
202
+ **/
203
+ checkInherents: GenericRuntimeApiMethod<
204
+ Rv,
205
+ (block: SpRuntimeBlock, data: SpInherentsInherentData) => Promise<SpInherentsCheckInherentsResult>
206
+ >;
207
+
208
+ /**
209
+ * Generic runtime api call
210
+ **/
211
+ [method: string]: GenericRuntimeApiMethod<Rv>;
212
+ };
213
+ /**
214
+ * @runtimeapi: TaggedTransactionQueue - 0xd2bc9897eed08f15
215
+ **/
216
+ taggedTransactionQueue: {
217
+ /**
218
+ * Validate the transaction.
219
+ *
220
+ * This method is invoked by the transaction pool to learn details about given transaction.
221
+ * The implementation should make sure to verify the correctness of the transaction
222
+ * against current state. The given `block_hash` corresponds to the hash of the block
223
+ * that is used as current state.
224
+ *
225
+ * Note that this call may be performed by the pool multiple times and transactions
226
+ * might be verified in any possible order.
227
+ *
228
+ * @callname: TaggedTransactionQueue_validate_transaction
229
+ * @param {SpRuntimeTransactionValidityTransactionSource} source
230
+ * @param {UncheckedExtrinsicLike} tx
231
+ * @param {H256} block_hash
232
+ **/
233
+ validateTransaction: GenericRuntimeApiMethod<
234
+ Rv,
235
+ (
236
+ source: SpRuntimeTransactionValidityTransactionSource,
237
+ tx: UncheckedExtrinsicLike,
238
+ blockHash: H256,
239
+ ) => Promise<
240
+ Result<SpRuntimeTransactionValidityValidTransaction, SpRuntimeTransactionValidityTransactionValidityError>
241
+ >
242
+ >;
243
+
244
+ /**
245
+ * Generic runtime api call
246
+ **/
247
+ [method: string]: GenericRuntimeApiMethod<Rv>;
248
+ };
249
+ /**
250
+ * @runtimeapi: OffchainWorkerApi - 0xf78b278be53f454c
251
+ **/
252
+ offchainWorkerApi: {
253
+ /**
254
+ * Starts the off-chain task for given block header.
255
+ *
256
+ * @callname: OffchainWorkerApi_offchain_worker
257
+ * @param {Header} header
258
+ **/
259
+ offchainWorker: GenericRuntimeApiMethod<Rv, (header: Header) => Promise<[]>>;
260
+
261
+ /**
262
+ * Generic runtime api call
263
+ **/
264
+ [method: string]: GenericRuntimeApiMethod<Rv>;
265
+ };
266
+ /**
267
+ * @runtimeapi: ParachainHost - 0xaf2c0297a23e6d3d
268
+ **/
269
+ parachainHost: {
270
+ /**
271
+ * Get the current validators.
272
+ *
273
+ * @callname: ParachainHost_validators
274
+ **/
275
+ validators: GenericRuntimeApiMethod<Rv, () => Promise<Array<PolkadotPrimitivesV7ValidatorAppPublic>>>;
276
+
277
+ /**
278
+ * Returns the validator groups and rotation info localized based on the hypothetical child
279
+ * of a block whose state this is invoked on. Note that `now` in the `GroupRotationInfo`
280
+ * should be the successor of the number of the block.
281
+ *
282
+ * @callname: ParachainHost_validator_groups
283
+ **/
284
+ validatorGroups: GenericRuntimeApiMethod<
285
+ Rv,
286
+ () => Promise<[Array<Array<PolkadotPrimitivesV7ValidatorIndex>>, PolkadotPrimitivesV7GroupRotationInfo]>
287
+ >;
288
+
289
+ /**
290
+ * Yields information on all availability cores as relevant to the child block.
291
+ * Cores are either free or occupied. Free cores can have paras assigned to them.
292
+ *
293
+ * @callname: ParachainHost_availability_cores
294
+ **/
295
+ availabilityCores: GenericRuntimeApiMethod<Rv, () => Promise<Array<PolkadotPrimitivesV7CoreState>>>;
296
+
297
+ /**
298
+ * Yields the persisted validation data for the given `ParaId` along with an assumption that
299
+ * should be used if the para currently occupies a core.
300
+ *
301
+ * Returns `None` if either the para is not registered or the assumption is `Freed`
302
+ * and the para already occupies a core.
303
+ *
304
+ * @callname: ParachainHost_persisted_validation_data
305
+ * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
306
+ * @param {PolkadotPrimitivesV7OccupiedCoreAssumption} assumption
307
+ **/
308
+ persistedValidationData: GenericRuntimeApiMethod<
309
+ Rv,
310
+ (
311
+ paraId: PolkadotParachainPrimitivesPrimitivesId,
312
+ assumption: PolkadotPrimitivesV7OccupiedCoreAssumption,
313
+ ) => Promise<PolkadotPrimitivesV7PersistedValidationData | undefined>
314
+ >;
315
+
316
+ /**
317
+ * Returns the persisted validation data for the given `ParaId` along with the corresponding
318
+ * validation code hash. Instead of accepting assumption about the para, matches the validation
319
+ * data hash against an expected one and yields `None` if they're not equal.
320
+ *
321
+ * @callname: ParachainHost_assumed_validation_data
322
+ * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
323
+ * @param {H256} expected_persisted_validation_data_hash
324
+ **/
325
+ assumedValidationData: GenericRuntimeApiMethod<
326
+ Rv,
327
+ (
328
+ paraId: PolkadotParachainPrimitivesPrimitivesId,
329
+ expectedPersistedValidationDataHash: H256,
330
+ ) => Promise<
331
+ | [PolkadotPrimitivesV7PersistedValidationData, PolkadotParachainPrimitivesPrimitivesValidationCodeHash]
332
+ | undefined
333
+ >
334
+ >;
335
+
336
+ /**
337
+ * Checks if the given validation outputs pass the acceptance criteria.
338
+ *
339
+ * @callname: ParachainHost_check_validation_outputs
340
+ * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
341
+ * @param {PolkadotPrimitivesV7CandidateCommitments} outputs
342
+ **/
343
+ checkValidationOutputs: GenericRuntimeApiMethod<
344
+ Rv,
345
+ (
346
+ paraId: PolkadotParachainPrimitivesPrimitivesId,
347
+ outputs: PolkadotPrimitivesV7CandidateCommitments,
348
+ ) => Promise<boolean>
349
+ >;
350
+
351
+ /**
352
+ * Returns the session index expected at a child of the block.
353
+ *
354
+ * This can be used to instantiate a `SigningContext`.
355
+ *
356
+ * @callname: ParachainHost_session_index_for_child
357
+ **/
358
+ sessionIndexForChild: GenericRuntimeApiMethod<Rv, () => Promise<number>>;
359
+
360
+ /**
361
+ * Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.
362
+ *
363
+ * Returns `None` if either the para is not registered or the assumption is `Freed`
364
+ * and the para already occupies a core.
365
+ *
366
+ * @callname: ParachainHost_validation_code
367
+ * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
368
+ * @param {PolkadotPrimitivesV7OccupiedCoreAssumption} assumption
369
+ **/
370
+ validationCode: GenericRuntimeApiMethod<
371
+ Rv,
372
+ (
373
+ paraId: PolkadotParachainPrimitivesPrimitivesId,
374
+ assumption: PolkadotPrimitivesV7OccupiedCoreAssumption,
375
+ ) => Promise<PolkadotParachainPrimitivesPrimitivesValidationCode | undefined>
376
+ >;
377
+
378
+ /**
379
+ * Get the receipt of a candidate pending availability. This returns `Some` for any paras
380
+ * assigned to occupied cores in `availability_cores` and `None` otherwise.
381
+ *
382
+ * @callname: ParachainHost_candidate_pending_availability
383
+ * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
384
+ **/
385
+ candidatePendingAvailability: GenericRuntimeApiMethod<
386
+ Rv,
387
+ (
388
+ paraId: PolkadotParachainPrimitivesPrimitivesId,
389
+ ) => Promise<PolkadotPrimitivesV7CommittedCandidateReceipt | undefined>
390
+ >;
391
+
392
+ /**
393
+ * Get a vector of events concerning candidates that occurred within a block.
394
+ *
395
+ * @callname: ParachainHost_candidate_events
396
+ **/
397
+ candidateEvents: GenericRuntimeApiMethod<Rv, () => Promise<Array<PolkadotPrimitivesV7CandidateEvent>>>;
398
+
399
+ /**
400
+ * Get all the pending inbound messages in the downward message queue for a para.
401
+ *
402
+ * @callname: ParachainHost_dmq_contents
403
+ * @param {PolkadotParachainPrimitivesPrimitivesId} recipient
404
+ **/
405
+ dmqContents: GenericRuntimeApiMethod<
406
+ Rv,
407
+ (
408
+ recipient: PolkadotParachainPrimitivesPrimitivesId,
409
+ ) => Promise<Array<PolkadotCorePrimitivesInboundDownwardMessage>>
410
+ >;
411
+
412
+ /**
413
+ * Get the contents of all channels addressed to the given recipient. Channels that have no
414
+ * messages in them are also included.
415
+ *
416
+ * @callname: ParachainHost_inbound_hrmp_channels_contents
417
+ * @param {PolkadotParachainPrimitivesPrimitivesId} recipient
418
+ **/
419
+ inboundHrmpChannelsContents: GenericRuntimeApiMethod<
420
+ Rv,
421
+ (
422
+ recipient: PolkadotParachainPrimitivesPrimitivesId,
423
+ ) => Promise<Array<[PolkadotParachainPrimitivesPrimitivesId, Array<PolkadotCorePrimitivesInboundHrmpMessage>]>>
424
+ >;
425
+
426
+ /**
427
+ * Get the validation code from its hash.
428
+ *
429
+ * @callname: ParachainHost_validation_code_by_hash
430
+ * @param {PolkadotParachainPrimitivesPrimitivesValidationCodeHash} hash
431
+ **/
432
+ validationCodeByHash: GenericRuntimeApiMethod<
433
+ Rv,
434
+ (
435
+ hash: PolkadotParachainPrimitivesPrimitivesValidationCodeHash,
436
+ ) => Promise<PolkadotParachainPrimitivesPrimitivesValidationCode | undefined>
437
+ >;
438
+
439
+ /**
440
+ * Scrape dispute relevant from on-chain, backing votes and resolved disputes.
441
+ *
442
+ * @callname: ParachainHost_on_chain_votes
443
+ **/
444
+ onChainVotes: GenericRuntimeApiMethod<Rv, () => Promise<PolkadotPrimitivesV7ScrapedOnChainVotes | undefined>>;
445
+
446
+ /**
447
+ * Get the session info for the given session, if stored.
448
+ *
449
+ * NOTE: This function is only available since parachain host version 2.
450
+ *
451
+ * @callname: ParachainHost_session_info
452
+ * @param {number} index
453
+ **/
454
+ sessionInfo: GenericRuntimeApiMethod<Rv, (index: number) => Promise<PolkadotPrimitivesV7SessionInfo | undefined>>;
455
+
456
+ /**
457
+ * Submits a PVF pre-checking statement into the transaction pool.
458
+ *
459
+ * NOTE: This function is only available since parachain host version 2.
460
+ *
461
+ * @callname: ParachainHost_submit_pvf_check_statement
462
+ * @param {PolkadotPrimitivesV7PvfCheckStatement} stmt
463
+ * @param {PolkadotPrimitivesV7ValidatorAppSignature} signature
464
+ **/
465
+ submitPvfCheckStatement: GenericRuntimeApiMethod<
466
+ Rv,
467
+ (stmt: PolkadotPrimitivesV7PvfCheckStatement, signature: PolkadotPrimitivesV7ValidatorAppSignature) => Promise<[]>
468
+ >;
469
+
470
+ /**
471
+ * Returns code hashes of PVFs that require pre-checking by validators in the active set.
472
+ *
473
+ * NOTE: This function is only available since parachain host version 2.
474
+ *
475
+ * @callname: ParachainHost_pvfs_require_precheck
476
+ **/
477
+ pvfsRequirePrecheck: GenericRuntimeApiMethod<
478
+ Rv,
479
+ () => Promise<Array<PolkadotParachainPrimitivesPrimitivesValidationCodeHash>>
480
+ >;
481
+
482
+ /**
483
+ * Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`.
484
+ *
485
+ * NOTE: This function is only available since parachain host version 2.
486
+ *
487
+ * @callname: ParachainHost_validation_code_hash
488
+ * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
489
+ * @param {PolkadotPrimitivesV7OccupiedCoreAssumption} assumption
490
+ **/
491
+ validationCodeHash: GenericRuntimeApiMethod<
492
+ Rv,
493
+ (
494
+ paraId: PolkadotParachainPrimitivesPrimitivesId,
495
+ assumption: PolkadotPrimitivesV7OccupiedCoreAssumption,
496
+ ) => Promise<PolkadotParachainPrimitivesPrimitivesValidationCodeHash | undefined>
497
+ >;
498
+
499
+ /**
500
+ * Returns all onchain disputes.
501
+ *
502
+ * @callname: ParachainHost_disputes
503
+ **/
504
+ disputes: GenericRuntimeApiMethod<
505
+ Rv,
506
+ () => Promise<Array<[number, PolkadotCorePrimitivesCandidateHash, PolkadotPrimitivesV7DisputeState]>>
507
+ >;
508
+
509
+ /**
510
+ * Returns execution parameters for the session.
511
+ *
512
+ * @callname: ParachainHost_session_executor_params
513
+ * @param {number} session_index
514
+ **/
515
+ sessionExecutorParams: GenericRuntimeApiMethod<
516
+ Rv,
517
+ (sessionIndex: number) => Promise<PolkadotPrimitivesV7ExecutorParams | undefined>
518
+ >;
519
+
520
+ /**
521
+ * Returns a list of validators that lost a past session dispute and need to be slashed.
522
+ * NOTE: This function is only available since parachain host version 5.
523
+ *
524
+ * @callname: ParachainHost_unapplied_slashes
525
+ **/
526
+ unappliedSlashes: GenericRuntimeApiMethod<
527
+ Rv,
528
+ () => Promise<Array<[number, PolkadotCorePrimitivesCandidateHash, PolkadotPrimitivesV7SlashingPendingSlashes]>>
529
+ >;
530
+
531
+ /**
532
+ * Returns a merkle proof of a validator session key.
533
+ * NOTE: This function is only available since parachain host version 5.
534
+ *
535
+ * @callname: ParachainHost_key_ownership_proof
536
+ * @param {PolkadotPrimitivesV7ValidatorAppPublic} validator_id
537
+ **/
538
+ keyOwnershipProof: GenericRuntimeApiMethod<
539
+ Rv,
540
+ (
541
+ validatorId: PolkadotPrimitivesV7ValidatorAppPublic,
542
+ ) => Promise<PolkadotPrimitivesV7SlashingOpaqueKeyOwnershipProof | undefined>
543
+ >;
544
+
545
+ /**
546
+ * Submit an unsigned extrinsic to slash validators who lost a dispute about
547
+ * a candidate of a past session.
548
+ * NOTE: This function is only available since parachain host version 5.
549
+ *
550
+ * @callname: ParachainHost_submit_report_dispute_lost
551
+ * @param {PolkadotPrimitivesV7SlashingDisputeProof} dispute_proof
552
+ * @param {PolkadotPrimitivesV7SlashingOpaqueKeyOwnershipProof} key_ownership_proof
553
+ **/
554
+ submitReportDisputeLost: GenericRuntimeApiMethod<
555
+ Rv,
556
+ (
557
+ disputeProof: PolkadotPrimitivesV7SlashingDisputeProof,
558
+ keyOwnershipProof: PolkadotPrimitivesV7SlashingOpaqueKeyOwnershipProof,
559
+ ) => Promise<[] | undefined>
560
+ >;
561
+
562
+ /**
563
+ * Get the minimum number of backing votes for a parachain candidate.
564
+ * This is a staging method! Do not use on production runtimes!
565
+ *
566
+ * @callname: ParachainHost_minimum_backing_votes
567
+ **/
568
+ minimumBackingVotes: GenericRuntimeApiMethod<Rv, () => Promise<number>>;
569
+
570
+ /**
571
+ * Returns the state of parachain backing for a given para.
572
+ *
573
+ * @callname: ParachainHost_para_backing_state
574
+ * @param {PolkadotParachainPrimitivesPrimitivesId} _
575
+ **/
576
+ paraBackingState: GenericRuntimeApiMethod<
577
+ Rv,
578
+ (
579
+ undefined: PolkadotParachainPrimitivesPrimitivesId,
580
+ ) => Promise<PolkadotPrimitivesV7AsyncBackingBackingState | undefined>
581
+ >;
582
+
583
+ /**
584
+ * Returns candidate's acceptance limitations for asynchronous backing for a relay parent.
585
+ *
586
+ * @callname: ParachainHost_async_backing_params
587
+ **/
588
+ asyncBackingParams: GenericRuntimeApiMethod<Rv, () => Promise<PolkadotPrimitivesV7AsyncBackingAsyncBackingParams>>;
589
+
590
+ /**
591
+ * Returns a list of all disabled validators at the given block.
592
+ *
593
+ * @callname: ParachainHost_disabled_validators
594
+ **/
595
+ disabledValidators: GenericRuntimeApiMethod<Rv, () => Promise<Array<PolkadotPrimitivesV7ValidatorIndex>>>;
596
+
597
+ /**
598
+ * Get node features.
599
+ * This is a staging method! Do not use on production runtimes!
600
+ *
601
+ * @callname: ParachainHost_node_features
602
+ **/
603
+ nodeFeatures: GenericRuntimeApiMethod<Rv, () => Promise<BitSequence>>;
604
+
605
+ /**
606
+ * Approval voting configuration parameters
607
+ *
608
+ * @callname: ParachainHost_approval_voting_params
609
+ **/
610
+ approvalVotingParams: GenericRuntimeApiMethod<Rv, () => Promise<PolkadotPrimitivesV7ApprovalVotingParams>>;
611
+
612
+ /**
613
+ * Claim queue
614
+ *
615
+ * @callname: ParachainHost_claim_queue
616
+ **/
617
+ claimQueue: GenericRuntimeApiMethod<
618
+ Rv,
619
+ () => Promise<Array<[PolkadotPrimitivesV7CoreIndex, Array<PolkadotParachainPrimitivesPrimitivesId>]>>
620
+ >;
621
+
622
+ /**
623
+ * Elastic scaling support
624
+ *
625
+ * @callname: ParachainHost_candidates_pending_availability
626
+ * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
627
+ **/
628
+ candidatesPendingAvailability: GenericRuntimeApiMethod<
629
+ Rv,
630
+ (paraId: PolkadotParachainPrimitivesPrimitivesId) => Promise<Array<PolkadotPrimitivesV7CommittedCandidateReceipt>>
631
+ >;
632
+
633
+ /**
634
+ * Generic runtime api call
635
+ **/
636
+ [method: string]: GenericRuntimeApiMethod<Rv>;
637
+ };
638
+ /**
639
+ * @runtimeapi: BeefyApi - 0x49eaaf1b548a0cb0
640
+ **/
641
+ beefyApi: {
642
+ /**
643
+ * Return the block number where BEEFY consensus is enabled/started
644
+ *
645
+ * @callname: BeefyApi_beefy_genesis
646
+ **/
647
+ beefyGenesis: GenericRuntimeApiMethod<Rv, () => Promise<number | undefined>>;
648
+
649
+ /**
650
+ * Return the current active BEEFY validator set
651
+ *
652
+ * @callname: BeefyApi_validator_set
653
+ **/
654
+ validatorSet: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBeefyValidatorSet | undefined>>;
655
+
656
+ /**
657
+ * Submits an unsigned extrinsic to report an equivocation. The caller
658
+ * must provide the equivocation proof and a key ownership proof
659
+ * (should be obtained using `generate_key_ownership_proof`). The
660
+ * extrinsic will be unsigned and should only be accepted for local
661
+ * authorship (not to be broadcast to the network). This method returns
662
+ * `None` when creation of the extrinsic fails, e.g. if equivocation
663
+ * reporting is disabled for the given runtime (i.e. this method is
664
+ * hardcoded to return `None`). Only useful in an offchain context.
665
+ *
666
+ * @callname: BeefyApi_submit_report_equivocation_unsigned_extrinsic
667
+ * @param {SpConsensusBeefyDoubleVotingProof} equivocation_proof
668
+ * @param {SpRuntimeOpaqueValue} key_owner_proof
669
+ **/
670
+ submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<
671
+ Rv,
672
+ (
673
+ equivocationProof: SpConsensusBeefyDoubleVotingProof,
674
+ keyOwnerProof: SpRuntimeOpaqueValue,
675
+ ) => Promise<[] | undefined>
676
+ >;
677
+
678
+ /**
679
+ * Generates a proof of key ownership for the given authority in the
680
+ * given set. An example usage of this module is coupled with the
681
+ * session historical module to prove that a given authority key is
682
+ * tied to a given staking identity during a specific session. Proofs
683
+ * of key ownership are necessary for submitting equivocation reports.
684
+ * NOTE: even though the API takes a `set_id` as parameter the current
685
+ * implementations ignores this parameter and instead relies on this
686
+ * method being called at the correct block height, i.e. any point at
687
+ * which the given set id is live on-chain. Future implementations will
688
+ * instead use indexed data through an offchain worker, not requiring
689
+ * older states to be available.
690
+ *
691
+ * @callname: BeefyApi_generate_key_ownership_proof
692
+ * @param {bigint} set_id
693
+ * @param {SpConsensusBeefyEcdsaCryptoPublic} authority_id
694
+ **/
695
+ generateKeyOwnershipProof: GenericRuntimeApiMethod<
696
+ Rv,
697
+ (setId: bigint, authorityId: SpConsensusBeefyEcdsaCryptoPublic) => Promise<SpRuntimeOpaqueValue | undefined>
698
+ >;
699
+
700
+ /**
701
+ * Generic runtime api call
702
+ **/
703
+ [method: string]: GenericRuntimeApiMethod<Rv>;
704
+ };
705
+ /**
706
+ * @runtimeapi: MmrApi - 0x91d5df18b0d2cf58
707
+ **/
708
+ mmrApi: {
709
+ /**
710
+ * Return the on-chain MMR root hash.
711
+ *
712
+ * @callname: MmrApi_mmr_root
713
+ **/
714
+ mmrRoot: GenericRuntimeApiMethod<Rv, () => Promise<Result<H256, SpMmrPrimitivesError>>>;
715
+
716
+ /**
717
+ * Return the number of MMR blocks in the chain.
718
+ *
719
+ * @callname: MmrApi_mmr_leaf_count
720
+ **/
721
+ mmrLeafCount: GenericRuntimeApiMethod<Rv, () => Promise<Result<bigint, SpMmrPrimitivesError>>>;
722
+
723
+ /**
724
+ * Generate MMR proof for a series of block numbers. If `best_known_block_number = Some(n)`,
725
+ * use historical MMR state at given block height `n`. Else, use current MMR state.
726
+ *
727
+ * @callname: MmrApi_generate_proof
728
+ * @param {Array<number>} block_numbers
729
+ * @param {number | undefined} best_known_block_number
730
+ **/
731
+ generateProof: GenericRuntimeApiMethod<
732
+ Rv,
733
+ (
734
+ blockNumbers: Array<number>,
735
+ bestKnownBlockNumber?: number | undefined,
736
+ ) => Promise<Result<[Array<SpMmrPrimitivesEncodableOpaqueLeaf>, SpMmrPrimitivesLeafProof], SpMmrPrimitivesError>>
737
+ >;
738
+
739
+ /**
740
+ * Verify MMR proof against on-chain MMR for a batch of leaves.
741
+ *
742
+ * Note this function will use on-chain MMR root hash and check if the proof matches the hash.
743
+ * Note, the leaves should be sorted such that corresponding leaves and leaf indices have the
744
+ * same position in both the `leaves` vector and the `leaf_indices` vector contained in the [LeafProof]
745
+ *
746
+ * @callname: MmrApi_verify_proof
747
+ * @param {Array<SpMmrPrimitivesEncodableOpaqueLeaf>} leaves
748
+ * @param {SpMmrPrimitivesLeafProof} proof
749
+ **/
750
+ verifyProof: GenericRuntimeApiMethod<
751
+ Rv,
752
+ (
753
+ leaves: Array<SpMmrPrimitivesEncodableOpaqueLeaf>,
754
+ proof: SpMmrPrimitivesLeafProof,
755
+ ) => Promise<Result<[], SpMmrPrimitivesError>>
756
+ >;
757
+
758
+ /**
759
+ * Verify MMR proof against given root hash for a batch of leaves.
760
+ *
761
+ * Note this function does not require any on-chain storage - the
762
+ * proof is verified against given MMR root hash.
763
+ *
764
+ * Note, the leaves should be sorted such that corresponding leaves and leaf indices have the
765
+ * same position in both the `leaves` vector and the `leaf_indices` vector contained in the [LeafProof]
766
+ *
767
+ * @callname: MmrApi_verify_proof_stateless
768
+ * @param {H256} root
769
+ * @param {Array<SpMmrPrimitivesEncodableOpaqueLeaf>} leaves
770
+ * @param {SpMmrPrimitivesLeafProof} proof
771
+ **/
772
+ verifyProofStateless: GenericRuntimeApiMethod<
773
+ Rv,
774
+ (
775
+ root: H256,
776
+ leaves: Array<SpMmrPrimitivesEncodableOpaqueLeaf>,
777
+ proof: SpMmrPrimitivesLeafProof,
778
+ ) => Promise<Result<[], SpMmrPrimitivesError>>
779
+ >;
780
+
781
+ /**
782
+ * Generic runtime api call
783
+ **/
784
+ [method: string]: GenericRuntimeApiMethod<Rv>;
785
+ };
786
+ /**
787
+ * @runtimeapi: BeefyMmrApi - 0x2a5e924655399e60
788
+ **/
789
+ beefyMmrApi: {
790
+ /**
791
+ * Return the currently active BEEFY authority set proof.
792
+ *
793
+ * @callname: BeefyMmrApi_authority_set_proof
794
+ **/
795
+ authoritySetProof: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBeefyMmrBeefyAuthoritySet>>;
796
+
797
+ /**
798
+ * Return the next/queued BEEFY authority set proof.
799
+ *
800
+ * @callname: BeefyMmrApi_next_authority_set_proof
801
+ **/
802
+ nextAuthoritySetProof: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBeefyMmrBeefyAuthoritySet>>;
803
+
804
+ /**
805
+ * Generic runtime api call
806
+ **/
807
+ [method: string]: GenericRuntimeApiMethod<Rv>;
808
+ };
809
+ /**
810
+ * @runtimeapi: GrandpaApi - 0xed99c5acb25eedf5
811
+ **/
812
+ grandpaApi: {
813
+ /**
814
+ * Get the current GRANDPA authorities and weights. This should not change except
815
+ * for when changes are scheduled and the corresponding delay has passed.
816
+ *
817
+ * When called at block B, it will return the set of authorities that should be
818
+ * used to finalize descendants of this block (B+1, B+2, ...). The block B itself
819
+ * is finalized by the authorities from block B-1.
820
+ *
821
+ * @callname: GrandpaApi_grandpa_authorities
822
+ **/
823
+ grandpaAuthorities: GenericRuntimeApiMethod<Rv, () => Promise<Array<[SpConsensusGrandpaAppPublic, bigint]>>>;
824
+
825
+ /**
826
+ * Submits an unsigned extrinsic to report an equivocation. The caller
827
+ * must provide the equivocation proof and a key ownership proof
828
+ * (should be obtained using `generate_key_ownership_proof`). The
829
+ * extrinsic will be unsigned and should only be accepted for local
830
+ * authorship (not to be broadcast to the network). This method returns
831
+ * `None` when creation of the extrinsic fails, e.g. if equivocation
832
+ * reporting is disabled for the given runtime (i.e. this method is
833
+ * hardcoded to return `None`). Only useful in an offchain context.
834
+ *
835
+ * @callname: GrandpaApi_submit_report_equivocation_unsigned_extrinsic
836
+ * @param {SpConsensusGrandpaEquivocationProof} equivocation_proof
837
+ * @param {SpRuntimeOpaqueValue} key_owner_proof
838
+ **/
839
+ submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<
840
+ Rv,
841
+ (
842
+ equivocationProof: SpConsensusGrandpaEquivocationProof,
843
+ keyOwnerProof: SpRuntimeOpaqueValue,
844
+ ) => Promise<[] | undefined>
845
+ >;
846
+
847
+ /**
848
+ * Generates a proof of key ownership for the given authority in the
849
+ * given set. An example usage of this module is coupled with the
850
+ * session historical module to prove that a given authority key is
851
+ * tied to a given staking identity during a specific session. Proofs
852
+ * of key ownership are necessary for submitting equivocation reports.
853
+ * NOTE: even though the API takes a `set_id` as parameter the current
854
+ * implementations ignore this parameter and instead rely on this
855
+ * method being called at the correct block height, i.e. any point at
856
+ * which the given set id is live on-chain. Future implementations will
857
+ * instead use indexed data through an offchain worker, not requiring
858
+ * older states to be available.
859
+ *
860
+ * @callname: GrandpaApi_generate_key_ownership_proof
861
+ * @param {bigint} set_id
862
+ * @param {SpConsensusGrandpaAppPublic} authority_id
863
+ **/
864
+ generateKeyOwnershipProof: GenericRuntimeApiMethod<
865
+ Rv,
866
+ (setId: bigint, authorityId: SpConsensusGrandpaAppPublic) => Promise<SpRuntimeOpaqueValue | undefined>
867
+ >;
868
+
869
+ /**
870
+ * Get current GRANDPA authority set id.
871
+ *
872
+ * @callname: GrandpaApi_current_set_id
873
+ **/
874
+ currentSetId: GenericRuntimeApiMethod<Rv, () => Promise<bigint>>;
875
+
876
+ /**
877
+ * Generic runtime api call
878
+ **/
879
+ [method: string]: GenericRuntimeApiMethod<Rv>;
880
+ };
881
+ /**
882
+ * @runtimeapi: BabeApi - 0xcbca25e39f142387
883
+ **/
884
+ babeApi: {
885
+ /**
886
+ * Return the configuration for BABE.
887
+ *
888
+ * @callname: BabeApi_configuration
889
+ **/
890
+ configuration: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBabeBabeConfiguration>>;
891
+
892
+ /**
893
+ * Returns the slot that started the current epoch.
894
+ *
895
+ * @callname: BabeApi_current_epoch_start
896
+ **/
897
+ currentEpochStart: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusSlotsSlot>>;
898
+
899
+ /**
900
+ * Returns information regarding the current epoch.
901
+ *
902
+ * @callname: BabeApi_current_epoch
903
+ **/
904
+ currentEpoch: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBabeEpoch>>;
905
+
906
+ /**
907
+ * Returns information regarding the next epoch (which was already
908
+ * previously announced).
909
+ *
910
+ * @callname: BabeApi_next_epoch
911
+ **/
912
+ nextEpoch: GenericRuntimeApiMethod<Rv, () => Promise<SpConsensusBabeEpoch>>;
913
+
914
+ /**
915
+ * Generates a proof of key ownership for the given authority in the
916
+ * current epoch. An example usage of this module is coupled with the
917
+ * session historical module to prove that a given authority key is
918
+ * tied to a given staking identity during a specific session. Proofs
919
+ * of key ownership are necessary for submitting equivocation reports.
920
+ * NOTE: even though the API takes a `slot` as parameter the current
921
+ * implementations ignores this parameter and instead relies on this
922
+ * method being called at the correct block height, i.e. any point at
923
+ * which the epoch for the given slot is live on-chain. Future
924
+ * implementations will instead use indexed data through an offchain
925
+ * worker, not requiring older states to be available.
926
+ *
927
+ * @callname: BabeApi_generate_key_ownership_proof
928
+ * @param {SpConsensusSlotsSlot} slot
929
+ * @param {SpConsensusBabeAppPublic} authority_id
930
+ **/
931
+ generateKeyOwnershipProof: GenericRuntimeApiMethod<
932
+ Rv,
933
+ (
934
+ slot: SpConsensusSlotsSlot,
935
+ authorityId: SpConsensusBabeAppPublic,
936
+ ) => Promise<SpConsensusBabeOpaqueKeyOwnershipProof | undefined>
937
+ >;
938
+
939
+ /**
940
+ * Submits an unsigned extrinsic to report an equivocation. The caller
941
+ * must provide the equivocation proof and a key ownership proof
942
+ * (should be obtained using `generate_key_ownership_proof`). The
943
+ * extrinsic will be unsigned and should only be accepted for local
944
+ * authorship (not to be broadcast to the network). This method returns
945
+ * `None` when creation of the extrinsic fails, e.g. if equivocation
946
+ * reporting is disabled for the given runtime (i.e. this method is
947
+ * hardcoded to return `None`). Only useful in an offchain context.
948
+ *
949
+ * @callname: BabeApi_submit_report_equivocation_unsigned_extrinsic
950
+ * @param {SpConsensusSlotsEquivocationProof} equivocation_proof
951
+ * @param {SpConsensusBabeOpaqueKeyOwnershipProof} key_owner_proof
952
+ **/
953
+ submitReportEquivocationUnsignedExtrinsic: GenericRuntimeApiMethod<
954
+ Rv,
955
+ (
956
+ equivocationProof: SpConsensusSlotsEquivocationProof,
957
+ keyOwnerProof: SpConsensusBabeOpaqueKeyOwnershipProof,
958
+ ) => Promise<[] | undefined>
959
+ >;
960
+
961
+ /**
962
+ * Generic runtime api call
963
+ **/
964
+ [method: string]: GenericRuntimeApiMethod<Rv>;
965
+ };
966
+ /**
967
+ * @runtimeapi: AuthorityDiscoveryApi - 0x687ad44ad37f03c2
968
+ **/
969
+ authorityDiscoveryApi: {
970
+ /**
971
+ * Retrieve authority identifiers of the current and next authority set.
972
+ *
973
+ * @callname: AuthorityDiscoveryApi_authorities
974
+ **/
975
+ authorities: GenericRuntimeApiMethod<Rv, () => Promise<Array<SpAuthorityDiscoveryAppPublic>>>;
976
+
977
+ /**
978
+ * Generic runtime api call
979
+ **/
980
+ [method: string]: GenericRuntimeApiMethod<Rv>;
981
+ };
982
+ /**
983
+ * @runtimeapi: SessionKeys - 0xab3c0572291feb8b
984
+ **/
985
+ sessionKeys: {
986
+ /**
987
+ * Generate a set of session keys with optionally using the given seed.
988
+ * The keys should be stored within the keystore exposed via runtime
989
+ * externalities.
990
+ *
991
+ * The seed needs to be a valid `utf8` string.
992
+ *
993
+ * Returns the concatenated SCALE encoded public keys.
994
+ *
995
+ * @callname: SessionKeys_generate_session_keys
996
+ * @param {BytesLike | undefined} seed
997
+ **/
998
+ generateSessionKeys: GenericRuntimeApiMethod<Rv, (seed?: BytesLike | undefined) => Promise<Bytes>>;
999
+
1000
+ /**
1001
+ * Decode the given public session keys.
1002
+ *
1003
+ * Returns the list of public raw public keys + key type.
1004
+ *
1005
+ * @callname: SessionKeys_decode_session_keys
1006
+ * @param {BytesLike} encoded
1007
+ **/
1008
+ decodeSessionKeys: GenericRuntimeApiMethod<
1009
+ Rv,
1010
+ (encoded: BytesLike) => Promise<Array<[Bytes, SpCoreCryptoKeyTypeId]> | undefined>
1011
+ >;
1012
+
1013
+ /**
1014
+ * Generic runtime api call
1015
+ **/
1016
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1017
+ };
1018
+ /**
1019
+ * @runtimeapi: AccountNonceApi - 0xbc9d89904f5b923f
1020
+ **/
1021
+ accountNonceApi: {
1022
+ /**
1023
+ * Get current account nonce of given `AccountId`.
1024
+ *
1025
+ * @callname: AccountNonceApi_account_nonce
1026
+ * @param {AccountId32Like} account
1027
+ **/
1028
+ accountNonce: GenericRuntimeApiMethod<Rv, (account: AccountId32Like) => Promise<number>>;
1029
+
1030
+ /**
1031
+ * Generic runtime api call
1032
+ **/
1033
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1034
+ };
1035
+ /**
1036
+ * @runtimeapi: TransactionPaymentApi - 0x37c8bb1350a9a2a8
1037
+ **/
1038
+ transactionPaymentApi: {
1039
+ /**
1040
+ *
1041
+ * @callname: TransactionPaymentApi_query_info
1042
+ * @param {UncheckedExtrinsicLike} uxt
1043
+ * @param {number} len
1044
+ **/
1045
+ queryInfo: GenericRuntimeApiMethod<
1046
+ Rv,
1047
+ (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
1048
+ >;
1049
+
1050
+ /**
1051
+ *
1052
+ * @callname: TransactionPaymentApi_query_fee_details
1053
+ * @param {UncheckedExtrinsicLike} uxt
1054
+ * @param {number} len
1055
+ **/
1056
+ queryFeeDetails: GenericRuntimeApiMethod<
1057
+ Rv,
1058
+ (uxt: UncheckedExtrinsicLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
1059
+ >;
1060
+
1061
+ /**
1062
+ *
1063
+ * @callname: TransactionPaymentApi_query_weight_to_fee
1064
+ * @param {SpWeightsWeightV2Weight} weight
1065
+ **/
1066
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
1067
+
1068
+ /**
1069
+ *
1070
+ * @callname: TransactionPaymentApi_query_length_to_fee
1071
+ * @param {number} length
1072
+ **/
1073
+ queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
1074
+
1075
+ /**
1076
+ * Generic runtime api call
1077
+ **/
1078
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1079
+ };
1080
+ /**
1081
+ * @runtimeapi: TransactionPaymentCallApi - 0xf3ff14d5ab527059
1082
+ **/
1083
+ transactionPaymentCallApi: {
1084
+ /**
1085
+ * Query information of a dispatch class, weight, and fee of a given encoded `Call`.
1086
+ *
1087
+ * @callname: TransactionPaymentCallApi_query_call_info
1088
+ * @param {WestendRuntimeRuntimeCallLike} call
1089
+ * @param {number} len
1090
+ **/
1091
+ queryCallInfo: GenericRuntimeApiMethod<
1092
+ Rv,
1093
+ (call: WestendRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentRuntimeDispatchInfo>
1094
+ >;
1095
+
1096
+ /**
1097
+ * Query fee details of a given encoded `Call`.
1098
+ *
1099
+ * @callname: TransactionPaymentCallApi_query_call_fee_details
1100
+ * @param {WestendRuntimeRuntimeCallLike} call
1101
+ * @param {number} len
1102
+ **/
1103
+ queryCallFeeDetails: GenericRuntimeApiMethod<
1104
+ Rv,
1105
+ (call: WestendRuntimeRuntimeCallLike, len: number) => Promise<PalletTransactionPaymentFeeDetails>
1106
+ >;
1107
+
1108
+ /**
1109
+ * Query the output of the current `WeightToFee` given some input.
1110
+ *
1111
+ * @callname: TransactionPaymentCallApi_query_weight_to_fee
1112
+ * @param {SpWeightsWeightV2Weight} weight
1113
+ **/
1114
+ queryWeightToFee: GenericRuntimeApiMethod<Rv, (weight: SpWeightsWeightV2Weight) => Promise<bigint>>;
1115
+
1116
+ /**
1117
+ * Query the output of the current `LengthToFee` given some input.
1118
+ *
1119
+ * @callname: TransactionPaymentCallApi_query_length_to_fee
1120
+ * @param {number} length
1121
+ **/
1122
+ queryLengthToFee: GenericRuntimeApiMethod<Rv, (length: number) => Promise<bigint>>;
1123
+
1124
+ /**
1125
+ * Generic runtime api call
1126
+ **/
1127
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1128
+ };
1129
+ /**
1130
+ * @runtimeapi: XcmPaymentApi - 0x6ff52ee858e6c5bd
1131
+ **/
1132
+ xcmPaymentApi: {
1133
+ /**
1134
+ * Returns a list of acceptable payment assets.
1135
+ *
1136
+ * # Arguments
1137
+ *
1138
+ * * `xcm_version`: Version.
1139
+ *
1140
+ * @callname: XcmPaymentApi_query_acceptable_payment_assets
1141
+ * @param {number} xcm_version
1142
+ **/
1143
+ queryAcceptablePaymentAssets: GenericRuntimeApiMethod<
1144
+ Rv,
1145
+ (xcmVersion: number) => Promise<Result<Array<XcmVersionedAssetId>, XcmRuntimeApisFeesError>>
1146
+ >;
1147
+
1148
+ /**
1149
+ * Returns a weight needed to execute a XCM.
1150
+ *
1151
+ * # Arguments
1152
+ *
1153
+ * * `message`: `VersionedXcm`.
1154
+ *
1155
+ * @callname: XcmPaymentApi_query_xcm_weight
1156
+ * @param {XcmVersionedXcm} message
1157
+ **/
1158
+ queryXcmWeight: GenericRuntimeApiMethod<
1159
+ Rv,
1160
+ (message: XcmVersionedXcm) => Promise<Result<SpWeightsWeightV2Weight, XcmRuntimeApisFeesError>>
1161
+ >;
1162
+
1163
+ /**
1164
+ * Converts a weight into a fee for the specified `AssetId`.
1165
+ *
1166
+ * # Arguments
1167
+ *
1168
+ * * `weight`: convertible `Weight`.
1169
+ * * `asset`: `VersionedAssetId`.
1170
+ *
1171
+ * @callname: XcmPaymentApi_query_weight_to_asset_fee
1172
+ * @param {SpWeightsWeightV2Weight} weight
1173
+ * @param {XcmVersionedAssetId} asset
1174
+ **/
1175
+ queryWeightToAssetFee: GenericRuntimeApiMethod<
1176
+ Rv,
1177
+ (weight: SpWeightsWeightV2Weight, asset: XcmVersionedAssetId) => Promise<Result<bigint, XcmRuntimeApisFeesError>>
1178
+ >;
1179
+
1180
+ /**
1181
+ * Get delivery fees for sending a specific `message` to a `destination`.
1182
+ * These always come in a specific asset, defined by the chain.
1183
+ *
1184
+ * # Arguments
1185
+ * * `message`: The message that'll be sent, necessary because most delivery fees are based on the
1186
+ * size of the message.
1187
+ * * `destination`: The destination to send the message to. Different destinations may use
1188
+ * different senders that charge different fees.
1189
+ *
1190
+ * @callname: XcmPaymentApi_query_delivery_fees
1191
+ * @param {XcmVersionedLocation} destination
1192
+ * @param {XcmVersionedXcm} message
1193
+ **/
1194
+ queryDeliveryFees: GenericRuntimeApiMethod<
1195
+ Rv,
1196
+ (
1197
+ destination: XcmVersionedLocation,
1198
+ message: XcmVersionedXcm,
1199
+ ) => Promise<Result<XcmVersionedAssets, XcmRuntimeApisFeesError>>
1200
+ >;
1201
+
1202
+ /**
1203
+ * Generic runtime api call
1204
+ **/
1205
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1206
+ };
1207
+ /**
1208
+ * @runtimeapi: DryRunApi - 0x91b1c8b16328eb92
1209
+ **/
1210
+ dryRunApi: {
1211
+ /**
1212
+ * Dry run call.
1213
+ *
1214
+ * @callname: DryRunApi_dry_run_call
1215
+ * @param {WestendRuntimeOriginCaller} origin
1216
+ * @param {WestendRuntimeRuntimeCallLike} call
1217
+ **/
1218
+ dryRunCall: GenericRuntimeApiMethod<
1219
+ Rv,
1220
+ (
1221
+ origin: WestendRuntimeOriginCaller,
1222
+ call: WestendRuntimeRuntimeCallLike,
1223
+ ) => Promise<Result<XcmRuntimeApisDryRunCallDryRunEffects, XcmRuntimeApisDryRunError>>
1224
+ >;
1225
+
1226
+ /**
1227
+ * Dry run XCM program
1228
+ *
1229
+ * @callname: DryRunApi_dry_run_xcm
1230
+ * @param {XcmVersionedLocation} origin_location
1231
+ * @param {XcmVersionedXcm} xcm
1232
+ **/
1233
+ dryRunXcm: GenericRuntimeApiMethod<
1234
+ Rv,
1235
+ (
1236
+ originLocation: XcmVersionedLocation,
1237
+ xcm: XcmVersionedXcm,
1238
+ ) => Promise<Result<XcmRuntimeApisDryRunXcmDryRunEffects, XcmRuntimeApisDryRunError>>
1239
+ >;
1240
+
1241
+ /**
1242
+ * Generic runtime api call
1243
+ **/
1244
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1245
+ };
1246
+ /**
1247
+ * @runtimeapi: LocationToAccountApi - 0x9ffb505aa738d69c
1248
+ **/
1249
+ locationToAccountApi: {
1250
+ /**
1251
+ * Converts `Location` to `AccountId`.
1252
+ *
1253
+ * @callname: LocationToAccountApi_convert_location
1254
+ * @param {XcmVersionedLocation} location
1255
+ **/
1256
+ convertLocation: GenericRuntimeApiMethod<
1257
+ Rv,
1258
+ (location: XcmVersionedLocation) => Promise<Result<AccountId32, XcmRuntimeApisConversionsError>>
1259
+ >;
1260
+
1261
+ /**
1262
+ * Generic runtime api call
1263
+ **/
1264
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1265
+ };
1266
+ /**
1267
+ * @runtimeapi: NominationPoolsApi - 0x17a6bc0d0062aeb3
1268
+ **/
1269
+ nominationPoolsApi: {
1270
+ /**
1271
+ * Returns the pending rewards for the member that the AccountId was given for.
1272
+ *
1273
+ * @callname: NominationPoolsApi_pending_rewards
1274
+ * @param {AccountId32Like} who
1275
+ **/
1276
+ pendingRewards: GenericRuntimeApiMethod<Rv, (who: AccountId32Like) => Promise<bigint>>;
1277
+
1278
+ /**
1279
+ * Returns the equivalent balance of `points` for a given pool.
1280
+ *
1281
+ * @callname: NominationPoolsApi_points_to_balance
1282
+ * @param {number} pool_id
1283
+ * @param {bigint} points
1284
+ **/
1285
+ pointsToBalance: GenericRuntimeApiMethod<Rv, (poolId: number, points: bigint) => Promise<bigint>>;
1286
+
1287
+ /**
1288
+ * Returns the equivalent points of `new_funds` for a given pool.
1289
+ *
1290
+ * @callname: NominationPoolsApi_balance_to_points
1291
+ * @param {number} pool_id
1292
+ * @param {bigint} new_funds
1293
+ **/
1294
+ balanceToPoints: GenericRuntimeApiMethod<Rv, (poolId: number, newFunds: bigint) => Promise<bigint>>;
1295
+
1296
+ /**
1297
+ * Returns the pending slash for a given pool.
1298
+ *
1299
+ * @callname: NominationPoolsApi_pool_pending_slash
1300
+ * @param {number} pool_id
1301
+ **/
1302
+ poolPendingSlash: GenericRuntimeApiMethod<Rv, (poolId: number) => Promise<bigint>>;
1303
+
1304
+ /**
1305
+ * Returns the pending slash for a given pool member.
1306
+ *
1307
+ * @callname: NominationPoolsApi_member_pending_slash
1308
+ * @param {AccountId32Like} member
1309
+ **/
1310
+ memberPendingSlash: GenericRuntimeApiMethod<Rv, (member: AccountId32Like) => Promise<bigint>>;
1311
+
1312
+ /**
1313
+ * Returns true if the pool with `pool_id` needs migration.
1314
+ *
1315
+ * This can happen when the `pallet-nomination-pools` has switched to using strategy
1316
+ * [`DelegateStake`](pallet_nomination_pools::adapter::DelegateStake) but the pool
1317
+ * still has funds that were staked using the older strategy
1318
+ * [TransferStake](pallet_nomination_pools::adapter::TransferStake). Use
1319
+ * [`migrate_pool_to_delegate_stake`](pallet_nomination_pools::Call::migrate_pool_to_delegate_stake)
1320
+ * to migrate the pool.
1321
+ *
1322
+ * @callname: NominationPoolsApi_pool_needs_delegate_migration
1323
+ * @param {number} pool_id
1324
+ **/
1325
+ poolNeedsDelegateMigration: GenericRuntimeApiMethod<Rv, (poolId: number) => Promise<boolean>>;
1326
+
1327
+ /**
1328
+ * Returns true if the delegated funds of the pool `member` needs migration.
1329
+ *
1330
+ * Once a pool has successfully migrated to the strategy
1331
+ * [`DelegateStake`](pallet_nomination_pools::adapter::DelegateStake), the funds of the
1332
+ * member can be migrated from pool account to the member's account. Use
1333
+ * [`migrate_delegation`](pallet_nomination_pools::Call::migrate_delegation)
1334
+ * to migrate the funds of the pool member.
1335
+ *
1336
+ * @callname: NominationPoolsApi_member_needs_delegate_migration
1337
+ * @param {AccountId32Like} member
1338
+ **/
1339
+ memberNeedsDelegateMigration: GenericRuntimeApiMethod<Rv, (member: AccountId32Like) => Promise<boolean>>;
1340
+
1341
+ /**
1342
+ * Generic runtime api call
1343
+ **/
1344
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1345
+ };
1346
+ /**
1347
+ * @runtimeapi: StakingApi - 0x18ef58a3b67ba770
1348
+ **/
1349
+ stakingApi: {
1350
+ /**
1351
+ * Returns the nominations quota for a nominator with a given balance.
1352
+ *
1353
+ * @callname: StakingApi_nominations_quota
1354
+ * @param {bigint} balance
1355
+ **/
1356
+ nominationsQuota: GenericRuntimeApiMethod<Rv, (balance: bigint) => Promise<number>>;
1357
+
1358
+ /**
1359
+ * Returns the page count of exposures for a validator `account` in a given era.
1360
+ *
1361
+ * @callname: StakingApi_eras_stakers_page_count
1362
+ * @param {number} era
1363
+ * @param {AccountId32Like} account
1364
+ **/
1365
+ erasStakersPageCount: GenericRuntimeApiMethod<Rv, (era: number, account: AccountId32Like) => Promise<number>>;
1366
+
1367
+ /**
1368
+ * Returns true if validator `account` has pages to be claimed for the given era.
1369
+ *
1370
+ * @callname: StakingApi_pending_rewards
1371
+ * @param {number} era
1372
+ * @param {AccountId32Like} account
1373
+ **/
1374
+ pendingRewards: GenericRuntimeApiMethod<Rv, (era: number, account: AccountId32Like) => Promise<boolean>>;
1375
+
1376
+ /**
1377
+ * Generic runtime api call
1378
+ **/
1379
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1380
+ };
1381
+ /**
1382
+ * @runtimeapi: GenesisBuilder - 0xfbc577b9d747efd6
1383
+ **/
1384
+ genesisBuilder: {
1385
+ /**
1386
+ * Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the
1387
+ * storage.
1388
+ *
1389
+ * In the case of a FRAME-based runtime, this function deserializes the full `RuntimeGenesisConfig` from the given JSON blob and
1390
+ * puts it into the storage. If the provided JSON blob is incorrect or incomplete or the
1391
+ * deserialization fails, an error is returned.
1392
+ *
1393
+ * Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no
1394
+ * defaults will be used.
1395
+ *
1396
+ * @callname: GenesisBuilder_build_state
1397
+ * @param {BytesLike} json
1398
+ **/
1399
+ buildState: GenericRuntimeApiMethod<Rv, (json: BytesLike) => Promise<Result<[], string>>>;
1400
+
1401
+ /**
1402
+ * Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by
1403
+ * `id`.
1404
+ *
1405
+ * If `id` is `None` the function returns JSON blob representation of the default
1406
+ * `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default
1407
+ * `RuntimeGenesisConfig`.
1408
+ *
1409
+ * Otherwise function returns a JSON representation of the built-in, named
1410
+ * `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not
1411
+ * exists. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of
1412
+ * (potentially nested) key-value pairs that are intended for customizing the default
1413
+ * runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation
1414
+ * of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can
1415
+ * be used in `build_state` method.
1416
+ *
1417
+ * @callname: GenesisBuilder_get_preset
1418
+ * @param {string | undefined} id
1419
+ **/
1420
+ getPreset: GenericRuntimeApiMethod<Rv, (id?: string | undefined) => Promise<Bytes | undefined>>;
1421
+
1422
+ /**
1423
+ * Returns a list of identifiers for available builtin `RuntimeGenesisConfig` presets.
1424
+ *
1425
+ * The presets from the list can be queried with [`GenesisBuilder::get_preset`] method. If
1426
+ * no named presets are provided by the runtime the list is empty.
1427
+ *
1428
+ * @callname: GenesisBuilder_preset_names
1429
+ **/
1430
+ presetNames: GenericRuntimeApiMethod<Rv, () => Promise<Array<string>>>;
1431
+
1432
+ /**
1433
+ * Generic runtime api call
1434
+ **/
1435
+ [method: string]: GenericRuntimeApiMethod<Rv>;
1436
+ };
1437
+ }