@dedot/chaintypes 0.12.0 → 0.13.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.
package/astar/consts.d.ts CHANGED
@@ -99,7 +99,7 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
99
99
  maxSubAccounts: number;
100
100
 
101
101
  /**
102
- * Maxmimum number of registrars allowed in the system. Needed to bound the complexity
102
+ * Maximum number of registrars allowed in the system. Needed to bound the complexity
103
103
  * of, e.g., updating judgements.
104
104
  **/
105
105
  maxRegistrars: number;
@@ -302,11 +302,15 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
302
302
  /**
303
303
  * The maximum number of locks that should exist on an account.
304
304
  * Not strictly enforced, but used for weight estimation.
305
+ *
306
+ * Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`
305
307
  **/
306
308
  maxLocks: number;
307
309
 
308
310
  /**
309
311
  * The maximum number of named reserves that can exist on an account.
312
+ *
313
+ * Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`
310
314
  **/
311
315
  maxReserves: number;
312
316
 
@@ -554,6 +558,14 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
554
558
  * Pallet `Aura`'s constants
555
559
  **/
556
560
  aura: {
561
+ /**
562
+ * The slot duration Aura should run with, expressed in milliseconds.
563
+ * The effective value of this type should not change while the chain is running.
564
+ *
565
+ * For backwards compatibility either use [`MinimumPeriodTimesTwo`] or a const.
566
+ **/
567
+ slotDuration: bigint;
568
+
557
569
  /**
558
570
  * Generic pallet constant
559
571
  **/
@@ -604,15 +616,6 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
604
616
  **/
605
617
  [name: string]: any;
606
618
  };
607
- /**
608
- * Pallet `DmpQueue`'s constants
609
- **/
610
- dmpQueue: {
611
- /**
612
- * Generic pallet constant
613
- **/
614
- [name: string]: any;
615
- };
616
619
  /**
617
620
  * Pallet `XcAssetConfig`'s constants
618
621
  **/
@@ -671,13 +674,23 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
671
674
 
672
675
  /**
673
676
  * The amount of weight (if any) which should be provided to the message queue for
674
- * servicing enqueued items.
677
+ * servicing enqueued items `on_initialize`.
675
678
  *
676
679
  * This may be legitimately `None` in the case that you will call
677
- * `ServiceQueues::service_queues` manually.
680
+ * `ServiceQueues::service_queues` manually or set [`Self::IdleMaxServiceWeight`] to have
681
+ * it run in `on_idle`.
678
682
  **/
679
683
  serviceWeight: SpWeightsWeightV2Weight | undefined;
680
684
 
685
+ /**
686
+ * The maximum amount of weight (if any) to be used from remaining weight `on_idle` which
687
+ * should be provided to the message queue for servicing enqueued items `on_idle`.
688
+ * Useful for parachains to process messages at the same block they are received.
689
+ *
690
+ * If `None`, it will not call `ServiceQueues::service_queues` in `on_idle`.
691
+ **/
692
+ idleMaxServiceWeight: SpWeightsWeightV2Weight | undefined;
693
+
681
694
  /**
682
695
  * Generic pallet constant
683
696
  **/
package/astar/errors.d.ts CHANGED
@@ -1090,11 +1090,6 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
1090
1090
  **/
1091
1091
  InUse: GenericPalletError<Rv>;
1092
1092
 
1093
- /**
1094
- * Invalid non-concrete asset.
1095
- **/
1096
- InvalidAssetNotConcrete: GenericPalletError<Rv>;
1097
-
1098
1093
  /**
1099
1094
  * Invalid asset, reserve chain could not be determined for it.
1100
1095
  **/
@@ -1589,7 +1584,7 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
1589
1584
  CodeRejected: GenericPalletError<Rv>;
1590
1585
 
1591
1586
  /**
1592
- * An indetermistic code was used in a context where this is not permitted.
1587
+ * An indeterministic code was used in a context where this is not permitted.
1593
1588
  **/
1594
1589
  Indeterministic: GenericPalletError<Rv>;
1595
1590
 
package/astar/events.d.ts CHANGED
@@ -1429,74 +1429,6 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
1429
1429
  **/
1430
1430
  [prop: string]: GenericPalletEvent<Rv>;
1431
1431
  };
1432
- /**
1433
- * Pallet `DmpQueue`'s events
1434
- **/
1435
- dmpQueue: {
1436
- /**
1437
- * The export of pages started.
1438
- **/
1439
- StartedExport: GenericPalletEvent<Rv, 'DmpQueue', 'StartedExport', null>;
1440
-
1441
- /**
1442
- * The export of a page completed.
1443
- **/
1444
- Exported: GenericPalletEvent<Rv, 'DmpQueue', 'Exported', { page: number }>;
1445
-
1446
- /**
1447
- * The export of a page failed.
1448
- *
1449
- * This should never be emitted.
1450
- **/
1451
- ExportFailed: GenericPalletEvent<Rv, 'DmpQueue', 'ExportFailed', { page: number }>;
1452
-
1453
- /**
1454
- * The export of pages completed.
1455
- **/
1456
- CompletedExport: GenericPalletEvent<Rv, 'DmpQueue', 'CompletedExport', null>;
1457
-
1458
- /**
1459
- * The export of overweight messages started.
1460
- **/
1461
- StartedOverweightExport: GenericPalletEvent<Rv, 'DmpQueue', 'StartedOverweightExport', null>;
1462
-
1463
- /**
1464
- * The export of an overweight message completed.
1465
- **/
1466
- ExportedOverweight: GenericPalletEvent<Rv, 'DmpQueue', 'ExportedOverweight', { index: bigint }>;
1467
-
1468
- /**
1469
- * The export of an overweight message failed.
1470
- *
1471
- * This should never be emitted.
1472
- **/
1473
- ExportOverweightFailed: GenericPalletEvent<Rv, 'DmpQueue', 'ExportOverweightFailed', { index: bigint }>;
1474
-
1475
- /**
1476
- * The export of overweight messages completed.
1477
- **/
1478
- CompletedOverweightExport: GenericPalletEvent<Rv, 'DmpQueue', 'CompletedOverweightExport', null>;
1479
-
1480
- /**
1481
- * The cleanup of remaining pallet storage started.
1482
- **/
1483
- StartedCleanup: GenericPalletEvent<Rv, 'DmpQueue', 'StartedCleanup', null>;
1484
-
1485
- /**
1486
- * Some debris was cleaned up.
1487
- **/
1488
- CleanedSome: GenericPalletEvent<Rv, 'DmpQueue', 'CleanedSome', { keysRemoved: number }>;
1489
-
1490
- /**
1491
- * The cleanup of remaining pallet storage completed.
1492
- **/
1493
- Completed: GenericPalletEvent<Rv, 'DmpQueue', 'Completed', { error: boolean }>;
1494
-
1495
- /**
1496
- * Generic pallet event
1497
- **/
1498
- [prop: string]: GenericPalletEvent<Rv>;
1499
- };
1500
1432
  /**
1501
1433
  * Pallet `XcAssetConfig`'s events
1502
1434
  **/
package/astar/index.d.ts CHANGED
@@ -23,7 +23,7 @@ export interface VersionedAstarApi<Rv extends RpcVersion> extends GenericSubstra
23
23
 
24
24
  /**
25
25
  * @name: AstarApi
26
- * @specVersion: 92
26
+ * @specVersion: 94
27
27
  **/
