@dedot/chaintypes 0.157.0 → 0.158.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.
@@ -29,6 +29,7 @@ import type {
29
29
  PolkadotPrimitivesV8AbridgedHostConfiguration,
30
30
  CumulusPrimitivesParachainInherentMessageQueueChain,
31
31
  PolkadotParachainPrimitivesPrimitivesId,
32
+ CumulusPalletParachainSystemParachainInherentInboundMessageId,
32
33
  PolkadotCorePrimitivesOutboundHrmpMessage,
33
34
  PalletBalancesAccountData,
34
35
  PalletBalancesBalanceLock,
@@ -57,6 +58,7 @@ import type {
57
58
  PalletMessageQueueBookState,
58
59
  CumulusPrimitivesCoreAggregateMessageOrigin,
59
60
  PalletMessageQueuePage,
61
+ SnowbridgeCoreOperatingModeBasicOperatingMode,
60
62
  PalletMultisigMultisig,
61
63
  PalletProxyProxyDefinition,
62
64
  PalletProxyAnnouncement,
@@ -78,7 +80,7 @@ import type {
78
80
  PalletNftsPendingSwap,
79
81
  PalletNftsCollectionConfig,
80
82
  PalletNftsItemConfig,
81
- StagingXcmV4Location,
83
+ StagingXcmV5Location,
82
84
  PalletAssetConversionPoolInfo,
83
85
  PalletStateTrieMigrationMigrationTask,
84
86
  PalletStateTrieMigrationMigrationLimits,
@@ -426,14 +428,36 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
426
428
  processedDownwardMessages: GenericStorageQuery<Rv, () => number>;
427
429
 
428
430
  /**
429
- * HRMP watermark that was set in a block.
431
+ * The last processed downward message.
430
432
  *
431
- * This will be cleared in `on_initialize` of each new block.
433
+ * We need to keep track of this to filter the messages that have been already processed.
434
+ *
435
+ * @param {Callback<CumulusPalletParachainSystemParachainInherentInboundMessageId | undefined> =} callback
436
+ **/
437
+ lastProcessedDownwardMessage: GenericStorageQuery<
438
+ Rv,
439
+ () => CumulusPalletParachainSystemParachainInherentInboundMessageId | undefined
440
+ >;
441
+
442
+ /**
443
+ * HRMP watermark that was set in a block.
432
444
  *
433
445
  * @param {Callback<number> =} callback
434
446
  **/
435
447
  hrmpWatermark: GenericStorageQuery<Rv, () => number>;
436
448
 
449
+ /**
450
+ * The last processed HRMP message.
451
+ *
452
+ * We need to keep track of this to filter the messages that have been already processed.
453
+ *
454
+ * @param {Callback<CumulusPalletParachainSystemParachainInherentInboundMessageId | undefined> =} callback
455
+ **/
456
+ lastProcessedHrmpMessage: GenericStorageQuery<
457
+ Rv,
458
+ () => CumulusPalletParachainSystemParachainInherentInboundMessageId | undefined
459
+ >;
460
+
437
461
  /**
438
462
  * HRMP messages that were sent in a block.
439
463
  *
@@ -1198,6 +1222,22 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1198
1222
  **/
1199
1223
  [storage: string]: GenericStorageQuery<Rv>;
1200
1224
  };
1225
+ /**
1226
+ * Pallet `SnowbridgeSystemFrontend`'s storage queries
1227
+ **/
1228
+ snowbridgeSystemFrontend: {
1229
+ /**
1230
+ * The current operating mode for exporting to Ethereum.
1231
+ *
1232
+ * @param {Callback<SnowbridgeCoreOperatingModeBasicOperatingMode> =} callback
1233
+ **/
1234
+ exportOperatingMode: GenericStorageQuery<Rv, () => SnowbridgeCoreOperatingModeBasicOperatingMode>;
1235
+
1236
+ /**
1237
+ * Generic pallet storage query
1238
+ **/
1239
+ [storage: string]: GenericStorageQuery<Rv>;
1240
+ };
1201
1241
  /**
1202
1242
  * Pallet `Multisig`'s storage queries
1203
1243
  **/
@@ -1599,25 +1639,25 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1599
1639
  /**
1600
1640
  * Details of an asset.
1601
1641
  *
1602
- * @param {StagingXcmV4Location} arg
1642
+ * @param {StagingXcmV5Location} arg
1603
1643
  * @param {Callback<PalletAssetsAssetDetails | undefined> =} callback
1604
1644
  **/
1605
1645
  asset: GenericStorageQuery<
1606
1646
  Rv,
1607
- (arg: StagingXcmV4Location) => PalletAssetsAssetDetails | undefined,
1608
- StagingXcmV4Location
1647
+ (arg: StagingXcmV5Location) => PalletAssetsAssetDetails | undefined,
1648
+ StagingXcmV5Location
1609
1649
  >;
1610
1650
 
1611
1651
  /**
1612
1652
  * The holdings of a specific account for a specific asset.
1613
1653
  *
1614
- * @param {[StagingXcmV4Location, AccountId32Like]} arg
1654
+ * @param {[StagingXcmV5Location, AccountId32Like]} arg
1615
1655
  * @param {Callback<PalletAssetsAssetAccount | undefined> =} callback
1616
1656
  **/
1617
1657
  account: GenericStorageQuery<
1618
1658
  Rv,
1619
- (arg: [StagingXcmV4Location, AccountId32Like]) => PalletAssetsAssetAccount | undefined,
1620
- [StagingXcmV4Location, AccountId32]
1659
+ (arg: [StagingXcmV5Location, AccountId32Like]) => PalletAssetsAssetAccount | undefined,
1660
+ [StagingXcmV5Location, AccountId32]
1621
1661
  >;
1622
1662
 
1623
1663
  /**
@@ -1625,22 +1665,22 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1625
1665
  * is the amount of `T::Currency` reserved for storing this.
1626
1666
  * First key is the asset ID, second key is the owner and third key is the delegate.
1627
1667
  *
1628
- * @param {[StagingXcmV4Location, AccountId32Like, AccountId32Like]} arg
1668
+ * @param {[StagingXcmV5Location, AccountId32Like, AccountId32Like]} arg
1629
1669
  * @param {Callback<PalletAssetsApproval | undefined> =} callback
1630
1670
  **/
1631
1671
  approvals: GenericStorageQuery<
1632
1672
  Rv,
1633
- (arg: [StagingXcmV4Location, AccountId32Like, AccountId32Like]) => PalletAssetsApproval | undefined,
1634
- [StagingXcmV4Location, AccountId32, AccountId32]
1673
+ (arg: [StagingXcmV5Location, AccountId32Like, AccountId32Like]) => PalletAssetsApproval | undefined,
1674
+ [StagingXcmV5Location, AccountId32, AccountId32]
1635
1675
  >;
1636
1676
 
1637
1677
  /**
1638
1678
  * Metadata of an asset.
1639
1679
  *
1640
- * @param {StagingXcmV4Location} arg
1680
+ * @param {StagingXcmV5Location} arg
1641
1681
  * @param {Callback<PalletAssetsAssetMetadata> =} callback
1642
1682
  **/
1643
- metadata: GenericStorageQuery<Rv, (arg: StagingXcmV4Location) => PalletAssetsAssetMetadata, StagingXcmV4Location>;
1683
+ metadata: GenericStorageQuery<Rv, (arg: StagingXcmV5Location) => PalletAssetsAssetMetadata, StagingXcmV5Location>;
1644
1684
 
1645
1685
  /**
1646
1686
  * The asset ID enforced for the next asset creation, if any present. Otherwise, this storage
@@ -1653,9 +1693,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1653
1693
  * The initial next asset ID can be set using the [`GenesisConfig`] or the
1654
1694
  * [SetNextAssetId](`migration::next_asset_id::SetNextAssetId`) migration.
1655
1695
  *
1656
- * @param {Callback<StagingXcmV4Location | undefined> =} callback
1696
+ * @param {Callback<StagingXcmV5Location | undefined> =} callback
1657
1697
  **/
1658
- nextAssetId: GenericStorageQuery<Rv, () => StagingXcmV4Location | undefined>;
1698
+ nextAssetId: GenericStorageQuery<Rv, () => StagingXcmV5Location | undefined>;
1659
1699
 
1660
1700
  /**
1661
1701
  * Generic pallet storage query
@@ -1736,13 +1776,13 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1736
1776
  * Map from `PoolAssetId` to `PoolInfo`. This establishes whether a pool has been officially
1737
1777
  * created rather than people sending tokens directly to a pool's public account.
1738
1778
  *
1739
- * @param {[StagingXcmV4Location, StagingXcmV4Location]} arg
1779
+ * @param {[StagingXcmV5Location, StagingXcmV5Location]} arg
1740
1780
  * @param {Callback<PalletAssetConversionPoolInfo | undefined> =} callback
1741
1781
  **/
1742
1782
  pools: GenericStorageQuery<
1743
1783
  Rv,
1744
- (arg: [StagingXcmV4Location, StagingXcmV4Location]) => PalletAssetConversionPoolInfo | undefined,
1745
- [StagingXcmV4Location, StagingXcmV4Location]
1784
+ (arg: [StagingXcmV5Location, StagingXcmV5Location]) => PalletAssetConversionPoolInfo | undefined,
1785
+ [StagingXcmV5Location, StagingXcmV5Location]
1746
1786
  >;
1747
1787
 
1748
1788
  /**
@@ -41,9 +41,14 @@ import type {
41
41
  AssetHubPolkadotRuntimeOriginCaller,
42
42
  XcmRuntimeApisDryRunXcmDryRunEffects,
43
43
  XcmRuntimeApisConversionsError,
44
+ XcmRuntimeApisTrustedQueryError,
45
+ XcmVersionedAsset,
46
+ XcmRuntimeApisAuthorizedAliasesOriginAliaser,
47
+ XcmRuntimeApisAuthorizedAliasesError,
44
48
  AssetsCommonRuntimeApiFungiblesAccessError,
45
49
  CumulusPrimitivesCoreCollationInfo,
46
- StagingXcmV4Location,
50
+ StagingXcmV5Location,
51
+ PolkadotParachainPrimitivesPrimitivesId,
47
52
  } from './types.js';
48
53
 
49
54
  export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<Rv> {
@@ -72,6 +77,22 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
72
77
  **/
73
78
  [method: string]: GenericRuntimeApiMethod<Rv>;
74
79
  };
80
+ /**
81
+ * @runtimeapi: RelayParentOffsetApi - 0x04e70521a0d3d2f8
82
+ **/
83
+ relayParentOffsetApi: {
84
+ /**
85
+ * Fetch the slot offset that is expected from the relay chain.
86
+ *
87
+ * @callname: RelayParentOffsetApi_relay_parent_offset
88
+ **/
89
+ relayParentOffset: GenericRuntimeApiMethod<Rv, () => Promise<number>>;
90
+
91
+ /**
92
+ * Generic runtime api call
93
+ **/
94
+ [method: string]: GenericRuntimeApiMethod<Rv>;
95
+ };
75
96
  /**
76
97
  * @runtimeapi: AuraUnincludedSegmentApi - 0xd7bdd8a272ca0d65
77
98
  **/
@@ -564,6 +585,90 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
564
585
  **/
565
586
  [method: string]: GenericRuntimeApiMethod<Rv>;
566
587
  };
