@dedot/chaintypes 0.91.0 → 0.93.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.
@@ -45,12 +45,14 @@ import type {
45
45
  AssetHubWestendRuntimeRuntimeCallLike,
46
46
  XcmRuntimeApisDryRunXcmDryRunEffects,
47
47
  XcmRuntimeApisConversionsError,
48
+ XcmRuntimeApisTrustedQueryError,
49
+ XcmVersionedAsset,
50
+ XcmRuntimeApisAuthorizedAliasesOriginAliaser,
51
+ XcmRuntimeApisAuthorizedAliasesError,
48
52
  AssetsCommonRuntimeApiFungiblesAccessError,
49
53
  CumulusPrimitivesCoreCollationInfo,
50
54
  PolkadotPrimitivesVstagingCoreSelector,
51
55
  PolkadotPrimitivesVstagingClaimQueueOffset,
52
- XcmRuntimeApisTrustedQueryError,
53
- XcmVersionedAsset,
54
56
  PalletRevivePrimitivesContractResult,
55
57
  PalletRevivePrimitivesContractResultInstantiateReturnValue,
56
58
  PalletRevivePrimitivesCode,
@@ -666,6 +668,90 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
666
668
  **/
667
669
  [method: string]: GenericRuntimeApiMethod<Rv>;
668
670
  };
671
+ /**
672
+ * @runtimeapi: TrustedQueryApi - 0x2609be83ac4468dc
673
+ **/
674
+ trustedQueryApi: {
675
+ /**
676
+ * Returns if the location is a trusted reserve for the asset.
677
+ *
678
+ * # Arguments
679
+ * * `asset`: `VersionedAsset`.
680
+ * * `location`: `VersionedLocation`.
681
+ *
682
+ * @callname: TrustedQueryApi_is_trusted_reserve
683
+ * @param {XcmVersionedAsset} asset
684
+ * @param {XcmVersionedLocation} location
685
+ **/
686
+ isTrustedReserve: GenericRuntimeApiMethod<
687
+ Rv,
688
+ (
689
+ asset: XcmVersionedAsset,
690
+ location: XcmVersionedLocation,
691
+ ) => Promise<Result<boolean, XcmRuntimeApisTrustedQueryError>>
692
+ >;
693
+
694
+ /**
695
+ * Returns if the asset can be teleported to the location.
696
+ *
697
+ * # Arguments
698
+ * * `asset`: `VersionedAsset`.
699
+ * * `location`: `VersionedLocation`.
700
+ *
701
+ * @callname: TrustedQueryApi_is_trusted_teleporter
702
+ * @param {XcmVersionedAsset} asset
703
+ * @param {XcmVersionedLocation} location
704
+ **/
705
+ isTrustedTeleporter: GenericRuntimeApiMethod<
706
+ Rv,
707
+ (
708
+ asset: XcmVersionedAsset,
709
+ location: XcmVersionedLocation,
710
+ ) => Promise<Result<boolean, XcmRuntimeApisTrustedQueryError>>
711
+ >;
712
+
713
+ /**
714
+ * Generic runtime api call
715
+ **/
716
+ [method: string]: GenericRuntimeApiMethod<Rv>;
717
+ };
718
+ /**
719
+ * @runtimeapi: AuthorizedAliasersApi - 0x12c8e3d4d7e06de0
720
+ **/
721
+ authorizedAliasersApi: {
722
+ /**
723
+ * Returns locations allowed to alias into and act as `target`.
724
+ *
725
+ * @callname: AuthorizedAliasersApi_authorized_aliasers
726
+ * @param {XcmVersionedLocation} target
727
+ **/
728
+ authorizedAliasers: GenericRuntimeApiMethod<
729
+ Rv,
730
+ (
731
+ target: XcmVersionedLocation,
732
+ ) => Promise<Result<Array<XcmRuntimeApisAuthorizedAliasesOriginAliaser>, XcmRuntimeApisAuthorizedAliasesError>>
733
+ >;
734
+
735
+ /**
736
+ * Returns whether `origin` is allowed to alias into and act as `target`.
737
+ *
738
+ * @callname: AuthorizedAliasersApi_is_authorized_alias
739
+ * @param {XcmVersionedLocation} origin
740
+ * @param {XcmVersionedLocation} target
741
+ **/
742
+ isAuthorizedAlias: GenericRuntimeApiMethod<
743
+ Rv,
744
+ (
745
+ origin: XcmVersionedLocation,
746
+ target: XcmVersionedLocation,
747
+ ) => Promise<Result<boolean, XcmRuntimeApisAuthorizedAliasesError>>
748
+ >;
749
+
750
+ /**
751
+ * Generic runtime api call
752
+ **/
753
+ [method: string]: GenericRuntimeApiMethod<Rv>;
754
+ };
669
755
  /**
670
756
  * @runtimeapi: TransactionPaymentCallApi - 0xf3ff14d5ab527059
671
757
  **/