28
28
  export interface AstarApi {
29
29
  legacy: VersionedAstarApi<RpcLegacy>;
package/astar/query.d.ts CHANGED
@@ -29,12 +29,12 @@ import type {
29
29
  PalletProxyAnnouncement,
30
30
  CumulusPalletParachainSystemUnincludedSegmentAncestor,
31
31
  CumulusPalletParachainSystemUnincludedSegmentSegmentTracker,
32
- PolkadotPrimitivesV6PersistedValidationData,
33
- PolkadotPrimitivesV6UpgradeRestriction,
34
- PolkadotPrimitivesV6UpgradeGoAhead,
32
+ PolkadotPrimitivesV7PersistedValidationData,
33
+ PolkadotPrimitivesV7UpgradeRestriction,
34
+ PolkadotPrimitivesV7UpgradeGoAhead,
35
35
  SpTrieStorageProof,
36
36
  CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot,
37
- PolkadotPrimitivesV6AbridgedHostConfiguration,
37
+ PolkadotPrimitivesV7AbridgedHostConfiguration,
38
38
  CumulusPrimitivesParachainInherentMessageQueueChain,
39
39
  PolkadotParachainPrimitivesPrimitivesId,
40
40
  PolkadotCorePrimitivesOutboundHrmpMessage,
@@ -83,7 +83,6 @@ import type {
83
83
  PalletXcmVersionMigrationStage,
84
84
  PalletXcmRemoteLockedFungibleRecord,
85
85
  XcmVersionedAssetId,
86
- CumulusPalletDmpQueueMigrationState,
87
86
  PalletMessageQueueBookState,
88
87
  CumulusPrimitivesCoreAggregateMessageOrigin,
89
88
  PalletMessageQueuePage,
@@ -482,9 +481,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
482
481
  * This value is expected to be set only once per block and it's never stored
483
482
  * in the trie.
484
483
  *
485
- * @param {Callback<PolkadotPrimitivesV6PersistedValidationData | undefined> =} callback
484
+ * @param {Callback<PolkadotPrimitivesV7PersistedValidationData | undefined> =} callback
486
485
  **/
487
- validationData: GenericStorageQuery<Rv, () => PolkadotPrimitivesV6PersistedValidationData | undefined>;
486
+ validationData: GenericStorageQuery<Rv, () => PolkadotPrimitivesV7PersistedValidationData | undefined>;
488
487
 
489
488
  /**
490
489
  * Were the validation data set to notify the relay chain?
@@ -511,9 +510,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
511
510
  * relay-chain. This value is ephemeral which means it doesn't hit the storage. This value is
512
511
  * set after the inherent.
513
512
  *
514
- * @param {Callback<PolkadotPrimitivesV6UpgradeRestriction | undefined> =} callback
513
+ * @param {Callback<PolkadotPrimitivesV7UpgradeRestriction | undefined> =} callback
515
514
  **/
516
- upgradeRestrictionSignal: GenericStorageQuery<Rv, () => PolkadotPrimitivesV6UpgradeRestriction | undefined>;
515
+ upgradeRestrictionSignal: GenericStorageQuery<Rv, () => PolkadotPrimitivesV7UpgradeRestriction | undefined>;
517
516
 
518
517
  /**
519
518
  * Optional upgrade go-ahead signal from the relay-chain.
@@ -522,9 +521,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
522
521
  * relay-chain. This value is ephemeral which means it doesn't hit the storage. This value is
523
522
  * set after the inherent.
524
523
  *
525
- * @param {Callback<PolkadotPrimitivesV6UpgradeGoAhead | undefined> =} callback
524
+ * @param {Callback<PolkadotPrimitivesV7UpgradeGoAhead | undefined> =} callback
526
525
  **/
527
- upgradeGoAhead: GenericStorageQuery<Rv, () => PolkadotPrimitivesV6UpgradeGoAhead | undefined>;
526
+ upgradeGoAhead: GenericStorageQuery<Rv, () => PolkadotPrimitivesV7UpgradeGoAhead | undefined>;
528
527
 
529
528
  /**
530
529
  * The state proof for the last relay parent block.
@@ -562,9 +561,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
562
561
  *
563
562
  * This data is also absent from the genesis.
564
563
  *
565
- * @param {Callback<PolkadotPrimitivesV6AbridgedHostConfiguration | undefined> =} callback
564
+ * @param {Callback<PolkadotPrimitivesV7AbridgedHostConfiguration | undefined> =} callback
566
565
  **/
567
- hostConfiguration: GenericStorageQuery<Rv, () => PolkadotPrimitivesV6AbridgedHostConfiguration | undefined>;
566
+ hostConfiguration: GenericStorageQuery<Rv, () => PolkadotPrimitivesV7AbridgedHostConfiguration | undefined>;
568
567
 
569
568
  /**
570
569
  * The last downward message queue chain head we have observed.
@@ -766,6 +765,8 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
766
765
  * Any liquidity locks on some account balances.
767
766
  * NOTE: Should only be accessed when setting, changing and freeing a lock.
768
767
  *
768
+ * Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`
769
+ *
769
770
  * @param {AccountId32Like} arg
770
771
  * @param {Callback<Array<PalletBalancesBalanceLock>> =} callback
771
772
  **/
@@ -774,6 +775,8 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
774
775
  /**
775
776
  * Named reserves on some account balances.
776
777
  *
778
+ * Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`
779
+ *
777
780
  * @param {AccountId32Like} arg
778
781
  * @param {Callback<Array<PalletBalancesReserveData>> =} callback
779
782
  **/
@@ -1191,9 +1194,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1191
1194
  * Candidates who initiated leave intent or kicked.
1192
1195
  *
1193
1196
  * @param {AccountId32Like} arg
1194
- * @param {Callback<[number, bigint]> =} callback
1197
+ * @param {Callback<[number, bigint] | undefined> =} callback
1195
1198
  **/
1196
- nonCandidates: GenericStorageQuery<Rv, (arg: AccountId32Like) => [number, bigint], AccountId32>;
1199
+ nonCandidates: GenericStorageQuery<Rv, (arg: AccountId32Like) => [number, bigint] | undefined, AccountId32>;
1197
1200
 
1198
1201
  /**
1199
1202
  * Last block authored by collator.
@@ -1569,22 +1572,6 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1569
1572
  **/
1570
1573
  [storage: string]: GenericStorageQuery<Rv>;
1571
1574
  };
1572
- /**
1573
- * Pallet `DmpQueue`'s storage queries
1574
- **/
1575
- dmpQueue: {
1576
- /**
1577
- * The migration state of this pallet.
1578
- *
1579
- * @param {Callback<CumulusPalletDmpQueueMigrationState> =} callback
1580
- **/
1581
- migrationStatus: GenericStorageQuery<Rv, () => CumulusPalletDmpQueueMigrationState>;
1582
-
1583
- /**
1584
- * Generic pallet storage query
1585
- **/
1586
- [storage: string]: GenericStorageQuery<Rv>;
1587
- };
1588
1575
  /**
1589
1576
  * Pallet `XcAssetConfig`'s storage queries
1590
1577
  **/
@@ -4,9 +4,9 @@ import type { GenericRuntimeApis, GenericRuntimeApiMethod, RpcVersion } from 'de
4
4
  import type {
5
5
  RuntimeVersion,
6
6
  Header,
7
+ H256,
7
8
  DispatchError,
8
9
  Result,
9
- H256,
10
10
  AccountId32Like,
11
11
  Bytes,
12
12
  BytesLike,
@@ -20,6 +20,7 @@ import type {
20
20
  SpCoreOpaqueMetadata,
21
21
  SpConsensusSlotsSlotDuration,
22
22
  SpConsensusAuraSr25519AppSr25519Public,
23
+ SpConsensusSlotsSlot,
23
24
  SpRuntimeTransactionValidityTransactionValidityError,
24
25
  FpSelfContainedUncheckedExtrinsic,
25
26
  SpInherentsInherentData,
@@ -46,6 +47,11 @@ import type {
46
47
  PalletContractsWasmDeterminism,
47
48
  PalletContractsPrimitivesContractAccessError,
48
49
  AstarPrimitivesDappStakingRankedTier,
50
+ XcmVersionedAssetId,
51
+ XcmFeePaymentRuntimeApiError,
52
+ XcmVersionedXcm,
53
+ XcmVersionedAssets,
54
+ XcmVersionedLocation,
49
55
  } from './types';
50
56
 
51
57
  export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<Rv> {
@@ -142,6 +148,33 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
142
148
  **/
143
149
  [method: string]: GenericRuntimeApiMethod<Rv>;
144
150
  };
151
+ /**
152
+ * @runtimeapi: AuraUnincludedSegmentApi - 0xd7bdd8a272ca0d65
153
+ **/
154
+ auraUnincludedSegmentApi: {
155
+ /**
156
+ * Whether it is legal to extend the chain, assuming the given block is the most
157
+ * recently included one as-of the relay parent that will be built against, and
158
+ * the given slot.
159
+ *
160
+ * This should be consistent with the logic the runtime uses when validating blocks to
161
+ * avoid issues.
162
+ *
163
+ * When the unincluded segment is empty, i.e. `included_hash == at`, where at is the block
164
+ * whose state we are querying against, this must always return `true` as long as the slot
165
+ * is more recent than the included block itself.
166
+ *
167
+ * @callname: AuraUnincludedSegmentApi_can_build_upon
168
+ * @param {H256} included_hash
169
+ * @param {SpConsensusSlotsSlot} slot
170
+ **/
171
+ canBuildUpon: GenericRuntimeApiMethod<Rv, (includedHash: H256, slot: SpConsensusSlotsSlot) => Promise<boolean>>;
172
+
173
+ /**
174
+ * Generic runtime api call
175
+ **/
176
+ [method: string]: GenericRuntimeApiMethod<Rv>;
177
+ };
145
178
  /**
146
179
  * @runtimeapi: BlockBuilder - 0x40fe3ad401f8959a
147
180
  **/
@@ -772,33 +805,137 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
772
805
  **/
773
806
  [method: string]: GenericRuntimeApiMethod<Rv>;
774
807
  };
808
+ /**
809
+ * @runtimeapi: XcmPaymentApi - 0x6ff52ee858e6c5bd
810
+ **/
811
+ xcmPaymentApi: {
812
+ /**
813
+ * Returns a list of acceptable payment assets.
814
+ *
815
+ * # Arguments
816
+ *
817
+ * * `xcm_version`: Version.
818
+ *
819
+ * @callname: XcmPaymentApi_query_acceptable_payment_assets
820
+ * @param {number} xcm_version
821
+ **/
822
+ queryAcceptablePaymentAssets: GenericRuntimeApiMethod<
823
+ Rv,
824
+ (xcmVersion: number) => Promise<Result<Array<XcmVersionedAssetId>, XcmFeePaymentRuntimeApiError>>
825
+ >;
826
+
827
+ /**
828
+ * Returns a weight needed to execute a XCM.
829
+ *
830
+ * # Arguments
831
+ *
832
+ * * `message`: `VersionedXcm`.
833
+ *
834
+ * @callname: XcmPaymentApi_query_xcm_weight
835
+ * @param {XcmVersionedXcm} message
836
+ **/
837
+ queryXcmWeight: GenericRuntimeApiMethod<
838
+ Rv,
839
+ (message: XcmVersionedXcm) => Promise<Result<SpWeightsWeightV2Weight, XcmFeePaymentRuntimeApiError>>
840
+ >;
841
+
842
+ /**
843
+ * Converts a weight into a fee for the specified `AssetId`.
844
+ *
845
+ * # Arguments
846
+ *
847
+ * * `weight`: convertible `Weight`.
848
+ * * `asset`: `VersionedAssetId`.
849
+ *
850
+ * @callname: XcmPaymentApi_query_weight_to_asset_fee
851
+ * @param {SpWeightsWeightV2Weight} weight
852
+ * @param {XcmVersionedAssetId} asset
853
+ **/
854
+ queryWeightToAssetFee: GenericRuntimeApiMethod<
855
+ Rv,
856
+ (
857
+ weight: SpWeightsWeightV2Weight,
858
+ asset: XcmVersionedAssetId,
859
+ ) => Promise<Result<bigint, XcmFeePaymentRuntimeApiError>>
860
+ >;
861
+
862
+ /**
863
+ * Get delivery fees for sending a specific `message` to a `destination`.
864
+ * These always come in a specific asset, defined by the chain.
865
+ *
866
+ * # Arguments
867
+ * * `message`: The message that'll be sent, necessary because most delivery fees are based on the
868
+ * size of the message.
869
+ * * `destination`: The destination to send the message to. Different destinations may use
870
+ * different senders that charge different fees.
871
+ *
872
+ * @callname: XcmPaymentApi_query_delivery_fees
873
+ * @param {XcmVersionedLocation} destination
874
+ * @param {XcmVersionedXcm} message
875
+ **/
876
+ queryDeliveryFees: GenericRuntimeApiMethod<
877
+ Rv,
878
+ (
879
+ destination: XcmVersionedLocation,
880
+ message: XcmVersionedXcm,
881
+ ) => Promise<Result<XcmVersionedAssets, XcmFeePaymentRuntimeApiError>>
882
+ >;
883
+
884
+ /**
885
+ * Generic runtime api call
886
+ **/
887
+ [method: string]: GenericRuntimeApiMethod<Rv>;
888
+ };
775
889
  /**
776
890
  * @runtimeapi: GenesisBuilder - 0xfbc577b9d747efd6
777
891
  **/
778
892
  genesisBuilder: {
779
893
  /**
780
- * Creates the default `RuntimeGenesisConfig` and returns it as a JSON blob.
894
+ * Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the
895
+ * storage.
781
896
  *
782
- * This function instantiates the default `RuntimeGenesisConfig` struct for the runtime and serializes it into a JSON
783
- * blob. It returns a `Vec<u8>` containing the JSON representation of the default `RuntimeGenesisConfig`.
897
+ * In the case of a FRAME-based runtime, this function deserializes the full `RuntimeGenesisConfig` from the given JSON blob and
898
+ * puts it into the storage. If the provided JSON blob is incorrect or incomplete or the
899
+ * deserialization fails, an error is returned.
784
900
  *
785
- * @callname: GenesisBuilder_create_default_config
901
+ * Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no
902
+ * defaults will be used.
903
+ *
904
+ * @callname: GenesisBuilder_build_state
905
+ * @param {BytesLike} json
786
906
  **/
787
- createDefaultConfig: GenericRuntimeApiMethod<Rv, () => Promise<Bytes>>;
907
+ buildState: GenericRuntimeApiMethod<Rv, (json: BytesLike) => Promise<Result<[], string>>>;
788
908
 
789
909
  /**
790
- * Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the storage.
910
+ * Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by
911
+ * `id`.
791
912
  *
792
- * This function deserializes the full `RuntimeGenesisConfig` from the given JSON blob and puts it into the storage.
793
- * If the provided JSON blob is incorrect or incomplete or the deserialization fails, an error is returned.
794
- * It is recommended to log any errors encountered during the process.
913
+ * If `id` is `None` the function returns JSON blob representation of the default
914
+ * `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default
915
+ * `RuntimeGenesisConfig`.
795
916
  *
796
- * Please note that provided json blob must contain all `RuntimeGenesisConfig` fields, no defaults will be used.
917
+ * Otherwise function returns a JSON representation of the built-in, named
918
+ * `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not
919
+ * exists. Returned `Vec<u8>` contains bytes of JSON blob (patch) which comprises a list of
920
+ * (potentially nested) key-value pairs that are intended for customizing the default
921
+ * runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation
922
+ * of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can
923
+ * be used in `build_state` method.
797
924
  *
798
- * @callname: GenesisBuilder_build_config
799
- * @param {BytesLike} json
925
+ * @callname: GenesisBuilder_get_preset
926
+ * @param {string | undefined} id
927
+ **/
928
+ getPreset: GenericRuntimeApiMethod<Rv, (id?: string | undefined) => Promise<Bytes | undefined>>;
929
+
930
+ /**
931
+ * Returns a list of identifiers for available builtin `RuntimeGenesisConfig` presets.
932
+ *
933
+ * The presets from the list can be queried with [`GenesisBuilder::get_preset`] method. If
934
+ * no named presets are provided by the runtime the list is empty.
935
+ *
936
+ * @callname: GenesisBuilder_preset_names
800
937
  **/
801
- buildConfig: GenericRuntimeApiMethod<Rv, (json: BytesLike) => Promise<Result<[], string>>>;
938
+ presetNames: GenericRuntimeApiMethod<Rv, () => Promise<Array<string>>>;
802
939
 
803
940
  /**
804
941
  * Generic runtime api call
package/astar/tx.d.ts CHANGED
@@ -45,6 +45,8 @@ import type {
45
45
  XcmVersionedAssets,
46
46
  StagingXcmV4Location,
47
47
  XcmV3WeightLimit,
48
+ StagingXcmExecutorAssetTransferTransferType,
49
+ XcmVersionedAssetId,
48
50
  XcmVersionedAsset,
49
51
  CumulusPrimitivesCoreAggregateMessageOrigin,
50
52
  EthereumTransactionTransactionV2,
@@ -2033,7 +2035,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
2033
2035
  *
2034
2036
  * This will waive the transaction fee if at least all but 10% of the accounts needed to
2035
2037
  * be upgraded. (We let some not have to be upgraded just in order to allow for the
2036
- * possibililty of churn).
2038
+ * possibility of churn).
2037
2039
  *
2038
2040
  * @param {Array<AccountId32Like>} who
2039
2041
  **/
@@ -4392,6 +4394,26 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
4392
4394
  >
4393
4395
  >;
4394
4396
 
4397
+ /**
4398
+ * Set slash destination.
4399
+ * Use `Some` to deposit slashed balance into destination or `None` to burn it.
4400
+ *
4401
+ * @param {AccountId32Like | undefined} destination
4402
+ **/
4403
+ setSlashDestination: GenericTxCall<
4404
+ Rv,
4405
+ (destination: AccountId32Like | undefined) => ChainSubmittableExtrinsic<
4406
+ Rv,
4407
+ {
4408
+ pallet: 'CollatorSelection';
4409
+ palletCall: {
4410
+ name: 'SetSlashDestination';
4411
+ params: { destination: AccountId32Like | undefined };
4412
+ };
4413
+ }
4414
+ >
4415
+ >;
4416
+
4395
4417
  /**
4396
4418
  * Generic pallet tx call
4397
4419
  **/
@@ -4863,7 +4885,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
4863
4885
  *
4864
4886
  * Fee payment on the destination side is made from the asset in the `assets` vector of
4865
4887
  * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
4866
- * is needed than `weight_limit`, then the operation will fail and the assets send may be
4888
+ * is needed than `weight_limit`, then the operation will fail and the sent assets may be
4867
4889
  * at risk.
4868
4890
  *
4869
4891
  * - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
@@ -4915,7 +4937,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
4915
4937
  *
4916
4938
  * Fee payment on the destination side is made from the asset in the `assets` vector of
4917
4939
  * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
4918
- * is needed than `weight_limit`, then the operation will fail and the assets send may be
4940
+ * is needed than `weight_limit`, then the operation will fail and the sent assets may be
4919
4941
  * at risk.
4920
4942
  *
4921
4943
  * - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
@@ -4991,7 +5013,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
4991
5013
  * Fee payment on the destination side is made from the asset in the `assets` vector of
4992
5014
  * index `fee_asset_item` (hence referred to as `fees`), up to enough to pay for
4993
5015
  * `weight_limit` of weight. If more weight is needed than `weight_limit`, then the
4994
- * operation will fail and the assets sent may be at risk.
5016
+ * operation will fail and the sent assets may be at risk.
4995
5017
  *
4996
5018
  * `assets` (excluding `fees`) must have same reserve location or otherwise be teleportable
4997
5019
  * to `dest`, no limitations imposed on `fees`.
@@ -5080,23 +5102,102 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
5080
5102
  >;
5081
5103
 
5082
5104
  /**
5083
- * Generic pallet tx call
5105
+ * Transfer assets from the local chain to the destination chain using explicit transfer
5106
+ * types for assets and fees.
5107
+ *
5108
+ * `assets` must have same reserve location or may be teleportable to `dest`. Caller must
5109
+ * provide the `assets_transfer_type` to be used for `assets`:
5110
+ * - `TransferType::LocalReserve`: transfer assets to sovereign account of destination
5111
+ * chain and forward a notification XCM to `dest` to mint and deposit reserve-based
5112
+ * assets to `beneficiary`.
5113
+ * - `TransferType::DestinationReserve`: burn local assets and forward a notification to
5114
+ * `dest` chain to withdraw the reserve assets from this chain's sovereign account and
5115
+ * deposit them to `beneficiary`.
5116
+ * - `TransferType::RemoteReserve(reserve)`: burn local assets, forward XCM to `reserve`
5117
+ * chain to move reserves from this chain's SA to `dest` chain's SA, and forward another
5118
+ * XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. Typically
5119
+ * the remote `reserve` is Asset Hub.
5120
+ * - `TransferType::Teleport`: burn local assets and forward XCM to `dest` chain to
5121
+ * mint/teleport assets and deposit them to `beneficiary`.
5122
+ *
5123
+ * On the destination chain, as well as any intermediary hops, `BuyExecution` is used to
5124
+ * buy execution using transferred `assets` identified by `remote_fees_id`.
5125
+ * Make sure enough of the specified `remote_fees_id` asset is included in the given list
5126
+ * of `assets`. `remote_fees_id` should be enough to pay for `weight_limit`. If more weight
5127
+ * is needed than `weight_limit`, then the operation will fail and the sent assets may be
5128
+ * at risk.
5129
+ *
5130
+ * `remote_fees_id` may use different transfer type than rest of `assets` and can be
5131
+ * specified through `fees_transfer_type`.
5132
+ *
5133
+ * The caller needs to specify what should happen to the transferred assets once they reach
5134
+ * the `dest` chain. This is done through the `custom_xcm_on_dest` parameter, which
5135
+ * contains the instructions to execute on `dest` as a final step.
5136
+ * This is usually as simple as:
5137
+ * `Xcm(vec![DepositAsset { assets: Wild(AllCounted(assets.len())), beneficiary }])`,
5138
+ * but could be something more exotic like sending the `assets` even further.
5139
+ *
5140
+ * - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
5141
+ * - `dest`: Destination context for the assets. Will typically be `[Parent,
5142
+ * Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from
5143
+ * relay to parachain, or `(parents: 2, (GlobalConsensus(..), ..))` to send from
5144
+ * parachain across a bridge to another ecosystem destination.
5145
+ * - `assets`: The assets to be withdrawn. This should include the assets used to pay the
5146
+ * fee on the `dest` (and possibly reserve) chains.
5147
+ * - `assets_transfer_type`: The XCM `TransferType` used to transfer the `assets`.
5148
+ * - `remote_fees_id`: One of the included `assets` to be be used to pay fees.
5149
+ * - `fees_transfer_type`: The XCM `TransferType` used to transfer the `fees` assets.
5150
+ * - `custom_xcm_on_dest`: The XCM to be executed on `dest` chain as the last step of the
5151
+ * transfer, which also determines what happens to the assets on the destination chain.
5152
+ * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
5153
+ *
5154
+ * @param {XcmVersionedLocation} dest
5155
+ * @param {XcmVersionedAssets} assets
5156
+ * @param {StagingXcmExecutorAssetTransferTransferType} assetsTransferType
5157
+ * @param {XcmVersionedAssetId} remoteFeesId
5158
+ * @param {StagingXcmExecutorAssetTransferTransferType} feesTransferType
5159
+ * @param {XcmVersionedXcm} customXcmOnDest
5160
+ * @param {XcmV3WeightLimit} weightLimit
5084
5161
  **/
5085
- [callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
5086
- };
5087
- /**
5088
- * Pallet `CumulusXcm`'s transaction calls
5089
- **/
5090
- cumulusXcm: {
5162
+ transferAssetsUsingTypeAndThen: GenericTxCall<
5163
+ Rv,
5164
+ (
5165
+ dest: XcmVersionedLocation,
5166
+ assets: XcmVersionedAssets,
5167
+ assetsTransferType: StagingXcmExecutorAssetTransferTransferType,
5168
+ remoteFeesId: XcmVersionedAssetId,
5169
+ feesTransferType: StagingXcmExecutorAssetTransferTransferType,
5170
+ customXcmOnDest: XcmVersionedXcm,
5171
+ weightLimit: XcmV3WeightLimit,
5172
+ ) => ChainSubmittableExtrinsic<
5173
+ Rv,
5174
+ {
5175
+ pallet: 'PolkadotXcm';
5176
+ palletCall: {
5177
+ name: 'TransferAssetsUsingTypeAndThen';
5178
+ params: {
5179
+ dest: XcmVersionedLocation;
5180
+ assets: XcmVersionedAssets;
5181
+ assetsTransferType: StagingXcmExecutorAssetTransferTransferType;
5182
+ remoteFeesId: XcmVersionedAssetId;
5183
+ feesTransferType: StagingXcmExecutorAssetTransferTransferType;
5184
+ customXcmOnDest: XcmVersionedXcm;
5185
+ weightLimit: XcmV3WeightLimit;
5186
+ };
5187
+ };
5188
+ }
5189
+ >
5190
+ >;
5191
+
5091
5192
  /**
5092
5193
  * Generic pallet tx call
5093
5194
  **/
5094
5195
  [callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
5095
5196
  };
5096
5197
  /**
5097
- * Pallet `DmpQueue`'s transaction calls
5198
+ * Pallet `CumulusXcm`'s transaction calls
5098
5199
  **/
5099
- dmpQueue: {
5200
+ cumulusXcm: {
5100
5201
  /**
5101
5202
  * Generic pallet tx call
5102
5203
  **/
package/astar/types.d.ts CHANGED
@@ -20,6 +20,7 @@ import type {
20
20
  MultiAddressLike,
21
21
  AccountId32Like,
22
22
  Permill,
23
+ Perbill,
23
24
  Era,
24
25
  Header,
25
26
  UncheckedExtrinsic,
@@ -73,7 +74,6 @@ export type AstarRuntimeRuntimeEvent =
73
74
  | { pallet: 'XcmpQueue'; palletEvent: CumulusPalletXcmpQueueEvent }
74
75
  | { pallet: 'PolkadotXcm'; palletEvent: PalletXcmEvent }
75
76
  | { pallet: 'CumulusXcm'; palletEvent: CumulusPalletXcmEvent }
76
- | { pallet: 'DmpQueue'; palletEvent: CumulusPalletDmpQueueEvent }
77
77
  | { pallet: 'XcAssetConfig'; palletEvent: PalletXcAssetConfigEvent }
78
78
  | { pallet: 'XTokens'; palletEvent: OrmlXtokensModuleEvent }
79
79
  | { pallet: 'MessageQueue'; palletEvent: PalletMessageQueueEvent }
@@ -1463,59 +1463,6 @@ export type CumulusPalletXcmEvent =
1463
1463
  **/
1464
1464
  | { name: 'ExecutedDownward'; data: [FixedBytes<32>, StagingXcmV4TraitsOutcome] };
1465
1465
 
1466
- /**
1467
- * The `Event` enum of this pallet
1468
- **/
1469
- export type CumulusPalletDmpQueueEvent =
1470
- /**
1471
- * The export of pages started.
1472
- **/
1473
- | { name: 'StartedExport' }
1474
- /**
1475
- * The export of a page completed.
1476
- **/
1477
- | { name: 'Exported'; data: { page: number } }
1478
- /**
1479
- * The export of a page failed.
1480
- *
1481
- * This should never be emitted.
1482
- **/
1483
- | { name: 'ExportFailed'; data: { page: number } }
1484
- /**
1485
- * The export of pages completed.
1486
- **/
1487
- | { name: 'CompletedExport' }
1488
- /**
1489
- * The export of overweight messages started.
1490
- **/
1491
- | { name: 'StartedOverweightExport' }
1492
- /**
1493
- * The export of an overweight message completed.
1494
- **/
1495
- | { name: 'ExportedOverweight'; data: { index: bigint } }
1496
- /**
1497
- * The export of an overweight message failed.
1498
- *
1499
- * This should never be emitted.
1500
- **/
1501
- | { name: 'ExportOverweightFailed'; data: { index: bigint } }
1502
- /**
1503
- * The export of overweight messages completed.
1504
- **/
1505
- | { name: 'CompletedOverweightExport' }
1506
- /**
1507
- * The cleanup of remaining pallet storage started.
1508
- **/
1509
- | { name: 'StartedCleanup' }
1510
- /**
1511
- * Some debris was cleaned up.
1512
- **/
1513
- | { name: 'CleanedSome'; data: { keysRemoved: number } }
1514
- /**
1515
- * The cleanup of remaining pallet storage completed.
1516
- **/
1517
- | { name: 'Completed'; data: { error: boolean } };
1518
-
1519
1466
  /**
1520
1467
  * The `Event` enum of this pallet
1521
1468
  **/
@@ -2371,7 +2318,6 @@ export type AstarRuntimeRuntimeCall =
2371
2318
  | { pallet: 'XcmpQueue'; palletCall: CumulusPalletXcmpQueueCall }
2372
2319
  | { pallet: 'PolkadotXcm'; palletCall: PalletXcmCall }
2373
2320
  | { pallet: 'CumulusXcm'; palletCall: CumulusPalletXcmCall }
2374
- | { pallet: 'DmpQueue'; palletCall: CumulusPalletDmpQueueCall }
2375
2321
  | { pallet: 'XcAssetConfig'; palletCall: PalletXcAssetConfigCall }
2376
2322
  | { pallet: 'XTokens'; palletCall: OrmlXtokensModuleCall }
2377
2323
  | { pallet: 'MessageQueue'; palletCall: PalletMessageQueueCall }
@@ -2402,7 +2348,6 @@ export type AstarRuntimeRuntimeCallLike =
2402
2348
  | { pallet: 'XcmpQueue'; palletCall: CumulusPalletXcmpQueueCallLike }
2403
2349
  | { pallet: 'PolkadotXcm'; palletCall: PalletXcmCallLike }
2404
2350
  | { pallet: 'CumulusXcm'; palletCall: CumulusPalletXcmCallLike }
2405
- | { pallet: 'DmpQueue'; palletCall: CumulusPalletDmpQueueCallLike }
2406
2351
  | { pallet: 'XcAssetConfig'; palletCall: PalletXcAssetConfigCallLike }
2407
2352
  | { pallet: 'XTokens'; palletCall: OrmlXtokensModuleCallLike }
2408
2353
  | { pallet: 'MessageQueue'; palletCall: PalletMessageQueueCallLike }
@@ -2901,15 +2846,9 @@ export type PalletIdentityJudgement =
2901
2846
  | { type: 'Erroneous' };
2902
2847
 
2903
2848
  export type SpRuntimeMultiSignature =
2904
- | { type: 'Ed25519'; value: SpCoreEd25519Signature }
2905
- | { type: 'Sr25519'; value: SpCoreSr25519Signature }
2906
- | { type: 'Ecdsa'; value: SpCoreEcdsaSignature };
2907
-
2908
- export type SpCoreEd25519Signature = FixedBytes<64>;
2909
-
2910
- export type SpCoreSr25519Signature = FixedBytes<64>;
2911
-
2912
- export type SpCoreEcdsaSignature = FixedBytes<65>;
2849
+ | { type: 'Ed25519'; value: FixedBytes<64> }
2850
+ | { type: 'Sr25519'; value: FixedBytes<64> }
2851
+ | { type: 'Ecdsa'; value: FixedBytes<65> };
2913
2852
 
2914
2853
  /**
2915
2854
  * Contains a variant per dispatchable extrinsic that this pallet has.
@@ -3665,13 +3604,13 @@ export type CumulusPalletParachainSystemCallLike =
3665
3604
  | { name: 'EnactAuthorizedUpgrade'; params: { code: BytesLike } };
3666
3605
 
3667
3606
  export type CumulusPrimitivesParachainInherentParachainInherentData = {
3668
- validationData: PolkadotPrimitivesV6PersistedValidationData;
3607
+ validationData: PolkadotPrimitivesV7PersistedValidationData;
3669
3608
  relayChainState: SpTrieStorageProof;
3670
3609
  downwardMessages: Array<PolkadotCorePrimitivesInboundDownwardMessage>;
3671
3610
  horizontalMessages: Array<[PolkadotParachainPrimitivesPrimitivesId, Array<PolkadotCorePrimitivesInboundHrmpMessage>]>;
3672
3611
  };
3673
3612
 
3674
- export type PolkadotPrimitivesV6PersistedValidationData = {
3613
+ export type PolkadotPrimitivesV7PersistedValidationData = {
3675
3614
  parentHead: PolkadotParachainPrimitivesPrimitivesHeadData;
3676
3615
  relayParentNumber: number;
3677
3616
  relayParentStorageRoot: H256;
@@ -3753,7 +3692,7 @@ export type PalletBalancesCall =
3753
3692
  *
3754
3693
  * This will waive the transaction fee if at least all but 10% of the accounts needed to
3755
3694
  * be upgraded. (We let some not have to be upgraded just in order to allow for the
3756
- * possibililty of churn).
3695
+ * possibility of churn).
3757
3696
  **/
3758
3697
  | { name: 'UpgradeAccounts'; params: { who: Array<AccountId32> } }
3759
3698
  /**
@@ -3829,7 +3768,7 @@ export type PalletBalancesCallLike =
3829
3768
  *
3830
3769
  * This will waive the transaction fee if at least all but 10% of the accounts needed to
3831
3770
  * be upgraded. (We let some not have to be upgraded just in order to allow for the
3832
- * possibililty of churn).
3771
+ * possibility of churn).
3833
3772
  **/
3834
3773
  | { name: 'UpgradeAccounts'; params: { who: Array<AccountId32Like> } }
3835
3774
  /**
@@ -5674,7 +5613,12 @@ export type PalletCollatorSelectionCall =
5674
5613
  * Withdraw `CandidacyBond` after un-bonding period has finished.
5675
5614
  * This call will fail called during un-bonding or if there's no `CandidacyBound` reserved.
5676
5615
  **/
5677
- | { name: 'WithdrawBond' };
5616
+ | { name: 'WithdrawBond' }
5617
+ /**
5618
+ * Set slash destination.
5619
+ * Use `Some` to deposit slashed balance into destination or `None` to burn it.
5620
+ **/
5621
+ | { name: 'SetSlashDestination'; params: { destination?: AccountId32 | undefined } };
5678
5622
 
5679
5623
  export type PalletCollatorSelectionCallLike =
5680
5624
  /**
@@ -5711,7 +5655,12 @@ export type PalletCollatorSelectionCallLike =
5711
5655
  * Withdraw `CandidacyBond` after un-bonding period has finished.
5712
5656
  * This call will fail called during un-bonding or if there's no `CandidacyBound` reserved.
5713
5657
  **/
5714
- | { name: 'WithdrawBond' };
5658
+ | { name: 'WithdrawBond' }
5659
+ /**
5660
+ * Set slash destination.
5661
+ * Use `Some` to deposit slashed balance into destination or `None` to burn it.
5662
+ **/
5663
+ | { name: 'SetSlashDestination'; params: { destination?: AccountId32Like | undefined } };
5715
5664
 
5716
5665
  /**
5717
5666
  * Contains a variant per dispatchable extrinsic that this pallet has.
@@ -5776,9 +5725,7 @@ export type PalletSessionCallLike =
5776
5725
 
5777
5726
  export type AstarRuntimeSessionKeys = { aura: SpConsensusAuraSr25519AppSr25519Public };
5778
5727
 
5779
- export type SpConsensusAuraSr25519AppSr25519Public = SpCoreSr25519Public;
5780
-
5781
- export type SpCoreSr25519Public = FixedBytes<32>;
5728
+ export type SpConsensusAuraSr25519AppSr25519Public = FixedBytes<32>;
5782
5729
 
5783
5730
  /**
5784
5731
  * Contains a variant per dispatchable extrinsic that this pallet has.
@@ -5999,7 +5946,7 @@ export type PalletXcmCall =
5999
5946
  *
6000
5947
  * Fee payment on the destination side is made from the asset in the `assets` vector of
6001
5948
  * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
6002
- * is needed than `weight_limit`, then the operation will fail and the assets send may be
5949
+ * is needed than `weight_limit`, then the operation will fail and the sent assets may be
6003
5950
  * at risk.
6004
5951
  *
6005
5952
  * - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
@@ -6029,7 +5976,7 @@ export type PalletXcmCall =
6029
5976
  *
6030
5977
  * Fee payment on the destination side is made from the asset in the `assets` vector of
6031
5978
  * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
6032
- * is needed than `weight_limit`, then the operation will fail and the assets send may be
5979
+ * is needed than `weight_limit`, then the operation will fail and the sent assets may be
6033
5980
  * at risk.
6034
5981
  *
6035
5982
  * - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
@@ -6068,7 +6015,7 @@ export type PalletXcmCall =
6068
6015
  * Fee payment on the destination side is made from the asset in the `assets` vector of
6069
6016
  * index `fee_asset_item` (hence referred to as `fees`), up to enough to pay for
6070
6017
  * `weight_limit` of weight. If more weight is needed than `weight_limit`, then the
6071
- * operation will fail and the assets sent may be at risk.
6018
+ * operation will fail and the sent assets may be at risk.
6072
6019
  *
6073
6020
  * `assets` (excluding `fees`) must have same reserve location or otherwise be teleportable
6074
6021
  * to `dest`, no limitations imposed on `fees`.
@@ -6114,7 +6061,69 @@ export type PalletXcmCall =
6114
6061
  * was the latest when they were trapped.
6115
6062
  * - `beneficiary`: The location/account where the claimed assets will be deposited.
6116
6063
  **/
6117
- | { name: 'ClaimAssets'; params: { assets: XcmVersionedAssets; beneficiary: XcmVersionedLocation } };
6064
+ | { name: 'ClaimAssets'; params: { assets: XcmVersionedAssets; beneficiary: XcmVersionedLocation } }
6065
+ /**
6066
+ * Transfer assets from the local chain to the destination chain using explicit transfer
6067
+ * types for assets and fees.
6068
+ *
6069
+ * `assets` must have same reserve location or may be teleportable to `dest`. Caller must
6070
+ * provide the `assets_transfer_type` to be used for `assets`:
6071
+ * - `TransferType::LocalReserve`: transfer assets to sovereign account of destination
6072
+ * chain and forward a notification XCM to `dest` to mint and deposit reserve-based
6073
+ * assets to `beneficiary`.
6074
+ * - `TransferType::DestinationReserve`: burn local assets and forward a notification to
6075
+ * `dest` chain to withdraw the reserve assets from this chain's sovereign account and
6076
+ * deposit them to `beneficiary`.
6077
+ * - `TransferType::RemoteReserve(reserve)`: burn local assets, forward XCM to `reserve`
6078
+ * chain to move reserves from this chain's SA to `dest` chain's SA, and forward another
6079
+ * XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. Typically
6080
+ * the remote `reserve` is Asset Hub.
6081
+ * - `TransferType::Teleport`: burn local assets and forward XCM to `dest` chain to
6082
+ * mint/teleport assets and deposit them to `beneficiary`.
6083
+ *
6084
+ * On the destination chain, as well as any intermediary hops, `BuyExecution` is used to
6085
+ * buy execution using transferred `assets` identified by `remote_fees_id`.
6086
+ * Make sure enough of the specified `remote_fees_id` asset is included in the given list
6087
+ * of `assets`. `remote_fees_id` should be enough to pay for `weight_limit`. If more weight
6088
+ * is needed than `weight_limit`, then the operation will fail and the sent assets may be
6089
+ * at risk.
6090
+ *
6091
+ * `remote_fees_id` may use different transfer type than rest of `assets` and can be
6092
+ * specified through `fees_transfer_type`.
6093
+ *
6094
+ * The caller needs to specify what should happen to the transferred assets once they reach
6095
+ * the `dest` chain. This is done through the `custom_xcm_on_dest` parameter, which
6096
+ * contains the instructions to execute on `dest` as a final step.
6097
+ * This is usually as simple as:
6098
+ * `Xcm(vec![DepositAsset { assets: Wild(AllCounted(assets.len())), beneficiary }])`,
6099
+ * but could be something more exotic like sending the `assets` even further.
6100
+ *
6101
+ * - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
6102
+ * - `dest`: Destination context for the assets. Will typically be `[Parent,
6103
+ * Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from
6104
+ * relay to parachain, or `(parents: 2, (GlobalConsensus(..), ..))` to send from
6105
+ * parachain across a bridge to another ecosystem destination.
6106
+ * - `assets`: The assets to be withdrawn. This should include the assets used to pay the
6107
+ * fee on the `dest` (and possibly reserve) chains.
6108
+ * - `assets_transfer_type`: The XCM `TransferType` used to transfer the `assets`.
6109
+ * - `remote_fees_id`: One of the included `assets` to be be used to pay fees.
6110
+ * - `fees_transfer_type`: The XCM `TransferType` used to transfer the `fees` assets.
6111
+ * - `custom_xcm_on_dest`: The XCM to be executed on `dest` chain as the last step of the
6112
+ * transfer, which also determines what happens to the assets on the destination chain.
6113
+ * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
6114
+ **/
6115
+ | {
6116
+ name: 'TransferAssetsUsingTypeAndThen';
6117
+ params: {
6118
+ dest: XcmVersionedLocation;
6119
+ assets: XcmVersionedAssets;
6120
+ assetsTransferType: StagingXcmExecutorAssetTransferTransferType;
6121
+ remoteFeesId: XcmVersionedAssetId;
6122
+ feesTransferType: StagingXcmExecutorAssetTransferTransferType;
6123
+ customXcmOnDest: XcmVersionedXcm;
6124
+ weightLimit: XcmV3WeightLimit;
6125
+ };
6126
+ };
6118
6127
 
6119
6128
  export type PalletXcmCallLike =
6120
6129
  | { name: 'Send'; params: { dest: XcmVersionedLocation; message: XcmVersionedXcm } }
@@ -6249,7 +6258,7 @@ export type PalletXcmCallLike =
6249
6258
  *
6250
6259
  * Fee payment on the destination side is made from the asset in the `assets` vector of
6251
6260
  * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
6252
- * is needed than `weight_limit`, then the operation will fail and the assets send may be
6261
+ * is needed than `weight_limit`, then the operation will fail and the sent assets may be
6253
6262
  * at risk.
6254
6263
  *
6255
6264
  * - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
@@ -6279,7 +6288,7 @@ export type PalletXcmCallLike =
6279
6288
  *
6280
6289
  * Fee payment on the destination side is made from the asset in the `assets` vector of
6281
6290
  * index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
6282
- * is needed than `weight_limit`, then the operation will fail and the assets send may be
6291
+ * is needed than `weight_limit`, then the operation will fail and the sent assets may be
6283
6292
  * at risk.
6284
6293
  *
6285
6294
  * - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
@@ -6318,7 +6327,7 @@ export type PalletXcmCallLike =
6318
6327
  * Fee payment on the destination side is made from the asset in the `assets` vector of
6319
6328
  * index `fee_asset_item` (hence referred to as `fees`), up to enough to pay for
6320
6329
  * `weight_limit` of weight. If more weight is needed than `weight_limit`, then the
6321
- * operation will fail and the assets sent may be at risk.
6330
+ * operation will fail and the sent assets may be at risk.
6322
6331
  *
6323
6332
  * `assets` (excluding `fees`) must have same reserve location or otherwise be teleportable
6324
6333
  * to `dest`, no limitations imposed on `fees`.
@@ -6364,7 +6373,69 @@ export type PalletXcmCallLike =
6364
6373
  * was the latest when they were trapped.
6365
6374
  * - `beneficiary`: The location/account where the claimed assets will be deposited.
6366
6375
  **/
6367
- | { name: 'ClaimAssets'; params: { assets: XcmVersionedAssets; beneficiary: XcmVersionedLocation } };
6376
+ | { name: 'ClaimAssets'; params: { assets: XcmVersionedAssets; beneficiary: XcmVersionedLocation } }
6377
+ /**
6378
+ * Transfer assets from the local chain to the destination chain using explicit transfer
6379
+ * types for assets and fees.
6380
+ *
6381
+ * `assets` must have same reserve location or may be teleportable to `dest`. Caller must
6382
+ * provide the `assets_transfer_type` to be used for `assets`:
6383
+ * - `TransferType::LocalReserve`: transfer assets to sovereign account of destination
6384
+ * chain and forward a notification XCM to `dest` to mint and deposit reserve-based
6385
+ * assets to `beneficiary`.
6386
+ * - `TransferType::DestinationReserve`: burn local assets and forward a notification to
6387
+ * `dest` chain to withdraw the reserve assets from this chain's sovereign account and
6388
+ * deposit them to `beneficiary`.
6389
+ * - `TransferType::RemoteReserve(reserve)`: burn local assets, forward XCM to `reserve`
6390
+ * chain to move reserves from this chain's SA to `dest` chain's SA, and forward another
6391
+ * XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. Typically
6392
+ * the remote `reserve` is Asset Hub.
6393
+ * - `TransferType::Teleport`: burn local assets and forward XCM to `dest` chain to
6394
+ * mint/teleport assets and deposit them to `beneficiary`.
6395
+ *
6396
+ * On the destination chain, as well as any intermediary hops, `BuyExecution` is used to
6397
+ * buy execution using transferred `assets` identified by `remote_fees_id`.
6398
+ * Make sure enough of the specified `remote_fees_id` asset is included in the given list
6399
+ * of `assets`. `remote_fees_id` should be enough to pay for `weight_limit`. If more weight
6400
+ * is needed than `weight_limit`, then the operation will fail and the sent assets may be
6401
+ * at risk.
6402
+ *
6403
+ * `remote_fees_id` may use different transfer type than rest of `assets` and can be
6404
+ * specified through `fees_transfer_type`.
6405
+ *
6406
+ * The caller needs to specify what should happen to the transferred assets once they reach
6407
+ * the `dest` chain. This is done through the `custom_xcm_on_dest` parameter, which
6408
+ * contains the instructions to execute on `dest` as a final step.
6409
+ * This is usually as simple as:
6410
+ * `Xcm(vec![DepositAsset { assets: Wild(AllCounted(assets.len())), beneficiary }])`,
6411
+ * but could be something more exotic like sending the `assets` even further.
6412
+ *
6413
+ * - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
6414
+ * - `dest`: Destination context for the assets. Will typically be `[Parent,
6415
+ * Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from
6416
+ * relay to parachain, or `(parents: 2, (GlobalConsensus(..), ..))` to send from
6417
+ * parachain across a bridge to another ecosystem destination.
6418
+ * - `assets`: The assets to be withdrawn. This should include the assets used to pay the
6419
+ * fee on the `dest` (and possibly reserve) chains.
6420
+ * - `assets_transfer_type`: The XCM `TransferType` used to transfer the `assets`.
6421
+ * - `remote_fees_id`: One of the included `assets` to be be used to pay fees.
6422
+ * - `fees_transfer_type`: The XCM `TransferType` used to transfer the `fees` assets.
6423
+ * - `custom_xcm_on_dest`: The XCM to be executed on `dest` chain as the last step of the
6424
+ * transfer, which also determines what happens to the assets on the destination chain.
6425
+ * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
6426
+ **/
6427
+ | {
6428
+ name: 'TransferAssetsUsingTypeAndThen';
6429
+ params: {
6430
+ dest: XcmVersionedLocation;
6431
+ assets: XcmVersionedAssets;
6432
+ assetsTransferType: StagingXcmExecutorAssetTransferTransferType;
6433
+ remoteFeesId: XcmVersionedAssetId;
6434
+ feesTransferType: StagingXcmExecutorAssetTransferTransferType;
6435
+ customXcmOnDest: XcmVersionedXcm;
6436
+ weightLimit: XcmV3WeightLimit;
6437
+ };
6438
+ };
6368
6439
 
6369
6440
  export type XcmVersionedXcm =
6370
6441
  | { type: 'V2'; value: XcmV2Xcm }
@@ -6625,19 +6696,22 @@ export type XcmV3MultiassetWildMultiAsset =
6625
6696
 
6626
6697
  export type XcmV3MultiassetWildFungibility = 'Fungible' | 'NonFungible';
6627
6698
 
6628
- /**
6629
- * Contains a variant per dispatchable extrinsic that this pallet has.
6630
- **/
6631
- export type CumulusPalletXcmCall = null;
6699
+ export type StagingXcmExecutorAssetTransferTransferType =
6700
+ | { type: 'Teleport' }
6701
+ | { type: 'LocalReserve' }
6702
+ | { type: 'DestinationReserve' }
6703
+ | { type: 'RemoteReserve'; value: XcmVersionedLocation };
6632
6704
 
6633
- export type CumulusPalletXcmCallLike = null;
6705
+ export type XcmVersionedAssetId =
6706
+ | { type: 'V3'; value: XcmV3MultiassetAssetId }
6707
+ | { type: 'V4'; value: StagingXcmV4AssetAssetId };
6634
6708
 
6635
6709
  /**
6636
6710
  * Contains a variant per dispatchable extrinsic that this pallet has.
6637
6711
  **/
6638
- export type CumulusPalletDmpQueueCall = null;
6712
+ export type CumulusPalletXcmCall = null;
6639
6713
 
6640
- export type CumulusPalletDmpQueueCallLike = null;
6714
+ export type CumulusPalletXcmCallLike = null;
6641
6715
 
6642
6716
  /**
6643
6717
  * Contains a variant per dispatchable extrinsic that this pallet has.
@@ -7988,7 +8062,7 @@ export type PalletProxyError =
7988
8062
  export type CumulusPalletParachainSystemUnincludedSegmentAncestor = {
7989
8063
  usedBandwidth: CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth;
7990
8064
  paraHeadHash?: H256 | undefined;
7991
- consumedGoAheadSignal?: PolkadotPrimitivesV6UpgradeGoAhead | undefined;
8065
+ consumedGoAheadSignal?: PolkadotPrimitivesV7UpgradeGoAhead | undefined;
7992
8066
  };
7993
8067
 
7994
8068
  export type CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth = {
@@ -8001,21 +8075,21 @@ export type CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth = {
8001
8075
 
8002
8076
  export type CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate = { msgCount: number; totalBytes: number };
8003
8077
 
8004
- export type PolkadotPrimitivesV6UpgradeGoAhead = 'Abort' | 'GoAhead';
8078
+ export type PolkadotPrimitivesV7UpgradeGoAhead = 'Abort' | 'GoAhead';
8005
8079
 
8006
8080
  export type CumulusPalletParachainSystemUnincludedSegmentSegmentTracker = {
8007
8081
  usedBandwidth: CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth;
8008
8082
  hrmpWatermark?: number | undefined;
8009
- consumedGoAheadSignal?: PolkadotPrimitivesV6UpgradeGoAhead | undefined;
8083
+ consumedGoAheadSignal?: PolkadotPrimitivesV7UpgradeGoAhead | undefined;
8010
8084
  };
8011
8085
 
8012
- export type PolkadotPrimitivesV6UpgradeRestriction = 'Present';
8086
+ export type PolkadotPrimitivesV7UpgradeRestriction = 'Present';
8013
8087
 
8014
8088
  export type CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot = {
8015
8089
  dmqMqcHead: H256;
8016
8090
  relayDispatchQueueRemainingCapacity: CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity;
8017
- ingressChannels: Array<[PolkadotParachainPrimitivesPrimitivesId, PolkadotPrimitivesV6AbridgedHrmpChannel]>;
8018
- egressChannels: Array<[PolkadotParachainPrimitivesPrimitivesId, PolkadotPrimitivesV6AbridgedHrmpChannel]>;
8091
+ ingressChannels: Array<[PolkadotParachainPrimitivesPrimitivesId, PolkadotPrimitivesV7AbridgedHrmpChannel]>;
8092
+ egressChannels: Array<[PolkadotParachainPrimitivesPrimitivesId, PolkadotPrimitivesV7AbridgedHrmpChannel]>;
8019
8093
  };
8020
8094
 
8021
8095
  export type CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity = {
@@ -8023,7 +8097,7 @@ export type CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRema
8023
8097
  remainingSize: number;
8024
8098
  };
8025
8099
 
8026
- export type PolkadotPrimitivesV6AbridgedHrmpChannel = {
8100
+ export type PolkadotPrimitivesV7AbridgedHrmpChannel = {
8027
8101
  maxCapacity: number;
8028
8102
  maxTotalSize: number;
8029
8103
  maxMessageSize: number;
@@ -8032,7 +8106,7 @@ export type PolkadotPrimitivesV6AbridgedHrmpChannel = {
8032
8106
  mqcHead?: H256 | undefined;
8033
8107
  };
8034
8108
 
8035
- export type PolkadotPrimitivesV6AbridgedHostConfiguration = {
8109
+ export type PolkadotPrimitivesV7AbridgedHostConfiguration = {
8036
8110
  maxCodeSize: number;
8037
8111
  maxHeadDataSize: number;
8038
8112
  maxUpwardQueueCount: number;
@@ -8042,10 +8116,10 @@ export type PolkadotPrimitivesV6AbridgedHostConfiguration = {
8042
8116
  hrmpMaxMessageNumPerCandidate: number;
8043
8117
  validationUpgradeCooldown: number;
8044
8118
  validationUpgradeDelay: number;
8045
- asyncBackingParams: PolkadotPrimitivesV6AsyncBackingAsyncBackingParams;
8119
+ asyncBackingParams: PolkadotPrimitivesV7AsyncBackingAsyncBackingParams;
8046
8120
  };
8047
8121
 
8048
- export type PolkadotPrimitivesV6AsyncBackingAsyncBackingParams = {
8122
+ export type PolkadotPrimitivesV7AsyncBackingAsyncBackingParams = {
8049
8123
  maxCandidateDepth: number;
8050
8124
  allowedAncestryLen: number;
8051
8125
  };
@@ -8271,14 +8345,13 @@ export type PalletDappStakingV3TierParameters = {
8271
8345
  };
8272
8346
 
8273
8347
  export type PalletDappStakingV3TierThreshold =
8274
- | { type: 'FixedTvlAmount'; value: { amount: bigint } }
8275
- | { type: 'DynamicTvlAmount'; value: { amount: bigint; minimumAmount: bigint } };
8348
+ | { type: 'FixedPercentage'; value: { requiredPercentage: Perbill } }
8349
+ | { type: 'DynamicPercentage'; value: { percentage: Perbill; minimumRequiredPercentage: Perbill } };
8276
8350
 
8277
8351
  export type PalletDappStakingV3TiersConfiguration = {
8278
- numberOfSlots: number;
8279
8352
  slotsPerTier: Array<number>;
8280
8353
  rewardPortion: Array<Permill>;
8281
- tierThresholds: Array<PalletDappStakingV3TierThreshold>;
8354
+ tierThresholds: Array<bigint>;
8282
8355
  };
8283
8356
 
8284
8357
  export type PalletDappStakingV3DAppTierRewards = {
@@ -8757,10 +8830,6 @@ export type PalletXcmVersionMigrationStage =
8757
8830
  | { type: 'NotifyCurrentTargets'; value?: Bytes | undefined }
8758
8831
  | { type: 'MigrateAndNotifyOldTargets' };
8759
8832
 
8760
- export type XcmVersionedAssetId =
8761
- | { type: 'V3'; value: XcmV3MultiassetAssetId }
8762
- | { type: 'V4'; value: StagingXcmV4AssetAssetId };
8763
-
8764
8833
  export type PalletXcmRemoteLockedFungibleRecord = {
8765
8834
  amount: bigint;
8766
8835
  owner: XcmVersionedLocation;
@@ -8855,10 +8924,6 @@ export type PalletXcmError =
8855
8924
  * The unlock operation cannot succeed because there are still consumers of the lock.
8856
8925
  **/
8857
8926
  | 'InUse'
8858
- /**
8859
- * Invalid non-concrete asset.
8860
- **/
8861
- | 'InvalidAssetNotConcrete'
8862
8927
  /**
8863
8928
  * Invalid asset, reserve chain could not be determined for it.
8864
8929
  **/
@@ -8876,15 +8941,6 @@ export type PalletXcmError =
8876
8941
  **/
8877
8942
  | 'LocalExecutionIncomplete';
8878
8943
 
8879
- export type CumulusPalletDmpQueueMigrationState =
8880
- | { type: 'NotStarted' }
8881
- | { type: 'StartedExport'; value: { nextBeginUsed: number } }
8882
- | { type: 'CompletedExport' }
8883
- | { type: 'StartedOverweightExport'; value: { nextOverweightIndex: bigint } }
8884
- | { type: 'CompletedOverweightExport' }
8885
- | { type: 'StartedCleanup'; value: { cursor?: Bytes | undefined } }
8886
- | { type: 'Completed' };
8887
-
8888
8944
  /**
8889
8945
  * The `Error` enum of this pallet.
8890
8946
  **/
@@ -9457,7 +9513,7 @@ export type PalletContractsError =
9457
9513
  **/
9458
9514
  | 'CodeRejected'
9459
9515
  /**
9460
- * An indetermistic code was used in a context where this is not permitted.
9516
+ * An indeterministic code was used in a context where this is not permitted.
9461
9517
  **/
9462
9518
  | 'Indeterministic'
9463
9519
  /**
@@ -9646,6 +9702,14 @@ export type PalletContractsPrimitivesCodeUploadReturnValue = { codeHash: H256; d
9646
9702
 
9647
9703
  export type PalletContractsPrimitivesContractAccessError = 'DoesntExist' | 'KeyDecodingFailed' | 'MigrationInProgress';
9648
9704
 
9705
+ export type XcmFeePaymentRuntimeApiError =
9706
+ | 'Unimplemented'
9707
+ | 'VersionedConversionFailed'
9708
+ | 'WeightNotComputable'
9709
+ | 'UnhandledXcmVersion'
9710
+ | 'AssetNotFound'
9711
+ | 'Unroutable';
9712
+
9649
9713
  export type AstarRuntimeRuntimeError =
9650
9714
  | { pallet: 'System'; palletError: FrameSystemError }
9651
9715
  | { pallet: 'Utility'; palletError: PalletUtilityError }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dedot/chaintypes",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Types for substrate-based chains",
5
5
  "author": "Thang X. Vu <thang@coongcrafts.io>",
6
6
  "main": "",
@@ -19,7 +19,7 @@
19
19
  "directory": "dist"
20
20
  },
21
21
  "license": "Apache-2.0",
22
- "gitHead": "a13655e8a823772147ecd2ccf6d9b28197c223d1",
22
+ "gitHead": "56bcab7863c2121353e8d6cb6631c139bc67bfc5",
23
23
  "module": "./index.js",
24
24
  "types": "./index.d.ts"
25
25
  }