588
+ /**
589
+ * @runtimeapi: TrustedQueryApi - 0x2609be83ac4468dc
590
+ **/
591
+ trustedQueryApi: {
592
+ /**
593
+ * Returns if the location is a trusted reserve for the asset.
594
+ *
595
+ * # Arguments
596
+ * * `asset`: `VersionedAsset`.
597
+ * * `location`: `VersionedLocation`.
598
+ *
599
+ * @callname: TrustedQueryApi_is_trusted_reserve
600
+ * @param {XcmVersionedAsset} asset
601
+ * @param {XcmVersionedLocation} location
602
+ **/
603
+ isTrustedReserve: GenericRuntimeApiMethod<
604
+ Rv,
605
+ (
606
+ asset: XcmVersionedAsset,
607
+ location: XcmVersionedLocation,
608
+ ) => Promise<Result<boolean, XcmRuntimeApisTrustedQueryError>>
609
+ >;
610
+
611
+ /**
612
+ * Returns if the asset can be teleported to the location.
613
+ *
614
+ * # Arguments
615
+ * * `asset`: `VersionedAsset`.
616
+ * * `location`: `VersionedLocation`.
617
+ *
618
+ * @callname: TrustedQueryApi_is_trusted_teleporter
619
+ * @param {XcmVersionedAsset} asset
620
+ * @param {XcmVersionedLocation} location
621
+ **/
622
+ isTrustedTeleporter: GenericRuntimeApiMethod<
623
+ Rv,
624
+ (
625
+ asset: XcmVersionedAsset,
626
+ location: XcmVersionedLocation,
627
+ ) => Promise<Result<boolean, XcmRuntimeApisTrustedQueryError>>
628
+ >;
629
+
630
+ /**
631
+ * Generic runtime api call
632
+ **/
633
+ [method: string]: GenericRuntimeApiMethod<Rv>;
634
+ };
635
+ /**
636
+ * @runtimeapi: AuthorizedAliasersApi - 0x12c8e3d4d7e06de0
637
+ **/
638
+ authorizedAliasersApi: {
639
+ /**
640
+ * Returns locations allowed to alias into and act as `target`.
641
+ *
642
+ * @callname: AuthorizedAliasersApi_authorized_aliasers
643
+ * @param {XcmVersionedLocation} target
644
+ **/
645
+ authorizedAliasers: GenericRuntimeApiMethod<
646
+ Rv,
647
+ (
648
+ target: XcmVersionedLocation,
649
+ ) => Promise<Result<Array<XcmRuntimeApisAuthorizedAliasesOriginAliaser>, XcmRuntimeApisAuthorizedAliasesError>>
650
+ >;
651
+
652
+ /**
653
+ * Returns whether `origin` is allowed to alias into and act as `target`.
654
+ *
655
+ * @callname: AuthorizedAliasersApi_is_authorized_alias
656
+ * @param {XcmVersionedLocation} origin
657
+ * @param {XcmVersionedLocation} target
658
+ **/
659
+ isAuthorizedAlias: GenericRuntimeApiMethod<
660
+ Rv,
661
+ (
662
+ origin: XcmVersionedLocation,
663
+ target: XcmVersionedLocation,
664
+ ) => Promise<Result<boolean, XcmRuntimeApisAuthorizedAliasesError>>
665
+ >;
666
+
667
+ /**
668
+ * Generic runtime api call
669
+ **/
670
+ [method: string]: GenericRuntimeApiMethod<Rv>;
671
+ };
567
672
  /**
568
673
  * @runtimeapi: FungiblesApi - 0xde92b8a0426b9bf6
569
674
  **/