@@ -849,53 +935,6 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
849
935
  **/
850
936
  [method: string]: GenericRuntimeApiMethod<Rv>;
851
937
  };
852
- /**
853
- * @runtimeapi: TrustedQueryApi - 0x2609be83ac4468dc
854
- **/
855
- trustedQueryApi: {
856
- /**
857
- * Returns if the location is a trusted reserve for the asset.
858
- *
859
- * # Arguments
860
- * * `asset`: `VersionedAsset`.
861
- * * `location`: `VersionedLocation`.
862
- *
863
- * @callname: TrustedQueryApi_is_trusted_reserve
864
- * @param {XcmVersionedAsset} asset
865
- * @param {XcmVersionedLocation} location
866
- **/
867
- isTrustedReserve: GenericRuntimeApiMethod<
868
- Rv,
869
- (
870
- asset: XcmVersionedAsset,
871
- location: XcmVersionedLocation,
872
- ) => Promise<Result<boolean, XcmRuntimeApisTrustedQueryError>>
873
- >;
874
-
875
- /**
876
- * Returns if the asset can be teleported to the location.
877
- *
878
- * # Arguments
879
- * * `asset`: `VersionedAsset`.
880
- * * `location`: `VersionedLocation`.
881
- *
882
- * @callname: TrustedQueryApi_is_trusted_teleporter
883
- * @param {XcmVersionedAsset} asset
884
- * @param {XcmVersionedLocation} location
885
- **/
886
- isTrustedTeleporter: GenericRuntimeApiMethod<
887
- Rv,
888
- (
889
- asset: XcmVersionedAsset,
890
- location: XcmVersionedLocation,
891
- ) => Promise<Result<boolean, XcmRuntimeApisTrustedQueryError>>
892
- >;
893
-
894
- /**
895
- * Generic runtime api call
896
- **/
897
- [method: string]: GenericRuntimeApiMethod<Rv>;
898
- };
899
938
  /**
900
939
  * @runtimeapi: ReviveApi - 0x8c403e5c4a9fd442
901
940
  **/
@@ -1035,6 +1074,22 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
1035
1074
  ) => Promise<Result<Bytes | undefined, PalletRevivePrimitivesContractAccessError>>
1036
1075
  >;
1037
1076
 
