@paraspell/sdk-core 12.8.7 → 12.8.9

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 CHANGED
@@ -1,13 +1,13 @@
1
1
  import * as _paraspell_sdk_common from '@paraspell/sdk-common';
2
- import { TChain as TChain$1, TSubstrateChain as TSubstrateChain$1, Version, TLocation, TRelaychain, TParachain, TExternalChain, TJunction, Parents, TJunctions } from '@paraspell/sdk-common';
2
+ import { TChain, TSubstrateChain, Version, TLocation, TRelaychain, TParachain, 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 { TAssetInfo, WithAmount, TAsset, TCurrencyCore, TCurrencyInputWithAmount, TCurrencyInput as TCurrencyInput$1, TAssetWithFee, WithComplexAmount, TAmount as TAmount$1, TAssetInfoWithId } from '@paraspell/assets';
5
+ import { TAssetInfo, WithAmount, TAsset, TCurrencyCore, TCurrencyInputWithAmount, TCurrencyInput, TAssetWithFee, WithComplexAmount, TAmount, TAssetInfoWithId } from '@paraspell/assets';
6
6
  export * from '@paraspell/assets';
7
7
  import { TPallet, TAssetsPallet } from '@paraspell/pallets';
8
8
  export * from '@paraspell/pallets';
9
9
  import { WalletClient, formatUnits as formatUnits$1, parseUnits as parseUnits$1 } from 'viem';
10
- import * as _paraspell_swap from '@paraspell/swap';
10
+ import * as SwapModule from '@paraspell/swap';
11
11
 
12
12
  type WithApi<TBase, TApi, TRes, TSigner> = TBase & {
13
13
  api: IPolkadotApi<TApi, TRes, TSigner>;
@@ -42,8 +42,8 @@ interface IPolkadotApi<TApi, TRes, TSigner> {
42
42
  getType(): TApiType;
43
43
  getConfig(): TBuilderOptions<TApiOrUrl<TApi>> | undefined;
44
44
  getApi(): TApi;
45
- init(chain: TChain$1, clientTtlMs?: number): Promise<void>;
46
- createApiInstance: (wsUrl: TUrl, chain: TSubstrateChain$1) => Promise<TApi>;
45
+ init(chain: TChain, clientTtlMs?: number): Promise<void>;
46
+ createApiInstance: (wsUrl: TUrl, chain: TSubstrateChain) => Promise<TApi>;
47
47
  accountToHex(address: string, isPrefixed?: boolean): string;
48
48
  accountToUint8a(address: string): Uint8Array;
49
49
  deserializeExtrinsics(serialized: TSerializedExtrinsics): TRes;
@@ -64,12 +64,12 @@ interface IPolkadotApi<TApi, TRes, TSigner> {
64
64
  }>;
65
65
  quoteAhPrice(fromMl: TLocation, toMl: TLocation, amountIn: bigint, includeFee?: boolean): Promise<bigint | undefined>;
66
66
  getXcmWeight(xcm: any): Promise<TWeight>;
67
- getXcmPaymentApiFee(chain: TSubstrateChain$1, localXcm: any, forwardedXcm: any, asset: TAssetInfo, version: Version, transformXcm: boolean): Promise<bigint>;
67
+ getXcmPaymentApiFee(chain: TSubstrateChain, localXcm: any, forwardedXcm: any, asset: TAssetInfo, version: Version, transformXcm: boolean): Promise<bigint>;
68
68
  getEvmStorage(contract: string, slot: string): Promise<string>;
69
69
  getFromRpc(module: string, method: string, key: string): Promise<string>;
70
70
  blake2AsHex(data: Uint8Array): string;
71
71
  clone(): IPolkadotApi<TApi, TRes, TSigner>;
72
- createApiForChain(chain: TSubstrateChain$1): Promise<IPolkadotApi<TApi, TRes, TSigner>>;
72
+ createApiForChain(chain: TSubstrateChain): Promise<IPolkadotApi<TApi, TRes, TSigner>>;
73
73
  getDryRunCall(options: TDryRunCallBaseOptions<TRes>): Promise<TDryRunChainResult>;
74
74
  getDryRunXcm(options: TDryRunXcmBaseOptions<TRes>): Promise<TDryRunChainResult>;
75
75
  getBridgeStatus(): Promise<TBridgeStatus>;
@@ -87,18 +87,18 @@ declare abstract class Chain<TApi, TRes, TSigner> {
87
87
  private readonly _info;
88
88
  private readonly _ecosystem;
89
89
  private readonly _version;
90
- constructor(chain: TSubstrateChain$1, info: string, ecosystem: TRelaychain, version: Version);
90
+ constructor(chain: TSubstrateChain, info: string, ecosystem: TRelaychain, version: Version);
91
91
  get info(): string;
92
92
  get ecosystem(): TRelaychain;
93
- get chain(): TSubstrateChain$1;
93
+ get chain(): TSubstrateChain;
94
94
  get version(): Version;
95
95
  transfer(sendOptions: TSendInternalOptions<TApi, TRes, TSigner>): Promise<TRes>;
96
96
  isRelayToParaEnabled(): boolean;
97
- throwIfCantReceive(destChain: TChain$1 | undefined): void;
98
- throwIfTempDisabled(options: TSendInternalOptions<TApi, TRes, TSigner>, destChain?: TChain$1): void;
97
+ throwIfCantReceive(destChain: TChain | undefined): void;
98
+ throwIfTempDisabled(options: TSendInternalOptions<TApi, TRes, TSigner>, destChain?: TChain): void;
99
99
  isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes, TSigner>): boolean;
100
100
  isReceivingTempDisabled(_scenario: TScenario): boolean;
101
- canReceiveFrom(_origin: TChain$1): boolean;
101
+ canReceiveFrom(_origin: TChain): boolean;
102
102
  shouldUseNativeAssetTeleport({ assetInfo: asset, to }: TSendInternalOptions<TApi, TRes, TSigner>): boolean;
103
103
  createAsset(asset: WithAmount<TAssetInfo>, version: Version): TAsset;
104
104
  getNativeAssetSymbol(): string;
@@ -284,7 +284,7 @@ declare class CoretimeKusama<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSig
284
284
  declare class CoretimePolkadot<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
285
285
  constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
286
286
  transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
287
- canReceiveFrom(origin: TChain$1): boolean;
287
+ canReceiveFrom(origin: TChain): boolean;
288
288
  }
289
289
 
290
290
  declare class CoretimePaseo<TApi, TRes, TSigner> extends CoretimePolkadot<TApi, TRes, TSigner> {
@@ -386,7 +386,7 @@ declare class Kintsugi<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> i
386
386
  }
387
387
 
388
388
  declare class Polkadot<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
389
- constructor(chain?: TSubstrateChain$1, info?: string, ecosystem?: TRelaychain, version?: Version);
389
+ constructor(chain?: TSubstrateChain, info?: string, ecosystem?: TRelaychain, version?: Version);
390
390
  transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
391
391
  }
392
392
 
@@ -512,14 +512,14 @@ declare class Westend<TApi, TRes, TSigner> extends Polkadot<TApi, TRes, TSigner>
512
512
  declare class Xode<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
513
513
  constructor();
514
514
  transferPolkadotXCM(options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
515
- canReceiveFrom(origin: TChain$1): boolean;
515
+ canReceiveFrom(origin: TChain): boolean;
516
516
  }
517
517
 
518
518
  declare class Zeitgeist<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
519
519
  constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
520
520
  getCustomCurrencyId(asset: TAssetInfo): TZeitgeistAsset | TXcmForeignAsset;
521
521
  transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
522
- canReceiveFrom(origin: TChain$1): boolean;
522
+ canReceiveFrom(origin: TChain): boolean;
523
523
  transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
524
524
  }
525
525
 
