@dedot/chaintypes 0.0.1-alpha.100

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