@dedot/chaintypes 0.0.1-alpha.49 → 0.0.1-alpha.51

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.
@@ -4,8 +4,8 @@ import type { GenericRuntimeApis, GenericRuntimeApiMethod } from '@dedot/types';
4
4
  import type {
5
5
  RuntimeVersion,
6
6
  Header,
7
- DispatchError,
8
7
  Result,
8
+ DispatchError,
9
9
  UncheckedExtrinsicLike,
10
10
  UncheckedExtrinsic,
11
11
  H256,
@@ -17,39 +17,46 @@ import type {
17
17
  import type {
18
18
  SpRuntimeBlock,
19
19
  SpRuntimeExtrinsicInclusionMode,
20
+ XcmVersionedAssetId,
21
+ XcmFeePaymentRuntimeApiError,
22
+ SpWeightsWeightV2Weight,
23
+ XcmVersionedXcm,
24
+ XcmVersionedAssets,
25
+ XcmVersionedLocation,
20
26
  SpCoreOpaqueMetadata,
21
27
  SpRuntimeTransactionValidityTransactionValidityError,
22
28
  SpInherentsInherentData,
23
29
  SpInherentsCheckInherentsResult,
24
30
  SpRuntimeTransactionValidityValidTransaction,
25
31
  SpRuntimeTransactionValidityTransactionSource,
26
- PolkadotPrimitivesV6ValidatorAppPublic,
27
- PolkadotPrimitivesV6ValidatorIndex,
28
- PolkadotPrimitivesV6GroupRotationInfo,
29
- PolkadotPrimitivesV6CoreState,
30
- PolkadotPrimitivesV6PersistedValidationData,
32
+ PolkadotPrimitivesV7ValidatorAppPublic,
33
+ PolkadotPrimitivesV7ValidatorIndex,
34
+ PolkadotPrimitivesV7GroupRotationInfo,
35
+ PolkadotPrimitivesV7CoreState,
36
+ PolkadotPrimitivesV7PersistedValidationData,
31
37
  PolkadotParachainPrimitivesPrimitivesId,
32
- PolkadotPrimitivesV6OccupiedCoreAssumption,
38
+ PolkadotPrimitivesV7OccupiedCoreAssumption,
33
39
  PolkadotParachainPrimitivesPrimitivesValidationCodeHash,
34
- PolkadotPrimitivesV6CandidateCommitments,
40
+ PolkadotPrimitivesV7CandidateCommitments,
35
41
  PolkadotParachainPrimitivesPrimitivesValidationCode,
36
- PolkadotPrimitivesV6CommittedCandidateReceipt,
37
- PolkadotPrimitivesV6CandidateEvent,
42
+ PolkadotPrimitivesV7CommittedCandidateReceipt,
43
+ PolkadotPrimitivesV7CandidateEvent,
38
44
  PolkadotCorePrimitivesInboundDownwardMessage,
39
45
  PolkadotCorePrimitivesInboundHrmpMessage,
40
- PolkadotPrimitivesV6ScrapedOnChainVotes,
41
- PolkadotPrimitivesV6SessionInfo,
42
- PolkadotPrimitivesV6PvfCheckStatement,
43
- PolkadotPrimitivesV6ValidatorAppSignature,
46
+ PolkadotPrimitivesV7ScrapedOnChainVotes,
47
+ PolkadotPrimitivesV7SessionInfo,
48
+ PolkadotPrimitivesV7PvfCheckStatement,
49
+ PolkadotPrimitivesV7ValidatorAppSignature,
44
50
  PolkadotCorePrimitivesCandidateHash,
45
- PolkadotPrimitivesV6DisputeState,
46
- PolkadotPrimitivesV6ExecutorParams,
47
- PolkadotPrimitivesV6SlashingPendingSlashes,
48
- PolkadotPrimitivesV6SlashingOpaqueKeyOwnershipProof,
49
- PolkadotPrimitivesV6SlashingDisputeProof,
50
- PolkadotPrimitivesV6AsyncBackingBackingState,
51
- PolkadotPrimitivesV6AsyncBackingAsyncBackingParams,
52
- PolkadotPrimitivesVstagingApprovalVotingParams,
51
+ PolkadotPrimitivesV7DisputeState,
52
+ PolkadotPrimitivesV7ExecutorParams,
53
+ PolkadotPrimitivesV7SlashingPendingSlashes,
54
+ PolkadotPrimitivesV7SlashingOpaqueKeyOwnershipProof,
55
+ PolkadotPrimitivesV7SlashingDisputeProof,
56
+ PolkadotPrimitivesV7AsyncBackingBackingState,
57
+ PolkadotPrimitivesV7AsyncBackingAsyncBackingParams,
58
+ PolkadotPrimitivesV7ApprovalVotingParams,
59
+ PolkadotPrimitivesV7CoreIndex,
53
60
  SpConsensusBeefyValidatorSet,
54
61
  SpConsensusBeefyEquivocationProof,
55
62
  SpConsensusBeefyOpaqueKeyOwnershipProof,
@@ -70,7 +77,6 @@ import type {
70
77
  SpCoreCryptoKeyTypeId,
71
78
  PalletTransactionPaymentRuntimeDispatchInfo,
72
79
  PalletTransactionPaymentFeeDetails,
73
- SpWeightsWeightV2Weight,
74
80
  SpConsensusBeefyMmrBeefyAuthoritySet,
75
81
  } from './types';
76
82
 
@@ -107,6 +113,83 @@ export interface RuntimeApis extends GenericRuntimeApis {
107
113
  **/
108
114
  [method: string]: GenericRuntimeApiMethod;
109
115
  };
116
+ /**
117
+ * @runtimeapi: XcmPaymentApi - 0x6ff52ee858e6c5bd
118
+ **/
119
+ xcmPaymentApi: {
120
+ /**
121
+ * Returns a list of acceptable payment assets.
122
+ *
123
+ * # Arguments
124
+ *
125
+ * * `xcm_version`: Version.
126
+ *
127
+ * @callname: XcmPaymentApi_query_acceptable_payment_assets
128
+ * @param {number} xcm_version
129
+ **/
130
+ queryAcceptablePaymentAssets: GenericRuntimeApiMethod<
131
+ (xcmVersion: number) => Promise<Result<Array<XcmVersionedAssetId>, XcmFeePaymentRuntimeApiError>>
132
+ >;
133
+
134
+ /**
135
+ * Returns a weight needed to execute a XCM.
136
+ *
137
+ * # Arguments
138
+ *
139
+ * * `message`: `VersionedXcm`.
140
+ *
141
+ * @callname: XcmPaymentApi_query_xcm_weight
142
+ * @param {XcmVersionedXcm} message
143
+ **/
144
+ queryXcmWeight: GenericRuntimeApiMethod<
145
+ (message: XcmVersionedXcm) => Promise<Result<SpWeightsWeightV2Weight, XcmFeePaymentRuntimeApiError>>
146
+ >;
147
+
148
+ /**
149
+ * Converts a weight into a fee for the specified `AssetId`.
150
+ *
151
+ * # Arguments
152
+ *
153
+ * * `weight`: convertible `Weight`.
154
+ * * `asset`: `VersionedAssetId`.
155
+ *
156
+ * @callname: XcmPaymentApi_query_weight_to_asset_fee
157
+ * @param {SpWeightsWeightV2Weight} weight
158
+ * @param {XcmVersionedAssetId} asset
159
+ **/
160
+ queryWeightToAssetFee: GenericRuntimeApiMethod<
161
+ (
162
+ weight: SpWeightsWeightV2Weight,
163
+ asset: XcmVersionedAssetId,
164
+ ) => Promise<Result<bigint, XcmFeePaymentRuntimeApiError>>
165
+ >;
166
+
167
+ /**
168
+ * Get delivery fees for sending a specific `message` to a `destination`.
169
+ * These always come in a specific asset, defined by the chain.
170
+ *
171
+ * # Arguments
172
+ * * `message`: The message that'll be sent, necessary because most delivery fees are based on the
173
+ * size of the message.
174
+ * * `destination`: The destination to send the message to. Different destinations may use
175
+ * different senders that charge different fees.
176
+ *
177
+ * @callname: XcmPaymentApi_query_delivery_fees
178
+ * @param {XcmVersionedLocation} destination
179
+ * @param {XcmVersionedXcm} message
180
+ **/
181
+ queryDeliveryFees: GenericRuntimeApiMethod<
182
+ (
183
+ destination: XcmVersionedLocation,
184
+ message: XcmVersionedXcm,
185
+ ) => Promise<Result<XcmVersionedAssets, XcmFeePaymentRuntimeApiError>>
186
+ >;
187
+
188
+ /**
189
+ * Generic runtime api call
190
+ **/
191
+ [method: string]: GenericRuntimeApiMethod;
192
+ };
110
193
  /**
111
194
  * @runtimeapi: Metadata - 0x37e397fc7c91f5e4
112
195
  **/
@@ -256,7 +339,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
256
339
  *
257
340
  * @callname: ParachainHost_validators
258
341
  **/
259
- validators: GenericRuntimeApiMethod<() => Promise<Array<PolkadotPrimitivesV6ValidatorAppPublic>>>;
342
+ validators: GenericRuntimeApiMethod<() => Promise<Array<PolkadotPrimitivesV7ValidatorAppPublic>>>;
260
343
 
261
344
  /**
262
345
  * Returns the validator groups and rotation info localized based on the hypothetical child
@@ -266,7 +349,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
266
349
  * @callname: ParachainHost_validator_groups
267
350
  **/
268
351
  validatorGroups: GenericRuntimeApiMethod<
269
- () => Promise<[Array<Array<PolkadotPrimitivesV6ValidatorIndex>>, PolkadotPrimitivesV6GroupRotationInfo]>
352
+ () => Promise<[Array<Array<PolkadotPrimitivesV7ValidatorIndex>>, PolkadotPrimitivesV7GroupRotationInfo]>
270
353
  >;
271
354
 
272
355
  /**
@@ -275,7 +358,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
275
358
  *
276
359
  * @callname: ParachainHost_availability_cores
277
360
  **/
278
- availabilityCores: GenericRuntimeApiMethod<() => Promise<Array<PolkadotPrimitivesV6CoreState>>>;
361
+ availabilityCores: GenericRuntimeApiMethod<() => Promise<Array<PolkadotPrimitivesV7CoreState>>>;
279
362
 
280
363
  /**
281
364
  * Yields the persisted validation data for the given `ParaId` along with an assumption that
@@ -286,13 +369,13 @@ export interface RuntimeApis extends GenericRuntimeApis {
286
369
  *
287
370
  * @callname: ParachainHost_persisted_validation_data
288
371
  * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
289
- * @param {PolkadotPrimitivesV6OccupiedCoreAssumption} assumption
372
+ * @param {PolkadotPrimitivesV7OccupiedCoreAssumption} assumption
290
373
  **/
291
374
  persistedValidationData: GenericRuntimeApiMethod<
292
375
  (
293
376
  paraId: PolkadotParachainPrimitivesPrimitivesId,
294
- assumption: PolkadotPrimitivesV6OccupiedCoreAssumption,
295
- ) => Promise<PolkadotPrimitivesV6PersistedValidationData | undefined>
377
+ assumption: PolkadotPrimitivesV7OccupiedCoreAssumption,
378
+ ) => Promise<PolkadotPrimitivesV7PersistedValidationData | undefined>
296
379
  >;
297
380
 
298
381
  /**
@@ -309,7 +392,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
309
392
  paraId: PolkadotParachainPrimitivesPrimitivesId,
310
393
  expectedPersistedValidationDataHash: H256,
311
394
  ) => Promise<
312
- | [PolkadotPrimitivesV6PersistedValidationData, PolkadotParachainPrimitivesPrimitivesValidationCodeHash]
395
+ | [PolkadotPrimitivesV7PersistedValidationData, PolkadotParachainPrimitivesPrimitivesValidationCodeHash]
313
396
  | undefined
314
397
  >
315
398
  >;
@@ -319,12 +402,12 @@ export interface RuntimeApis extends GenericRuntimeApis {
319
402
  *
320
403
  * @callname: ParachainHost_check_validation_outputs
321
404
  * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
322
- * @param {PolkadotPrimitivesV6CandidateCommitments} outputs
405
+ * @param {PolkadotPrimitivesV7CandidateCommitments} outputs
323
406
  **/
324
407
  checkValidationOutputs: GenericRuntimeApiMethod<
325
408
  (
326
409
  paraId: PolkadotParachainPrimitivesPrimitivesId,
327
- outputs: PolkadotPrimitivesV6CandidateCommitments,
410
+ outputs: PolkadotPrimitivesV7CandidateCommitments,
328
411
  ) => Promise<boolean>
329
412
  >;
330
413
 
@@ -345,12 +428,12 @@ export interface RuntimeApis extends GenericRuntimeApis {
345
428
  *
346
429
  * @callname: ParachainHost_validation_code
347
430
  * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
348
- * @param {PolkadotPrimitivesV6OccupiedCoreAssumption} assumption
431
+ * @param {PolkadotPrimitivesV7OccupiedCoreAssumption} assumption
349
432
  **/
350
433
  validationCode: GenericRuntimeApiMethod<
351
434
  (
352
435
  paraId: PolkadotParachainPrimitivesPrimitivesId,
353
- assumption: PolkadotPrimitivesV6OccupiedCoreAssumption,
436
+ assumption: PolkadotPrimitivesV7OccupiedCoreAssumption,
354
437
  ) => Promise<PolkadotParachainPrimitivesPrimitivesValidationCode | undefined>
355
438
  >;
356
439
 
@@ -364,7 +447,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
364
447
  candidatePendingAvailability: GenericRuntimeApiMethod<
365
448
  (
366
449
  paraId: PolkadotParachainPrimitivesPrimitivesId,
367
- ) => Promise<PolkadotPrimitivesV6CommittedCandidateReceipt | undefined>
450
+ ) => Promise<PolkadotPrimitivesV7CommittedCandidateReceipt | undefined>
368
451
  >;
369
452
 
370
453
  /**
@@ -372,7 +455,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
372
455
  *
373
456
  * @callname: ParachainHost_candidate_events
374
457
  **/
375
- candidateEvents: GenericRuntimeApiMethod<() => Promise<Array<PolkadotPrimitivesV6CandidateEvent>>>;
458
+ candidateEvents: GenericRuntimeApiMethod<() => Promise<Array<PolkadotPrimitivesV7CandidateEvent>>>;
376
459
 
377
460
  /**
378
461
  * Get all the pending inbound messages in the downward message queue for a para.
@@ -416,7 +499,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
416
499
  *
417
500
  * @callname: ParachainHost_on_chain_votes
418
501
  **/
419
- onChainVotes: GenericRuntimeApiMethod<() => Promise<PolkadotPrimitivesV6ScrapedOnChainVotes | undefined>>;
502
+ onChainVotes: GenericRuntimeApiMethod<() => Promise<PolkadotPrimitivesV7ScrapedOnChainVotes | undefined>>;
420
503
 
421
504
  /**
422
505
  * Get the session info for the given session, if stored.
@@ -426,7 +509,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
426
509
  * @callname: ParachainHost_session_info
427
510
  * @param {number} index
428
511
  **/
429
- sessionInfo: GenericRuntimeApiMethod<(index: number) => Promise<PolkadotPrimitivesV6SessionInfo | undefined>>;
512
+ sessionInfo: GenericRuntimeApiMethod<(index: number) => Promise<PolkadotPrimitivesV7SessionInfo | undefined>>;
430
513
 
431
514
  /**
432
515
  * Submits a PVF pre-checking statement into the transaction pool.
@@ -434,11 +517,11 @@ export interface RuntimeApis extends GenericRuntimeApis {
434
517
  * NOTE: This function is only available since parachain host version 2.
435
518
  *
436
519
  * @callname: ParachainHost_submit_pvf_check_statement
437
- * @param {PolkadotPrimitivesV6PvfCheckStatement} stmt
438
- * @param {PolkadotPrimitivesV6ValidatorAppSignature} signature
520
+ * @param {PolkadotPrimitivesV7PvfCheckStatement} stmt
521
+ * @param {PolkadotPrimitivesV7ValidatorAppSignature} signature
439
522
  **/
440
523
  submitPvfCheckStatement: GenericRuntimeApiMethod<
441
- (stmt: PolkadotPrimitivesV6PvfCheckStatement, signature: PolkadotPrimitivesV6ValidatorAppSignature) => Promise<[]>
524
+ (stmt: PolkadotPrimitivesV7PvfCheckStatement, signature: PolkadotPrimitivesV7ValidatorAppSignature) => Promise<[]>
442
525
  >;
443
526
 
444
527
  /**
@@ -459,12 +542,12 @@ export interface RuntimeApis extends GenericRuntimeApis {
459
542
  *
460
543
  * @callname: ParachainHost_validation_code_hash
461
544
  * @param {PolkadotParachainPrimitivesPrimitivesId} para_id
462
- * @param {PolkadotPrimitivesV6OccupiedCoreAssumption} assumption
545
+ * @param {PolkadotPrimitivesV7OccupiedCoreAssumption} assumption
463
546
  **/
464
547
  validationCodeHash: GenericRuntimeApiMethod<
465
548
  (
466
549
  paraId: PolkadotParachainPrimitivesPrimitivesId,
467
- assumption: PolkadotPrimitivesV6OccupiedCoreAssumption,
550
+ assumption: PolkadotPrimitivesV7OccupiedCoreAssumption,
468
551
  ) => Promise<PolkadotParachainPrimitivesPrimitivesValidationCodeHash | undefined>
469
552
  >;
470
553
 
@@ -474,7 +557,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
474
557
  * @callname: ParachainHost_disputes
475
558
  **/
476
559
  disputes: GenericRuntimeApiMethod<
477
- () => Promise<Array<[number, PolkadotCorePrimitivesCandidateHash, PolkadotPrimitivesV6DisputeState]>>
560
+ () => Promise<Array<[number, PolkadotCorePrimitivesCandidateHash, PolkadotPrimitivesV7DisputeState]>>
478
561
  >;
479
562
 
480
563
  /**
@@ -484,7 +567,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
484
567
  * @param {number} session_index
485
568
  **/
486
569
  sessionExecutorParams: GenericRuntimeApiMethod<
487
- (sessionIndex: number) => Promise<PolkadotPrimitivesV6ExecutorParams | undefined>
570
+ (sessionIndex: number) => Promise<PolkadotPrimitivesV7ExecutorParams | undefined>
488
571
  >;
489
572
 
490
573
  /**
@@ -494,7 +577,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
494
577
  * @callname: ParachainHost_unapplied_slashes
495
578
  **/
496
579
  unappliedSlashes: GenericRuntimeApiMethod<
497
- () => Promise<Array<[number, PolkadotCorePrimitivesCandidateHash, PolkadotPrimitivesV6SlashingPendingSlashes]>>
580
+ () => Promise<Array<[number, PolkadotCorePrimitivesCandidateHash, PolkadotPrimitivesV7SlashingPendingSlashes]>>
498
581
  >;
499
582
 
500
583
  /**
@@ -502,12 +585,12 @@ export interface RuntimeApis extends GenericRuntimeApis {
502
585
  * NOTE: This function is only available since parachain host version 5.
503
586
  *
504
587
  * @callname: ParachainHost_key_ownership_proof
505
- * @param {PolkadotPrimitivesV6ValidatorAppPublic} validator_id
588
+ * @param {PolkadotPrimitivesV7ValidatorAppPublic} validator_id
506
589
  **/
507
590
  keyOwnershipProof: GenericRuntimeApiMethod<
508
591
  (
509
- validatorId: PolkadotPrimitivesV6ValidatorAppPublic,
510
- ) => Promise<PolkadotPrimitivesV6SlashingOpaqueKeyOwnershipProof | undefined>
592
+ validatorId: PolkadotPrimitivesV7ValidatorAppPublic,
593
+ ) => Promise<PolkadotPrimitivesV7SlashingOpaqueKeyOwnershipProof | undefined>
511
594
  >;
512
595
 
513
596
  /**
@@ -516,13 +599,13 @@ export interface RuntimeApis extends GenericRuntimeApis {
516
599
  * NOTE: This function is only available since parachain host version 5.
517
600
  *
518
601
  * @callname: ParachainHost_submit_report_dispute_lost
519
- * @param {PolkadotPrimitivesV6SlashingDisputeProof} dispute_proof
520
- * @param {PolkadotPrimitivesV6SlashingOpaqueKeyOwnershipProof} key_ownership_proof
602
+ * @param {PolkadotPrimitivesV7SlashingDisputeProof} dispute_proof
603
+ * @param {PolkadotPrimitivesV7SlashingOpaqueKeyOwnershipProof} key_ownership_proof
521
604
  **/
522
605
  submitReportDisputeLost: GenericRuntimeApiMethod<
523
606
  (
524
- disputeProof: PolkadotPrimitivesV6SlashingDisputeProof,
525
- keyOwnershipProof: PolkadotPrimitivesV6SlashingOpaqueKeyOwnershipProof,
607
+ disputeProof: PolkadotPrimitivesV7SlashingDisputeProof,
608
+ keyOwnershipProof: PolkadotPrimitivesV7SlashingOpaqueKeyOwnershipProof,
526
609
  ) => Promise<[] | undefined>
527
610
  >;
528
611
 
@@ -543,7 +626,7 @@ export interface RuntimeApis extends GenericRuntimeApis {
543
626
  paraBackingState: GenericRuntimeApiMethod<
544
627
  (
545
628
  undefined: PolkadotParachainPrimitivesPrimitivesId,
546
- ) => Promise<PolkadotPrimitivesV6AsyncBackingBackingState | undefined>
629
+ ) => Promise<PolkadotPrimitivesV7AsyncBackingBackingState | undefined>
547
630
  >;
548
631
 
549
632
  /**
@@ -551,14 +634,14 @@ export interface RuntimeApis extends GenericRuntimeApis {
551
634
  *
552
635
  * @callname: ParachainHost_async_backing_params
553
636
  **/
554
- asyncBackingParams: GenericRuntimeApiMethod<() => Promise<PolkadotPrimitivesV6AsyncBackingAsyncBackingParams>>;
637
+ asyncBackingParams: GenericRuntimeApiMethod<() => Promise<PolkadotPrimitivesV7AsyncBackingAsyncBackingParams>>;
555
638
 
556
639
  /**
557
640
  * Returns a list of all disabled validators at the given block.
558
641
  *
559
642
  * @callname: ParachainHost_disabled_validators
560
643
  **/
561
- disabledValidators: GenericRuntimeApiMethod<() => Promise<Array<PolkadotPrimitivesV6ValidatorIndex>>>;
644
+ disabledValidators: GenericRuntimeApiMethod<() => Promise<Array<PolkadotPrimitivesV7ValidatorIndex>>>;
562
645
 
563
646
  /**
564
647
  * Get node features.
@@ -573,7 +656,16 @@ export interface RuntimeApis extends GenericRuntimeApis {
573
656
  *
574
657
  * @callname: ParachainHost_approval_voting_params
575
658
  **/
576
- approvalVotingParams: GenericRuntimeApiMethod<() => Promise<PolkadotPrimitivesVstagingApprovalVotingParams>>;
659
+ approvalVotingParams: GenericRuntimeApiMethod<() => Promise<PolkadotPrimitivesV7ApprovalVotingParams>>;
660
+
661
+ /**
662
+ * Claim queue
663
+ *
664
+ * @callname: ParachainHost_claim_queue
665
+ **/
666
+ claimQueue: GenericRuntimeApiMethod<
667
+ () => Promise<Array<[PolkadotPrimitivesV7CoreIndex, Array<PolkadotParachainPrimitivesPrimitivesId>]>>
668
+ >;
577
669
 
578
670
  /**
579
671
  * Generic runtime api call