@paraspell/sdk-core 13.7.2 → 13.9.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +238 -152
  2. package/dist/index.mjs +1009 -890
  3. 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, TCurrencyCore, TAmount, TAssetWithFee, WithComplexAmount, TAssetInfoWithId } from '@paraspell/assets';
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';
@@ -121,6 +121,23 @@ declare abstract class PolkadotApi<TApi, TRes, TSigner, TCustomChain extends str
121
121
  private maybeHydrateCustomChain;
122
122
  }
123
123
 
124
+ type TSetBalanceRes = {
125
+ assetStatusTx?: TSerializedExtrinsics;
126
+ balanceTx: TSerializedExtrinsics;
127
+ };
128
+ type TMintConfig = {
129
+ useIdPrefix?: boolean;
130
+ useLocationId?: boolean;
131
+ useBigIntId?: boolean;
132
+ useCustomCurrencyId?: boolean;
133
+ };
134
+ declare abstract class BaseAssetsPallet {
135
+ protected palletName: TAssetsPallet;
136
+ constructor(palletName: TAssetsPallet);
137
+ abstract mint<TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, address: string, assetInfo: WithAmount<TAssetInfo>, balance: bigint, chain: Chain<TApi, TRes, TSigner, TCustomChain>): Promise<TSetBalanceRes>;
138
+ abstract getBalance<TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, address: string, asset: TAssetInfo, customCurrencyId?: unknown): Promise<bigint>;
139
+ }
140
+
124
141
  declare abstract class Chain<TApi, TRes, TSigner, TCustomChain extends string = never> {
125
142
  private readonly _chain;
126
143
  private readonly _info;
@@ -148,6 +165,9 @@ declare abstract class Chain<TApi, TRes, TSigner, TCustomChain extends string =
148
165
  getCustomCurrencyId(_api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, _asset: TAssetInfo): unknown;
149
166
  getBalanceForeign(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, address: string, asset: TAssetInfo): Promise<bigint>;
150
167
  getBalance(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, address: string, asset: TAssetInfo): Promise<bigint>;
168
+ mint(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, address: string, assetInfo: WithAmount<TAssetInfo>, balance: bigint): Promise<TSetBalanceRes>;
169
+ resolveMintConfig(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>): TMintConfig;
170
+ protected getMintConfig(): TMintConfig;
151
171
  }
152
172
 
153
173
  declare class Acala<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
@@ -157,6 +177,7 @@ declare class Acala<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> impl
157
177
  transferLocalNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): Promise<TRes>;
158
178
  transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
159
179
  getCustomCurrencyId<TCustomChain extends string = never>(_api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, asset: TAssetInfo): TForeignOrTokenAsset;
180
+ protected getMintConfig(): TMintConfig;
160
181
  getBalance(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
161
182
  }
162
183
 
@@ -195,6 +216,7 @@ declare class AssetHubWestend<TApi, TRes, TSigner> extends AssetHubPolkadot<TApi
195
216
 
196
217
  declare class Astar<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
197
218
  constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
219
+ protected getMintConfig(): TMintConfig;
198
220
  transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
199
221
  isRelayToParaEnabled(): boolean;
200
222
  transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
@@ -202,6 +224,7 @@ declare class Astar<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> impl
202
224
 
203
225
  declare class Hydration<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
204
226
  constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
227
+ protected getMintConfig(): TMintConfig;
205
228
  transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
206
229
  transferMoonbeamWhAsset<TApi, TRes, TSigner>(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
207
230
  transferLocalNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): Promise<TRes>;
@@ -258,6 +281,7 @@ declare class BifrostPolkadot<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSi
258
281
  VSToken2?: undefined;
259
282
  VToken2?: undefined;
260
283
  };
284
+ protected getMintConfig(): TMintConfig;
261
285
  transferPolkadotXCM(options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
262
286
  transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
263
287
  }
@@ -348,6 +372,7 @@ declare class CrustShadow<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner
348
372
 
349
373
  declare class Darwinia<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
350
374
  constructor();
375
+ protected getMintConfig(): TMintConfig;
351
376
  transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
352
377
  transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
353
378
  }
@@ -361,6 +386,7 @@ declare class EnergyWebX<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner>
361
386
  constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
362
387
  transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
363
388
  isRelayToParaEnabled(): boolean;
389
+ protected getMintConfig(): TMintConfig;
364
390
  getBalanceForeign<TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
365
391
  }
366
392
 
@@ -445,6 +471,7 @@ declare class Mythos<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> imp
445
471
 
