@paraspell/sdk-core 13.7.2 → 13.8.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/dist/index.d.ts +193 -133
- package/dist/index.mjs +824 -790
- package/package.json +6 -9
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _paraspell_sdk_common from '@paraspell/sdk-common';
|
|
|
2
2
|
import { TSubstrateChain, TChain, Version, TRelaychain, TParachain, TLocation, TExternalChain, TJunction, Parents, TJunctions } from '@paraspell/sdk-common';
|
|
3
3
|
export * from '@paraspell/sdk-common';
|
|
4
4
|
import * as _paraspell_assets from '@paraspell/assets';
|
|
5
|
-
import { TChainAssetsInfo, TAssetInfo, TCurrencyInput, WithAmount, TAsset, TCurrencyInputWithAmount, TCustomAssetInfo, TCustomCtx, TCustomAssetsMap,
|
|
5
|
+
import { TChainAssetsInfo, TAssetInfo, TCurrencyInput, WithAmount, TAsset, TCurrencyInputWithAmount, WithComplexAmount, TCurrencyCore, TSingleCurrencyInputWithAmount, TCustomAssetInfo, TCustomCtx, TCustomAssetsMap, TSingleCurrencyInput, TAmount, TAssetWithFee, TAssetInfoWithId } from '@paraspell/assets';
|
|
6
6
|
export * from '@paraspell/assets';
|
|
7
7
|
import { TPallet, TPalletEntry, TAssetsPallet, TCustomChainPallets, TCrosschainPallet } from '@paraspell/pallets';
|
|
8
8
|
export * from '@paraspell/pallets';
|
|
@@ -734,8 +734,8 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TTransferBas
|
|
|
734
734
|
* @param currency - The currency to be transferred.
|
|
735
735
|
* @returns An instance of Builder
|
|
736
736
|
*/
|
|
737
|
-
currency(currency:
|
|
738
|
-
currency:
|
|
737
|
+
currency<TCurrency extends TCurrencyInputWithAmount>(currency: TCurrency): GeneralBuilder<TApi, TRes, TSigner, T & {
|
|
738
|
+
currency: TCurrency;
|
|
739
739
|
}, TCustomChain>;
|
|
740
740
|
/**
|
|
741
741
|
* Sets the recipient address.
|
|
@@ -883,37 +883,82 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TTransferBas
|
|
|
883
883
|
getOriginXcmFee<TDisableFallback extends boolean = false>(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>, options?: TGetXcmFeeBuilderOptions & {
|
|
884
884
|
disableFallback: TDisableFallback;
|
|
885
885
|
}): Promise<TXcmFeeDetailWithForwardedXcm<TDisableFallback>>;
|
|
886
|
+
/**
|
|
887
|
+
* Returns the max transferable amount for each provided asset.
|
|
888
|
+
*
|
|
889
|
+
* @returns The max transferable amounts in the order the assets were provided.
|
|
890
|
+
*/
|
|
891
|
+
getTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
|
|
892
|
+
currency: WithComplexAmount<TCurrencyCore>[];
|
|
893
|
+
}, TCustomChain>): Promise<bigint[]>;
|
|
886
894
|
/**
|
|
887
895
|
* Returns the max transferable amount for the transfer
|
|
888
896
|
*
|
|
889
897
|
* @returns The max transferable amount.
|
|
890
898
|
*/
|
|
891
|
-
getTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner
|
|
899
|
+
getTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
|
|
900
|
+
currency: TSingleCurrencyInputWithAmount;
|
|
901
|
+
}, TCustomChain>): Promise<bigint>;
|
|
902
|
+
getTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<bigint | bigint[]>;
|
|
903
|
+
/**
|
|
904
|
+
* Returns the min transferable amount for each provided asset.
|
|
905
|
+
*
|
|
906
|
+
* @returns The min transferable amounts in the order the assets were provided.
|
|
907
|
+
*/
|
|
908
|
+
getMinTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
|
|
909
|
+
currency: WithComplexAmount<TCurrencyCore>[];
|
|
910
|
+
}, TCustomChain>): Promise<bigint[]>;
|
|
892
911
|
/**
|
|
893
912
|
* Returns the min transferable amount for the transfer
|
|
894
913
|
*
|
|
895
914
|
* @returns The min transferable amount.
|
|
896
915
|
*/
|
|
897
|
-
getMinTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner
|
|
916
|
+
getMinTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
|
|
917
|
+
currency: TSingleCurrencyInputWithAmount;
|
|
918
|
+
}, TCustomChain>): Promise<bigint>;
|
|
919
|
+
getMinTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<bigint | bigint[]>;
|
|
898
920
|
/**
|
|
899
921
|
* Returns the max transferable amount for the transfer
|
|
900
922
|
*
|
|
901
923
|
* @returns The max transferable amount.
|
|
902
924
|
*/
|
|
903
925
|
verifyEdOnDestination(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<boolean>;
|
|
926
|
+
/**
|
|
927
|
+
* Returns the transfer info for each provided asset.
|
|
928
|
+
*
|
|
929
|
+
* @returns The transfer info with per-asset selected and received currency details.
|
|
930
|
+
*/
|
|
931
|
+
getTransferInfo(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
|
|
932
|
+
currency: WithComplexAmount<TCurrencyCore>[];
|
|
933
|
+
}, TCustomChain>): Promise<TTransferInfo<WithComplexAmount<TCurrencyCore>[]>>;
|
|
904
934
|
/**
|
|
905
935
|
* Returns the transfer info for the transfer
|
|
906
936
|
*
|
|
907
937
|
* @returns The transfer info.
|
|
908
938
|
*/
|
|
909
|
-
getTransferInfo(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner
|
|
939
|
+
getTransferInfo(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
|
|
940
|
+
currency: TSingleCurrencyInputWithAmount;
|
|
941
|
+
}, TCustomChain>): Promise<TTransferInfo>;
|
|
942
|
+
getTransferInfo(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<TTransferInfo<TCurrencyInputWithAmount>>;
|
|
943
|
+
/**
|
|
944
|
+
* Returns the receivable amount on the destination for each provided asset.
|
|
945
|
+
*
|
|
946
|
+
* @returns The computed receivable amounts in the order the assets were provided.
|
|
947
|
+
* @throws \{UnableToComputeError\} Thrown when a receivable amount cannot be determined.
|
|
948
|
+
*/
|
|
949
|
+
getReceivableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
|
|
950
|
+
currency: WithComplexAmount<TCurrencyCore>[];
|
|
951
|
+
}, TCustomChain>): Promise<bigint[]>;
|
|
910
952
|
/**
|
|
911
953
|
* Returns the receivable amount on the destination after the transfer
|
|
912
954
|
*
|
|
913
955
|
* @returns The computed receivable amount.
|
|
914
956
|
* @throws \{UnableToComputeError\} Thrown when the receivable amount cannot be determined.
|
|
915
957
|
*/
|
|
916
|
-
getReceivableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner
|
|
958
|
+
getReceivableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
|
|
959
|
+
currency: TSingleCurrencyInputWithAmount;
|
|
960
|
+
}, TCustomChain>): Promise<bigint>;
|
|
961
|
+
getReceivableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<bigint | bigint[]>;
|
|
917
962
|
getBestAmountOut(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSwap<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<{
|
|
918
963
|
exchange: TExchangeChain;
|
|
919
964
|
amountOut: bigint;
|
|
@@ -1110,6 +1155,7 @@ type TDryRunCallBaseOptions<TRes, TCustomChain extends string = never> = {
|
|
|
1110
1155
|
*/
|
|
1111
1156
|
version: Version;
|
|
1112
1157
|
asset: WithAmount<TAssetInfo>;
|
|
1158
|
+
assets?: WithAmount<TAssetInfo>[];
|
|
1113
1159
|
bypassOptions?: TBypassOptions;
|
|
1114
1160
|
feeAsset?: TAssetInfo;
|
|
1115
1161
|
};
|
|
@@ -1175,6 +1221,7 @@ type TResolveHopParams<TApi, TRes, TSigner, TCustomChain extends string = never>
|
|
|
1175
1221
|
currentChain: TSubstrateChain;
|
|
1176
1222
|
destination: TDestination;
|
|
1177
1223
|
asset: TAssetInfo;
|
|
1224
|
+
currentAsset: TAssetInfo;
|
|
1178
1225
|
currency: TCurrencyInputWithAmount;
|
|
1179
1226
|
swapConfig?: TSwapConfig;
|
|
1180
1227
|
hasPassedExchange: boolean;
|
|
@@ -1192,7 +1239,7 @@ type HopTraversalConfig<TApi, TRes, TSigner, THopResult, TCustomChain extends st
|
|
|
1192
1239
|
api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
|
|
1193
1240
|
origin: TSubstrateChain | TCustomChain;
|
|
1194
1241
|
destination: TChain;
|
|
1195
|
-
|
|
1242
|
+
asset: TAssetInfo;
|
|
1196
1243
|
initialForwardedXcms: any;
|
|
1197
1244
|
initialDestParaId: number | undefined;
|
|
1198
1245
|
swapConfig?: TSwapConfig;
|
|
@@ -1565,7 +1612,7 @@ type TGetXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolean, TCu
|
|
|
1565
1612
|
*/
|
|
1566
1613
|
sender: string;
|
|
1567
1614
|
recipient: string;
|
|
1568
|
-
currency:
|
|
1615
|
+
currency: TCurrencyInputWithAmount;
|
|
1569
1616
|
version?: Version;
|
|
1570
1617
|
feeAsset?: TCurrencyInput;
|
|
1571
1618
|
disableFallback: TDisableFallback;
|
|
@@ -1585,7 +1632,7 @@ type TGetOriginXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolea
|
|
|
1585
1632
|
origin: TSubstrateChain | TCustomChain;
|
|
1586
1633
|
destination: TChain;
|
|
1587
1634
|
sender: string;
|
|
1588
|
-
currency:
|
|
1635
|
+
currency: TCurrencyInputWithAmount;
|
|
1589
1636
|
version?: Version;
|
|
1590
1637
|
feeAsset?: TCurrencyInput;
|
|
1591
1638
|
disableFallback: TDisableFallback;
|
|
@@ -1601,10 +1648,11 @@ type TGetFeeForDestChainBaseOptions<TRes, TCustomChain extends string = never> =
|
|
|
1601
1648
|
destination: TChain;
|
|
1602
1649
|
sender: string;
|
|
1603
1650
|
recipient: string;
|
|
1604
|
-
currency:
|
|
1651
|
+
currency: TCurrencyInputWithAmount;
|
|
1652
|
+
asset: WithAmount<TAssetInfo>;
|
|
1653
|
+
currentAsset: WithAmount<TAssetInfo>;
|
|
1605
1654
|
forwardedXcms: any;
|
|
1606
1655
|
tx: TRes;
|
|
1607
|
-
asset: TAssetInfo;
|
|
1608
1656
|
version: Version;
|
|
1609
1657
|
originFee: bigint;
|
|
1610
1658
|
feeAsset?: TCurrencyInput;
|
|
@@ -1673,6 +1721,90 @@ type TPaymentInfo = {
|
|
|
1673
1721
|
weight: TWeight;
|
|
1674
1722
|
};
|
|
1675
1723
|
|
|
1724
|
+
type TGetBalanceCommonOptions<TCustomChain extends string = never> = {
|
|
1725
|
+
/**
|
|
1726
|
+
* The address of the account.
|
|
1727
|
+
*/
|
|
1728
|
+
address: string;
|
|
1729
|
+
/**
|
|
1730
|
+
* The chain on which to query the balance.
|
|
1731
|
+
*/
|
|
1732
|
+
chain: TChain | TCustomChain;
|
|
1733
|
+
};
|
|
1734
|
+
/**
|
|
1735
|
+
* Retrieves the asset balance for a given account on a specified chain.
|
|
1736
|
+
*/
|
|
1737
|
+
type TGetAssetBalanceOptionsBase<TCustomChain extends string = never> = TGetBalanceCommonOptions<TCustomChain> & {
|
|
1738
|
+
/**
|
|
1739
|
+
* The resolved asset to query balance for.
|
|
1740
|
+
*/
|
|
1741
|
+
asset: TAssetInfo;
|
|
1742
|
+
};
|
|
1743
|
+
/**
|
|
1744
|
+
* Retrieves the currency balance for a given account on a specified chain.
|
|
1745
|
+
*/
|
|
1746
|
+
type TGetBalanceOptionsBase<TCustomChain extends string = never> = TGetBalanceCommonOptions<TCustomChain> & {
|
|
1747
|
+
/**
|
|
1748
|
+
* The currency to query.
|
|
1749
|
+
*/
|
|
1750
|
+
currency?: TCurrencyCore;
|
|
1751
|
+
};
|
|
1752
|
+
type TGetBalanceOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TGetBalanceOptionsBase<TCustomChain>, TApi, TRes, TSigner, TCustomChain>;
|
|
1753
|
+
type TGetAssetBalanceOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TGetAssetBalanceOptionsBase<TCustomChain>, TApi, TRes, TSigner, TCustomChain>;
|
|
1754
|
+
type TGetTransferableAmountOptionsBase<TRes, TCurrency = WithAmount<TCurrencyCore>> = {
|
|
1755
|
+
/**
|
|
1756
|
+
* The sender address of the account.
|
|
1757
|
+
*/
|
|
1758
|
+
sender: string;
|
|
1759
|
+
/**
|
|
1760
|
+
* The chain on which to query the balance.
|
|
1761
|
+
*/
|
|
1762
|
+
origin: TSubstrateChain;
|
|
1763
|
+
/**
|
|
1764
|
+
* The destination chain.
|
|
1765
|
+
*/
|
|
1766
|
+
destination: TChain;
|
|
1767
|
+
/**
|
|
1768
|
+
* The currency to query.
|
|
1769
|
+
*/
|
|
1770
|
+
currency: TCurrency;
|
|
1771
|
+
version: Version | undefined;
|
|
1772
|
+
buildTx: TTxFactory<TRes>;
|
|
1773
|
+
feeAsset?: TCurrencyInput;
|
|
1774
|
+
};
|
|
1775
|
+
type TGetTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain extends string = never, TCurrency = WithAmount<TCurrencyCore>> = WithApi<TGetTransferableAmountOptionsBase<TRes, TCurrency>, TApi, TRes, TSigner, TCustomChain>;
|
|
1776
|
+
type TPerAssetResult<TCurrency, TValue> = TCurrency extends unknown[] ? TValue[] : TValue;
|
|
1777
|
+
type TGetMinTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain extends string = never, TCurrency = WithAmount<TCurrencyCore>> = WithApi<TGetTransferableAmountOptionsBase<TRes, TCurrency> & {
|
|
1778
|
+
recipient: string;
|
|
1779
|
+
builder: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner>, TCustomChain>;
|
|
1780
|
+
}, TApi, TRes, TSigner, TCustomChain>;
|
|
1781
|
+
type TVerifyEdOnDestinationOptionsBase<TRes> = {
|
|
1782
|
+
/**
|
|
1783
|
+
* The origin chain.
|
|
1784
|
+
*/
|
|
1785
|
+
origin: TSubstrateChain;
|
|
1786
|
+
/**
|
|
1787
|
+
* The destination chain.
|
|
1788
|
+
*/
|
|
1789
|
+
destination: TChain;
|
|
1790
|
+
/**
|
|
1791
|
+
* The address of the account.
|
|
1792
|
+
*/
|
|
1793
|
+
recipient: string;
|
|
1794
|
+
/**
|
|
1795
|
+
* The account of the sender.
|
|
1796
|
+
*/
|
|
1797
|
+
sender: string;
|
|
1798
|
+
/**
|
|
1799
|
+
* The currency to query.
|
|
1800
|
+
*/
|
|
1801
|
+
currency: TCurrencyInputWithAmount;
|
|
1802
|
+
version: Version | undefined;
|
|
1803
|
+
buildTx: TTxFactory<TRes>;
|
|
1804
|
+
feeAsset?: TCurrencyInput;
|
|
1805
|
+
};
|
|
1806
|
+
type TVerifyEdOnDestinationOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TVerifyEdOnDestinationOptionsBase<TRes>, TApi, TRes, TSigner, TCustomChain>;
|
|
1807
|
+
|
|
1676
1808
|
type THopTransferInfo = {
|
|
1677
1809
|
chain: TChain;
|
|
1678
1810
|
result: {
|
|
@@ -1685,35 +1817,38 @@ type TXcmFeeBase = {
|
|
|
1685
1817
|
fee: bigint;
|
|
1686
1818
|
asset: TAssetInfo;
|
|
1687
1819
|
};
|
|
1688
|
-
type
|
|
1820
|
+
type TOriginXcmFeeInfo = TXcmFeeBase & {
|
|
1821
|
+
sufficient: boolean;
|
|
1822
|
+
balance: bigint;
|
|
1823
|
+
balanceAfter: bigint;
|
|
1824
|
+
};
|
|
1825
|
+
type TSelectedCurrencyInfo = {
|
|
1826
|
+
sufficient: boolean;
|
|
1827
|
+
balance: bigint;
|
|
1828
|
+
balanceAfter: bigint;
|
|
1829
|
+
asset: TAssetInfo;
|
|
1830
|
+
};
|
|
1831
|
+
type TReceivedCurrencyInfo = {
|
|
1832
|
+
sufficient: boolean | UnableToComputeError;
|
|
1833
|
+
receivedAmount: bigint | UnableToComputeError;
|
|
1834
|
+
balance: bigint;
|
|
1835
|
+
balanceAfter: bigint | UnableToComputeError;
|
|
1836
|
+
asset: TAssetInfo;
|
|
1837
|
+
};
|
|
1838
|
+
type TTransferInfo<TCurrency = WithAmount<TCurrencyCore>> = {
|
|
1689
1839
|
chain: {
|
|
1690
1840
|
origin: TChain;
|
|
1691
1841
|
destination: TChain;
|
|
1692
1842
|
ecosystem: string;
|
|
1693
1843
|
};
|
|
1694
1844
|
origin: {
|
|
1695
|
-
selectedCurrency:
|
|
1696
|
-
|
|
1697
|
-
balance: bigint;
|
|
1698
|
-
balanceAfter: bigint;
|
|
1699
|
-
asset: TAssetInfo;
|
|
1700
|
-
};
|
|
1701
|
-
xcmFee: TXcmFeeBase & {
|
|
1702
|
-
sufficient: boolean;
|
|
1703
|
-
balance: bigint;
|
|
1704
|
-
balanceAfter: bigint;
|
|
1705
|
-
};
|
|
1845
|
+
selectedCurrency: TPerAssetResult<TCurrency, TSelectedCurrencyInfo>;
|
|
1846
|
+
xcmFee: TOriginXcmFeeInfo;
|
|
1706
1847
|
isExchange?: boolean;
|
|
1707
1848
|
};
|
|
1708
1849
|
hops: THopTransferInfo[];
|
|
1709
1850
|
destination: {
|
|
1710
|
-
receivedCurrency:
|
|
1711
|
-
sufficient: boolean | UnableToComputeError;
|
|
1712
|
-
receivedAmount: bigint | UnableToComputeError;
|
|
1713
|
-
balance: bigint;
|
|
1714
|
-
balanceAfter: bigint | UnableToComputeError;
|
|
1715
|
-
asset: TAssetInfo;
|
|
1716
|
-
};
|
|
1851
|
+
receivedCurrency: TPerAssetResult<TCurrency, TReceivedCurrencyInfo>;
|
|
1717
1852
|
xcmFee: TXcmFeeBase & {
|
|
1718
1853
|
balanceAfter: bigint | UnableToComputeError;
|
|
1719
1854
|
};
|
|
@@ -1724,8 +1859,7 @@ type TBuildOriginInfoOptions<TApi, TRes, TSigner, TCustomChain extends string =
|
|
|
1724
1859
|
api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
|
|
1725
1860
|
origin: TSubstrateChain;
|
|
1726
1861
|
sender: string;
|
|
1727
|
-
|
|
1728
|
-
originAsset: TAssetInfo;
|
|
1862
|
+
assets: WithAmount<TAssetInfo>[];
|
|
1729
1863
|
amount: bigint;
|
|
1730
1864
|
originFee: bigint;
|
|
1731
1865
|
originFeeAsset: TAssetInfo;
|
|
@@ -1736,7 +1870,7 @@ type BuildHopInfoOptions<TApi, TRes, TSigner, TCustomChain extends string = neve
|
|
|
1736
1870
|
chain: TChain;
|
|
1737
1871
|
fee: bigint;
|
|
1738
1872
|
originChain: TSubstrateChain;
|
|
1739
|
-
currency:
|
|
1873
|
+
currency: TSingleCurrencyInput;
|
|
1740
1874
|
asset: TAssetInfo;
|
|
1741
1875
|
sender: string;
|
|
1742
1876
|
ahAddress?: string;
|
|
@@ -1746,9 +1880,10 @@ type TBuildDestInfoOptions<TApi, TRes, TSigner, TCustomChain extends string = ne
|
|
|
1746
1880
|
origin: TSubstrateChain;
|
|
1747
1881
|
destination: TChain;
|
|
1748
1882
|
recipient: string;
|
|
1749
|
-
currency: WithAmount<
|
|
1883
|
+
currency: WithAmount<TSingleCurrencyInput>;
|
|
1750
1884
|
originFee: bigint;
|
|
1751
1885
|
isFeeAssetAh: boolean;
|
|
1886
|
+
paysDestFee: boolean;
|
|
1752
1887
|
destFeeDetail: TXcmFeeDetail;
|
|
1753
1888
|
totalHopFee: bigint;
|
|
1754
1889
|
bridgeFee?: bigint;
|
|
@@ -1757,18 +1892,18 @@ type TOriginFeeDetails = {
|
|
|
1757
1892
|
sufficientForXCM: boolean;
|
|
1758
1893
|
xcmFee: bigint;
|
|
1759
1894
|
};
|
|
1760
|
-
type TGetTransferInfoOptionsBase<TRes
|
|
1895
|
+
type TGetTransferInfoOptionsBase<TRes, TCurrency = WithAmount<TCurrencyCore>> = {
|
|
1761
1896
|
buildTx: TTxFactory<TRes>;
|
|
1762
1897
|
origin: TSubstrateChain;
|
|
1763
1898
|
destination: TChain;
|
|
1764
1899
|
sender: string;
|
|
1765
1900
|
ahAddress?: string;
|
|
1766
1901
|
recipient: string;
|
|
1767
|
-
currency:
|
|
1902
|
+
currency: TCurrency;
|
|
1768
1903
|
version: Version | undefined;
|
|
1769
1904
|
feeAsset?: TCurrencyCore;
|
|
1770
1905
|
};
|
|
1771
|
-
type TGetTransferInfoOptions<TApi, TRes, TSigner, TCustomChain extends string = never
|
|
1906
|
+
type TGetTransferInfoOptions<TApi, TRes, TSigner, TCustomChain extends string = never, TCurrency = WithAmount<TCurrencyCore>> = WithApi<TGetTransferInfoOptionsBase<TRes, TCurrency>, TApi, TRes, TSigner, TCustomChain>;
|
|
1772
1907
|
|
|
1773
1908
|
type TExchangeChain = (typeof EXCHANGE_CHAINS)[number];
|
|
1774
1909
|
type TExchangeInput = TExchangeChain | TExchangeChain[] | undefined;
|
|
@@ -1894,6 +2029,10 @@ interface IXTokensTransfer<TApi, TRes, TSigner, TCustomChain extends string = ne
|
|
|
1894
2029
|
type TScenario = 'ParaToRelay' | 'ParaToPara' | 'RelayToPara';
|
|
1895
2030
|
type TAddress = string | TLocation;
|
|
1896
2031
|
type TDestination = TChain | TLocation;
|
|
2032
|
+
type TResolvedCurrency = {
|
|
2033
|
+
assets: WithAmount<TAssetInfo>[];
|
|
2034
|
+
asset: WithAmount<TAssetInfo>;
|
|
2035
|
+
};
|
|
1897
2036
|
type TTransferBaseOptions<TApi, TRes, TSigner> = {
|
|
1898
2037
|
/**
|
|
1899
2038
|
* The origin chain
|
|
@@ -2113,89 +2252,6 @@ declare abstract class BaseAssetsPallet {
|
|
|
2113
2252
|
abstract getBalance<TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, address: string, asset: TAssetInfo, customCurrencyId?: unknown): Promise<bigint>;
|
|
2114
2253
|
}
|
|
2115
2254
|
|
|
2116
|
-
type TGetBalanceCommonOptions<TCustomChain extends string = never> = {
|
|
2117
|
-
/**
|
|
2118
|
-
* The address of the account.
|
|
2119
|
-
*/
|
|
2120
|
-
address: string;
|
|
2121
|
-
/**
|
|
2122
|
-
* The chain on which to query the balance.
|
|
2123
|
-
*/
|
|
2124
|
-
chain: TChain | TCustomChain;
|
|
2125
|
-
};
|
|
2126
|
-
/**
|
|
2127
|
-
* Retrieves the asset balance for a given account on a specified chain.
|
|
2128
|
-
*/
|
|
2129
|
-
type TGetAssetBalanceOptionsBase<TCustomChain extends string = never> = TGetBalanceCommonOptions<TCustomChain> & {
|
|
2130
|
-
/**
|
|
2131
|
-
* The resolved asset to query balance for.
|
|
2132
|
-
*/
|
|
2133
|
-
asset: TAssetInfo;
|
|
2134
|
-
};
|
|
2135
|
-
/**
|
|
2136
|
-
* Retrieves the currency balance for a given account on a specified chain.
|
|
2137
|
-
*/
|
|
2138
|
-
type TGetBalanceOptionsBase<TCustomChain extends string = never> = TGetBalanceCommonOptions<TCustomChain> & {
|
|
2139
|
-
/**
|
|
2140
|
-
* The currency to query.
|
|
2141
|
-
*/
|
|
2142
|
-
currency?: TCurrencyCore;
|
|
2143
|
-
};
|
|
2144
|
-
type TGetBalanceOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TGetBalanceOptionsBase<TCustomChain>, TApi, TRes, TSigner, TCustomChain>;
|
|
2145
|
-
type TGetAssetBalanceOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TGetAssetBalanceOptionsBase<TCustomChain>, TApi, TRes, TSigner, TCustomChain>;
|
|
2146
|
-
type TGetTransferableAmountOptionsBase<TRes> = {
|
|
2147
|
-
/**
|
|
2148
|
-
* The sender address of the account.
|
|
2149
|
-
*/
|
|
2150
|
-
sender: string;
|
|
2151
|
-
/**
|
|
2152
|
-
* The chain on which to query the balance.
|
|
2153
|
-
*/
|
|
2154
|
-
origin: TSubstrateChain;
|
|
2155
|
-
/**
|
|
2156
|
-
* The destination chain.
|
|
2157
|
-
*/
|
|
2158
|
-
destination: TChain;
|
|
2159
|
-
/**
|
|
2160
|
-
* The currency to query.
|
|
2161
|
-
*/
|
|
2162
|
-
currency: WithAmount<TCurrencyCore>;
|
|
2163
|
-
version: Version | undefined;
|
|
2164
|
-
buildTx: TTxFactory<TRes>;
|
|
2165
|
-
feeAsset?: TCurrencyInput;
|
|
2166
|
-
};
|
|
2167
|
-
type TGetTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TGetTransferableAmountOptionsBase<TRes>, TApi, TRes, TSigner, TCustomChain>;
|
|
2168
|
-
type TGetMinTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TGetTransferableAmountOptionsBase<TRes> & {
|
|
2169
|
-
recipient: string;
|
|
2170
|
-
builder: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner>, TCustomChain>;
|
|
2171
|
-
}, TApi, TRes, TSigner, TCustomChain>;
|
|
2172
|
-
type TVerifyEdOnDestinationOptionsBase<TRes> = {
|
|
2173
|
-
/**
|
|
2174
|
-
* The origin chain.
|
|
2175
|
-
*/
|
|
2176
|
-
origin: TSubstrateChain;
|
|
2177
|
-
/**
|
|
2178
|
-
* The destination chain.
|
|
2179
|
-
*/
|
|
2180
|
-
destination: TChain;
|
|
2181
|
-
/**
|
|
2182
|
-
* The address of the account.
|
|
2183
|
-
*/
|
|
2184
|
-
recipient: string;
|
|
2185
|
-
/**
|
|
2186
|
-
* The account of the sender.
|
|
2187
|
-
*/
|
|
2188
|
-
sender: string;
|
|
2189
|
-
/**
|
|
2190
|
-
* The currency to query.
|
|
2191
|
-
*/
|
|
2192
|
-
currency: WithAmount<TCurrencyCore>;
|
|
2193
|
-
version: Version | undefined;
|
|
2194
|
-
buildTx: TTxFactory<TRes>;
|
|
2195
|
-
feeAsset?: TCurrencyInput;
|
|
2196
|
-
};
|
|
2197
|
-
type TVerifyEdOnDestinationOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TVerifyEdOnDestinationOptionsBase<TRes>, TApi, TRes, TSigner, TCustomChain>;
|
|
2198
|
-
|
|
2199
2255
|
type OneKey<K extends string, V = unknown> = {
|
|
2200
2256
|
[P in K]: Record<P, V> & Partial<Record<Exclude<K, P>, never>> extends infer O ? {
|
|
2201
2257
|
[Q in keyof O]: O[Q];
|
|
@@ -2339,7 +2395,7 @@ declare const getSwapExtensionOrThrow: () => TSwapExtension;
|
|
|
2339
2395
|
declare const claimAssets: <TApi, TRes, TSigner>(options: TAssetClaimOptions<TApi, TRes, TSigner>) => Promise<TRes>;
|
|
2340
2396
|
|
|
2341
2397
|
declare const resolveTransferParams: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TSubstrateTransferOptions<TApi, TRes, TSigner, TCustomChain>) => {
|
|
2342
|
-
resolvedFeeAsset: TAssetInfo | undefined;
|
|
2398
|
+
resolvedFeeAsset: _paraspell_assets.WithOptionalAmount<TAssetInfo> | undefined;
|
|
2343
2399
|
resolvedVersion: _paraspell_sdk_common.Version;
|
|
2344
2400
|
overriddenAsset: _paraspell_sdk_common.TLocation | _paraspell_assets.TAssetWithFee[] | undefined;
|
|
2345
2401
|
normalizedAsset: {
|
|
@@ -2397,7 +2453,7 @@ declare const aggregateHopFees: (hops: TXcmFeeHopInfo[], matchAsset: TAssetInfo)
|
|
|
2397
2453
|
bridgeFee?: bigint;
|
|
2398
2454
|
};
|
|
2399
2455
|
|
|
2400
|
-
declare const buildDestInfo: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, origin, destination, recipient, currency, originFee, isFeeAssetAh, destFeeDetail, totalHopFee, bridgeFee }: TBuildDestInfoOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<{
|
|
2456
|
+
declare const buildDestInfo: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, origin, destination, recipient, currency, originFee, isFeeAssetAh, paysDestFee, destFeeDetail, totalHopFee, bridgeFee }: TBuildDestInfoOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<{
|
|
2401
2457
|
receivedCurrency: {
|
|
2402
2458
|
sufficient: boolean | UnableToComputeError;
|
|
2403
2459
|
receivedAmount: bigint | UnableToComputeError;
|
|
@@ -2421,15 +2477,18 @@ declare const buildHopInfo: <TApi, TRes, TSigner, TCustomChain extends string =
|
|
|
2421
2477
|
};
|
|
2422
2478
|
}>;
|
|
2423
2479
|
|
|
2424
|
-
declare const buildOriginInfo: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, origin, sender,
|
|
2480
|
+
declare const buildOriginInfo: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, origin, sender, assets, amount, originFee, originFeeAsset, isFeeAssetAh }: TBuildOriginInfoOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<{
|
|
2481
|
+
selectedCurrency: TSelectedCurrencyInfo[];
|
|
2482
|
+
xcmFee: TOriginXcmFeeInfo;
|
|
2483
|
+
}>;
|
|
2425
2484
|
|
|
2426
|
-
declare const getTransferInfo: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, buildTx, origin, destination, sender, ahAddress, recipient, currency, feeAsset, version }: TGetTransferInfoOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<TTransferInfo
|
|
2485
|
+
declare const getTransferInfo: <TApi, TRes, TSigner, TCurrency extends TCurrencyInputWithAmount, TCustomChain extends string = never>({ api, buildTx, origin, destination, sender, ahAddress, recipient, currency, feeAsset, version }: TGetTransferInfoOptions<TApi, TRes, TSigner, TCustomChain, TCurrency>) => Promise<TTransferInfo<TCurrency>>;
|
|
2427
2486
|
|
|
2428
|
-
declare const getMinTransferableAmountInternal: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, origin, sender, recipient,
|
|
2429
|
-
declare const getMinTransferableAmount: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TGetMinTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<bigint
|
|
2487
|
+
declare const getMinTransferableAmountInternal: <TApi, TRes, TSigner, TCurrency extends TCurrencyInputWithAmount, TCustomChain extends string = never>({ api, origin, sender, recipient, destination, currency, feeAsset, buildTx, builder, version }: TGetMinTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain, TCurrency>) => Promise<TPerAssetResult<TCurrency, bigint>>;
|
|
2488
|
+
declare const getMinTransferableAmount: <TApi, TRes, TSigner, TCurrency extends TCurrencyInputWithAmount, TCustomChain extends string = never>(options: TGetMinTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain, TCurrency>) => Promise<TPerAssetResult<TCurrency, bigint>>;
|
|
2430
2489
|
|
|
2431
|
-
declare const getTransferableAmountInternal: <TApi, TRes, TSigner, TCustomChain extends string = never>(
|
|
2432
|
-
declare const getTransferableAmount: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TGetTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<bigint
|
|
2490
|
+
declare const getTransferableAmountInternal: <TApi, TRes, TSigner, TCurrency extends TCurrencyInputWithAmount, TCustomChain extends string = never>(options: TGetTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain, TCurrency>) => Promise<TPerAssetResult<TCurrency, bigint>>;
|
|
2491
|
+
declare const getTransferableAmount: <TApi, TRes, TSigner, TCurrency extends TCurrencyInputWithAmount, TCustomChain extends string = never>(options: TGetTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain, TCurrency>) => Promise<TPerAssetResult<TCurrency, bigint>>;
|
|
2433
2492
|
|
|
2434
2493
|
declare const resolveAssetCount: <TApi, TRes, TSigner>(overriddenAsset: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>["overriddenAsset"], isRelayAsset: boolean) => number;
|
|
2435
2494
|
declare const constructTypeAndThenCall: <TApi, TRes, TSigner, TCustomChain extends string = never>(context: TTypeAndThenCallContext<TApi, TRes, TSigner, TCustomChain>, fees?: TTypeAndThenFees | null) => Promise<TSerializedExtrinsics>;
|
|
@@ -2445,10 +2504,11 @@ declare const createTypeAndThenCall: <TApi, TRes, TSigner, TCustomChain extends
|
|
|
2445
2504
|
*/
|
|
2446
2505
|
declare const createTypeThenAutoReserve: <TApi, TRes, TSigner>(chain: TSubstrateChain, options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>) => Promise<TSerializedExtrinsics>;
|
|
2447
2506
|
|
|
2507
|
+
declare const assertNotRawAssets: (currency: TCurrencyInput) => asserts currency is Exclude<TCurrencyInput, TAsset<TAmount>[]>;
|
|
2448
2508
|
declare const validateCurrency: (currency: TCurrencyInput, feeAsset?: TCurrencyInput) => void;
|
|
2449
2509
|
declare const validateDestination: <TApi, TRes, TSigner, TCustomChain extends string = never>(origin: TSubstrateChain, destination: TDestination, api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>) => void;
|
|
2450
2510
|
declare const validateAssetSpecifiers: (assetCheckEnabled: boolean, currency: TCurrencyInput) => void;
|
|
2451
|
-
declare const validateTransact: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, from, to, sender, recipient: address, transactOptions }: TSubstrateTransferOptions<TApi, TRes, TSigner, TCustomChain>) => ValidationError | undefined;
|
|
2511
|
+
declare const validateTransact: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, from, to, sender, recipient: address, currency, transactOptions }: TSubstrateTransferOptions<TApi, TRes, TSigner, TCustomChain>) => ValidationError | undefined;
|
|
2452
2512
|
|
|
2453
2513
|
declare const verifyEdOnDestination: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TVerifyEdOnDestinationOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<boolean>;
|
|
2454
2514
|
|
|
@@ -2482,7 +2542,7 @@ declare const formatAssetIdToERC20: (id: string) => string;
|
|
|
2482
2542
|
declare const maybeOverrideAssets: (version: Version, amount: bigint, assets: TAsset[], overriddenCurrency?: TLocation | TAsset[]) => TAsset | TAsset[];
|
|
2483
2543
|
declare const maybeOverrideAsset: (version: Version, amount: bigint, asset: TAsset, overriddenCurrency?: TLocation | TAsset[]) => TAsset;
|
|
2484
2544
|
|
|
2485
|
-
declare const sortAssets: (assets:
|
|
2545
|
+
declare const sortAssets: <T extends TAsset>(assets: T[]) => T[];
|
|
2486
2546
|
|
|
2487
2547
|
declare const computeOverridenAmount: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TCreateTxsOptions<TApi, TRes, TSigner, TCustomChain>, increaseAmount: string, relative?: boolean) => number | bigint;
|
|
2488
2548
|
declare const overrideTxAmount: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TCreateTxsOptions<TApi, TRes, TSigner, TCustomChain>, builder: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptions<TApi, TRes, TSigner>, TCustomChain>, amount: string, relative?: boolean) => Promise<TRes>;
|
|
@@ -2610,5 +2670,5 @@ declare const selectXcmVersion: (forcedVersion: Version | undefined, originVersi
|
|
|
2610
2670
|
declare const pickCompatibleXcmVersion: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, origin: TSubstrateChain | TCustomChain, destination: TDestination, override?: Version) => Version;
|
|
2611
2671
|
declare const pickRouterCompatibleXcmVersion: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, origin: TSubstrateChain | undefined, exchangeChain: TSubstrateChain, destination: TChain | undefined) => Version;
|
|
2612
2672
|
|
|
2613
|
-
export { API_TYPES, AmountTooLowError, ApiNotInitializedError, AssetClaimBuilder, BaseAssetsPallet, BatchMode, BatchValidationError, BridgeHaltedError, Builder, CustomChainConflictError, CustomChainInvalidError, DEFAULT_TTL_MS, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETH_MAINNET_CHAIN_ID, ETH_TESTNET_CHAIN_ID, EXCHANGE_CHAINS, EXTENSION_MS, ExtensionNotInstalledError, FeatureTemporarilyDisabledError, GeneralBuilder, InvalidAddressError, MAX_CLIENTS, MissingChainApiError, MissingParameterError, NoXCMSupportImplementedError, NumberFormatError, OverrideConflictError, PolkadotApi, PolkadotXcmError, PolkadotXcmExecutionError, ProviderUnavailableError, RELAY_LOCATION, RoutingResolutionError, RuntimeApiError, RuntimeApiUnavailableError, ScenarioNotSupportedError, SubmitTransactionError, TRANSACT_ORIGINS, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, TypeAndThenUnavailableError, UnableToComputeError, UnsupportedOperationError, ValidationError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, aggregateHopFees, applyDecimalAbstraction, assertAddressIsString, assertCurrencyCore, assertEvmAddress, assertExtensionInstalled, assertHasId, assertNotEvmTransfer, assertSender, assertSenderSource, assertSubstrateOrigin, assertSwapSupport, assertToIsString, blake2b256, blake2b512, buildCustomChainAssetsInfo, buildCustomChainConfig, buildDestInfo, buildHopInfo, buildOriginInfo, calcPreviewMintAmount, claimAssets, compareAddresses, computeOverridenAmount, constructTypeAndThenCall, convertBuilderConfig, convertSs58, createAsset, createAssetId, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createClientCache, createClientPoolHelpers, createCustomXcmOnDest, createDestination, createDirectExecuteXcm, createEthereumBridgeInstructions, createExecuteCall, createExecuteExchangeXcm, createSwapBuilder, createTransfer, createTransferOrSwap, createTransferOrSwapAll, createTxOverrideAmount, createTypeAndThenCall, createTypeThenAutoReserve, createVersionedAssets, createVersionedDestination, createX1Payload, deriveAccountId, dryRun, dryRunInternal, dryRunOrigin, encodeSs58, executeWithSwap, formatAssetIdToERC20, formatUnits, generateMessageId, getAssetBalanceInternal, getAssetReserveChain, getAssetReserveChainImpl, getBalance, getBalanceInternal, getBridgeStatus, getChain, getChainConfig, getChainConfigImpl, getChainLocation, getChainProviders, getChainProvidersImpl, getChainVersion, getEthErc20Balance, getEvmExtensionOrThrow, getEvmPrivateKeyHex, getEvmSnowbridgeExtensionOrThrow, getFailureInfo, getLocalTransferAmount, getMinTransferableAmount, getMinTransferableAmountInternal, getMoonbeamErc20Balance, getOriginXcmFee, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getParaIdImpl, getRelayChainOf, getRelayChainOfImpl, getRelayChainSymbolOf, getSwapExtensionOrThrow, getTChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeInternal, getXcmFeeOnce, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, isSenderSigner, isViemSigner, keyFromWs, localizeLocation, localizeLocationImpl, maybeOverrideAsset, maybeOverrideAssets, normalizeAmount, normalizeCustomChains, normalizeExchange, overrideTxAmount, padFee, padValueBy, parseUnits, pickCompatibleXcmVersion, pickRouterCompatibleXcmVersion, registerEvmExtension, registerEvmSnowbridgeExtension, registerSwapExtension, resolveAssetCount, resolveDestChain, resolveModuleError, resolveParaId, resolveTransferParams, reverseTransformLocation, selectXcmVersion, sortAssets, throwUnsupportedCurrency, transferMoonbeamEvm, transferMoonbeamToEth, traverseXcmHops, validateAddress, validateAssetSpecifiers, validateCurrency, validateDestination, validateDestinationAddress, validateTransact, verifyEdOnDestination, wrapTxBypass };
|
|
2614
|
-
export type { BuildHopInfoOptions, ClientCache, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotXCMTransfer, IXTokensTransfer, OneKey, TAddress, TApiOrUrl, TApiType, TAssetClaimInternalOptions, TAssetClaimOptions, TAssetClaimOptionsBase, TBatchOptions, TBatchedTransferOptions, TBifrostToken, TBridgeStatus, TBuildAllInternalRes, TBuildDestInfoOptions, TBuildEvmTransferOptions, TBuildInternalRes, TBuildInternalResBase, TBuildOriginInfoOptions, TBuilderConfig, TBuilderInternalOptions, TBuilderOptions, TBypassOptions, TCacheItem, TChainConfig, TChainConfigMap, TChainEndpoint, TChainWithApi, TClientEntry, TClientKey, TConditionalXcmFeeDetail, TConditionalXcmFeeHopInfo, TCreateBaseSwapXcmOptions, TCreateBaseTransferXcmOptions, TCreateBeneficiaryOptions, TCreateBeneficiaryXTokensOptions, TCreateEthBridgeInstructionsOptions, TCreateSwapXcmInternalOptions, TCreateSwapXcmOptions, TCreateTransferXcmOptions, TCreateTxsOptions, TCustomChainEntry, TCustomChainEntryHydrated, TCustomChainFrom, TCustomChainInput, TCustomChainPalletsInput, TCustomChainsCtx, TCustomChainsMap, TDestWeight, TDestination, TDryRunBaseOptions, TDryRunBypassOptions, TDryRunCallBaseOptions, TDryRunCallOptions, TDryRunChainFailure, TDryRunChainResult, TDryRunChainSuccess, TDryRunError, TDryRunOptions, TDryRunPreviewOptions, TDryRunResBase, TDryRunResult, TDryRunXcmBaseOptions, TDryRunXcmOptions, TEvmExtension, TEvmSnowbridgeExtension, TEvmTransferOptions, TEvmTransferOptionsBase, TExchangeChain, TExchangeInput, TFeeType, TForeignAssetId, TForeignOrNativeAsset, TForeignOrTokenAsset, TFullCustomCtx, TGetAssetBalanceOptions, TGetAssetBalanceOptionsBase, TGetBalanceCommonOptions, TGetBalanceOptions, TGetBalanceOptionsBase, TGetFeeForDestChainBaseOptions, TGetFeeForDestChainOptions, TGetMinTransferableAmountOptions, TGetOriginXcmFeeBaseOptions, TGetOriginXcmFeeInternalOptions, TGetOriginXcmFeeOptions, TGetReverseTxFeeOptions, TGetTransferInfoOptions, TGetTransferInfoOptionsBase, TGetTransferableAmountOptions, TGetTransferableAmountOptionsBase, TGetXcmFeeBaseOptions, TGetXcmFeeBuilderOptions, TGetXcmFeeInternalOptions, TGetXcmFeeOptions, TGetXcmFeeResult, THopInfo, THopTransferInfo, TModuleError, TNativeTokenAsset, TOriginFeeDetails, TOtherReserveAsset, TPaymentInfo, TPolkadotXCMTransferOptions, TPolkadotXcmMethod, TProviderEntry, TReserveAsset, TResolveHopParams, TRuntimeApi, TScenario, TSelfReserveAsset, TSender, TSerializedExtrinsics, TSerializedRuntimeApiQuery, TSerializedStateQuery, TSetBalanceRes, TStatusChangeCallback, TSubstrateTransferBaseOptions, TSubstrateTransferBaseOptionsWithSender, TSubstrateTransferOptions, TSwapBuilder, TSwapBuilderFactory, TSwapConfig, TSwapEvent, TSwapEventType, TSwapExtension, TSwapFeeEstimates, TSwapOptions, TSystemProperties, TTransactOptions, TTransactOrigin, TTransactionContext, TTransactionType, TTransferBaseOptions, TTransferBaseOptionsWithSender, TTransferBaseOptionsWithSwap, TTransferFeeEstimates, TTransferInfo, TTransferInternalOptions, TTransferLocalOptions, TTransferOptions, TTransferOptionsWithSwap, TTxFactory, TTypeAndThenCallContext, TTypeAndThenFees, TTypeAndThenOverrides, TUrl, TVerifyEdOnDestinationOptions, TVerifyEdOnDestinationOptionsBase, TWeight, TXTokensCurrencySelection, TXTokensMethod, TXTokensTransferOptions, TXcmAsset, TXcmFeeBase, TXcmFeeDetail, TXcmFeeDetailError, TXcmFeeDetailSuccess, TXcmFeeDetailWithFallback, TXcmFeeDetailWithForwardedXcm, TXcmFeeHopInfo, TXcmFeeHopResult, TXcmFeeSwapConfig, TXcmForeignAsset, TXcmPalletMethod, TXcmVersioned, TZeitgeistAsset, WithApi, WithRequiredSender, WithRequiredSwapOptions };
|
|
2673
|
+
export { API_TYPES, AmountTooLowError, ApiNotInitializedError, AssetClaimBuilder, BaseAssetsPallet, BatchMode, BatchValidationError, BridgeHaltedError, Builder, CustomChainConflictError, CustomChainInvalidError, DEFAULT_TTL_MS, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETH_MAINNET_CHAIN_ID, ETH_TESTNET_CHAIN_ID, EXCHANGE_CHAINS, EXTENSION_MS, ExtensionNotInstalledError, FeatureTemporarilyDisabledError, GeneralBuilder, InvalidAddressError, MAX_CLIENTS, MissingChainApiError, MissingParameterError, NoXCMSupportImplementedError, NumberFormatError, OverrideConflictError, PolkadotApi, PolkadotXcmError, PolkadotXcmExecutionError, ProviderUnavailableError, RELAY_LOCATION, RoutingResolutionError, RuntimeApiError, RuntimeApiUnavailableError, ScenarioNotSupportedError, SubmitTransactionError, TRANSACT_ORIGINS, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, TypeAndThenUnavailableError, UnableToComputeError, UnsupportedOperationError, ValidationError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, aggregateHopFees, applyDecimalAbstraction, assertAddressIsString, assertCurrencyCore, assertEvmAddress, assertExtensionInstalled, assertHasId, assertNotEvmTransfer, assertNotRawAssets, assertSender, assertSenderSource, assertSubstrateOrigin, assertSwapSupport, assertToIsString, blake2b256, blake2b512, buildCustomChainAssetsInfo, buildCustomChainConfig, buildDestInfo, buildHopInfo, buildOriginInfo, calcPreviewMintAmount, claimAssets, compareAddresses, computeOverridenAmount, constructTypeAndThenCall, convertBuilderConfig, convertSs58, createAsset, createAssetId, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createClientCache, createClientPoolHelpers, createCustomXcmOnDest, createDestination, createDirectExecuteXcm, createEthereumBridgeInstructions, createExecuteCall, createExecuteExchangeXcm, createSwapBuilder, createTransfer, createTransferOrSwap, createTransferOrSwapAll, createTxOverrideAmount, createTypeAndThenCall, createTypeThenAutoReserve, createVersionedAssets, createVersionedDestination, createX1Payload, deriveAccountId, dryRun, dryRunInternal, dryRunOrigin, encodeSs58, executeWithSwap, formatAssetIdToERC20, formatUnits, generateMessageId, getAssetBalanceInternal, getAssetReserveChain, getAssetReserveChainImpl, getBalance, getBalanceInternal, getBridgeStatus, getChain, getChainConfig, getChainConfigImpl, getChainLocation, getChainProviders, getChainProvidersImpl, getChainVersion, getEthErc20Balance, getEvmExtensionOrThrow, getEvmPrivateKeyHex, getEvmSnowbridgeExtensionOrThrow, getFailureInfo, getLocalTransferAmount, getMinTransferableAmount, getMinTransferableAmountInternal, getMoonbeamErc20Balance, getOriginXcmFee, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getParaIdImpl, getRelayChainOf, getRelayChainOfImpl, getRelayChainSymbolOf, getSwapExtensionOrThrow, getTChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeInternal, getXcmFeeOnce, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, isSenderSigner, isViemSigner, keyFromWs, localizeLocation, localizeLocationImpl, maybeOverrideAsset, maybeOverrideAssets, normalizeAmount, normalizeCustomChains, normalizeExchange, overrideTxAmount, padFee, padValueBy, parseUnits, pickCompatibleXcmVersion, pickRouterCompatibleXcmVersion, registerEvmExtension, registerEvmSnowbridgeExtension, registerSwapExtension, resolveAssetCount, resolveDestChain, resolveModuleError, resolveParaId, resolveTransferParams, reverseTransformLocation, selectXcmVersion, sortAssets, throwUnsupportedCurrency, transferMoonbeamEvm, transferMoonbeamToEth, traverseXcmHops, validateAddress, validateAssetSpecifiers, validateCurrency, validateDestination, validateDestinationAddress, validateTransact, verifyEdOnDestination, wrapTxBypass };
|
|
2674
|
+
export type { BuildHopInfoOptions, ClientCache, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotXCMTransfer, IXTokensTransfer, OneKey, TAddress, TApiOrUrl, TApiType, TAssetClaimInternalOptions, TAssetClaimOptions, TAssetClaimOptionsBase, TBatchOptions, TBatchedTransferOptions, TBifrostToken, TBridgeStatus, TBuildAllInternalRes, TBuildDestInfoOptions, TBuildEvmTransferOptions, TBuildInternalRes, TBuildInternalResBase, TBuildOriginInfoOptions, TBuilderConfig, TBuilderInternalOptions, TBuilderOptions, TBypassOptions, TCacheItem, TChainConfig, TChainConfigMap, TChainEndpoint, TChainWithApi, TClientEntry, TClientKey, TConditionalXcmFeeDetail, TConditionalXcmFeeHopInfo, TCreateBaseSwapXcmOptions, TCreateBaseTransferXcmOptions, TCreateBeneficiaryOptions, TCreateBeneficiaryXTokensOptions, TCreateEthBridgeInstructionsOptions, TCreateSwapXcmInternalOptions, TCreateSwapXcmOptions, TCreateTransferXcmOptions, TCreateTxsOptions, TCustomChainEntry, TCustomChainEntryHydrated, TCustomChainFrom, TCustomChainInput, TCustomChainPalletsInput, TCustomChainsCtx, TCustomChainsMap, TDestWeight, TDestination, TDryRunBaseOptions, TDryRunBypassOptions, TDryRunCallBaseOptions, TDryRunCallOptions, TDryRunChainFailure, TDryRunChainResult, TDryRunChainSuccess, TDryRunError, TDryRunOptions, TDryRunPreviewOptions, TDryRunResBase, TDryRunResult, TDryRunXcmBaseOptions, TDryRunXcmOptions, TEvmExtension, TEvmSnowbridgeExtension, TEvmTransferOptions, TEvmTransferOptionsBase, TExchangeChain, TExchangeInput, TFeeType, TForeignAssetId, TForeignOrNativeAsset, TForeignOrTokenAsset, TFullCustomCtx, TGetAssetBalanceOptions, TGetAssetBalanceOptionsBase, TGetBalanceCommonOptions, TGetBalanceOptions, TGetBalanceOptionsBase, TGetFeeForDestChainBaseOptions, TGetFeeForDestChainOptions, TGetMinTransferableAmountOptions, TGetOriginXcmFeeBaseOptions, TGetOriginXcmFeeInternalOptions, TGetOriginXcmFeeOptions, TGetReverseTxFeeOptions, TGetTransferInfoOptions, TGetTransferInfoOptionsBase, TGetTransferableAmountOptions, TGetTransferableAmountOptionsBase, TGetXcmFeeBaseOptions, TGetXcmFeeBuilderOptions, TGetXcmFeeInternalOptions, TGetXcmFeeOptions, TGetXcmFeeResult, THopInfo, THopTransferInfo, TModuleError, TNativeTokenAsset, TOriginFeeDetails, TOriginXcmFeeInfo, TOtherReserveAsset, TPaymentInfo, TPerAssetResult, TPolkadotXCMTransferOptions, TPolkadotXcmMethod, TProviderEntry, TReceivedCurrencyInfo, TReserveAsset, TResolveHopParams, TResolvedCurrency, TRuntimeApi, TScenario, TSelectedCurrencyInfo, TSelfReserveAsset, TSender, TSerializedExtrinsics, TSerializedRuntimeApiQuery, TSerializedStateQuery, TSetBalanceRes, TStatusChangeCallback, TSubstrateTransferBaseOptions, TSubstrateTransferBaseOptionsWithSender, TSubstrateTransferOptions, TSwapBuilder, TSwapBuilderFactory, TSwapConfig, TSwapEvent, TSwapEventType, TSwapExtension, TSwapFeeEstimates, TSwapOptions, TSystemProperties, TTransactOptions, TTransactOrigin, TTransactionContext, TTransactionType, TTransferBaseOptions, TTransferBaseOptionsWithSender, TTransferBaseOptionsWithSwap, TTransferFeeEstimates, TTransferInfo, TTransferInternalOptions, TTransferLocalOptions, TTransferOptions, TTransferOptionsWithSwap, TTxFactory, TTypeAndThenCallContext, TTypeAndThenFees, TTypeAndThenOverrides, TUrl, TVerifyEdOnDestinationOptions, TVerifyEdOnDestinationOptionsBase, TWeight, TXTokensCurrencySelection, TXTokensMethod, TXTokensTransferOptions, TXcmAsset, TXcmFeeBase, TXcmFeeDetail, TXcmFeeDetailError, TXcmFeeDetailSuccess, TXcmFeeDetailWithFallback, TXcmFeeDetailWithForwardedXcm, TXcmFeeHopInfo, TXcmFeeHopResult, TXcmFeeSwapConfig, TXcmForeignAsset, TXcmPalletMethod, TXcmVersioned, TZeitgeistAsset, WithApi, WithRequiredSender, WithRequiredSwapOptions };
|