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

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