446
472
  declare class NeuroWeb<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
447
473
  constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
474
+ protected getMintConfig(): TMintConfig;
448
475
  transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
449
476
  transferLocalNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): Promise<TRes>;
450
477
  transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
@@ -498,6 +525,8 @@ declare class PeopleWestend<TApi, TRes, TSigner> extends PeoplePolkadot<TApi, TR
498
525
  declare class Quartz<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
499
526
  constructor();
500
527
  transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
528
+ transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
529
+ getBalanceForeign<TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
501
530
  isSendingTempDisabled(): boolean;
502
531
  }
503
532
 
@@ -514,7 +543,7 @@ declare class Shiden<TApi, TRes, TSigner> extends Astar<TApi, TRes, TSigner> {
514
543
  declare class Unique<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
515
544
  constructor();
516
545
  transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
517
- transferLocalNonNativeAsset(_options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
546
+ transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
518
547
  getBalanceForeign<TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
519
548
  }
520
549
 
@@ -734,8 +763,8 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TTransferBas
734
763
  * @param currency - The currency to be transferred.
735
764
  * @returns An instance of Builder
736
765
  */
737
- currency(currency: TCurrencyInputWithAmount): GeneralBuilder<TApi, TRes, TSigner, T & {
738
- currency: TCurrencyInputWithAmount;
766
+ currency<TCurrency extends TCurrencyInputWithAmount>(currency: TCurrency): GeneralBuilder<TApi, TRes, TSigner, T & {
767
+ currency: TCurrency;
739
768
  }, TCustomChain>;
740
769
  /**
741
770
  * Sets the recipient address.
@@ -883,37 +912,82 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TTransferBas
883
912
  getOriginXcmFee<TDisableFallback extends boolean = false>(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>, options?: TGetXcmFeeBuilderOptions & {
884
913
  disableFallback: TDisableFallback;
885
914
  }): Promise<TXcmFeeDetailWithForwardedXcm<TDisableFallback>>;
915
+ /**
916
+ * Returns the max transferable amount for each provided asset.
917
+ *
918
+ * @returns The max transferable amounts in the order the assets were provided.
919
+ */
920
+ getTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
921
+ currency: WithComplexAmount<TCurrencyCore>[];
922
+ }, TCustomChain>): Promise<bigint[]>;
886
923
  /**
887
924
  * Returns the max transferable amount for the transfer
888
925
  *
889
926
  * @returns The max transferable amount.
890
927
  */
891
- getTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<bigint>;
928
+ getTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
929
+ currency: TSingleCurrencyInputWithAmount;
930
+ }, TCustomChain>): Promise<bigint>;
931
+ getTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<bigint | bigint[]>;
932
+ /**
933
+ * Returns the min transferable amount for each provided asset.
934
+ *
935
+ * @returns The min transferable amounts in the order the assets were provided.
936
+ */
937
+ getMinTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
938
+ currency: WithComplexAmount<TCurrencyCore>[];
939
+ }, TCustomChain>): Promise<bigint[]>;
892
940
  /**
893
941
  * Returns the min transferable amount for the transfer
894
942
  *
895
943
  * @returns The min transferable amount.
896
944
  */
897
- getMinTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<bigint>;
945
+ getMinTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
946
+ currency: TSingleCurrencyInputWithAmount;
947
+ }, TCustomChain>): Promise<bigint>;
948
+ getMinTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<bigint | bigint[]>;
898
949
  /**
899
950
  * Returns the max transferable amount for the transfer
900
951
  *
901
952
  * @returns The max transferable amount.
902
953
  */
903
954
  verifyEdOnDestination(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<boolean>;
955
+ /**
956
+ * Returns the transfer info for each provided asset.
957
+ *
958
+ * @returns The transfer info with per-asset selected and received currency details.
959
+ */
960
+ getTransferInfo(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
961
+ currency: WithComplexAmount<TCurrencyCore>[];
962
+ }, TCustomChain>): Promise<TTransferInfo<WithComplexAmount<TCurrencyCore>[]>>;
904
963
  /**
905
964
  * Returns the transfer info for the transfer
906
965
  *
907
966
  * @returns The transfer info.
908
967
  */