@@ -672,16 +777,16 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
672
777
  * (Use `amount_in_max` to control slippage.)
673
778
  *
674
779
  * @callname: AssetConversionApi_quote_price_tokens_for_exact_tokens
675
- * @param {StagingXcmV4Location} asset1
676
- * @param {StagingXcmV4Location} asset2
780
+ * @param {StagingXcmV5Location} asset1
781
+ * @param {StagingXcmV5Location} asset2
677
782
  * @param {bigint} amount
678
783
  * @param {boolean} include_fee
679
784
  **/
680
785
  quotePriceTokensForExactTokens: GenericRuntimeApiMethod<
681
786
  Rv,
682
787
  (
683
- asset1: StagingXcmV4Location,
684
- asset2: StagingXcmV4Location,
788
+ asset1: StagingXcmV5Location,
789
+ asset2: StagingXcmV5Location,
685
790
  amount: bigint,
686
791
  includeFee: boolean,
687
792
  ) => Promise<bigint | undefined>
@@ -694,16 +799,16 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
694
799
  * (Use `amount_out_min` to control slippage.)
695
800
  *
696
801
  * @callname: AssetConversionApi_quote_price_exact_tokens_for_tokens
697
- * @param {StagingXcmV4Location} asset1
698
- * @param {StagingXcmV4Location} asset2
802
+ * @param {StagingXcmV5Location} asset1
803
+ * @param {StagingXcmV5Location} asset2
699
804
  * @param {bigint} amount