1077
+ /**
1078
+ * Query a given variable-sized storage key in a given contract.
1079
+ *
1080
+ * Returns `Ok(Some(Vec<u8>))` if the storage value exists under the given key in the
1081
+ * specified account and `Ok(None)` if it doesn't. If the account specified by the address
1082
+ * doesn't exist, or doesn't have a contract then `Err` is returned.
1083
+ *
1084
+ * @callname: ReviveApi_get_storage_var_key
1085
+ * @param {H160} address
1086
+ * @param {BytesLike} key
1087
+ **/
1088
+ getStorageVarKey: GenericRuntimeApiMethod<
1089
+ Rv,
1090
+ (address: H160, key: BytesLike) => Promise<Result<Bytes | undefined, PalletRevivePrimitivesContractAccessError>>
1091
+ >;
1092
+
1038
1093
  /**
1039
1094
  * Traces the execution of an entire block and returns call traces.
1040
1095
  *
@@ -29,6 +29,8 @@ import type {
29
29
  StagingXcmExecutorAssetTransferTransferType,
30
30
  XcmVersionedAssetId,
31
31
  CumulusPrimitivesCoreAggregateMessageOrigin,
32
+ SnowbridgeCoreOperatingModeBasicOperatingMode,
33
+ SnowbridgeCoreAssetMetadata,
32
34
  AssetHubWestendRuntimeOriginCaller,
33
35
  PalletMultisigTimepoint,
34
36
  AssetHubWestendRuntimeProxyType,
@@ -1782,6 +1784,77 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
1782
1784
  >
1783
1785
  >;
1784
1786
 
1787
+ /**
1788
+ * Authorize another `aliaser` location to alias into the local `origin` making this call.
1789
+ * The `aliaser` is only authorized until the provided `expiry` block number.
1790
+ * The call can also be used for a previously authorized alias in order to update its
1791
+ * `expiry` block number.
1792
+ *
1793
+ * Usually useful to allow your local account to be aliased into from a remote location
1794
+ * also under your control (like your account on another chain).
1795
+ *
1796
+ * WARNING: make sure the caller `origin` (you) trusts the `aliaser` location to act in
1797
+ * their/your name. Once authorized using this call, the `aliaser` can freely impersonate
1798
+ * `origin` in XCM programs executed on the local chain.
1799
+ *
1800
+ * @param {XcmVersionedLocation} aliaser
1801
+ * @param {bigint | undefined} expires
1802
+ **/
1803
+ addAuthorizedAlias: GenericTxCall<
1804
+ Rv,
1805
+ (
1806
+ aliaser: XcmVersionedLocation,
1807
+ expires: bigint | undefined,
1808
+ ) => ChainSubmittableExtrinsic<
1809
+ Rv,
1810
+ {
1811
+ pallet: 'PolkadotXcm';
1812
+ palletCall: {
1813
+ name: 'AddAuthorizedAlias';
1814
+ params: { aliaser: XcmVersionedLocation; expires: bigint | undefined };
1815
+ };
1816
+ }
1817
+ >
1818
+ >;
1819
+
1820
+ /**
1821
+ * Remove a previously authorized `aliaser` from the list of locations that can alias into
1822
+ * the local `origin` making this call.
1823
+ *
1824
+ * @param {XcmVersionedLocation} aliaser
1825
+ **/
1826
+ removeAuthorizedAlias: GenericTxCall<
1827
+ Rv,
1828
+ (aliaser: XcmVersionedLocation) => ChainSubmittableExtrinsic<
1829
+ Rv,
1830
+ {
1831
+ pallet: 'PolkadotXcm';
1832
+ palletCall: {
1833
+ name: 'RemoveAuthorizedAlias';
1834
+ params: { aliaser: XcmVersionedLocation };
1835
+ };
1836
+ }
1837
+ >
1838
+ >;
1839
+
1840
+ /**
1841
+ * Remove all previously authorized `aliaser`s that can alias into the local `origin`
1842
+ * making this call.
1843
+ *
1844
+ **/
1845
+ removeAllAuthorizedAliases: GenericTxCall<
1846
+ Rv,
1847
+ () => ChainSubmittableExtrinsic<
1848
+ Rv,
1849
+ {
1850
+ pallet: 'PolkadotXcm';
1851
+ palletCall: {
1852
+ name: 'RemoveAllAuthorizedAliases';
1853
+ };
1854
+ }
1855
+ >
1856
+ >;
1857
+
1785
1858
  /**
1786
1859
  * Generic pallet tx call
1787
1860
  **/
@@ -1904,6 +1977,63 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
1904
1977
  **/
1905
1978
  [callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
1906
1979
  };