909
- getTransferInfo(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<TTransferInfo>;
968
+ getTransferInfo(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
969
+ currency: TSingleCurrencyInputWithAmount;
970
+ }, TCustomChain>): Promise<TTransferInfo>;
971
+ getTransferInfo(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<TTransferInfo<TCurrencyInputWithAmount>>;
972
+ /**
973
+ * Returns the receivable amount on the destination for each provided asset.
974
+ *
975
+ * @returns The computed receivable amounts in the order the assets were provided.
976
+ * @throws \{UnableToComputeError\} Thrown when a receivable amount cannot be determined.
977
+ */
978
+ getReceivableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
979
+ currency: WithComplexAmount<TCurrencyCore>[];
980
+ }, TCustomChain>): Promise<bigint[]>;
910
981
  /**
911
982
  * Returns the receivable amount on the destination after the transfer
912
983
  *
913
984
  * @returns The computed receivable amount.
914
985
  * @throws \{UnableToComputeError\} Thrown when the receivable amount cannot be determined.
915
986
  */
916
- getReceivableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<bigint>;
987
+ getReceivableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
988
+ currency: TSingleCurrencyInputWithAmount;
989
+ }, TCustomChain>): Promise<bigint>;
990
+ getReceivableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<bigint | bigint[]>;
917
991
  getBestAmountOut(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSwap<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<{
918
992
  exchange: TExchangeChain;
919
993
  amountOut: bigint;
@@ -1110,6 +1184,7 @@ type TDryRunCallBaseOptions<TRes, TCustomChain extends string = never> = {
1110
1184
  */
1111
1185
  version: Version;
1112
1186
  asset: WithAmount<TAssetInfo>;
1187
+ assets?: WithAmount<TAssetInfo>[];
1113
1188
  bypassOptions?: TBypassOptions;
1114
1189
  feeAsset?: TAssetInfo;
1115
1190
  };
@@ -1149,10 +1224,8 @@ type TDryRunChainSuccess = TDryRunResBase & {
1149
1224
  forwardedXcms: any;
1150
1225
  destParaId?: number;
1151
1226
  };
1152
- type TDryRunChainFailure = TDryRunResBase & {
1227
+ type TDryRunChainFailure = TDryRunResBase & TDryRunError & {
1153
1228
  success: false;
1154
- failureReason: string;
1155
- failureSubReason?: string;
1156
1229
  };
1157
1230
  type TDryRunChainResult = TDryRunChainSuccess | TDryRunChainFailure;
1158
1231
  type THopInfo = {
@@ -1160,10 +1233,10 @@ type THopInfo = {
1160
1233
  result: TDryRunChainResult;
1161
1234
  };
1162
1235
  type TChainEndpoint = 'origin' | 'destination' | TChain;
1163
- type TDryRunResult = {
1164
- failureReason?: string;
1165
- failureSubReason?: string;
1236
+ type TDryRunFailureInfo = Partial<TDryRunError> & {
1166
1237
  failureChain?: TChainEndpoint;
1238
+ };
1239
+ type TDryRunResult = TDryRunFailureInfo & {
1167
1240
  origin: TDryRunChainResult;
1168
1241
  destination?: TDryRunChainResult;
1169
1242
  hops: THopInfo[];
@@ -1175,6 +1248,7 @@ type TResolveHopParams<TApi, TRes, TSigner, TCustomChain extends string = never>
1175
1248
  currentChain: TSubstrateChain;
1176
1249
  destination: TDestination;
1177
1250
  asset: TAssetInfo;
1251
+ currentAsset: TAssetInfo;
1178
1252
  currency: TCurrencyInputWithAmount;
1179
1253
  swapConfig?: TSwapConfig;
1180
1254
  hasPassedExchange: boolean;
@@ -1192,7 +1266,7 @@ type HopTraversalConfig<TApi, TRes, TSigner, THopResult, TCustomChain extends st
1192
1266
  api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
1193
1267
  origin: TSubstrateChain | TCustomChain;
1194
1268
  destination: TChain;
1195
- currency: TCurrencyCore;
1269
+ asset: TAssetInfo;
1196
1270
  initialForwardedXcms: any;
1197
1271
  initialDestParaId: number | undefined;
1198
1272
  swapConfig?: TSwapConfig;
@@ -1318,6 +1392,7 @@ type TModuleError = {
1318
1392
  type TDryRunError = {
1319
1393
  failureReason: string;
1320
1394
  failureSubReason?: string;
1395
+ failureIndex?: number;
1321
1396
  };
1322
1397
 
1323
1398
  declare class AmountTooLowError extends Error {
@@ -1565,7 +1640,7 @@ type TGetXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolean, TCu
1565
1640
  */
1566
1641
  sender: string;
1567
1642
  recipient: string;
1568
- currency: WithAmount<TCurrencyCore>;
1643
+ currency: TCurrencyInputWithAmount;
1569
1644
  version?: Version;
1570
1645
  feeAsset?: TCurrencyInput;
1571
1646
  disableFallback: TDisableFallback;
@@ -1585,7 +1660,7 @@ type TGetOriginXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolea
1585
1660
  origin: TSubstrateChain | TCustomChain;
1586
1661
  destination: TChain;
1587
1662
  sender: string;
1588
- currency: WithAmount<TCurrencyCore>;
1663
+ currency: TCurrencyInputWithAmount;
1589
1664
  version?: Version;
1590
1665
  feeAsset?: TCurrencyInput;
1591
1666
  disableFallback: TDisableFallback;
@@ -1601,10 +1676,11 @@ type TGetFeeForDestChainBaseOptions<TRes, TCustomChain extends string = never> =
1601
1676
  destination: TChain;
1602
1677
  sender: string;
1603
1678
  recipient: string;
1604
- currency: WithAmount<TCurrencyCore>;
1679
+ currency: TCurrencyInputWithAmount;
1680
+ asset: WithAmount<TAssetInfo>;
1681
+ currentAsset: WithAmount<TAssetInfo>;
1605
1682
  forwardedXcms: any;
1606
1683
  tx: TRes;
1607
- asset: TAssetInfo;
1608
1684
  version: Version;
1609
1685
  originFee: bigint;
1610
1686
  feeAsset?: TCurrencyInput;
@@ -1673,6 +1749,90 @@ type TPaymentInfo = {
1673
1749
  weight: TWeight;
1674
1750
  };
1675
1751
 
1752
+ type TGetBalanceCommonOptions<TCustomChain extends string = never> = {
1753
+ /**
1754
+ * The address of the account.
1755
+ */
1756
+ address: string;
1757
+ /**
1758
+ * The chain on which to query the balance.
1759
+ */
1760
+ chain: TChain | TCustomChain;
1761
+ };
1762
+ /**
1763
+ * Retrieves the asset balance for a given account on a specified chain.
1764
+ */
1765
+ type TGetAssetBalanceOptionsBase<TCustomChain extends string = never> = TGetBalanceCommonOptions<TCustomChain> & {
1766
+ /**
1767
+ * The resolved asset to query balance for.
1768
+ */
1769
+ asset: TAssetInfo;
1770
+ };
1771
+ /**
1772
+ * Retrieves the currency balance for a given account on a specified chain.
1773
+ */
1774
+ type TGetBalanceOptionsBase<TCustomChain extends string = never> = TGetBalanceCommonOptions<TCustomChain> & {
1775
+ /**
1776
+ * The currency to query.
1777
+ */
1778
+ currency?: TCurrencyCore;
1779
+ };
1780
+ type TGetBalanceOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TGetBalanceOptionsBase<TCustomChain>, TApi, TRes, TSigner, TCustomChain>;
1781
+ type TGetAssetBalanceOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TGetAssetBalanceOptionsBase<TCustomChain>, TApi, TRes, TSigner, TCustomChain>;
1782
+ type TGetTransferableAmountOptionsBase<TRes, TCurrency = WithAmount<TCurrencyCore>> = {
1783
+ /**
1784
+ * The sender address of the account.
1785
+ */
1786
+ sender: string;
1787
+ /**
1788
+ * The chain on which to query the balance.
1789
+ */
1790
+ origin: TSubstrateChain;
1791
+ /**
1792
+ * The destination chain.
1793
+ */
1794
+ destination: TChain;
1795
+ /**
1796
+ * The currency to query.
1797
+ */
1798
+ currency: TCurrency;
1799
+ version: Version | undefined;
1800
+ buildTx: TTxFactory<TRes>;
1801
+ feeAsset?: TCurrencyInput;
1802
+ };
1803
+ type TGetTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain extends string = never, TCurrency = WithAmount<TCurrencyCore>> = WithApi<TGetTransferableAmountOptionsBase<TRes, TCurrency>, TApi, TRes, TSigner, TCustomChain>;
1804
+ type TPerAssetResult<TCurrency, TValue> = TCurrency extends unknown[] ? TValue[] : TValue;
1805
+ type TGetMinTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain extends string = never, TCurrency = WithAmount<TCurrencyCore>> = WithApi<TGetTransferableAmountOptionsBase<TRes, TCurrency> & {
1806
+ recipient: string;
1807
+ builder: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner>, TCustomChain>;
1808
+ }, TApi, TRes, TSigner, TCustomChain>;
1809
+ type TVerifyEdOnDestinationOptionsBase<TRes> = {
1810
+ /**
1811
+ * The origin chain.
1812
+ */
1813
+ origin: TSubstrateChain;
1814
+ /**
1815
+ * The destination chain.
1816
+ */
1817
+ destination: TChain;
1818
+ /**
1819
+ * The address of the account.
1820
+ */
1821
+ recipient: string;
1822
+ /**
1823
+ * The account of the sender.
1824
+ */
1825
+ sender: string;
1826
+ /**
1827
+ * The currency to query.
1828
+ */
1829
+ currency: TCurrencyInputWithAmount;
1830
+ version: Version | undefined;
1831
+ buildTx: TTxFactory<TRes>;
1832
+ feeAsset?: TCurrencyInput;
1833
+ };
1834
+ type TVerifyEdOnDestinationOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TVerifyEdOnDestinationOptionsBase<TRes>, TApi, TRes, TSigner, TCustomChain>;
1835
+
1676
1836
  type THopTransferInfo = {
1677
1837
  chain: TChain;
1678
1838
  result: {
@@ -1685,35 +1845,38 @@ type TXcmFeeBase = {
1685
1845
  fee: bigint;
1686
1846
  asset: TAssetInfo;
1687
1847
  };
1688
- type TTransferInfo = {
1848
+ type TOriginXcmFeeInfo = TXcmFeeBase & {
1849
+ sufficient: boolean;
1850
+ balance: bigint;
1851
+ balanceAfter: bigint;
1852
+ };
1853
+ type TSelectedCurrencyInfo = {
1854
+ sufficient: boolean;
1855
+ balance: bigint;
1856
+ balanceAfter: bigint;
1857
+ asset: TAssetInfo;
1858
+ };
1859
+ type TReceivedCurrencyInfo = {
1860
+ sufficient: boolean | UnableToComputeError;
1861
+ receivedAmount: bigint | UnableToComputeError;
1862
+ balance: bigint;
1863
+ balanceAfter: bigint | UnableToComputeError;
1864
+ asset: TAssetInfo;
1865
+ };
1866
+ type TTransferInfo<TCurrency = WithAmount<TCurrencyCore>> = {
1689
1867
  chain: {
1690
1868
  origin: TChain;
1691
1869
  destination: TChain;
1692
1870
  ecosystem: string;
1693
1871
  };
1694
1872
  origin: {
1695
- selectedCurrency: {
1696
- sufficient: boolean;
1697
- balance: bigint;
1698
- balanceAfter: bigint;
1699
- asset: TAssetInfo;
1700
- };
1701
- xcmFee: TXcmFeeBase & {
1702
- sufficient: boolean;
1703
- balance: bigint;
1704
- balanceAfter: bigint;
1705
- };
1873
+ selectedCurrency: TPerAssetResult<TCurrency, TSelectedCurrencyInfo>;
1874
+ xcmFee: TOriginXcmFeeInfo;
1706
1875
  isExchange?: boolean;
1707
1876
  };
1708
1877
  hops: THopTransferInfo[];
1709
1878
  destination: {
1710
- receivedCurrency: {
1711
- sufficient: boolean | UnableToComputeError;
1712
- receivedAmount: bigint | UnableToComputeError;
1713
- balance: bigint;
1714
- balanceAfter: bigint | UnableToComputeError;
1715
- asset: TAssetInfo;
1716
- };
1879
+ receivedCurrency: TPerAssetResult<TCurrency, TReceivedCurrencyInfo>;
1717
1880
  xcmFee: TXcmFeeBase & {
1718
1881
  balanceAfter: bigint | UnableToComputeError;
1719
1882
  };
@@ -1724,8 +1887,7 @@ type TBuildOriginInfoOptions<TApi, TRes, TSigner, TCustomChain extends string =
1724
1887
  api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
1725
1888
  origin: TSubstrateChain;
1726
1889
  sender: string;
1727
- currency: TCurrencyCore;
1728
- originAsset: TAssetInfo;
1890
+ assets: WithAmount<TAssetInfo>[];
1729
1891
  amount: bigint;
1730
1892
  originFee: bigint;
1731
1893
  originFeeAsset: TAssetInfo;
@@ -1736,7 +1898,7 @@ type BuildHopInfoOptions<TApi, TRes, TSigner, TCustomChain extends string = neve
1736
1898
  chain: TChain;
1737
1899
  fee: bigint;
1738
1900
  originChain: TSubstrateChain;
1739
- currency: TCurrencyCore;
1901
+ currency: TSingleCurrencyInput;
1740
1902
  asset: TAssetInfo;
1741
1903
  sender: string;
1742
1904
  ahAddress?: string;
@@ -1746,9 +1908,10 @@ type TBuildDestInfoOptions<TApi, TRes, TSigner, TCustomChain extends string = ne
1746
1908
  origin: TSubstrateChain;
1747
1909
  destination: TChain;
1748
1910
  recipient: string;
1749
- currency: WithAmount<TCurrencyCore>;
1911
+ currency: WithAmount<TSingleCurrencyInput>;
1750
1912
  originFee: bigint;
1751
1913
  isFeeAssetAh: boolean;
1914
+ paysDestFee: boolean;
1752
1915
  destFeeDetail: TXcmFeeDetail;
1753
1916
  totalHopFee: bigint;
1754
1917
  bridgeFee?: bigint;
@@ -1757,18 +1920,18 @@ type TOriginFeeDetails = {
1757
1920
  sufficientForXCM: boolean;
1758
1921
  xcmFee: bigint;
1759
1922
  };
1760
- type TGetTransferInfoOptionsBase<TRes> = {
1923
+ type TGetTransferInfoOptionsBase<TRes, TCurrency = WithAmount<TCurrencyCore>> = {
1761
1924
  buildTx: TTxFactory<TRes>;
1762
1925
  origin: TSubstrateChain;
1763
1926
  destination: TChain;
1764
1927
  sender: string;
1765
1928
  ahAddress?: string;
1766
1929
  recipient: string;
1767
- currency: WithAmount<TCurrencyCore>;
1930
+ currency: TCurrency;
1768
1931
  version: Version | undefined;
1769
1932
  feeAsset?: TCurrencyCore;
1770
1933
  };
1771
- type TGetTransferInfoOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TGetTransferInfoOptionsBase<TRes>, TApi, TRes, TSigner, TCustomChain>;
1934
+ type TGetTransferInfoOptions<TApi, TRes, TSigner, TCustomChain extends string = never, TCurrency = WithAmount<TCurrencyCore>> = WithApi<TGetTransferInfoOptionsBase<TRes, TCurrency>, TApi, TRes, TSigner, TCustomChain>;
1772
1935
 
1773
1936
  type TExchangeChain = (typeof EXCHANGE_CHAINS)[number];
1774
1937
  type TExchangeInput = TExchangeChain | TExchangeChain[] | undefined;
@@ -1894,6 +2057,10 @@ interface IXTokensTransfer<TApi, TRes, TSigner, TCustomChain extends string = ne
1894
2057
  type TScenario = 'ParaToRelay' | 'ParaToPara' | 'RelayToPara';
1895
2058
  type TAddress = string | TLocation;
1896
2059
  type TDestination = TChain | TLocation;
2060
+ type TResolvedCurrency = {
2061
+ assets: WithAmount<TAssetInfo>[];
2062
+ asset: WithAmount<TAssetInfo>;
2063
+ };
1897
2064
  type TTransferBaseOptions<TApi, TRes, TSigner> = {
1898
2065
  /**
1899
2066
  * The origin chain
@@ -2102,100 +2269,6 @@ type TAssetClaimInternalOptions<TApi, TRes, TSigner> = TAssetClaimOptions<TApi,
2102
2269
  assets: TAsset<bigint>[];
2103
2270
  };
2104
2271
 
2105
- type TSetBalanceRes = {
2106
- assetStatusTx?: TSerializedExtrinsics;
2107
- balanceTx: TSerializedExtrinsics;
2108
- };
2109
- declare abstract class BaseAssetsPallet {
2110
- protected palletName: TAssetsPallet;
2111
- constructor(palletName: TAssetsPallet);
2112
- abstract mint<TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, address: string, assetInfo: WithAmount<TAssetInfo>, balance: bigint, chain: TSubstrateChain | TCustomChain): Promise<TSetBalanceRes>;
2113
- abstract getBalance<TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, address: string, asset: TAssetInfo, customCurrencyId?: unknown): Promise<bigint>;
2114
- }
2115
-
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
2272
  type OneKey<K extends string, V = unknown> = {
2200
2273
  [P in K]: Record<P, V> & Partial<Record<Exclude<K, P>, never>> extends infer O ? {
2201
2274
  [Q in keyof O]: O[Q];
@@ -2339,7 +2412,7 @@ declare const getSwapExtensionOrThrow: () => TSwapExtension;
2339
2412
  declare const claimAssets: <TApi, TRes, TSigner>(options: TAssetClaimOptions<TApi, TRes, TSigner>) => Promise<TRes>;
2340
2413
 
2341
2414
  declare const resolveTransferParams: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TSubstrateTransferOptions<TApi, TRes, TSigner, TCustomChain>) => {
2342
- resolvedFeeAsset: TAssetInfo | undefined;
2415
+ resolvedFeeAsset: _paraspell_assets.WithOptionalAmount<TAssetInfo> | undefined;
2343
2416
  resolvedVersion: _paraspell_sdk_common.Version;
2344
2417
  overriddenAsset: _paraspell_sdk_common.TLocation | _paraspell_assets.TAssetWithFee[] | undefined;
2345
2418
  normalizedAsset: {
@@ -2362,7 +2435,7 @@ declare const dryRunInternal: <TApi, TRes, TSigner, TCustomChain extends string
2362
2435
 
2363
2436
  declare const dryRunOrigin: <TApi, TRes, TSigner>(options: TDryRunCallOptions<TApi, TRes, TSigner>) => Promise<TDryRunChainResult>;
2364
2437
 
2365
- declare const getFailureInfo: (result: TDryRunResult) => Pick<TDryRunResult, "failureReason" | "failureSubReason" | "failureChain">;
2438
+ declare const getFailureInfo: (result: TDryRunResult) => TDryRunFailureInfo;
2366
2439
 
2367
2440
  declare const traverseXcmHops: <TApi, TRes, TSigner, THopResult, TCustomChain extends string = never>(config: HopTraversalConfig<TApi, TRes, TSigner, THopResult, TCustomChain>) => Promise<HopTraversalResult<THopResult, TCustomChain>>;
2368
2441
  declare const addEthereumBridgeFees: <TApi, TRes, TSigner, TResult extends {
@@ -2397,7 +2470,7 @@ declare const aggregateHopFees: (hops: TXcmFeeHopInfo[], matchAsset: TAssetInfo)
2397
2470
  bridgeFee?: bigint;
2398
2471
  };
2399
2472
 
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<{
2473
+ 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
2474
  receivedCurrency: {
2402
2475
  sufficient: boolean | UnableToComputeError;
2403
2476
  receivedAmount: bigint | UnableToComputeError;
@@ -2421,15 +2494,18 @@ declare const buildHopInfo: <TApi, TRes, TSigner, TCustomChain extends string =
2421
2494
  };
2422
2495
  }>;
2423
2496
 
2424
- declare const buildOriginInfo: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, origin, sender, currency, originAsset, amount, originFee, originFeeAsset, isFeeAssetAh }: TBuildOriginInfoOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<TTransferInfo["origin"]>;
2497
+ declare const buildOriginInfo: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, origin, sender, assets, amount, originFee, originFeeAsset, isFeeAssetAh }: TBuildOriginInfoOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<{
2498
+ selectedCurrency: TSelectedCurrencyInfo[];
2499
+ xcmFee: TOriginXcmFeeInfo;
2500
+ }>;
2425
2501
 
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>;
2502
+ 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
2503
 
2428
- declare const getMinTransferableAmountInternal: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, origin, sender, recipient, origin: chain, destination, currency, feeAsset, buildTx, builder, version }: TGetMinTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<bigint>;
2429
- declare const getMinTransferableAmount: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TGetMinTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<bigint>;
2504
+ 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>>;
2505
+ 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
2506
 
2431
- declare const getTransferableAmountInternal: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, sender, origin: chain, destination, currency, buildTx, feeAsset, version }: TGetTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<bigint>;
2432
- declare const getTransferableAmount: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TGetTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<bigint>;
2507
+ declare const getTransferableAmountInternal: <TApi, TRes, TSigner, TCurrency extends TCurrencyInputWithAmount, TCustomChain extends string = never>(options: TGetTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain, TCurrency>) => Promise<TPerAssetResult<TCurrency, bigint>>;
2508
+ 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
2509
 
2434
2510
  declare const resolveAssetCount: <TApi, TRes, TSigner>(overriddenAsset: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>["overriddenAsset"], isRelayAsset: boolean) => number;
2435
2511
  declare const constructTypeAndThenCall: <TApi, TRes, TSigner, TCustomChain extends string = never>(context: TTypeAndThenCallContext<TApi, TRes, TSigner, TCustomChain>, fees?: TTypeAndThenFees | null) => Promise<TSerializedExtrinsics>;
@@ -2445,10 +2521,11 @@ declare const createTypeAndThenCall: <TApi, TRes, TSigner, TCustomChain extends
2445
2521
  */
2446
2522
  declare const createTypeThenAutoReserve: <TApi, TRes, TSigner>(chain: TSubstrateChain, options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>) => Promise<TSerializedExtrinsics>;
2447
2523
 
2524
+ declare const assertNotRawAssets: (currency: TCurrencyInput) => asserts currency is Exclude<TCurrencyInput, TAsset<TAmount>[]>;
2448
2525
  declare const validateCurrency: (currency: TCurrencyInput, feeAsset?: TCurrencyInput) => void;
2449
2526
  declare const validateDestination: <TApi, TRes, TSigner, TCustomChain extends string = never>(origin: TSubstrateChain, destination: TDestination, api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>) => void;
2450
2527
  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;
2528
+ 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
2529
 
2453
2530
  declare const verifyEdOnDestination: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TVerifyEdOnDestinationOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<boolean>;
2454
2531
 
@@ -2482,7 +2559,9 @@ declare const formatAssetIdToERC20: (id: string) => string;
2482
2559
  declare const maybeOverrideAssets: (version: Version, amount: bigint, assets: TAsset[], overriddenCurrency?: TLocation | TAsset[]) => TAsset | TAsset[];
2483
2560
  declare const maybeOverrideAsset: (version: Version, amount: bigint, asset: TAsset, overriddenCurrency?: TLocation | TAsset[]) => TAsset;
2484
2561
 
2485
- declare const sortAssets: (assets: TAsset[]) => TAsset[];
2562
+ declare const pickOtherMintPallet: (asset: TAssetInfo, pallets: TAssetsPallet[]) => TAssetsPallet;
2563
+
2564
+ declare const sortAssets: <T extends TAsset>(assets: T[]) => T[];
2486
2565
 
2487
2566
  declare const computeOverridenAmount: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TCreateTxsOptions<TApi, TRes, TSigner, TCustomChain>, increaseAmount: string, relative?: boolean) => number | bigint;
2488
2567
  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>;
@@ -2561,6 +2640,13 @@ declare const resolveDestChain: <TApi, TRes, TSigner, TCustomChain extends strin
2561
2640
 
2562
2641
  declare const resolveParaId: <TApi, TRes, TSigner, TCustomChain extends string = never>(paraId: number | undefined, destination: TDestination, api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>) => number | undefined;
2563
2642
 
2643
+ /**
2644
+ * Checks if a given chain is a supported exchange chain.
2645
+ *
2646
+ * @param chain - The chain to check.
2647
+ * @returns True if the chain is a supported exchange chain; otherwise, false.
2648
+ */
2649
+ declare const isExchange: (chain: string) => chain is TExchangeChain;
2564
2650
  declare const convertBuilderConfig: <TApi>(config: TBuilderOptions<TApiOrUrl<TApi>> | undefined) => TBuilderConfig<TUrl> | undefined;
2565
2651
  declare const createSwapBuilder: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TTransferOptionsWithSwap<TApi, TRes, TSigner, TCustomChain>) => TSwapBuilder<TApi, TRes, TSigner>;
2566
2652
  declare const executeWithSwap: <TApi, TRes, TSigner, T, TCustomChain extends string = never>(options: TTransferOptionsWithSwap<TApi, TRes, TSigner, TCustomChain>, executor: (builder: TSwapBuilder<TApi, TRes, TSigner>) => Promise<T>) => Promise<T>;
@@ -2610,5 +2696,5 @@ declare const selectXcmVersion: (forcedVersion: Version | undefined, originVersi
2610
2696
  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
2697
  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
2698
 
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 };
2699
+ 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, isExchange, isSenderSigner, isViemSigner, keyFromWs, localizeLocation, localizeLocationImpl, maybeOverrideAsset, maybeOverrideAssets, normalizeAmount, normalizeCustomChains, normalizeExchange, overrideTxAmount, padFee, padValueBy, parseUnits, pickCompatibleXcmVersion, pickOtherMintPallet, pickRouterCompatibleXcmVersion, registerEvmExtension, registerEvmSnowbridgeExtension, registerSwapExtension, resolveAssetCount, resolveDestChain, resolveModuleError, resolveParaId, resolveTransferParams, reverseTransformLocation, selectXcmVersion, sortAssets, throwUnsupportedCurrency, transferMoonbeamEvm, transferMoonbeamToEth, traverseXcmHops, validateAddress, validateAssetSpecifiers, validateCurrency, validateDestination, validateDestinationAddress, validateTransact, verifyEdOnDestination, wrapTxBypass };
2700
+ 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, TDryRunFailureInfo, 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, TMintConfig, 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 };