700
805
  * @param {boolean} include_fee
701
806
  **/
702
807
  quotePriceExactTokensForTokens: GenericRuntimeApiMethod<
703
808
  Rv,
704
809
  (
705
- asset1: StagingXcmV4Location,
706
- asset2: StagingXcmV4Location,
810
+ asset1: StagingXcmV5Location,
811
+ asset2: StagingXcmV5Location,
707
812
  amount: bigint,
708
813
  includeFee: boolean,
709
814
  ) => Promise<bigint | undefined>
@@ -713,14 +818,30 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
713
818
  * Returns the size of the liquidity pool for the given asset pair.
714
819
  *
715
820
  * @callname: AssetConversionApi_get_reserves
716
- * @param {StagingXcmV4Location} asset1
717
- * @param {StagingXcmV4Location} asset2
821
+ * @param {StagingXcmV5Location} asset1
822
+ * @param {StagingXcmV5Location} asset2
718
823
  **/
719
824
  getReserves: GenericRuntimeApiMethod<
720
825
  Rv,
721
- (asset1: StagingXcmV4Location, asset2: StagingXcmV4Location) => Promise<[bigint, bigint] | undefined>
826
+ (asset1: StagingXcmV5Location, asset2: StagingXcmV5Location) => Promise<[bigint, bigint] | undefined>
722
827
  >;
723
828
 
829
+ /**
830
+ * Generic runtime api call
831
+ **/
832
+ [method: string]: GenericRuntimeApiMethod<Rv>;
833
+ };
834
+ /**
835
+ * @runtimeapi: GetParachainInfo - 0xa2ddb6a58477bf63
836
+ **/
837
+ getParachainInfo: {
838
+ /**
839
+ * Retrieve the parachain id used for runtime.
840
+ *
841
+ * @callname: GetParachainInfo_parachain_id
842
+ **/
843
+ parachainId: GenericRuntimeApiMethod<Rv, () => Promise<PolkadotParachainPrimitivesPrimitivesId>>;
844
+
724
845
  /**
725
846
  * Generic runtime api call
726
847
  **/