@@ -607,10 +607,10 @@ declare const TRANSACT_ORIGINS: readonly ["Native", "SovereignAccount", "Superus
607
607
  declare const EXCHANGE_CHAINS: readonly ["AssetHubPolkadotDex", "AssetHubKusamaDex", "AssetHubPaseoDex", "AssetHubWestendDex", "HydrationDex", "KaruraDex", "AcalaDex", "BifrostKusamaDex", "BifrostPolkadotDex"];
608
608
 
609
609
  type TExchangeChain = (typeof EXCHANGE_CHAINS)[number];
610
- type TExchangeInput$1 = TExchangeChain | [TExchangeChain, ...TExchangeChain[]] | undefined;
610
+ type TExchangeInput = TExchangeChain | [TExchangeChain, ...TExchangeChain[]] | undefined;
611
611
  type TSwapOptions<TApi, TRes, TSigner> = {
612
612
  currencyTo: TCurrencyCore;
613
- exchange?: TExchangeInput$1;
613
+ exchange?: TExchangeInput;
614
614
  slippage?: number;
615
615
  evmSenderAddress?: string;
616
616
  evmSigner?: TSigner;
@@ -619,7 +619,7 @@ type TSwapOptions<TApi, TRes, TSigner> = {
619
619
  type TTransactionContext<TApi, TRes> = {
620
620
  type: TTransactionType;
621
621
  api: TApi;
622
- chain: TSubstrateChain$1;
622
+ chain: TSubstrateChain;
623
623
  tx: TRes;
624
624
  };
625
625
  type TTransactionType = 'TRANSFER' | 'SWAP' | 'SWAP_AND_TRANSFER';
@@ -639,11 +639,11 @@ type TSwapEvent<TApi, TRes> = {
639
639
  /**
640
640
  * Current transaction's origin chain
641
641
  */
642
- chain?: TSubstrateChain$1;
642
+ chain?: TSubstrateChain;
643
643
  /**
644
644
  * Current transaction's destination chain
645
645
  */
646
- destinationChain?: TChain$1;
646
+ destinationChain?: TChain;
647
647
  /**
648
648
  * 0-based step index of current operation
649
649
  */
@@ -653,7 +653,7 @@ type TStatusChangeCallback<TApi, TRes> = (info: TSwapEvent<TApi, TRes>) => void;
653
653
 
654
654
  type TPolkadotXCMTransferOptions<TApi, TRes, TSigner> = {
655
655
  api: IPolkadotApi<TApi, TRes, TSigner>;
656
- chain: TSubstrateChain$1;
656
+ chain: TSubstrateChain;
657
657
  beneficiaryLocation: TLocation;
658
658
  address: TAddress;
659
659
  asset: TAsset;
@@ -662,9 +662,9 @@ type TPolkadotXCMTransferOptions<TApi, TRes, TSigner> = {
662
662
  assetInfo: WithAmount<TAssetInfo>;
663
663
  currency: TCurrencyInputWithAmount;
664
664
  feeAssetInfo?: TAssetInfo;
665
- feeCurrency?: TCurrencyInput$1;
665
+ feeCurrency?: TCurrencyInput;
666
666
  destination: TDestination;
667
- destChain?: TChain$1;
667
+ destChain?: TChain;
668
668
  paraIdTo?: number;
669
669
  version: Version;
670
670
  senderAddress?: string;
@@ -678,7 +678,7 @@ type TXTokensTransferOptions<TApi, TRes, TSigner> = {
678
678
  asset: WithAmount<TAssetInfo>;
679
679
  address: TAddress;
680
680
  scenario: TScenario;
681
- origin: TSubstrateChain$1;
681
+ origin: TSubstrateChain;
682
682
  destination: TDestination;
683
683
  paraIdTo?: number;
684
684
  version: Version;
@@ -695,12 +695,12 @@ interface IXTokensTransfer<TApi, TRes, TSigner> {
695
695
  }
696
696
  type TScenario = 'ParaToRelay' | 'ParaToPara' | 'RelayToPara';
697
697
  type TAddress = string | TLocation;
698
- type TDestination = TChain$1 | TLocation;
698
+ type TDestination = TChain | TLocation;
699
699
  type TSendBaseOptions<TApi, TRes, TSigner> = {
700
700
  /**
701
701
  * The origin chain
702
702
  */
703
- from: TSubstrateChain$1;
703
+ from: TSubstrateChain;
704
704
  /**
705
705
  * The destination address. A SS58 or H160 format.
706
706
  */
@@ -724,7 +724,7 @@ type TSendBaseOptions<TApi, TRes, TSigner> = {
724
724
  /**
725
725
  * The optional fee asset. Either ID, symbol, or location
726
726
  */
727
- feeAsset?: TCurrencyInput$1;
727
+ feeAsset?: TCurrencyInput;
728
728
  /**
729
729
  * The optional destination parachain ID
730
730
  */
@@ -776,7 +776,7 @@ type TSendInternalOptions<TApi, TRes, TSigner> = Omit<TSendBaseOptions<TApi, TRe
776
776
  api: IPolkadotApi<TApi, TRes, TSigner>;
777
777
  assetInfo: WithAmount<TAssetInfo>;
778
778
  feeAsset?: TAssetInfo;
779
- feeCurrency?: TCurrencyInput$1;
779
+ feeCurrency?: TCurrencyInput;
780
780
  overriddenAsset?: TLocation | TAssetWithFee[];
781
781
  version: Version;
782
782
  isAmountAll: boolean;
@@ -820,7 +820,7 @@ type TCreateBeneficiaryOptions<TApi, TRes, TSigner> = {
820
820
  };
821
821
  type TCreateBeneficiaryXTokensOptions<TApi, TRes, TSigner> = {
822
822
  api: IPolkadotApi<TApi, TRes, TSigner>;
823
- origin: TSubstrateChain$1;
823
+ origin: TSubstrateChain;
824
824
  destination: TDestination;
825
825
  address: TAddress;
826
826
  version: Version;
@@ -836,8 +836,8 @@ type TTransferFeeEstimates = {
836
836
  reserveFee: bigint;
837
837
  };
838
838
  type TCreateBaseTransferXcmOptions<TRes> = {
839
- chain: TSubstrateChain$1;
840
- destChain: TChain$1;
839
+ chain: TSubstrateChain;
840
+ destChain: TChain;
841
841
  assetInfo: WithAmount<TAssetInfo>;
842
842
  feeAssetInfo?: TAssetInfo;
843
843
  fees: TTransferFeeEstimates;
@@ -851,12 +851,12 @@ type TCreateBaseTransferXcmOptions<TRes> = {
851
851
  };
852
852
  type TCreateTransferXcmOptions<TApi, TRes, TSigner> = WithApi<TCreateBaseTransferXcmOptions<TRes>, TApi, TRes, TSigner>;
853
853
  type TCreateBaseSwapXcmOptions = {
854
- chain?: TSubstrateChain$1;
854
+ chain?: TSubstrateChain;
855
855
  exchangeChain: TParachain;
856
- destChain?: TChain$1;
856
+ destChain?: TChain;
857
857
  assetInfoFrom: WithAmount<TAssetInfo>;
858
858
  assetInfoTo: WithAmount<TAssetInfo>;
859
- currencyTo: TCurrencyInput$1;
859
+ currencyTo: TCurrencyInput;
860
860
  feeAssetInfo?: TAssetInfo;
861
861
  senderAddress: string;
862
862
  recipientAddress: string;
@@ -884,8 +884,8 @@ type TCreateEthBridgeInstructionsOptions<TApi, TRes, TSigner> = {
884
884
  };
885
885
 
886
886
  type TAssetClaimOptionsBase = {
887
- chain: TSubstrateChain$1;
888
- currency: WithComplexAmount<TCurrencyCore> | TAsset<TAmount$1>[] | WithComplexAmount<TCurrencyCore>[];
887
+ chain: TSubstrateChain;
888
+ currency: WithComplexAmount<TCurrencyCore> | TAsset<TAmount>[] | WithComplexAmount<TCurrencyCore>[];
889
889
  address: TAddress;
890
890
  version?: Version;
891
891
  };
@@ -902,7 +902,7 @@ type TSetBalanceRes = {
902
902
  declare abstract class BaseAssetsPallet {
903
903
  protected palletName: TAssetsPallet;
904
904
  constructor(palletName: TAssetsPallet);
905
- abstract mint<TApi, TRes, TSigner>(address: string, assetInfo: WithAmount<TAssetInfo>, balance: bigint, chain: TSubstrateChain$1, api: IPolkadotApi<TApi, TRes, TSigner>): Promise<TSetBalanceRes>;
905
+ abstract mint<TApi, TRes, TSigner>(address: string, assetInfo: WithAmount<TAssetInfo>, balance: bigint, chain: TSubstrateChain, api: IPolkadotApi<TApi, TRes, TSigner>): Promise<TSetBalanceRes>;
906
906
  abstract getBalance<TApi, TRes, TSigner>(api: IPolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo, customCurrencyId?: unknown): Promise<bigint>;
907
907
  }
908
908
 
@@ -974,7 +974,7 @@ declare class BatchTransactionManager<TApi, TRes, TSigner> {
974
974
  transactionOptions: TBatchedSendOptions<TApi, TRes, TSigner>[];
975
975
  addTransaction(options: TBatchedSendOptions<TApi, TRes, TSigner>): void;
976
976
  isEmpty(): boolean;
977
- buildBatch(api: IPolkadotApi<TApi, TRes, TSigner>, from: TSubstrateChain$1, options?: TBatchOptions): Promise<TRes>;
977
+ buildBatch(api: IPolkadotApi<TApi, TRes, TSigner>, from: TSubstrateChain, options?: TBatchOptions): Promise<TRes>;
978
978
  }
979
979
 
980
980
  /**
@@ -991,8 +991,8 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TSendBaseOpt
991
991
  * @param chain - The chain from which the transaction originates.
992
992
  * @returns An instance of Builder
993
993
  */
994
- from(chain: TSubstrateChain$1): GeneralBuilder<TApi, TRes, TSigner, T & {
995
- from: TSubstrateChain$1;
994
+ from(chain: TSubstrateChain): GeneralBuilder<TApi, TRes, TSigner, T & {
995
+ from: TSubstrateChain;
996
996
  }>;
997
997
  /**
998
998
  * Specifies the destination chain for the transaction.
@@ -1010,8 +1010,8 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TSendBaseOpt
1010
1010
  * @param chain - The chain from which to claim assets.
1011
1011
  * @returns An instance of Builder
1012
1012
  */
1013
- claimFrom(chain: TSubstrateChain$1): AssetClaimBuilder<TApi, TRes, TSigner, {
1014
- chain: TSubstrateChain$1;
1013
+ claimFrom(chain: TSubstrateChain): AssetClaimBuilder<TApi, TRes, TSigner, {
1014
+ chain: TSubstrateChain;
1015
1015
  }>;
1016
1016
  /**
1017
1017
  * Specifies the currency to be used in the transaction. Symbol, ID, location or multi-asset.
@@ -1083,8 +1083,8 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TSendBaseOpt
1083
1083
  * @param currency - The currency to be used for the fee.
1084
1084
  * @returns An instance of the Builder
1085
1085
  */
1086
- feeAsset(currency: TCurrencyInput$1 | undefined): GeneralBuilder<TApi, TRes, TSigner, T & {
1087
- feeAsset: TCurrencyInput$1 | undefined;
1086
+ feeAsset(currency: TCurrencyInput | undefined): GeneralBuilder<TApi, TRes, TSigner, T & {
1087
+ feeAsset: TCurrencyInput | undefined;
1088
1088
  }>;
1089
1089
  /**
1090
1090
  * Sets the hex of the encoded transaction call to apply on the destination chain
@@ -1116,7 +1116,7 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TSendBaseOpt
1116
1116
  * @returns An instance of Builder
1117
1117
  */
1118
1118
  addToBatch(this: GeneralBuilder<TApi, TRes, TSigner, TSendBaseOptions<TApi, TRes, TSigner>>): GeneralBuilder<TApi, TRes, TSigner, T & {
1119
- from: TSubstrateChain$1;
1119
+ from: TSubstrateChain;
1120
1120
  }>;
1121
1121
  /**
1122
1122
  * Builds and returns the batched transaction based on the configured parameters.
@@ -1218,7 +1218,7 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TSendBaseOpt
1218
1218
  * @throws \{UnableToComputeError\} Thrown when the receivable amount cannot be determined.
1219
1219
  */
1220
1220
  getReceivableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TSendBaseOptionsWithSenderAddress<TApi, TRes, TSigner>>): Promise<bigint>;
1221
- getBestAmountOut(this: GeneralBuilder<TApi, TRes, TSigner, TSendBaseOptionsWithSwap<TApi, TRes, TSigner>>): Promise<_paraspell_swap.TGetBestAmountOutResult>;
1221
+ getBestAmountOut(this: GeneralBuilder<TApi, TRes, TSigner, TSendBaseOptionsWithSwap<TApi, TRes, TSigner>>): Promise<SwapModule.TGetBestAmountOutResult>;
1222
1222
  signAndSubmit(this: GeneralBuilder<TApi, TRes, TSigner, TSendBaseOptionsWithSenderAddress<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>>): Promise<string>;
1223
1223
  /**
1224
1224
  * Returns the API instance used by the builder.
@@ -1247,13 +1247,13 @@ type TSwapConfig = {
1247
1247
  };
1248
1248
  type TDryRunBaseOptions<TRes> = {
1249
1249
  tx: TRes;
1250
- origin: TSubstrateChain$1;
1251
- destination: TChain$1;
1250
+ origin: TSubstrateChain;
1251
+ destination: TChain;
1252
1252
  senderAddress: string;
1253
1253
  address: string;
1254
1254
  currency: TCurrencyInputWithAmount;
1255
1255
  version?: Version;
1256
- feeAsset?: TCurrencyInput$1;
1256
+ feeAsset?: TCurrencyInput;
1257
1257
  swapConfig?: TSwapConfig;
1258
1258
  useRootOrigin?: boolean;
1259
1259
  bypassOptions?: TBypassOptions;
@@ -1267,7 +1267,7 @@ type TDryRunCallBaseOptions<TRes> = {
1267
1267
  /**
1268
1268
  * The chain to dry-run on
1269
1269
  */
1270
- chain: TSubstrateChain$1;
1270
+ chain: TSubstrateChain;
1271
1271
  /**
1272
1272
  * The destination chain
1273
1273
  */
@@ -1301,11 +1301,11 @@ type TDryRunXcmBaseOptions<TRes> = {
1301
1301
  /**
1302
1302
  * The chain to dry-run on
1303
1303
  */
1304
- chain: TSubstrateChain$1;
1304
+ chain: TSubstrateChain;
1305
1305
  /**
1306
1306
  * The origin chain
1307
1307
  */
1308
- origin: TSubstrateChain$1;
1308
+ origin: TSubstrateChain;
1309
1309
  asset: TAssetInfo;
1310
1310
  version: Version;
1311
1311
  feeAsset?: TAssetInfo;
@@ -1331,12 +1331,12 @@ type TDryRunChainFailure = TDryRunResBase & {
1331
1331
  };
1332
1332
  type TDryRunChainResult = TDryRunChainSuccess | TDryRunChainFailure;
1333
1333
  type THopInfo = {
1334
- chain: TChain$1;
1334
+ chain: TChain;
1335
1335
  result: TDryRunChainResult;
1336
1336
  /** @deprecated Use `result.isExchange` instead. Will be removed in v13. */
1337
1337
  isExchange?: boolean;
1338
1338
  };
1339
- type TChainEndpoint = 'origin' | 'destination' | TChain$1;
1339
+ type TChainEndpoint = 'origin' | 'destination' | TChain;
1340
1340
  type TDryRunResult = {
1341
1341
  failureReason?: string;
1342
1342
  failureSubReason?: string;
@@ -1348,8 +1348,8 @@ type TDryRunResult = {
1348
1348
  type TResolveHopParams<TApi, TRes, TSigner> = {
1349
1349
  api: IPolkadotApi<TApi, TRes, TSigner>;
1350
1350
  tx: TRes;
1351
- originChain: TSubstrateChain$1;
1352
- currentChain: TSubstrateChain$1;
1351
+ originChain: TSubstrateChain;
1352
+ currentChain: TSubstrateChain;
1353
1353
  destination: TDestination;
1354
1354
  asset: TAssetInfo;
1355
1355
  currency: TCurrencyInputWithAmount;
@@ -1358,8 +1358,8 @@ type TResolveHopParams<TApi, TRes, TSigner> = {
1358
1358
  };
1359
1359
  type HopProcessParams<TApi, TRes, TSigner> = {
1360
1360
  api: IPolkadotApi<TApi, TRes, TSigner>;
1361
- currentChain: TSubstrateChain$1;
1362
- currentOrigin: TSubstrateChain$1;
1361
+ currentChain: TSubstrateChain;
1362
+ currentOrigin: TSubstrateChain;
1363
1363
  currentAsset: TAssetInfo;
1364
1364
  forwardedXcms: any;
1365
1365
  hasPassedExchange: boolean;
@@ -1367,8 +1367,8 @@ type HopProcessParams<TApi, TRes, TSigner> = {
1367
1367
  };
1368
1368
  type HopTraversalConfig<TApi, TRes, TSigner, THopResult> = {
1369
1369
  api: IPolkadotApi<TApi, TRes, TSigner>;
1370
- origin: TSubstrateChain$1;
1371
- destination: TChain$1;
1370
+ origin: TSubstrateChain;
1371
+ destination: TChain;
1372
1372
  currency: TCurrencyCore;
1373
1373
  initialForwardedXcms: any;
1374
1374
  initialDestParaId: number | undefined;
@@ -1382,11 +1382,11 @@ type HopTraversalConfig<TApi, TRes, TSigner, THopResult> = {
1382
1382
  };
1383
1383
  type HopTraversalResult<THopResult> = {
1384
1384
  hops: Array<{
1385
- chain: TSubstrateChain$1;
1385
+ chain: TSubstrateChain;
1386
1386
  result: THopResult;
1387
1387
  }>;
1388
1388
  destination?: THopResult;
1389
- lastProcessedChain?: TSubstrateChain$1;
1389
+ lastProcessedChain?: TSubstrateChain;
1390
1390
  };
1391
1391
  type TBypassOptions = {
1392
1392
  mintFeeAssets?: boolean;
@@ -1509,11 +1509,11 @@ type TGetXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolean> = {
1509
1509
  /**
1510
1510
  * The origin chain
1511
1511
  */
1512
- origin: TSubstrateChain$1;
1512
+ origin: TSubstrateChain;
1513
1513
  /**
1514
1514
  * The destination chain
1515
1515
  */
1516
- destination: TChain$1;
1516
+ destination: TChain;
1517
1517
  /**
1518
1518
  * The sender address
1519
1519
  */
@@ -1521,7 +1521,7 @@ type TGetXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolean> = {
1521
1521
  address: string;
1522
1522
  currency: WithAmount<TCurrencyCore>;
1523
1523
  version?: Version;
1524
- feeAsset?: TCurrencyInput$1;
1524
+ feeAsset?: TCurrencyInput;
1525
1525
  disableFallback: TDisableFallback;
1526
1526
  swapConfig?: TXcmFeeSwapConfig;
1527
1527
  skipReverseFeeCalculation?: boolean;
@@ -1538,12 +1538,12 @@ type TGetXcmFeeBuilderOptions = {
1538
1538
  };
1539
1539
  type TGetOriginXcmFeeBaseOptions<TRes> = {
1540
1540
  buildTx: TTxFactory<TRes>;
1541
- origin: TSubstrateChain$1;
1542
- destination: TChain$1;
1541
+ origin: TSubstrateChain;
1542
+ destination: TChain;
1543
1543
  senderAddress: string;
1544
1544
  currency: WithAmount<TCurrencyCore>;
1545
1545
  version?: Version;
1546
- feeAsset?: TCurrencyInput$1;
1546
+ feeAsset?: TCurrencyInput;
1547
1547
  disableFallback: boolean;
1548
1548
  useRootOrigin?: boolean;
1549
1549
  };
@@ -1552,9 +1552,9 @@ type TGetOriginXcmFeeInternalOptions<TApi, TRes, TSigner> = Omit<TGetOriginXcmFe
1552
1552
  tx: TRes;
1553
1553
  };
1554
1554
  type TGetFeeForDestChainBaseOptions<TRes> = {
1555
- prevChain: TSubstrateChain$1;
1556
- origin: TSubstrateChain$1;
1557
- destination: TChain$1;
1555
+ prevChain: TSubstrateChain;
1556
+ origin: TSubstrateChain;
1557
+ destination: TChain;
1558
1558
  senderAddress: string;
1559
1559
  address: string;
1560
1560
  currency: WithAmount<TCurrencyCore>;
@@ -1563,7 +1563,7 @@ type TGetFeeForDestChainBaseOptions<TRes> = {
1563
1563
  asset: TAssetInfo;
1564
1564
  version: Version;
1565
1565
  originFee: bigint;
1566
- feeAsset?: TCurrencyInput$1;
1566
+ feeAsset?: TCurrencyInput;
1567
1567
  disableFallback: boolean;
1568
1568
  hasPassedExchange?: boolean;
1569
1569
  swapConfig?: TXcmFeeSwapConfig;
@@ -1571,7 +1571,7 @@ type TGetFeeForDestChainBaseOptions<TRes> = {
1571
1571
  };
1572
1572
  type TGetFeeForDestChainOptions<TApi, TRes, TSigner> = WithApi<TGetFeeForDestChainBaseOptions<TRes>, TApi, TRes, TSigner>;
1573
1573
  type TGetReverseTxFeeOptions<TApi, TRes, TSigner> = Omit<TGetFeeForDestChainOptions<TApi, TRes, TSigner>, 'destination' | 'disableFallback' | 'forwardedXcms' | 'asset' | 'originFee' | 'prevChain' | 'version'> & {
1574
- destination: TSubstrateChain$1;
1574
+ destination: TSubstrateChain;
1575
1575
  };
1576
1576
  type TFeeType = 'dryRun' | 'paymentInfo' | 'noFeeRequired';
1577
1577
  type TXcmFeeBase$1 = {
@@ -1610,13 +1610,13 @@ type TDestXcmFeeDetail<TDisableFallback extends boolean> = TConditionalXcmFeeDet
1610
1610
  destParaId?: number;
1611
1611
  };
1612
1612
  type TConditionalXcmFeeHopInfo<TDisableFallback extends boolean> = {
1613
- chain: TChain$1;
1613
+ chain: TChain;
1614
1614
  result: TConditionalXcmFeeDetail<TDisableFallback>;
1615
1615
  /** @deprecated - Use `result.isExchange` instead. Will be removed in v13. */
1616
1616
  isExchange?: boolean;
1617
1617
  };
1618
1618
  type TXcmFeeHopInfo = {
1619
- chain: TChain$1;
1619
+ chain: TChain;
1620
1620
  result: TXcmFeeDetail;
1621
1621
  /** @deprecated - Use `result.isExchange` instead. Will be removed in v13. */
1622
1622
  isExchange?: boolean;
@@ -1650,7 +1650,7 @@ type TGetBalanceCommonOptions = {
1650
1650
  /**
1651
1651
  * The chain on which to query the balance.
1652
1652
  */
1653
- chain: TChain$1;
1653
+ chain: TChain;
1654
1654
  };
1655
1655
  /**
1656
1656
  * Retrieves the asset balance for a given account on a specified chain.
@@ -1680,18 +1680,18 @@ type TGetTransferableAmountOptionsBase<TRes> = {
1680
1680
  /**
1681
1681
  * The chain on which to query the balance.
1682
1682
  */
1683
- origin: TSubstrateChain$1;
1683
+ origin: TSubstrateChain;
1684
1684
  /**
1685
1685
  * The destination chain.
1686
1686
  */
1687
- destination: TChain$1;
1687
+ destination: TChain;
1688
1688
  /**
1689
1689
  * The currency to query.
1690
1690
  */
1691
1691
  currency: WithAmount<TCurrencyCore>;
1692
1692
  version: Version | undefined;
1693
1693
  buildTx: TTxFactory<TRes>;
1694
- feeAsset?: TCurrencyInput$1;
1694
+ feeAsset?: TCurrencyInput;
1695
1695
  };
1696
1696
  type TGetTransferableAmountOptions<TApi, TRes, TSigner> = WithApi<TGetTransferableAmountOptionsBase<TRes>, TApi, TRes, TSigner>;
1697
1697
  type TGetMinTransferableAmountOptions<TApi, TRes, TSigner> = WithApi<TGetTransferableAmountOptionsBase<TRes> & {
@@ -1702,11 +1702,11 @@ type TVerifyEdOnDestinationOptionsBase<TRes> = {
1702
1702
  /**
1703
1703
  * The origin chain.
1704
1704
  */
1705
- origin: TSubstrateChain$1;
1705
+ origin: TSubstrateChain;
1706
1706
  /**
1707
1707
  * The destination chain.
1708
1708
  */
1709
- destination: TChain$1;
1709
+ destination: TChain;
1710
1710
  /**
1711
1711
  * The address of the account.
1712
1712
  */
@@ -1721,11 +1721,11 @@ type TVerifyEdOnDestinationOptionsBase<TRes> = {
1721
1721
  currency: WithAmount<TCurrencyCore>;
1722
1722
  version: Version | undefined;
1723
1723
  buildTx: TTxFactory<TRes>;
1724
- feeAsset?: TCurrencyInput$1;
1724
+ feeAsset?: TCurrencyInput;
1725
1725
  };
1726
1726
  type TVerifyEdOnDestinationOptions<TApi, TRes, TSigner> = WithApi<TVerifyEdOnDestinationOptionsBase<TRes>, TApi, TRes, TSigner>;
1727
1727
 
1728
- type TEvmChainFrom = Extract<TChain$1, 'Ethereum' | 'Moonbeam' | 'Moonriver' | 'Darwinia'>;
1728
+ type TEvmChainFrom = Extract<TChain, 'Ethereum' | 'Moonbeam' | 'Moonriver' | 'Darwinia'>;
1729
1729
  /**
1730
1730
  * The options for the Ethereum to Polkadot transfer builder.
1731
1731
  */
@@ -1737,7 +1737,7 @@ type TEvmBuilderOptionsBase = {
1737
1737
  /**
1738
1738
  * The destination chain on Polkadot network.
1739
1739
  */
1740
- to: TChain$1;
1740
+ to: TChain;
1741
1741
  /**
1742
1742
  * The currency to transfer. Symbol or ID.
1743
1743
  */
@@ -1795,7 +1795,7 @@ type TDryRunPreviewOptions = {
1795
1795
  };
1796
1796
  type TBuilderOptions<TApi> = TApi | TBuilderConfig<TApi>;
1797
1797
  type TBuilderConfig<TApi> = Partial<{
1798
- apiOverrides: Partial<Record<TChain$1, TApi>>;
1798
+ apiOverrides: Partial<Record<TChain, TApi>>;
1799
1799
  development: boolean;
1800
1800
  abstractDecimals: boolean;
1801
1801
  xcmFormatCheck: boolean;
@@ -1828,7 +1828,7 @@ type TChainConfig = {
1828
1828
  paraId: number;
1829
1829
  providers: TProviderEntry[];
1830
1830
  };
1831
- type TChainConfigMap = Record<TSubstrateChain$1, TChainConfig>;
1831
+ type TChainConfigMap = Record<TSubstrateChain, TChainConfig>;
1832
1832
 
1833
1833
  type OneKey<K extends string, V = unknown> = {
1834
1834
  [P in K]: Record<P, V> & Partial<Record<Exclude<K, P>, never>> extends infer O ? {
@@ -1955,7 +1955,7 @@ declare class MissingChainApiError extends Error {
1955
1955
  *
1956
1956
  * @param chain - The chain for which the API is missing.
1957
1957
  */
1958
- constructor(chain: TChain$1);
1958
+ constructor(chain: TChain);
1959
1959
  }
1960
1960
 
1961
1961
  /**
@@ -1974,7 +1974,7 @@ declare class NoXCMSupportImplementedError extends Error {
1974
1974
  *
1975
1975
  * @param chain - The chain for which XCM support is not implemented.
1976
1976
  */
1977
- constructor(chain: TChain$1);
1977
+ constructor(chain: TChain);
1978
1978
  }
1979
1979
 
1980
1980
  /**
@@ -2013,7 +2013,7 @@ declare class RuntimeApiUnavailableError extends Error {
2013
2013
  }
2014
2014
 
2015
2015
  type TScenarioNotSupportedContext = {
2016
- chain: TChain$1;
2016
+ chain: TChain;
2017
2017
  scenario: TScenario;
2018
2018
  };
2019
2019
  /**
@@ -2059,7 +2059,7 @@ declare class ValidationError extends Error {
2059
2059
  }
2060
2060
 
2061
2061
  type THopTransferInfo = {
2062
- chain: TChain$1;
2062
+ chain: TChain;
2063
2063
  result: {
2064
2064
  xcmFee: TXcmFeeBase;
2065
2065
  asset: TAssetInfo;
@@ -2071,8 +2071,8 @@ type TXcmFeeBase = {
2071
2071
  };
2072
2072
  type TTransferInfo = {
2073
2073
  chain: {
2074
- origin: TChain$1;
2075
- destination: TChain$1;
2074
+ origin: TChain;
2075
+ destination: TChain;
2076
2076
  ecosystem: string;
2077
2077
  };
2078
2078
  origin: {
@@ -2104,9 +2104,9 @@ type TTransferInfo = {
2104
2104
  };
2105
2105
  type BuildHopInfoOptions<TApi, TRes, TSigner> = {
2106
2106
  api: IPolkadotApi<TApi, TRes, TSigner>;
2107
- chain: TSubstrateChain$1;
2107
+ chain: TSubstrateChain;
2108
2108
  fee: bigint;
2109
- originChain: TSubstrateChain$1;
2109
+ originChain: TSubstrateChain;
2110
2110
  currency: TCurrencyCore;
2111
2111
  asset: TAssetInfo;
2112
2112
  senderAddress: string;
@@ -2114,8 +2114,8 @@ type BuildHopInfoOptions<TApi, TRes, TSigner> = {
2114
2114
  };
2115
2115
  type TBuildDestInfoOptions<TApi, TRes, TSigner> = {
2116
2116
  api: IPolkadotApi<TApi, TRes, TSigner>;
2117
- origin: TSubstrateChain$1;
2118
- destination: TChain$1;
2117
+ origin: TSubstrateChain;
2118
+ destination: TChain;
2119
2119
  address: string;
2120
2120
  currency: WithAmount<TCurrencyCore>;
2121
2121
  originFee: bigint;
@@ -2130,8 +2130,8 @@ type TOriginFeeDetails = {
2130
2130
  };
2131
2131
  type TGetTransferInfoOptionsBase<TRes> = {
2132
2132
  buildTx: TTxFactory<TRes>;
2133
- origin: TSubstrateChain$1;
2134
- destination: TChain$1;
2133
+ origin: TSubstrateChain;
2134
+ destination: TChain;
2135
2135
  senderAddress: string;
2136
2136
  ahAddress?: string;
2137
2137
  address: string;
@@ -2141,14 +2141,14 @@ type TGetTransferInfoOptionsBase<TRes> = {
2141
2141
  };
2142
2142
  type TGetTransferInfoOptions<TApi, TRes, TSigner> = WithApi<TGetTransferInfoOptionsBase<TRes>, TApi, TRes, TSigner>;
2143
2143
 
2144
- type TChainWithApi<TApi, TRes, TSigner, T = TSubstrateChain$1> = {
2144
+ type TChainWithApi<TApi, TRes, TSigner, T = TSubstrateChain> = {
2145
2145
  api: IPolkadotApi<TApi, TRes, TSigner>;
2146
2146
  chain: T;
2147
2147
  };
2148
2148
  type TTypeAndThenCallContext<TApi, TRes, TSigner> = {
2149
2149
  origin: TChainWithApi<TApi, TRes, TSigner>;
2150
2150
  dest: TChainWithApi<TApi, TRes, TSigner>;
2151
- reserve: TChainWithApi<TApi, TRes, TSigner, TChain$1>;
2151
+ reserve: TChainWithApi<TApi, TRes, TSigner, TChain>;
2152
2152
  isSubBridge: boolean;
2153
2153
  isSnowbridge: boolean;
2154
2154
  isRelayAsset: boolean;
@@ -2161,7 +2161,7 @@ type TTypeAndThenFees = {
2161
2161
  destFee: bigint;
2162
2162
  };
2163
2163
  type TTypeAndThenOverrides = {
2164
- reserveChain?: TSubstrateChain$1;
2164
+ reserveChain?: TSubstrateChain;
2165
2165
  noFeeAsset?: boolean;
2166
2166
  };
2167
2167
 
@@ -2177,7 +2177,7 @@ declare const blake2b256: (msg: Uint8Array) => Uint8Array<ArrayBufferLike>;
2177
2177
  declare const blake2b512: (msg: Uint8Array) => Uint8Array<ArrayBufferLike>;
2178
2178
  declare const deriveAccountId: (raw: Uint8Array) => Uint8Array;
2179
2179
  declare const encodeSs58: (payload: Uint8Array, network: number) => string;
2180
- declare const convertSs58: <TApi, TRes, TSigner>(api: IPolkadotApi<TApi, TRes, TSigner>, address: string, chain: TSubstrateChain$1) => string;
2180
+ declare const convertSs58: <TApi, TRes, TSigner>(api: IPolkadotApi<TApi, TRes, TSigner>, address: string, chain: TSubstrateChain) => string;
2181
2181
 
2182
2182
  declare const getAssetBalanceInternal: <TApi, TRes, TSigner>({ api, address, chain, asset }: TGetAssetBalanceOptions<TApi, TRes, TSigner>) => Promise<bigint>;
2183
2183
  declare const getBalanceInternal: <TApi, TRes, TSigner>(options: TGetBalanceOptions<TApi, TRes, TSigner>) => Promise<bigint>;
@@ -2185,11 +2185,11 @@ declare const getBalance: <TApi, TRes, TSigner>(options: TGetBalanceOptions<TApi
2185
2185
 
2186
2186
  declare const getEthErc20Balance: (chain: TExternalChain, asset: TAssetInfo, address: string) => Promise<bigint>;
2187
2187
 
2188
- declare const getMoonbeamErc20Balance: (chain: TSubstrateChain$1, assetId: string, address: string) => Promise<bigint>;
2188
+ declare const getMoonbeamErc20Balance: (chain: TSubstrateChain, assetId: string, address: string) => Promise<bigint>;
2189
2189
 
2190
- declare const getChainConfig: (chain: TSubstrateChain$1) => TChainConfig;
2190
+ declare const getChainConfig: (chain: TSubstrateChain) => TChainConfig;
2191
2191
 
2192
- declare const getChainProviders: (chain: TSubstrateChain$1) => string[];
2192
+ declare const getChainProviders: (chain: TSubstrateChain) => string[];
2193
2193
 
2194
2194
  /**
2195
2195
  * Retrieves the parachain ID for a specified chain.
@@ -2197,7 +2197,7 @@ declare const getChainProviders: (chain: TSubstrateChain$1) => string[];
2197
2197
  * @param chain - The chain for which to get the paraId.
2198
2198
  * @returns The parachain ID of the chain.
2199
2199
  */
2200
- declare const getParaId: (chain: TChain$1) => number;
2200
+ declare const getParaId: (chain: TChain) => number;
2201
2201
 
2202
2202
  /**
2203
2203
  * Retrieves the chain name corresponding to a specified parachain ID.
@@ -2205,7 +2205,7 @@ declare const getParaId: (chain: TChain$1) => number;
2205
2205
  * @param paraId - The parachain ID.
2206
2206
  * @returns The chain name if found; otherwise, null.
2207
2207
  */
2208
- declare const getTChain: (paraId: number, ecosystem: TRelaychain | TExternalChain) => TChain$1 | null;
2208
+ declare const getTChain: (paraId: number, ecosystem: TRelaychain | TExternalChain) => TChain | null;
2209
2209
 
2210
2210
  declare const claimAssets: <TApi, TRes, TSigner>(options: TAssetClaimOptions<TApi, TRes, TSigner>) => Promise<TRes>;
2211
2211
 
@@ -2238,7 +2238,7 @@ declare const getFailureInfo: (result: TDryRunResult) => Pick<TDryRunResult, "fa
2238
2238
  declare const traverseXcmHops: <TApi, TRes, TSigner, THopResult>(config: HopTraversalConfig<TApi, TRes, TSigner, THopResult>) => Promise<HopTraversalResult<THopResult>>;
2239
2239
  declare const addEthereumBridgeFees: <TApi, TRes, TSigner, TResult extends {
2240
2240
  fee?: bigint;
2241
- }>(api: IPolkadotApi<TApi, TRes, TSigner>, bridgeHubResult: TResult | undefined, destination: TChain$1, assetHubChain: TSubstrateChain$1) => Promise<TResult | undefined>;
2241
+ }>(api: IPolkadotApi<TApi, TRes, TSigner>, bridgeHubResult: TResult | undefined, destination: TChain, assetHubChain: TSubstrateChain) => Promise<TResult | undefined>;
2242
2242
 
2243
2243
  declare const calcPreviewMintAmount: (balance: bigint, desired: bigint) => bigint | null;
2244
2244
  declare const wrapTxBypass: <TApi, TRes, TSigner>(dryRunOptions: TDryRunBypassOptions<TApi, TRes, TSigner>, options?: TBypassOptions) => Promise<TRes>;
@@ -2247,7 +2247,7 @@ declare const getParaEthTransferFees: <TApi, TRes, TSigner>(ahApi: IPolkadotApi<
2247
2247
 
2248
2248
  declare const transferMoonbeamEvm: <TApi, TRes, TSigner>(options: TEvmBuilderOptions<TApi, TRes, TSigner>) => Promise<string>;
2249
2249
 
2250
- declare const transferMoonbeamToEth: <TApi, TRes, TSigner>(from: TSubstrateChain$1, { api, to, signer, address, ahAddress, currency }: TEvmBuilderOptions<TApi, TRes, TSigner>) => Promise<`0x${string}`>;
2250
+ declare const transferMoonbeamToEth: <TApi, TRes, TSigner>(from: TSubstrateChain, { api, to, signer, address, ahAddress, currency }: TEvmBuilderOptions<TApi, TRes, TSigner>) => Promise<`0x${string}`>;
2251
2251
 
2252
2252
  declare const getOriginXcmFee: <TApi, TRes, TSigner>(options: TGetOriginXcmFeeOptions<TApi, TRes, TSigner>) => Promise<TXcmFeeDetail & {
2253
2253
  forwardedXcms?: unknown;
@@ -2303,18 +2303,18 @@ declare const createTypeAndThenCall: <TApi, TRes, TSigner>(options: TPolkadotXCM
2303
2303
  * by dry-running both variants and preferring the one that succeeds. If both fail, returns the
2304
2304
  * AssetHub variant. Supports only relaychain assets.
2305
2305
  */
2306
- declare const createTypeThenAutoReserve: <TApi, TRes, TSigner>(chain: TSubstrateChain$1, options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>) => Promise<TSerializedExtrinsics>;
2306
+ declare const createTypeThenAutoReserve: <TApi, TRes, TSigner>(chain: TSubstrateChain, options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>) => Promise<TSerializedExtrinsics>;
2307
2307
 
2308
- declare const validateCurrency: (currency: TCurrencyInput$1, feeAsset?: TCurrencyInput$1) => void;
2309
- declare const validateDestination: (origin: TSubstrateChain$1, destination: TDestination) => void;
2310
- declare const validateAssetSpecifiers: (assetCheckEnabled: boolean, currency: TCurrencyInput$1) => void;
2308
+ declare const validateCurrency: (currency: TCurrencyInput, feeAsset?: TCurrencyInput) => void;
2309
+ declare const validateDestination: (origin: TSubstrateChain, destination: TDestination) => void;
2310
+ declare const validateAssetSpecifiers: (assetCheckEnabled: boolean, currency: TCurrencyInput) => void;
2311
2311
  declare const validateTransact: <TApi, TRes, TSigner>({ api, from, to, senderAddress, address, transactOptions }: TSendOptions<TApi, TRes, TSigner>) => ValidationError | undefined;
2312
2312
 
2313
2313
  declare const verifyEdOnDestination: <TApi, TRes, TSigner>(options: TVerifyEdOnDestinationOptions<TApi, TRes, TSigner>) => Promise<boolean>;
2314
2314
 
2315
2315
  declare const compareAddresses: <TApi, TRes, TSigner>(api: IPolkadotApi<TApi, TRes, TSigner>, addr1: string, addr2: string) => boolean;
2316
2316
 
2317
- declare const validateAddress: <TApi, TRes, TSigner>(api: IPolkadotApi<TApi, TRes, TSigner>, address: TAddress, chain: TChain$1, isDestination?: boolean) => void;
2317
+ declare const validateAddress: <TApi, TRes, TSigner>(api: IPolkadotApi<TApi, TRes, TSigner>, address: TAddress, chain: TChain, isDestination?: boolean) => void;
2318
2318
 
2319
2319
  declare const validateDestinationAddress: <TApi, TRes, TSigner>(address: TAddress, destination: TDestination, api: IPolkadotApi<TApi, TRes, TSigner>) => void;
2320
2320
 
@@ -2347,9 +2347,9 @@ declare const createTransferOrSwap: <TApi, TRes, TSigner>(options: TSendOptions<
2347
2347
 
2348
2348
  declare const isConfig: <TApi>(value: any) => value is TBuilderConfig<TApi>;
2349
2349
 
2350
- declare const getAssetReserveChain: (chain: TSubstrateChain$1, assetLocation: TLocation) => TSubstrateChain$1;
2350
+ declare const getAssetReserveChain: (chain: TSubstrateChain, assetLocation: TLocation) => TSubstrateChain;
2351
2351
 
2352
- declare const getChainVersion: <TApi, TRes, TSigner>(chain: TChain$1) => Version;
2352
+ declare const getChainVersion: <TApi, TRes, TSigner>(chain: TChain) => Version;
2353
2353
 
2354
2354
  /**
2355
2355
  * Gets the relay chain (Polkadot, Kusama, Westend, or Paseo) of a given chain.
@@ -2357,17 +2357,17 @@ declare const getChainVersion: <TApi, TRes, TSigner>(chain: TChain$1) => Version
2357
2357
  * @param chain - The chain to evaluate.
2358
2358
  * @returns The corresponding relay chain.
2359
2359
  */
2360
- declare const getRelayChainOf: (chain: TSubstrateChain$1) => TRelaychain;
2360
+ declare const getRelayChainOf: (chain: TSubstrateChain) => TRelaychain;
2361
2361
 
2362
- declare const createChainClient: <TApi, TRes, TSigner>(api: IPolkadotApi<TApi, TRes, TSigner>, chain: TSubstrateChain$1) => Promise<TApi>;
2362
+ declare const createChainClient: <TApi, TRes, TSigner>(api: IPolkadotApi<TApi, TRes, TSigner>, chain: TSubstrateChain) => Promise<TApi>;
2363
2363
 
2364
- declare const computeFeeFromDryRun: (dryRun: any, chain: TSubstrateChain$1, executionFee: bigint, isFeeAsset?: boolean) => bigint;
2364
+ declare const computeFeeFromDryRun: (dryRun: any, chain: TSubstrateChain, executionFee: bigint, isFeeAsset?: boolean) => bigint;
2365
2365
 
2366
- declare const computeFeeFromDryRunPjs: (dryRun: any, chain: TSubstrateChain$1, executionFee: bigint) => bigint;
2366
+ declare const computeFeeFromDryRunPjs: (dryRun: any, chain: TSubstrateChain, executionFee: bigint) => bigint;
2367
2367
 
2368
- declare const resolveModuleError: (chain: TSubstrateChain$1, error: TModuleError) => TDryRunError;
2368
+ declare const resolveModuleError: (chain: TSubstrateChain, error: TModuleError) => TDryRunError;
2369
2369
 
2370
- declare const padFee: (raw: bigint, origin: TSubstrateChain$1, dest: TChain$1, side: "origin" | "destination") => bigint;
2370
+ declare const padFee: (raw: bigint, origin: TSubstrateChain, dest: TChain, side: "origin" | "destination") => bigint;
2371
2371
  declare const padValueBy: (amount: bigint, percent: number) => bigint;
2372
2372
 
2373
2373
  /**
@@ -2383,12 +2383,12 @@ declare const getEvmPrivateKeyHex: (path: string) => "0x5fb92d6e98884f76de468fa3
2383
2383
  declare const createBeneficiaryLocXTokens: <TApi, TRes, TSigner>({ api, address: recipientAddress, origin, destination, version, paraId }: TCreateBeneficiaryXTokensOptions<TApi, TRes, TSigner>) => TLocation;
2384
2384
  declare const createBeneficiaryLocation: <TApi, TRes, TSigner>({ api, address, version }: TCreateBeneficiaryOptions<TApi, TRes, TSigner>) => TLocation;
2385
2385
 
2386
- declare const createDestination: (version: Version, origin: TSubstrateChain$1, destination: TDestination, chainId?: number, junction?: TJunction, parents?: Parents) => TLocation;
2387
- declare const createVersionedDestination: (version: Version, origin: TSubstrateChain$1, destination: TDestination, chainId?: number, junction?: TJunction, parents?: Parents) => TXcmVersioned<TLocation>;
2386
+ declare const createDestination: (version: Version, origin: TSubstrateChain, destination: TDestination, chainId?: number, junction?: TJunction, parents?: Parents) => TLocation;
2387
+ declare const createVersionedDestination: (version: Version, origin: TSubstrateChain, destination: TDestination, chainId?: number, junction?: TJunction, parents?: Parents) => TXcmVersioned<TLocation>;
2388
2388
 
2389
2389
  declare const createX1Payload: (version: Version, junction: TJunction) => TJunctions;
2390
2390
 
2391
- declare const getChainLocation: (chain: TChain$1, destChain: TChain$1) => TLocation;
2391
+ declare const getChainLocation: (chain: TChain, destChain: TChain) => TLocation;
2392
2392
 
2393
2393
  /**
2394
2394
  * This function localizes a location by removing the `Parachain` junction
@@ -2399,28 +2399,28 @@ declare const getChainLocation: (chain: TChain$1, destChain: TChain$1) => TLocat
2399
2399
  * @param location - The location to localize
2400
2400
  * @returns The localized location
2401
2401
  */
2402
- declare const localizeLocation: (chain: TChain$1, location: TLocation, origin?: TChain$1) => TLocation;
2402
+ declare const localizeLocation: (chain: TChain, location: TLocation, origin?: TChain) => TLocation;
2403
2403
 
2404
2404
  declare const reverseTransformLocation: (location: TLocation) => TLocation;
2405
2405
 
2406
2406
  declare const normalizeAmount: (amount: bigint) => bigint;
2407
2407
 
2408
- declare const resolveDestChain: (originChain: TSubstrateChain$1, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "Darwinia" | "EnergyWebX" | "Hydration" | "Interlay" | "Heima" | "Jamton" | "Moonbeam" | "CoretimePolkadot" | "Collectives" | "Crust" | "Manta" | "Nodle" | "NeuroWeb" | "Pendulum" | "Mythos" | "Peaq" | "PeoplePolkadot" | "Unique" | "Xode" | "AssetHubKusama" | "BridgeHubKusama" | "Karura" | "Kintsugi" | "Moonriver" | "CoretimeKusama" | "Encointer" | "Altair" | "Basilisk" | "BifrostKusama" | "CrustShadow" | "Crab" | "Laos" | "Quartz" | "PeopleKusama" | "Shiden" | "Zeitgeist" | "AssetHubWestend" | "BridgeHubWestend" | "CollectivesWestend" | "CoretimeWestend" | "Penpal" | "PeopleWestend" | "AjunaPaseo" | "AssetHubPaseo" | "BifrostPaseo" | "BridgeHubPaseo" | "CoretimePaseo" | "EnergyWebXPaseo" | "HeimaPaseo" | "HydrationPaseo" | "LaosPaseo" | "NeuroWebPaseo" | "PeoplePaseo" | "ZeitgeistPaseo" | undefined;
2408
+ declare const resolveDestChain: (originChain: TSubstrateChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "Darwinia" | "EnergyWebX" | "Hydration" | "Interlay" | "Heima" | "Jamton" | "Moonbeam" | "CoretimePolkadot" | "Collectives" | "Crust" | "Manta" | "Nodle" | "NeuroWeb" | "Pendulum" | "Mythos" | "Peaq" | "PeoplePolkadot" | "Unique" | "Xode" | "AssetHubKusama" | "BridgeHubKusama" | "Karura" | "Kintsugi" | "Moonriver" | "CoretimeKusama" | "Encointer" | "Altair" | "Basilisk" | "BifrostKusama" | "CrustShadow" | "Crab" | "Laos" | "Quartz" | "PeopleKusama" | "Shiden" | "Zeitgeist" | "AssetHubWestend" | "BridgeHubWestend" | "CollectivesWestend" | "CoretimeWestend" | "Penpal" | "PeopleWestend" | "AjunaPaseo" | "AssetHubPaseo" | "BifrostPaseo" | "BridgeHubPaseo" | "CoretimePaseo" | "EnergyWebXPaseo" | "HeimaPaseo" | "HydrationPaseo" | "LaosPaseo" | "NeuroWebPaseo" | "PeoplePaseo" | "ZeitgeistPaseo" | undefined;
2409
2409
 
2410
2410
  declare const resolveParaId: (paraId: number | undefined, destination: TDestination) => number | undefined;
2411
2411
 
2412
- declare const createRouterBuilder: <TApi, TRes, TSigner>(options: TSendOptionsWithSwap<TApi, TRes, TSigner>) => Promise<_paraspell_swap.RouterBuilderCore<object & {
2413
- from: TSubstrateChain | undefined;
2412
+ declare const createRouterBuilder: <TApi, TRes, TSigner>(options: TSendOptionsWithSwap<TApi, TRes, TSigner>) => Promise<SwapModule.RouterBuilderCore<object & {
2413
+ from: SwapModule.EXCHANGE_CHAINS | undefined;
2414
2414
  } & {
2415
- exchange: TExchangeInput;
2415
+ exchange: SwapModule.EXCHANGE_CHAINS;
2416
2416
  } & {
2417
- to: TChain | undefined;
2417
+ to: SwapModule.EXCHANGE_CHAINS | undefined;
2418
2418
  } & {
2419
- currencyFrom: TCurrencyInput;
2419
+ currencyFrom: SwapModule.EXCHANGE_CHAINS;
2420
2420
  } & {
2421
- currencyTo: TCurrencyInput;
2421
+ currencyTo: SwapModule.EXCHANGE_CHAINS;
2422
2422
  } & {
2423
- amount: TAmount;
2423
+ amount: SwapModule.EXCHANGE_CHAINS;
2424
2424
  } & {
2425
2425
  senderAddress: string;
2426
2426
  } & {
@@ -2432,8 +2432,8 @@ declare const createRouterBuilder: <TApi, TRes, TSigner>(options: TSendOptionsWi
2432
2432
  }>>;
2433
2433
  declare const executeWithRouter: <TApi, TRes, TSigner, T>(options: TSendOptionsWithSwap<TApi, TRes, TSigner>, executor: (builder: Awaited<ReturnType<typeof createRouterBuilder>>) => Promise<T>) => Promise<T>;
2434
2434
 
2435
- declare const abstractDecimals: <TApi, TRes, TSigner>(amount: TAmount$1, decimals: number | undefined, api: IPolkadotApi<TApi, TRes, TSigner>) => bigint;
2436
- declare const applyDecimalAbstraction: (amount: TAmount$1, decimals: number | undefined, shouldAbstract: boolean) => bigint;
2435
+ declare const abstractDecimals: <TApi, TRes, TSigner>(amount: TAmount, decimals: number | undefined, api: IPolkadotApi<TApi, TRes, TSigner>) => bigint;
2436
+ declare const applyDecimalAbstraction: (amount: TAmount, decimals: number | undefined, shouldAbstract: boolean) => bigint;
2437
2437
 
2438
2438
  declare const createAssetsFilter: (asset: TAsset, version: Version) => {
2439
2439
  Wild: {
@@ -2450,9 +2450,9 @@ declare const createBaseExecuteXcm: <TRes>(options: TCreateBaseTransferXcmOption
2450
2450
  suffixXcm?: unknown[];
2451
2451
  }) => unknown[];
2452
2452
 
2453
- declare const createExecuteCall: (chain: TSubstrateChain$1, xcm: TXcmVersioned<any>, maxWeight: TWeight) => TSerializedExtrinsics;
2453
+ declare const createExecuteCall: (chain: TSubstrateChain, xcm: TXcmVersioned<any>, maxWeight: TWeight) => TSerializedExtrinsics;
2454
2454
 
2455
- declare const createExecuteExchangeXcm: <TApi, TRes, TSigner>(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>, origin: TSubstrateChain$1, weight: TWeight, originExecutionFee: bigint, destExecutionFee: bigint) => TRes;
2455
+ declare const createExecuteExchangeXcm: <TApi, TRes, TSigner>(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>, origin: TSubstrateChain, weight: TWeight, originExecutionFee: bigint, destExecutionFee: bigint) => TRes;
2456
2456
 
2457
2457
  declare const createDirectExecuteXcm: <TApi, TRes, TSigner>(options: TCreateTransferXcmOptions<TApi, TRes, TSigner>) => Promise<OneKey<_paraspell_sdk_common.Version, unknown[]>>;
2458
2458
 
@@ -2464,7 +2464,7 @@ declare const getLocalTransferAmount: <TApi, TRes, TSigner>({ assetInfo, balance
2464
2464
 
2465
2465
  declare const handleToAhTeleport: <TApi, TRes, TSigner>(origin: TParachain, input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>, defaultTx: TRes) => Promise<TRes>;
2466
2466
 
2467
- declare const throwUnsupportedCurrency: (currency: TCurrencyInput$1, chain: string, { isDestination }?: {
2467
+ declare const throwUnsupportedCurrency: (currency: TCurrencyInput, chain: string, { isDestination }?: {
2468
2468
  isDestination: boolean;
2469
2469
  }) => never;
2470
2470
 
@@ -2473,8 +2473,8 @@ declare const formatUnits: typeof formatUnits$1;
2473
2473
 
2474
2474
  declare const addXcmVersionHeader: <T, V extends Version>(obj: T, version: V) => OneKey<V, T>;
2475
2475
  declare const selectXcmVersion: (forcedVersion: Version | undefined, originVersion: Version, destMaxVersion?: Version) => Version;
2476
- declare const pickCompatibleXcmVersion: (origin: TSubstrateChain$1, destination: TDestination, override?: Version) => Version;
2477
- declare const pickRouterCompatibleXcmVersion: (origin: TSubstrateChain$1 | undefined, exchangeChain: TSubstrateChain$1, destination: TChain$1 | undefined) => Version;
2476
+ declare const pickCompatibleXcmVersion: (origin: TSubstrateChain, destination: TDestination, override?: Version) => Version;
2477
+ declare const pickRouterCompatibleXcmVersion: (origin: TSubstrateChain | undefined, exchangeChain: TSubstrateChain, destination: TChain | undefined) => Version;
2478
2478
 
2479
2479
  export { AmountTooLowError, AssetClaimBuilder, BaseAssetsPallet, BatchMode, BatchValidationError, BridgeHaltedError, Builder, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETH_MAINNET_CHAIN_ID, ETH_TESTNET_CHAIN_ID, EXCHANGE_CHAINS, ExtensionNotInstalledError, FeatureTemporarilyDisabledError, GeneralBuilder, InvalidAddressError, MissingChainApiError, MissingParameterError, NoXCMSupportImplementedError, NumberFormatError, OverrideConflictError, PolkadotXcmError, PolkadotXcmExecutionError, ProviderUnavailableError, RELAY_LOCATION, RoutingResolutionError, RuntimeApiUnavailableError, ScenarioNotSupportedError, TRANSACT_ORIGINS, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, TypeAndThenUnavailableError, UnableToComputeError, UnsupportedOperationError, ValidationError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, applyDecimalAbstraction, assertAddressIsString, assertHasId, assertSender, assertSenderAddress, assertSwapSupport, assertToIsString, blake2b256, blake2b512, calcPreviewMintAmount, claimAssets, compareAddresses, computeFeeFromDryRun, computeFeeFromDryRunPjs, computeOverridenAmount, constructTypeAndThenCall, convertSs58, createAsset, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createClientCache, createClientPoolHelpers, createDestination, createDirectExecuteXcm, createExecuteCall, createExecuteExchangeXcm, createId, createRouterBuilder, createTransfer, createTransferOrSwap, createTransferOrSwapAll, createTxOverrideAmount, createTypeAndThenCall, createTypeThenAutoReserve, createVersionedAssets, createVersionedDestination, createX1Payload, deriveAccountId, dryRun, dryRunInternal, dryRunOrigin, encodeSs58, executeWithRouter, formatAssetIdToERC20, formatUnits, getAssetBalanceInternal, getAssetReserveChain, getBalance, getBalanceInternal, getBridgeStatus, getChain, getChainConfig, getChainLocation, getChainProviders, getChainVersion, getEthErc20Balance, getEvmPrivateKeyHex, getFailureInfo, getLocalTransferAmount, getMinTransferableAmount, getMinTransferableAmountInternal, getMoonbeamErc20Balance, getOriginXcmFee, getOriginXcmFeeEstimate, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getRelayChainOf, getTChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeEstimate, getXcmFeeInternal, getXcmFeeOnce, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, isSenderSigner, keyFromWs, localizeLocation, maybeOverrideAsset, maybeOverrideAssets, normalizeAmount, overrideTxAmount, padFee, padValueBy, parseUnits, pickCompatibleXcmVersion, pickRouterCompatibleXcmVersion, resolveDestChain, resolveModuleError, resolveParaId, resolveTransferParams, reverseTransformLocation, selectXcmVersion, sortAssets, throwUnsupportedCurrency, transferMoonbeamEvm, transferMoonbeamToEth, traverseXcmHops, validateAddress, validateAssetSpecifiers, validateCurrency, validateDestination, validateDestinationAddress, validateTransact, verifyEdOnDestination, wrapTxBypass };
2480
- export type { BuildHopInfoOptions, ClientCache, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotApi, IPolkadotXCMTransfer, IXTokensTransfer, OneKey, TAddress, TApiOrUrl, TApiType, TAssetClaimInternalOptions, TAssetClaimOptions, TAssetClaimOptionsBase, TBatchOptions, TBatchedSendOptions, TBifrostToken, TBridgeStatus, TBuildAllInternalRes, TBuildDestInfoOptions, TBuildInternalRes, TBuildInternalResBase, TBuilderConfig, TBuilderInternalOptions, TBuilderOptions, TBypassOptions, TCacheItem, TChainConfig, TChainConfigMap, TChainEndpoint, TChainWithApi, TClientEntry, TClientKey, TConditionalXcmFeeDetail, TConditionalXcmFeeHopInfo, TCreateBaseSwapXcmOptions, TCreateBaseTransferXcmOptions, TCreateBeneficiaryOptions, TCreateBeneficiaryXTokensOptions, TCreateEthBridgeInstructionsOptions, TCreateSwapXcmInternalOptions, TCreateSwapXcmOptions, TCreateTransferXcmOptions, TCreateTxsOptions, TDestWeight, TDestXcmFeeDetail, TDestination, TDryRunBaseOptions, TDryRunBypassOptions, TDryRunCallBaseOptions, TDryRunCallOptions, TDryRunChainFailure, TDryRunChainResult, TDryRunChainSuccess, TDryRunError, TDryRunOptions, TDryRunPreviewOptions, TDryRunResBase, TDryRunResult, TDryRunXcmBaseOptions, TDryRunXcmOptions, TEvmBuilderOptions, TEvmBuilderOptionsBase, TEvmChainFrom, TExchangeChain, TExchangeInput$1 as TExchangeInput, TFeeType, TForeignAssetId, TForeignOrNativeAsset, TForeignOrTokenAsset, TGetAssetBalanceOptions, TGetAssetBalanceOptionsBase, TGetBalanceCommonOptions, TGetBalanceOptions, TGetBalanceOptionsBase, TGetFeeForDestChainBaseOptions, TGetFeeForDestChainOptions, TGetMinTransferableAmountOptions, TGetOriginXcmFeeBaseOptions, TGetOriginXcmFeeEstimateOptions, TGetOriginXcmFeeInternalOptions, TGetOriginXcmFeeOptions, TGetReverseTxFeeOptions, TGetTransferInfoOptions, TGetTransferInfoOptionsBase, TGetTransferableAmountOptions, TGetTransferableAmountOptionsBase, TGetXcmFeeBaseOptions, TGetXcmFeeBuilderOptions, TGetXcmFeeEstimateDetail, TGetXcmFeeEstimateOptions, TGetXcmFeeEstimateResult, TGetXcmFeeInternalOptions, TGetXcmFeeOptions, TGetXcmFeeResult, THopInfo, THopTransferInfo, TMantaAsset, TModuleError, TNativeTokenAsset, TNodleAsset, TOriginFeeDetails, TOtherReserveAsset, TPaymentInfo, TPolkadotXCMTransferOptions, TPolkadotXcmMethod, TProviderEntry, TReserveAsset, TResolveHopParams, TScenario, TSelfReserveAsset, TSendBaseOptions, TSendBaseOptionsWithSenderAddress, TSendBaseOptionsWithSwap, TSendInternalOptions, TSendOptions, TSendOptionsWithSwap, TSender, TSerializeEthTransferOptions, TSerializedEthTransfer, TSerializedExtrinsics, TSerializedRuntimeApiQuery, TSerializedStateQuery, TSetBalanceRes, TStatusChangeCallback, TSwapConfig, TSwapEvent, TSwapEventType, TSwapFeeEstimates, TSwapOptions, TTransactOptions, TTransactOrigin, TTransactionContext, TTransactionType, TTransferFeeEstimates, TTransferInfo, TTransferLocalOptions, TTxFactory, TTypeAndThenCallContext, TTypeAndThenFees, TTypeAndThenOverrides, TUrl, TVerifyEdOnDestinationOptions, TVerifyEdOnDestinationOptionsBase, TWeight, TXTokensCurrencySelection, TXTokensMethod, TXTokensTransferOptions, TXcmAsset, TXcmFeeBase, TXcmFeeDetail, TXcmFeeDetailError, TXcmFeeDetailSuccess, TXcmFeeDetailWithFallback, TXcmFeeHopInfo, TXcmFeeHopResult, TXcmFeeSwapConfig, TXcmForeignAsset, TXcmPalletMethod, TXcmVersioned, TZeitgeistAsset, WithApi, WithRequiredSenderAddress, WithRequiredSwapOptions };
2480
+ export type { BuildHopInfoOptions, ClientCache, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotApi, IPolkadotXCMTransfer, IXTokensTransfer, OneKey, TAddress, TApiOrUrl, TApiType, TAssetClaimInternalOptions, TAssetClaimOptions, TAssetClaimOptionsBase, TBatchOptions, TBatchedSendOptions, TBifrostToken, TBridgeStatus, TBuildAllInternalRes, TBuildDestInfoOptions, TBuildInternalRes, TBuildInternalResBase, TBuilderConfig, TBuilderInternalOptions, TBuilderOptions, TBypassOptions, TCacheItem, TChainConfig, TChainConfigMap, TChainEndpoint, TChainWithApi, TClientEntry, TClientKey, TConditionalXcmFeeDetail, TConditionalXcmFeeHopInfo, TCreateBaseSwapXcmOptions, TCreateBaseTransferXcmOptions, TCreateBeneficiaryOptions, TCreateBeneficiaryXTokensOptions, TCreateEthBridgeInstructionsOptions, TCreateSwapXcmInternalOptions, TCreateSwapXcmOptions, TCreateTransferXcmOptions, TCreateTxsOptions, TDestWeight, TDestXcmFeeDetail, TDestination, TDryRunBaseOptions, TDryRunBypassOptions, TDryRunCallBaseOptions, TDryRunCallOptions, TDryRunChainFailure, TDryRunChainResult, TDryRunChainSuccess, TDryRunError, TDryRunOptions, TDryRunPreviewOptions, TDryRunResBase, TDryRunResult, TDryRunXcmBaseOptions, TDryRunXcmOptions, TEvmBuilderOptions, TEvmBuilderOptionsBase, TEvmChainFrom, TExchangeChain, TExchangeInput, TFeeType, TForeignAssetId, TForeignOrNativeAsset, TForeignOrTokenAsset, TGetAssetBalanceOptions, TGetAssetBalanceOptionsBase, TGetBalanceCommonOptions, TGetBalanceOptions, TGetBalanceOptionsBase, TGetFeeForDestChainBaseOptions, TGetFeeForDestChainOptions, TGetMinTransferableAmountOptions, TGetOriginXcmFeeBaseOptions, TGetOriginXcmFeeEstimateOptions, TGetOriginXcmFeeInternalOptions, TGetOriginXcmFeeOptions, TGetReverseTxFeeOptions, TGetTransferInfoOptions, TGetTransferInfoOptionsBase, TGetTransferableAmountOptions, TGetTransferableAmountOptionsBase, TGetXcmFeeBaseOptions, TGetXcmFeeBuilderOptions, TGetXcmFeeEstimateDetail, TGetXcmFeeEstimateOptions, TGetXcmFeeEstimateResult, TGetXcmFeeInternalOptions, TGetXcmFeeOptions, TGetXcmFeeResult, THopInfo, THopTransferInfo, TMantaAsset, TModuleError, TNativeTokenAsset, TNodleAsset, TOriginFeeDetails, TOtherReserveAsset, TPaymentInfo, TPolkadotXCMTransferOptions, TPolkadotXcmMethod, TProviderEntry, TReserveAsset, TResolveHopParams, TScenario, TSelfReserveAsset, TSendBaseOptions, TSendBaseOptionsWithSenderAddress, TSendBaseOptionsWithSwap, TSendInternalOptions, TSendOptions, TSendOptionsWithSwap, TSender, TSerializeEthTransferOptions, TSerializedEthTransfer, TSerializedExtrinsics, TSerializedRuntimeApiQuery, TSerializedStateQuery, TSetBalanceRes, TStatusChangeCallback, TSwapConfig, TSwapEvent, TSwapEventType, TSwapFeeEstimates, TSwapOptions, TTransactOptions, TTransactOrigin, TTransactionContext, TTransactionType, TTransferFeeEstimates, TTransferInfo, TTransferLocalOptions, TTxFactory, TTypeAndThenCallContext, TTypeAndThenFees, TTypeAndThenOverrides, TUrl, TVerifyEdOnDestinationOptions, TVerifyEdOnDestinationOptionsBase, TWeight, TXTokensCurrencySelection, TXTokensMethod, TXTokensTransferOptions, TXcmAsset, TXcmFeeBase, TXcmFeeDetail, TXcmFeeDetailError, TXcmFeeDetailSuccess, TXcmFeeDetailWithFallback, TXcmFeeHopInfo, TXcmFeeHopResult, TXcmFeeSwapConfig, TXcmForeignAsset, TXcmPalletMethod, TXcmVersioned, TZeitgeistAsset, WithApi, WithRequiredSenderAddress, WithRequiredSwapOptions };
package/dist/index.mjs CHANGED
@@ -7349,10 +7349,6 @@ var getXcmFeeOnce = /*#__PURE__*/function () {
7349
7349
  });
7350
7350
  case 11:
7351
7351
  traversalResult = _context2.v;
7352
- // Handle case where we failed before reaching destination
7353
- destFee = 0n;
7354
- destFeeType = isExternalChain(destination) ? 'noFeeRequired' : 'paymentInfo';
7355
- destSufficient = undefined;
7356
7352
  if (!traversalResult.destination) {
7357
7353
  _context2.n = 12;
7358
7354
  break;
@@ -13396,7 +13392,7 @@ var convertBuilderConfig = function convertBuilderConfig(config) {
13396
13392
  if (config.apiOverrides && Object.values(config.apiOverrides).some(function (url) {
13397
13393
  return _typeof(url) === 'object';
13398
13394
  })) {
13399
- throw new UnsupportedOperationError('XCM Router does not support API client override with non-string values');
13395
+ throw new UnsupportedOperationError('Swap module does not support API client override with non-string values');
13400
13396
  }
13401
13397
  var filteredApiOverrides = Object.fromEntries(Object.entries(apiOverrides).filter(function (_ref) {
13402
13398
  var _ref2 = _slicedToArray(_ref, 2),
@@ -13409,50 +13405,69 @@ var convertBuilderConfig = function convertBuilderConfig(config) {
13409
13405
  }
13410
13406
  var isWsUrl = typeof config === 'string' && Array.isArray(config);
13411
13407
  if (!isWsUrl) {
13412
- throw new UnsupportedOperationError('XCM Router does not support API client override');
13408
+ throw new UnsupportedOperationError('Swap module does not support API client override');
13413
13409
  }
13414
13410
  };
13411
+ var importSwapModuleOrThrow = /*#__PURE__*/function () {
13412
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
13413
+ var MODULE_NAME;
13414
+ return _regenerator().w(function (_context) {
13415
+ while (1) switch (_context.p = _context.n) {
13416
+ case 0:
13417
+ MODULE_NAME = '@paraspell/swap';
13418
+ _context.p = 1;
13419
+ _context.n = 2;
13420
+ return import(MODULE_NAME);
13421
+ case 2:
13422
+ return _context.a(2, _context.v);
13423
+ case 3:
13424
+ _context.p = 3;
13425
+ _context.v;
13426
+ throw new ExtensionNotInstalledError("The swap package is required to use swaps. Please install ".concat(MODULE_NAME, "."));
13427
+ case 4:
13428
+ return _context.a(2);
13429
+ }
13430
+ }, _callee, null, [[1, 3]]);
13431
+ }));
13432
+ return function importSwapModuleOrThrow() {
13433
+ return _ref3.apply(this, arguments);
13434
+ };
13435
+ }();
13415
13436
  var createRouterBuilder = /*#__PURE__*/function () {
13416
- var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(options) {
13437
+ var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(options) {
13417
13438
  var _options$transactOpti, _slippage$toString;
13418
- var api, _yield$import, RouterBuilder, from, to, currency, _options$swapOptions, currencyTo, evmSenderAddress, exchange, slippage, onStatusChange, senderAddress, address, config, routerConfig, builder;
13419
- return _regenerator().w(function (_context) {
13420
- while (1) switch (_context.n) {
13439
+ var api, _yield$importSwapModu, RouterBuilder, from, to, currency, _options$swapOptions, currencyTo, evmSenderAddress, exchange, slippage, onStatusChange, senderAddress, address, config, routerConfig, builder;
13440
+ return _regenerator().w(function (_context2) {
13441
+ while (1) switch (_context2.n) {
13421
13442
  case 0:
13422
13443
  api = options.api;
13423
13444
  if (!((_options$transactOpti = options.transactOptions) !== null && _options$transactOpti !== void 0 && _options$transactOpti.call)) {
13424
- _context.n = 1;
13445
+ _context2.n = 1;
13425
13446
  break;
13426
13447
  }
13427
13448
  throw new UnsupportedOperationError('Cannot use transact options together with swap options.');
13428
13449
  case 1:
13429
13450
  if (!(api.getType() !== 'PAPI')) {
13430
- _context.n = 2;
13451
+ _context2.n = 2;
13431
13452
  break;
13432
13453
  }
13433
13454
  throw new UnsupportedOperationError('Swaps are only supported when using PAPI SDK.');
13434
13455
  case 2:
13435
- _context.n = 3;
13436
- return import('@paraspell/swap');
13456
+ _context2.n = 3;
13457
+ return importSwapModuleOrThrow();
13437
13458
  case 3:
13438
- _yield$import = _context.v;
13439
- RouterBuilder = _yield$import.RouterBuilder;
13440
- if (RouterBuilder) {
13441
- _context.n = 4;
13442
- break;
13443
- }
13444
- throw new ExtensionNotInstalledError('XCM Router package is required for swaps. Please install @paraspell/swap.');
13445
- case 4:
13459
+ _yield$importSwapModu = _context2.v;
13460
+ RouterBuilder = _yield$importSwapModu.RouterBuilder;
13446
13461
  from = options.from, to = options.to, currency = options.currency, _options$swapOptions = options.swapOptions, currencyTo = _options$swapOptions.currencyTo, evmSenderAddress = _options$swapOptions.evmSenderAddress, exchange = _options$swapOptions.exchange, slippage = _options$swapOptions.slippage, onStatusChange = _options$swapOptions.onStatusChange, senderAddress = options.senderAddress, address = options.address;
13447
13462
  assertToIsString(to);
13448
13463
  assertAddressIsString(address);
13449
13464
  assertSenderAddress(senderAddress);
13450
13465
  if (!Array.isArray(currency)) {
13451
- _context.n = 5;
13466
+ _context2.n = 4;
13452
13467
  break;
13453
13468
  }
13454
13469
  throw new UnsupportedOperationError('Swaps with multiple currencies are not supported.');
13455
- case 5:
13470
+ case 4:
13456
13471
  config = api.getConfig();
13457
13472
  routerConfig = convertBuilderConfig(config);
13458
13473
  builder = RouterBuilder(routerConfig).from(from).exchange(exchange).to(to).currencyFrom(currency).currencyTo(currencyTo).amount(currency.amount).senderAddress(senderAddress).evmSenderAddress(evmSenderAddress).recipientAddress(address).slippagePct((_slippage$toString = slippage === null || slippage === void 0 ? void 0 : slippage.toString()) !== null && _slippage$toString !== void 0 ? _slippage$toString : DEFAULT_SWAP_SLIPPAGE.toString());
@@ -13462,30 +13477,30 @@ var createRouterBuilder = /*#__PURE__*/function () {
13462
13477
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
13463
13478
  builder = builder.onStatusChange(onStatusChange);
13464
13479
  }
13465
- return _context.a(2, builder);
13480
+ return _context2.a(2, builder);
13466
13481
  }
13467
- }, _callee);
13482
+ }, _callee2);
13468
13483
  }));
13469
13484
  return function createRouterBuilder(_x) {
13470
- return _ref3.apply(this, arguments);
13485
+ return _ref4.apply(this, arguments);
13471
13486
  };
13472
13487
  }();
13473
13488
  var executeWithRouter = /*#__PURE__*/function () {
13474
- var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(options, executor) {
13489
+ var _ref5 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(options, executor) {
13475
13490
  var routerBuilder;
13476
- return _regenerator().w(function (_context2) {
13477
- while (1) switch (_context2.n) {
13491
+ return _regenerator().w(function (_context3) {
13492
+ while (1) switch (_context3.n) {
13478
13493
  case 0:
13479
- _context2.n = 1;
13494
+ _context3.n = 1;
13480
13495
  return createRouterBuilder(options);
13481
13496
  case 1:
13482
- routerBuilder = _context2.v;
13483
- return _context2.a(2, executor(routerBuilder));
13497
+ routerBuilder = _context3.v;
13498
+ return _context3.a(2, executor(routerBuilder));
13484
13499
  }
13485
- }, _callee2);
13500
+ }, _callee3);
13486
13501
  }));
13487
13502
  return function executeWithRouter(_x2, _x3) {
13488
- return _ref4.apply(this, arguments);
13503
+ return _ref5.apply(this, arguments);
13489
13504
  };
13490
13505
  }();
13491
13506
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk-core",
3
- "version": "12.8.7",
3
+ "version": "12.8.9",
4
4
  "description": "SDK core for ParaSpell XCM/XCMP tool for developers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,10 +25,10 @@
25
25
  "dependencies": {
26
26
  "@noble/hashes": "^2.0.1",
27
27
  "@scure/base": "^2.0.0",
28
- "viem": "2.46.3",
29
- "@paraspell/assets": "12.8.7",
30
- "@paraspell/pallets": "12.8.7",
31
- "@paraspell/sdk-common": "12.8.7"
28
+ "viem": "^2.47.1",
29
+ "@paraspell/assets": "12.8.9",
30
+ "@paraspell/pallets": "12.8.9",
31
+ "@paraspell/sdk-common": "12.8.9"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "@paraspell/swap": "^12.0.0"