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