1980
+ /**
1981
+ * Pallet `SnowbridgeSystemFrontend`'s transaction calls
1982
+ **/
1983
+ snowbridgeSystemFrontend: {
1984
+ /**
1985
+ * Set the operating mode for exporting messages to Ethereum.
1986
+ *
1987
+ * @param {SnowbridgeCoreOperatingModeBasicOperatingMode} mode
1988
+ **/
1989
+ setOperatingMode: GenericTxCall<
1990
+ Rv,
1991
+ (mode: SnowbridgeCoreOperatingModeBasicOperatingMode) => ChainSubmittableExtrinsic<
1992
+ Rv,
1993
+ {
1994
+ pallet: 'SnowbridgeSystemFrontend';
1995
+ palletCall: {
1996
+ name: 'SetOperatingMode';
1997
+ params: { mode: SnowbridgeCoreOperatingModeBasicOperatingMode };
1998
+ };
1999
+ }
2000
+ >
2001
+ >;
2002
+
2003
+ /**
2004
+ * Initiates the registration for a Polkadot-native token as a wrapped ERC20 token on
2005
+ * Ethereum.
2006
+ * - `asset_id`: Location of the asset
2007
+ * - `metadata`: Metadata to include in the instantiated ERC20 contract on Ethereum
2008
+ *
2009
+ * All origins are allowed, however `asset_id` must be a location nested within the origin
2010
+ * consensus system.
2011
+ *
2012
+ * @param {XcmVersionedLocation} assetId
2013
+ * @param {SnowbridgeCoreAssetMetadata} metadata
2014
+ **/
2015
+ registerToken: GenericTxCall<
2016
+ Rv,
2017
+ (
2018
+ assetId: XcmVersionedLocation,
2019
+ metadata: SnowbridgeCoreAssetMetadata,
2020
+ ) => ChainSubmittableExtrinsic<
2021
+ Rv,
2022
+ {
2023
+ pallet: 'SnowbridgeSystemFrontend';
2024
+ palletCall: {
2025
+ name: 'RegisterToken';
2026
+ params: { assetId: XcmVersionedLocation; metadata: SnowbridgeCoreAssetMetadata };
2027
+ };
2028
+ }
2029
+ >
2030
+ >;
2031
+
2032
+ /**
2033
+ * Generic pallet tx call
2034
+ **/
2035
+ [callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
2036
+ };
1907
2037
  /**
1908
2038
  * Pallet `Utility`'s transaction calls
1909
2039
  **/
@@ -2401,6 +2531,43 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
2401
2531
  >
2402
2532
  >;
2403
2533
 
2534
+ /**
2535
+ * Poke the deposit reserved for an existing multisig operation.
2536
+ *
2537
+ * The dispatch origin for this call must be _Signed_ and must be the original depositor of
2538
+ * the multisig operation.
2539
+ *
2540
+ * The transaction fee is waived if the deposit amount has changed.
2541
+ *
2542
+ * - `threshold`: The total number of approvals needed for this multisig.
2543
+ * - `other_signatories`: The accounts (other than the sender) who are part of the
2544
+ * multisig.
2545
+ * - `call_hash`: The hash of the call this deposit is reserved for.
2546
+ *
2547
+ * Emits `DepositPoked` if successful.
2548
+ *
2549
+ * @param {number} threshold
2550
+ * @param {Array<AccountId32Like>} otherSignatories
2551
+ * @param {FixedBytes<32>} callHash
2552
+ **/
2553
+ pokeDeposit: GenericTxCall<
2554
+ Rv,
2555
+ (
2556
+ threshold: number,
2557
+ otherSignatories: Array<AccountId32Like>,
2558
+ callHash: FixedBytes<32>,
2559
+ ) => ChainSubmittableExtrinsic<
2560
+ Rv,
2561
+ {
2562
+ pallet: 'Multisig';
2563
+ palletCall: {
2564
+ name: 'PokeDeposit';
2565
+ params: { threshold: number; otherSignatories: Array<AccountId32Like>; callHash: FixedBytes<32> };
2566
+ };
2567
+ }
2568
+ >
2569
+ >;
2570
+
2404
2571
  /**
2405
2572
  * Generic pallet tx call
2406
2573
  **/
@@ -2585,7 +2752,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
2585
2752
  * `pure` with corresponding parameters.
2586
2753
  *
2587
2754
  * - `spawner`: The account that originally called `pure` to create this account.
2588
- * - `index`: The disambiguation index originally passed to `pure`. Probably `0`.
2755
+ * - `index`: The disambiguation index originally passed to `create_pure`. Probably `0`.
2589
2756
  * - `proxy_type`: The proxy type originally passed to `pure`.
2590
2757
  * - `height`: The height of the chain when the call to `pure` was processed.
2591
2758
  * - `ext_index`: The extrinsic index in which the call to `pure` was processed.
@@ -2768,6 +2935,30 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
2768
2935
  >
2769
2936
  >;
2770
2937
 
2938
+ /**
2939
+ * Poke / Adjust deposits made for proxies and announcements based on current values.
2940
+ * This can be used by accounts to possibly lower their locked amount.
2941
+ *
2942
+ * The dispatch origin for this call must be _Signed_.
2943
+ *
2944
+ * The transaction fee is waived if the deposit amount has changed.
2945
+ *
2946
+ * Emits `DepositPoked` if successful.
2947
+ *
2948
+ **/
2949
+ pokeDeposit: GenericTxCall<
2950
+ Rv,
2951
+ () => ChainSubmittableExtrinsic<
2952
+ Rv,
2953
+ {
2954
+ pallet: 'Proxy';
2955
+ palletCall: {
2956
+ name: 'PokeDeposit';
2957
+ };
2958
+ }
2959
+ >
2960
+ >;
2961
+
2771
2962
  /**
2772
2963
  * Generic pallet tx call
2773
2964
  **/
@@ -2876,6 +3067,9 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
2876
3067
  * - `id`: The identifier of the asset to be destroyed. This must identify an existing
2877
3068
  * asset.
2878
3069
  *
3070
+ * It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
3071
+ * an account contains holds or freezes in place.
3072
+ *
2879
3073
  * @param {number} id
2880
3074
  **/
2881
3075
  startDestroy: GenericTxCall<
@@ -3778,6 +3972,9 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
3778
3972
  * refunded.
3779
3973
  * - `allow_burn`: If `true` then assets may be destroyed in order to complete the refund.
3780
3974
  *
3975
+ * It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
3976
+ * the asset account contains holds or freezes in place.
3977
+ *
3781
3978
  * Emits `Refunded` event when successful.
3782
3979
  *
3783
3980
  * @param {number} id
@@ -3876,6 +4073,9 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
3876
4073
  * - `id`: The identifier of the asset for the account holding a deposit.
3877
4074
  * - `who`: The account to refund.
3878
4075
  *
4076
+ * It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
4077
+ * the asset account contains holds or freezes in place.
4078
+ *
3879
4079
  * Emits `Refunded` event when successful.
3880
4080
  *
3881
4081
  * @param {number} id
@@ -6536,6 +6736,9 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
6536
6736
  * - `id`: The identifier of the asset to be destroyed. This must identify an existing
6537
6737
  * asset.
6538
6738
  *
6739
+ * It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
6740
+ * an account contains holds or freezes in place.
6741
+ *
6539
6742
  * @param {StagingXcmV5Location} id
6540
6743
  **/
6541
6744
  startDestroy: GenericTxCall<
@@ -7454,6 +7657,9 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
7454
7657
  * refunded.
7455
7658
  * - `allow_burn`: If `true` then assets may be destroyed in order to complete the refund.
7456
7659
  *
7660
+ * It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
7661
+ * the asset account contains holds or freezes in place.
7662
+ *
7457
7663
  * Emits `Refunded` event when successful.
7458
7664
  *
7459
7665
  * @param {StagingXcmV5Location} id
@@ -7552,6 +7758,9 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
7552
7758
  * - `id`: The identifier of the asset for the account holding a deposit.
7553
7759
  * - `who`: The account to refund.
7554
7760
  *
7761
+ * It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
7762
+ * the asset account contains holds or freezes in place.
7763
+ *
7555
7764
  * Emits `Refunded` event when successful.
7556
7765
  *
7557
7766
  * @param {StagingXcmV5Location} id
@@ -7856,6 +8065,9 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
7856
8065
  * - `id`: The identifier of the asset to be destroyed. This must identify an existing
7857
8066
  * asset.
7858
8067
  *
8068
+ * It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
8069
+ * an account contains holds or freezes in place.
8070
+ *
7859
8071
  * @param {number} id
7860
8072
  **/
7861
8073
  startDestroy: GenericTxCall<
@@ -8758,6 +8970,9 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
8758
8970
  * refunded.
8759
8971
  * - `allow_burn`: If `true` then assets may be destroyed in order to complete the refund.
8760
8972
  *
8973
+ * It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
8974
+ * the asset account contains holds or freezes in place.
8975
+ *
8761
8976
  * Emits `Refunded` event when successful.
8762
8977
  *
8763
8978
  * @param {number} id
@@ -8856,6 +9071,9 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
8856
9071
  * - `id`: The identifier of the asset for the account holding a deposit.
8857
9072
  * - `who`: The account to refund.
8858
9073
  *
9074
+ * It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
9075
+ * the asset account contains holds or freezes in place.
9076
+ *
8859
9077
  * Emits `Refunded` event when successful.
8860
9078
  *
8861
9079
  * @param {number} id