@paraspell/sdk-core 12.8.8 → 12.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.
- package/dist/index.d.ts +150 -147
- package/dist/index.mjs +11898 -11997
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as _paraspell_sdk_common from '@paraspell/sdk-common';
|
|
2
|
-
import { TChain
|
|
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
|
|
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
|
|
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>;
|
|
@@ -36,14 +36,15 @@ type ClientCache<T> = {
|
|
|
36
36
|
remainingTtl: (k: TClientKey) => number | undefined;
|
|
37
37
|
revive: (k: TClientKey, ttl: number) => void;
|
|
38
38
|
};
|
|
39
|
-
|
|
39
|
+
declare const API_TYPES: readonly ["PAPI", "PJS", "DEDOT"];
|
|
40
|
+
type TApiType = (typeof API_TYPES)[number];
|
|
40
41
|
|
|
41
42
|
interface IPolkadotApi<TApi, TRes, TSigner> {
|
|
42
43
|
getType(): TApiType;
|
|
43
44
|
getConfig(): TBuilderOptions<TApiOrUrl<TApi>> | undefined;
|
|
44
45
|
getApi(): TApi;
|
|
45
|
-
init(chain: TChain
|
|
46
|
-
createApiInstance: (wsUrl: TUrl, chain: TSubstrateChain
|
|
46
|
+
init(chain: TChain, clientTtlMs?: number): Promise<void>;
|
|
47
|
+
createApiInstance: (wsUrl: TUrl, chain: TSubstrateChain) => Promise<TApi>;
|
|
47
48
|
accountToHex(address: string, isPrefixed?: boolean): string;
|
|
48
49
|
accountToUint8a(address: string): Uint8Array;
|
|
49
50
|
deserializeExtrinsics(serialized: TSerializedExtrinsics): TRes;
|
|
@@ -64,12 +65,12 @@ interface IPolkadotApi<TApi, TRes, TSigner> {
|
|
|
64
65
|
}>;
|
|
65
66
|
quoteAhPrice(fromMl: TLocation, toMl: TLocation, amountIn: bigint, includeFee?: boolean): Promise<bigint | undefined>;
|
|
66
67
|
getXcmWeight(xcm: any): Promise<TWeight>;
|
|
67
|
-
getXcmPaymentApiFee(chain: TSubstrateChain
|
|
68
|
+
getXcmPaymentApiFee(chain: TSubstrateChain, localXcm: any, forwardedXcm: any, asset: TAssetInfo, version: Version, transformXcm: boolean): Promise<bigint>;
|
|
68
69
|
getEvmStorage(contract: string, slot: string): Promise<string>;
|
|
69
70
|
getFromRpc(module: string, method: string, key: string): Promise<string>;
|
|
70
71
|
blake2AsHex(data: Uint8Array): string;
|
|
71
72
|
clone(): IPolkadotApi<TApi, TRes, TSigner>;
|
|
72
|
-
createApiForChain(chain: TSubstrateChain
|
|
73
|
+
createApiForChain(chain: TSubstrateChain): Promise<IPolkadotApi<TApi, TRes, TSigner>>;
|
|
73
74
|
getDryRunCall(options: TDryRunCallBaseOptions<TRes>): Promise<TDryRunChainResult>;
|
|
74
75
|
getDryRunXcm(options: TDryRunXcmBaseOptions<TRes>): Promise<TDryRunChainResult>;
|
|
75
76
|
getBridgeStatus(): Promise<TBridgeStatus>;
|
|
@@ -87,18 +88,18 @@ declare abstract class Chain<TApi, TRes, TSigner> {
|
|
|
87
88
|
private readonly _info;
|
|
88
89
|
private readonly _ecosystem;
|
|
89
90
|
private readonly _version;
|
|
90
|
-
constructor(chain: TSubstrateChain
|
|
91
|
+
constructor(chain: TSubstrateChain, info: string, ecosystem: TRelaychain, version: Version);
|
|
91
92
|
get info(): string;
|
|
92
93
|
get ecosystem(): TRelaychain;
|
|
93
|
-
get chain(): TSubstrateChain
|
|
94
|
+
get chain(): TSubstrateChain;
|
|
94
95
|
get version(): Version;
|
|
95
96
|
transfer(sendOptions: TSendInternalOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
96
97
|
isRelayToParaEnabled(): boolean;
|
|
97
|
-
throwIfCantReceive(destChain: TChain
|
|
98
|
-
throwIfTempDisabled(options: TSendInternalOptions<TApi, TRes, TSigner>, destChain?: TChain
|
|
98
|
+
throwIfCantReceive(destChain: TChain | undefined): void;
|
|
99
|
+
throwIfTempDisabled(options: TSendInternalOptions<TApi, TRes, TSigner>, destChain?: TChain): void;
|
|
99
100
|
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes, TSigner>): boolean;
|
|
100
101
|
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
101
|
-
canReceiveFrom(_origin: TChain
|
|
102
|
+
canReceiveFrom(_origin: TChain): boolean;
|
|
102
103
|
shouldUseNativeAssetTeleport({ assetInfo: asset, to }: TSendInternalOptions<TApi, TRes, TSigner>): boolean;
|
|
103
104
|
createAsset(asset: WithAmount<TAssetInfo>, version: Version): TAsset;
|
|
104
105
|
getNativeAssetSymbol(): string;
|
|
@@ -284,7 +285,7 @@ declare class CoretimeKusama<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSig
|
|
|
284
285
|
declare class CoretimePolkadot<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
285
286
|
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
286
287
|
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
287
|
-
canReceiveFrom(origin: TChain
|
|
288
|
+
canReceiveFrom(origin: TChain): boolean;
|
|
288
289
|
}
|
|
289
290
|
|
|
290
291
|
declare class CoretimePaseo<TApi, TRes, TSigner> extends CoretimePolkadot<TApi, TRes, TSigner> {
|
|
@@ -386,7 +387,7 @@ declare class Kintsugi<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> i
|
|
|
386
387
|
}
|
|
387
388
|
|
|
388
389
|
declare class Polkadot<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
389
|
-
constructor(chain?: TSubstrateChain
|
|
390
|
+
constructor(chain?: TSubstrateChain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
390
391
|
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
391
392
|
}
|
|
392
393
|
|
|
@@ -512,14 +513,14 @@ declare class Westend<TApi, TRes, TSigner> extends Polkadot<TApi, TRes, TSigner>
|
|
|
512
513
|
declare class Xode<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
513
514
|
constructor();
|
|
514
515
|
transferPolkadotXCM(options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
515
|
-
canReceiveFrom(origin: TChain
|
|
516
|
+
canReceiveFrom(origin: TChain): boolean;
|
|
516
517
|
}
|
|
517
518
|
|
|
518
519
|
declare class Zeitgeist<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
519
520
|
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
520
521
|
getCustomCurrencyId(asset: TAssetInfo): TZeitgeistAsset | TXcmForeignAsset;
|
|
521
522
|
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
522
|
-
canReceiveFrom(origin: TChain
|
|
523
|
+
canReceiveFrom(origin: TChain): boolean;
|
|
523
524
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
524
525
|
}
|
|
525
526
|
|
|
@@ -600,6 +601,9 @@ declare const ETH_TESTNET_CHAIN_ID: bigint;
|
|
|
600
601
|
declare const RELAY_LOCATION: TLocation;
|
|
601
602
|
declare const TX_CLIENT_TIMEOUT_MS: number;
|
|
602
603
|
declare const DRY_RUN_CLIENT_TIMEOUT_MS: number;
|
|
604
|
+
declare const DEFAULT_TTL_MS = 60000;
|
|
605
|
+
declare const MAX_CLIENTS = 100;
|
|
606
|
+
declare const EXTENSION_MS: number;
|
|
603
607
|
declare const TRANSACT_ORIGINS: readonly ["Native", "SovereignAccount", "Superuser", "Xcm"];
|
|
604
608
|
/**
|
|
605
609
|
* Supported exchange chains
|
|
@@ -607,10 +611,10 @@ declare const TRANSACT_ORIGINS: readonly ["Native", "SovereignAccount", "Superus
|
|
|
607
611
|
declare const EXCHANGE_CHAINS: readonly ["AssetHubPolkadotDex", "AssetHubKusamaDex", "AssetHubPaseoDex", "AssetHubWestendDex", "HydrationDex", "KaruraDex", "AcalaDex", "BifrostKusamaDex", "BifrostPolkadotDex"];
|
|
608
612
|
|
|
609
613
|
type TExchangeChain = (typeof EXCHANGE_CHAINS)[number];
|
|
610
|
-
type TExchangeInput
|
|
614
|
+
type TExchangeInput = TExchangeChain | TExchangeChain[] | undefined;
|
|
611
615
|
type TSwapOptions<TApi, TRes, TSigner> = {
|
|
612
616
|
currencyTo: TCurrencyCore;
|
|
613
|
-
exchange?: TExchangeInput
|
|
617
|
+
exchange?: TExchangeInput;
|
|
614
618
|
slippage?: number;
|
|
615
619
|
evmSenderAddress?: string;
|
|
616
620
|
evmSigner?: TSigner;
|
|
@@ -619,7 +623,7 @@ type TSwapOptions<TApi, TRes, TSigner> = {
|
|
|
619
623
|
type TTransactionContext<TApi, TRes> = {
|
|
620
624
|
type: TTransactionType;
|
|
621
625
|
api: TApi;
|
|
622
|
-
chain: TSubstrateChain
|
|
626
|
+
chain: TSubstrateChain;
|
|
623
627
|
tx: TRes;
|
|
624
628
|
};
|
|
625
629
|
type TTransactionType = 'TRANSFER' | 'SWAP' | 'SWAP_AND_TRANSFER';
|
|
@@ -639,11 +643,11 @@ type TSwapEvent<TApi, TRes> = {
|
|
|
639
643
|
/**
|
|
640
644
|
* Current transaction's origin chain
|
|
641
645
|
*/
|
|
642
|
-
chain?: TSubstrateChain
|
|
646
|
+
chain?: TSubstrateChain;
|
|
643
647
|
/**
|
|
644
648
|
* Current transaction's destination chain
|
|
645
649
|
*/
|
|
646
|
-
destinationChain?: TChain
|
|
650
|
+
destinationChain?: TChain;
|
|
647
651
|
/**
|
|
648
652
|
* 0-based step index of current operation
|
|
649
653
|
*/
|
|
@@ -653,7 +657,7 @@ type TStatusChangeCallback<TApi, TRes> = (info: TSwapEvent<TApi, TRes>) => void;
|
|
|
653
657
|
|
|
654
658
|
type TPolkadotXCMTransferOptions<TApi, TRes, TSigner> = {
|
|
655
659
|
api: IPolkadotApi<TApi, TRes, TSigner>;
|
|
656
|
-
chain: TSubstrateChain
|
|
660
|
+
chain: TSubstrateChain;
|
|
657
661
|
beneficiaryLocation: TLocation;
|
|
658
662
|
address: TAddress;
|
|
659
663
|
asset: TAsset;
|
|
@@ -662,9 +666,9 @@ type TPolkadotXCMTransferOptions<TApi, TRes, TSigner> = {
|
|
|
662
666
|
assetInfo: WithAmount<TAssetInfo>;
|
|
663
667
|
currency: TCurrencyInputWithAmount;
|
|
664
668
|
feeAssetInfo?: TAssetInfo;
|
|
665
|
-
feeCurrency?: TCurrencyInput
|
|
669
|
+
feeCurrency?: TCurrencyInput;
|
|
666
670
|
destination: TDestination;
|
|
667
|
-
destChain?: TChain
|
|
671
|
+
destChain?: TChain;
|
|
668
672
|
paraIdTo?: number;
|
|
669
673
|
version: Version;
|
|
670
674
|
senderAddress?: string;
|
|
@@ -678,7 +682,7 @@ type TXTokensTransferOptions<TApi, TRes, TSigner> = {
|
|
|
678
682
|
asset: WithAmount<TAssetInfo>;
|
|
679
683
|
address: TAddress;
|
|
680
684
|
scenario: TScenario;
|
|
681
|
-
origin: TSubstrateChain
|
|
685
|
+
origin: TSubstrateChain;
|
|
682
686
|
destination: TDestination;
|
|
683
687
|
paraIdTo?: number;
|
|
684
688
|
version: Version;
|
|
@@ -695,12 +699,12 @@ interface IXTokensTransfer<TApi, TRes, TSigner> {
|
|
|
695
699
|
}
|
|
696
700
|
type TScenario = 'ParaToRelay' | 'ParaToPara' | 'RelayToPara';
|
|
697
701
|
type TAddress = string | TLocation;
|
|
698
|
-
type TDestination = TChain
|
|
702
|
+
type TDestination = TChain | TLocation;
|
|
699
703
|
type TSendBaseOptions<TApi, TRes, TSigner> = {
|
|
700
704
|
/**
|
|
701
705
|
* The origin chain
|
|
702
706
|
*/
|
|
703
|
-
from: TSubstrateChain
|
|
707
|
+
from: TSubstrateChain;
|
|
704
708
|
/**
|
|
705
709
|
* The destination address. A SS58 or H160 format.
|
|
706
710
|
*/
|
|
@@ -724,7 +728,7 @@ type TSendBaseOptions<TApi, TRes, TSigner> = {
|
|
|
724
728
|
/**
|
|
725
729
|
* The optional fee asset. Either ID, symbol, or location
|
|
726
730
|
*/
|
|
727
|
-
feeAsset?: TCurrencyInput
|
|
731
|
+
feeAsset?: TCurrencyInput;
|
|
728
732
|
/**
|
|
729
733
|
* The optional destination parachain ID
|
|
730
734
|
*/
|
|
@@ -776,7 +780,7 @@ type TSendInternalOptions<TApi, TRes, TSigner> = Omit<TSendBaseOptions<TApi, TRe
|
|
|
776
780
|
api: IPolkadotApi<TApi, TRes, TSigner>;
|
|
777
781
|
assetInfo: WithAmount<TAssetInfo>;
|
|
778
782
|
feeAsset?: TAssetInfo;
|
|
779
|
-
feeCurrency?: TCurrencyInput
|
|
783
|
+
feeCurrency?: TCurrencyInput;
|
|
780
784
|
overriddenAsset?: TLocation | TAssetWithFee[];
|
|
781
785
|
version: Version;
|
|
782
786
|
isAmountAll: boolean;
|
|
@@ -820,7 +824,7 @@ type TCreateBeneficiaryOptions<TApi, TRes, TSigner> = {
|
|
|
820
824
|
};
|
|
821
825
|
type TCreateBeneficiaryXTokensOptions<TApi, TRes, TSigner> = {
|
|
822
826
|
api: IPolkadotApi<TApi, TRes, TSigner>;
|
|
823
|
-
origin: TSubstrateChain
|
|
827
|
+
origin: TSubstrateChain;
|
|
824
828
|
destination: TDestination;
|
|
825
829
|
address: TAddress;
|
|
826
830
|
version: Version;
|
|
@@ -836,8 +840,8 @@ type TTransferFeeEstimates = {
|
|
|
836
840
|
reserveFee: bigint;
|
|
837
841
|
};
|
|
838
842
|
type TCreateBaseTransferXcmOptions<TRes> = {
|
|
839
|
-
chain: TSubstrateChain
|
|
840
|
-
destChain: TChain
|
|
843
|
+
chain: TSubstrateChain;
|
|
844
|
+
destChain: TChain;
|
|
841
845
|
assetInfo: WithAmount<TAssetInfo>;
|
|
842
846
|
feeAssetInfo?: TAssetInfo;
|
|
843
847
|
fees: TTransferFeeEstimates;
|
|
@@ -851,12 +855,12 @@ type TCreateBaseTransferXcmOptions<TRes> = {
|
|
|
851
855
|
};
|
|
852
856
|
type TCreateTransferXcmOptions<TApi, TRes, TSigner> = WithApi<TCreateBaseTransferXcmOptions<TRes>, TApi, TRes, TSigner>;
|
|
853
857
|
type TCreateBaseSwapXcmOptions = {
|
|
854
|
-
chain?: TSubstrateChain
|
|
858
|
+
chain?: TSubstrateChain;
|
|
855
859
|
exchangeChain: TParachain;
|
|
856
|
-
destChain?: TChain
|
|
860
|
+
destChain?: TChain;
|
|
857
861
|
assetInfoFrom: WithAmount<TAssetInfo>;
|
|
858
862
|
assetInfoTo: WithAmount<TAssetInfo>;
|
|
859
|
-
currencyTo: TCurrencyInput
|
|
863
|
+
currencyTo: TCurrencyInput;
|
|
860
864
|
feeAssetInfo?: TAssetInfo;
|
|
861
865
|
senderAddress: string;
|
|
862
866
|
recipientAddress: string;
|
|
@@ -884,8 +888,8 @@ type TCreateEthBridgeInstructionsOptions<TApi, TRes, TSigner> = {
|
|
|
884
888
|
};
|
|
885
889
|
|
|
886
890
|
type TAssetClaimOptionsBase = {
|
|
887
|
-
chain: TSubstrateChain
|
|
888
|
-
currency: WithComplexAmount<TCurrencyCore> | TAsset<TAmount
|
|
891
|
+
chain: TSubstrateChain;
|
|
892
|
+
currency: WithComplexAmount<TCurrencyCore> | TAsset<TAmount>[] | WithComplexAmount<TCurrencyCore>[];
|
|
889
893
|
address: TAddress;
|
|
890
894
|
version?: Version;
|
|
891
895
|
};
|
|
@@ -902,7 +906,7 @@ type TSetBalanceRes = {
|
|
|
902
906
|
declare abstract class BaseAssetsPallet {
|
|
903
907
|
protected palletName: TAssetsPallet;
|
|
904
908
|
constructor(palletName: TAssetsPallet);
|
|
905
|
-
abstract mint<TApi, TRes, TSigner>(address: string, assetInfo: WithAmount<TAssetInfo>, balance: bigint, chain: TSubstrateChain
|
|
909
|
+
abstract mint<TApi, TRes, TSigner>(address: string, assetInfo: WithAmount<TAssetInfo>, balance: bigint, chain: TSubstrateChain, api: IPolkadotApi<TApi, TRes, TSigner>): Promise<TSetBalanceRes>;
|
|
906
910
|
abstract getBalance<TApi, TRes, TSigner>(api: IPolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo, customCurrencyId?: unknown): Promise<bigint>;
|
|
907
911
|
}
|
|
908
912
|
|
|
@@ -974,7 +978,7 @@ declare class BatchTransactionManager<TApi, TRes, TSigner> {
|
|
|
974
978
|
transactionOptions: TBatchedSendOptions<TApi, TRes, TSigner>[];
|
|
975
979
|
addTransaction(options: TBatchedSendOptions<TApi, TRes, TSigner>): void;
|
|
976
980
|
isEmpty(): boolean;
|
|
977
|
-
buildBatch(api: IPolkadotApi<TApi, TRes, TSigner>, from: TSubstrateChain
|
|
981
|
+
buildBatch(api: IPolkadotApi<TApi, TRes, TSigner>, from: TSubstrateChain, options?: TBatchOptions): Promise<TRes>;
|
|
978
982
|
}
|
|
979
983
|
|
|
980
984
|
/**
|
|
@@ -991,8 +995,8 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TSendBaseOpt
|
|
|
991
995
|
* @param chain - The chain from which the transaction originates.
|
|
992
996
|
* @returns An instance of Builder
|
|
993
997
|
*/
|
|
994
|
-
from(chain: TSubstrateChain
|
|
995
|
-
from: TSubstrateChain
|
|
998
|
+
from(chain: TSubstrateChain): GeneralBuilder<TApi, TRes, TSigner, T & {
|
|
999
|
+
from: TSubstrateChain;
|
|
996
1000
|
}>;
|
|
997
1001
|
/**
|
|
998
1002
|
* Specifies the destination chain for the transaction.
|
|
@@ -1010,8 +1014,8 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TSendBaseOpt
|
|
|
1010
1014
|
* @param chain - The chain from which to claim assets.
|
|
1011
1015
|
* @returns An instance of Builder
|
|
1012
1016
|
*/
|
|
1013
|
-
claimFrom(chain: TSubstrateChain
|
|
1014
|
-
chain: TSubstrateChain
|
|
1017
|
+
claimFrom(chain: TSubstrateChain): AssetClaimBuilder<TApi, TRes, TSigner, {
|
|
1018
|
+
chain: TSubstrateChain;
|
|
1015
1019
|
}>;
|
|
1016
1020
|
/**
|
|
1017
1021
|
* Specifies the currency to be used in the transaction. Symbol, ID, location or multi-asset.
|
|
@@ -1083,8 +1087,8 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TSendBaseOpt
|
|
|
1083
1087
|
* @param currency - The currency to be used for the fee.
|
|
1084
1088
|
* @returns An instance of the Builder
|
|
1085
1089
|
*/
|
|
1086
|
-
feeAsset(currency: TCurrencyInput
|
|
1087
|
-
feeAsset: TCurrencyInput
|
|
1090
|
+
feeAsset(currency: TCurrencyInput | undefined): GeneralBuilder<TApi, TRes, TSigner, T & {
|
|
1091
|
+
feeAsset: TCurrencyInput | undefined;
|
|
1088
1092
|
}>;
|
|
1089
1093
|
/**
|
|
1090
1094
|
* Sets the hex of the encoded transaction call to apply on the destination chain
|
|
@@ -1116,7 +1120,7 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TSendBaseOpt
|
|
|
1116
1120
|
* @returns An instance of Builder
|
|
1117
1121
|
*/
|
|
1118
1122
|
addToBatch(this: GeneralBuilder<TApi, TRes, TSigner, TSendBaseOptions<TApi, TRes, TSigner>>): GeneralBuilder<TApi, TRes, TSigner, T & {
|
|
1119
|
-
from: TSubstrateChain
|
|
1123
|
+
from: TSubstrateChain;
|
|
1120
1124
|
}>;
|
|
1121
1125
|
/**
|
|
1122
1126
|
* Builds and returns the batched transaction based on the configured parameters.
|
|
@@ -1218,7 +1222,7 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TSendBaseOpt
|
|
|
1218
1222
|
* @throws \{UnableToComputeError\} Thrown when the receivable amount cannot be determined.
|
|
1219
1223
|
*/
|
|
1220
1224
|
getReceivableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TSendBaseOptionsWithSenderAddress<TApi, TRes, TSigner>>): Promise<bigint>;
|
|
1221
|
-
getBestAmountOut(this: GeneralBuilder<TApi, TRes, TSigner, TSendBaseOptionsWithSwap<TApi, TRes, TSigner>>): Promise<
|
|
1225
|
+
getBestAmountOut(this: GeneralBuilder<TApi, TRes, TSigner, TSendBaseOptionsWithSwap<TApi, TRes, TSigner>>): Promise<SwapModule.TGetBestAmountOutResult>;
|
|
1222
1226
|
signAndSubmit(this: GeneralBuilder<TApi, TRes, TSigner, TSendBaseOptionsWithSenderAddress<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>>): Promise<string>;
|
|
1223
1227
|
/**
|
|
1224
1228
|
* Returns the API instance used by the builder.
|
|
@@ -1247,13 +1251,13 @@ type TSwapConfig = {
|
|
|
1247
1251
|
};
|
|
1248
1252
|
type TDryRunBaseOptions<TRes> = {
|
|
1249
1253
|
tx: TRes;
|
|
1250
|
-
origin: TSubstrateChain
|
|
1251
|
-
destination: TChain
|
|
1254
|
+
origin: TSubstrateChain;
|
|
1255
|
+
destination: TChain;
|
|
1252
1256
|
senderAddress: string;
|
|
1253
1257
|
address: string;
|
|
1254
1258
|
currency: TCurrencyInputWithAmount;
|
|
1255
1259
|
version?: Version;
|
|
1256
|
-
feeAsset?: TCurrencyInput
|
|
1260
|
+
feeAsset?: TCurrencyInput;
|
|
1257
1261
|
swapConfig?: TSwapConfig;
|
|
1258
1262
|
useRootOrigin?: boolean;
|
|
1259
1263
|
bypassOptions?: TBypassOptions;
|
|
@@ -1267,7 +1271,7 @@ type TDryRunCallBaseOptions<TRes> = {
|
|
|
1267
1271
|
/**
|
|
1268
1272
|
* The chain to dry-run on
|
|
1269
1273
|
*/
|
|
1270
|
-
chain: TSubstrateChain
|
|
1274
|
+
chain: TSubstrateChain;
|
|
1271
1275
|
/**
|
|
1272
1276
|
* The destination chain
|
|
1273
1277
|
*/
|
|
@@ -1301,11 +1305,11 @@ type TDryRunXcmBaseOptions<TRes> = {
|
|
|
1301
1305
|
/**
|
|
1302
1306
|
* The chain to dry-run on
|
|
1303
1307
|
*/
|
|
1304
|
-
chain: TSubstrateChain
|
|
1308
|
+
chain: TSubstrateChain;
|
|
1305
1309
|
/**
|
|
1306
1310
|
* The origin chain
|
|
1307
1311
|
*/
|
|
1308
|
-
origin: TSubstrateChain
|
|
1312
|
+
origin: TSubstrateChain;
|
|
1309
1313
|
asset: TAssetInfo;
|
|
1310
1314
|
version: Version;
|
|
1311
1315
|
feeAsset?: TAssetInfo;
|
|
@@ -1331,12 +1335,12 @@ type TDryRunChainFailure = TDryRunResBase & {
|
|
|
1331
1335
|
};
|
|
1332
1336
|
type TDryRunChainResult = TDryRunChainSuccess | TDryRunChainFailure;
|
|
1333
1337
|
type THopInfo = {
|
|
1334
|
-
chain: TChain
|
|
1338
|
+
chain: TChain;
|
|
1335
1339
|
result: TDryRunChainResult;
|
|
1336
1340
|
/** @deprecated Use `result.isExchange` instead. Will be removed in v13. */
|
|
1337
1341
|
isExchange?: boolean;
|
|
1338
1342
|
};
|
|
1339
|
-
type TChainEndpoint = 'origin' | 'destination' | TChain
|
|
1343
|
+
type TChainEndpoint = 'origin' | 'destination' | TChain;
|
|
1340
1344
|
type TDryRunResult = {
|
|
1341
1345
|
failureReason?: string;
|
|
1342
1346
|
failureSubReason?: string;
|
|
@@ -1348,8 +1352,8 @@ type TDryRunResult = {
|
|
|
1348
1352
|
type TResolveHopParams<TApi, TRes, TSigner> = {
|
|
1349
1353
|
api: IPolkadotApi<TApi, TRes, TSigner>;
|
|
1350
1354
|
tx: TRes;
|
|
1351
|
-
originChain: TSubstrateChain
|
|
1352
|
-
currentChain: TSubstrateChain
|
|
1355
|
+
originChain: TSubstrateChain;
|
|
1356
|
+
currentChain: TSubstrateChain;
|
|
1353
1357
|
destination: TDestination;
|
|
1354
1358
|
asset: TAssetInfo;
|
|
1355
1359
|
currency: TCurrencyInputWithAmount;
|
|
@@ -1358,8 +1362,8 @@ type TResolveHopParams<TApi, TRes, TSigner> = {
|
|
|
1358
1362
|
};
|
|
1359
1363
|
type HopProcessParams<TApi, TRes, TSigner> = {
|
|
1360
1364
|
api: IPolkadotApi<TApi, TRes, TSigner>;
|
|
1361
|
-
currentChain: TSubstrateChain
|
|
1362
|
-
currentOrigin: TSubstrateChain
|
|
1365
|
+
currentChain: TSubstrateChain;
|
|
1366
|
+
currentOrigin: TSubstrateChain;
|
|
1363
1367
|
currentAsset: TAssetInfo;
|
|
1364
1368
|
forwardedXcms: any;
|
|
1365
1369
|
hasPassedExchange: boolean;
|
|
@@ -1367,8 +1371,8 @@ type HopProcessParams<TApi, TRes, TSigner> = {
|
|
|
1367
1371
|
};
|
|
1368
1372
|
type HopTraversalConfig<TApi, TRes, TSigner, THopResult> = {
|
|
1369
1373
|
api: IPolkadotApi<TApi, TRes, TSigner>;
|
|
1370
|
-
origin: TSubstrateChain
|
|
1371
|
-
destination: TChain
|
|
1374
|
+
origin: TSubstrateChain;
|
|
1375
|
+
destination: TChain;
|
|
1372
1376
|
currency: TCurrencyCore;
|
|
1373
1377
|
initialForwardedXcms: any;
|
|
1374
1378
|
initialDestParaId: number | undefined;
|
|
@@ -1382,11 +1386,11 @@ type HopTraversalConfig<TApi, TRes, TSigner, THopResult> = {
|
|
|
1382
1386
|
};
|
|
1383
1387
|
type HopTraversalResult<THopResult> = {
|
|
1384
1388
|
hops: Array<{
|
|
1385
|
-
chain: TSubstrateChain
|
|
1389
|
+
chain: TSubstrateChain;
|
|
1386
1390
|
result: THopResult;
|
|
1387
1391
|
}>;
|
|
1388
1392
|
destination?: THopResult;
|
|
1389
|
-
lastProcessedChain?: TSubstrateChain
|
|
1393
|
+
lastProcessedChain?: TSubstrateChain;
|
|
1390
1394
|
};
|
|
1391
1395
|
type TBypassOptions = {
|
|
1392
1396
|
mintFeeAssets?: boolean;
|
|
@@ -1509,11 +1513,11 @@ type TGetXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolean> = {
|
|
|
1509
1513
|
/**
|
|
1510
1514
|
* The origin chain
|
|
1511
1515
|
*/
|
|
1512
|
-
origin: TSubstrateChain
|
|
1516
|
+
origin: TSubstrateChain;
|
|
1513
1517
|
/**
|
|
1514
1518
|
* The destination chain
|
|
1515
1519
|
*/
|
|
1516
|
-
destination: TChain
|
|
1520
|
+
destination: TChain;
|
|
1517
1521
|
/**
|
|
1518
1522
|
* The sender address
|
|
1519
1523
|
*/
|
|
@@ -1521,7 +1525,7 @@ type TGetXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolean> = {
|
|
|
1521
1525
|
address: string;
|
|
1522
1526
|
currency: WithAmount<TCurrencyCore>;
|
|
1523
1527
|
version?: Version;
|
|
1524
|
-
feeAsset?: TCurrencyInput
|
|
1528
|
+
feeAsset?: TCurrencyInput;
|
|
1525
1529
|
disableFallback: TDisableFallback;
|
|
1526
1530
|
swapConfig?: TXcmFeeSwapConfig;
|
|
1527
1531
|
skipReverseFeeCalculation?: boolean;
|
|
@@ -1538,12 +1542,12 @@ type TGetXcmFeeBuilderOptions = {
|
|
|
1538
1542
|
};
|
|
1539
1543
|
type TGetOriginXcmFeeBaseOptions<TRes> = {
|
|
1540
1544
|
buildTx: TTxFactory<TRes>;
|
|
1541
|
-
origin: TSubstrateChain
|
|
1542
|
-
destination: TChain
|
|
1545
|
+
origin: TSubstrateChain;
|
|
1546
|
+
destination: TChain;
|
|
1543
1547
|
senderAddress: string;
|
|
1544
1548
|
currency: WithAmount<TCurrencyCore>;
|
|
1545
1549
|
version?: Version;
|
|
1546
|
-
feeAsset?: TCurrencyInput
|
|
1550
|
+
feeAsset?: TCurrencyInput;
|
|
1547
1551
|
disableFallback: boolean;
|
|
1548
1552
|
useRootOrigin?: boolean;
|
|
1549
1553
|
};
|
|
@@ -1552,9 +1556,9 @@ type TGetOriginXcmFeeInternalOptions<TApi, TRes, TSigner> = Omit<TGetOriginXcmFe
|
|
|
1552
1556
|
tx: TRes;
|
|
1553
1557
|
};
|
|
1554
1558
|
type TGetFeeForDestChainBaseOptions<TRes> = {
|
|
1555
|
-
prevChain: TSubstrateChain
|
|
1556
|
-
origin: TSubstrateChain
|
|
1557
|
-
destination: TChain
|
|
1559
|
+
prevChain: TSubstrateChain;
|
|
1560
|
+
origin: TSubstrateChain;
|
|
1561
|
+
destination: TChain;
|
|
1558
1562
|
senderAddress: string;
|
|
1559
1563
|
address: string;
|
|
1560
1564
|
currency: WithAmount<TCurrencyCore>;
|
|
@@ -1563,7 +1567,7 @@ type TGetFeeForDestChainBaseOptions<TRes> = {
|
|
|
1563
1567
|
asset: TAssetInfo;
|
|
1564
1568
|
version: Version;
|
|
1565
1569
|
originFee: bigint;
|
|
1566
|
-
feeAsset?: TCurrencyInput
|
|
1570
|
+
feeAsset?: TCurrencyInput;
|
|
1567
1571
|
disableFallback: boolean;
|
|
1568
1572
|
hasPassedExchange?: boolean;
|
|
1569
1573
|
swapConfig?: TXcmFeeSwapConfig;
|
|
@@ -1571,7 +1575,7 @@ type TGetFeeForDestChainBaseOptions<TRes> = {
|
|
|
1571
1575
|
};
|
|
1572
1576
|
type TGetFeeForDestChainOptions<TApi, TRes, TSigner> = WithApi<TGetFeeForDestChainBaseOptions<TRes>, TApi, TRes, TSigner>;
|
|
1573
1577
|
type TGetReverseTxFeeOptions<TApi, TRes, TSigner> = Omit<TGetFeeForDestChainOptions<TApi, TRes, TSigner>, 'destination' | 'disableFallback' | 'forwardedXcms' | 'asset' | 'originFee' | 'prevChain' | 'version'> & {
|
|
1574
|
-
destination: TSubstrateChain
|
|
1578
|
+
destination: TSubstrateChain;
|
|
1575
1579
|
};
|
|
1576
1580
|
type TFeeType = 'dryRun' | 'paymentInfo' | 'noFeeRequired';
|
|
1577
1581
|
type TXcmFeeBase$1 = {
|
|
@@ -1610,13 +1614,13 @@ type TDestXcmFeeDetail<TDisableFallback extends boolean> = TConditionalXcmFeeDet
|
|
|
1610
1614
|
destParaId?: number;
|
|
1611
1615
|
};
|
|
1612
1616
|
type TConditionalXcmFeeHopInfo<TDisableFallback extends boolean> = {
|
|
1613
|
-
chain: TChain
|
|
1617
|
+
chain: TChain;
|
|
1614
1618
|
result: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
1615
1619
|
/** @deprecated - Use `result.isExchange` instead. Will be removed in v13. */
|
|
1616
1620
|
isExchange?: boolean;
|
|
1617
1621
|
};
|
|
1618
1622
|
type TXcmFeeHopInfo = {
|
|
1619
|
-
chain: TChain
|
|
1623
|
+
chain: TChain;
|
|
1620
1624
|
result: TXcmFeeDetail;
|
|
1621
1625
|
/** @deprecated - Use `result.isExchange` instead. Will be removed in v13. */
|
|
1622
1626
|
isExchange?: boolean;
|
|
@@ -1650,7 +1654,7 @@ type TGetBalanceCommonOptions = {
|
|
|
1650
1654
|
/**
|
|
1651
1655
|
* The chain on which to query the balance.
|
|
1652
1656
|
*/
|
|
1653
|
-
chain: TChain
|
|
1657
|
+
chain: TChain;
|
|
1654
1658
|
};
|
|
1655
1659
|
/**
|
|
1656
1660
|
* Retrieves the asset balance for a given account on a specified chain.
|
|
@@ -1680,18 +1684,18 @@ type TGetTransferableAmountOptionsBase<TRes> = {
|
|
|
1680
1684
|
/**
|
|
1681
1685
|
* The chain on which to query the balance.
|
|
1682
1686
|
*/
|
|
1683
|
-
origin: TSubstrateChain
|
|
1687
|
+
origin: TSubstrateChain;
|
|
1684
1688
|
/**
|
|
1685
1689
|
* The destination chain.
|
|
1686
1690
|
*/
|
|
1687
|
-
destination: TChain
|
|
1691
|
+
destination: TChain;
|
|
1688
1692
|
/**
|
|
1689
1693
|
* The currency to query.
|
|
1690
1694
|
*/
|
|
1691
1695
|
currency: WithAmount<TCurrencyCore>;
|
|
1692
1696
|
version: Version | undefined;
|
|
1693
1697
|
buildTx: TTxFactory<TRes>;
|
|
1694
|
-
feeAsset?: TCurrencyInput
|
|
1698
|
+
feeAsset?: TCurrencyInput;
|
|
1695
1699
|
};
|
|
1696
1700
|
type TGetTransferableAmountOptions<TApi, TRes, TSigner> = WithApi<TGetTransferableAmountOptionsBase<TRes>, TApi, TRes, TSigner>;
|
|
1697
1701
|
type TGetMinTransferableAmountOptions<TApi, TRes, TSigner> = WithApi<TGetTransferableAmountOptionsBase<TRes> & {
|
|
@@ -1702,11 +1706,11 @@ type TVerifyEdOnDestinationOptionsBase<TRes> = {
|
|
|
1702
1706
|
/**
|
|
1703
1707
|
* The origin chain.
|
|
1704
1708
|
*/
|
|
1705
|
-
origin: TSubstrateChain
|
|
1709
|
+
origin: TSubstrateChain;
|
|
1706
1710
|
/**
|
|
1707
1711
|
* The destination chain.
|
|
1708
1712
|
*/
|
|
1709
|
-
destination: TChain
|
|
1713
|
+
destination: TChain;
|
|
1710
1714
|
/**
|
|
1711
1715
|
* The address of the account.
|
|
1712
1716
|
*/
|
|
@@ -1721,11 +1725,11 @@ type TVerifyEdOnDestinationOptionsBase<TRes> = {
|
|
|
1721
1725
|
currency: WithAmount<TCurrencyCore>;
|
|
1722
1726
|
version: Version | undefined;
|
|
1723
1727
|
buildTx: TTxFactory<TRes>;
|
|
1724
|
-
feeAsset?: TCurrencyInput
|
|
1728
|
+
feeAsset?: TCurrencyInput;
|
|
1725
1729
|
};
|
|
1726
1730
|
type TVerifyEdOnDestinationOptions<TApi, TRes, TSigner> = WithApi<TVerifyEdOnDestinationOptionsBase<TRes>, TApi, TRes, TSigner>;
|
|
1727
1731
|
|
|
1728
|
-
type TEvmChainFrom = Extract<TChain
|
|
1732
|
+
type TEvmChainFrom = Extract<TChain, 'Ethereum' | 'Moonbeam' | 'Moonriver' | 'Darwinia'>;
|
|
1729
1733
|
/**
|
|
1730
1734
|
* The options for the Ethereum to Polkadot transfer builder.
|
|
1731
1735
|
*/
|
|
@@ -1737,7 +1741,7 @@ type TEvmBuilderOptionsBase = {
|
|
|
1737
1741
|
/**
|
|
1738
1742
|
* The destination chain on Polkadot network.
|
|
1739
1743
|
*/
|
|
1740
|
-
to: TChain
|
|
1744
|
+
to: TChain;
|
|
1741
1745
|
/**
|
|
1742
1746
|
* The currency to transfer. Symbol or ID.
|
|
1743
1747
|
*/
|
|
@@ -1795,7 +1799,7 @@ type TDryRunPreviewOptions = {
|
|
|
1795
1799
|
};
|
|
1796
1800
|
type TBuilderOptions<TApi> = TApi | TBuilderConfig<TApi>;
|
|
1797
1801
|
type TBuilderConfig<TApi> = Partial<{
|
|
1798
|
-
apiOverrides: Partial<Record<TChain
|
|
1802
|
+
apiOverrides: Partial<Record<TChain, TApi>>;
|
|
1799
1803
|
development: boolean;
|
|
1800
1804
|
abstractDecimals: boolean;
|
|
1801
1805
|
xcmFormatCheck: boolean;
|
|
@@ -1828,7 +1832,7 @@ type TChainConfig = {
|
|
|
1828
1832
|
paraId: number;
|
|
1829
1833
|
providers: TProviderEntry[];
|
|
1830
1834
|
};
|
|
1831
|
-
type TChainConfigMap = Record<TSubstrateChain
|
|
1835
|
+
type TChainConfigMap = Record<TSubstrateChain, TChainConfig>;
|
|
1832
1836
|
|
|
1833
1837
|
type OneKey<K extends string, V = unknown> = {
|
|
1834
1838
|
[P in K]: Record<P, V> & Partial<Record<Exclude<K, P>, never>> extends infer O ? {
|
|
@@ -1955,7 +1959,7 @@ declare class MissingChainApiError extends Error {
|
|
|
1955
1959
|
*
|
|
1956
1960
|
* @param chain - The chain for which the API is missing.
|
|
1957
1961
|
*/
|
|
1958
|
-
constructor(chain: TChain
|
|
1962
|
+
constructor(chain: TChain);
|
|
1959
1963
|
}
|
|
1960
1964
|
|
|
1961
1965
|
/**
|
|
@@ -1974,7 +1978,7 @@ declare class NoXCMSupportImplementedError extends Error {
|
|
|
1974
1978
|
*
|
|
1975
1979
|
* @param chain - The chain for which XCM support is not implemented.
|
|
1976
1980
|
*/
|
|
1977
|
-
constructor(chain: TChain
|
|
1981
|
+
constructor(chain: TChain);
|
|
1978
1982
|
}
|
|
1979
1983
|
|
|
1980
1984
|
/**
|
|
@@ -2013,7 +2017,7 @@ declare class RuntimeApiUnavailableError extends Error {
|
|
|
2013
2017
|
}
|
|
2014
2018
|
|
|
2015
2019
|
type TScenarioNotSupportedContext = {
|
|
2016
|
-
chain: TChain
|
|
2020
|
+
chain: TChain;
|
|
2017
2021
|
scenario: TScenario;
|
|
2018
2022
|
};
|
|
2019
2023
|
/**
|
|
@@ -2059,7 +2063,7 @@ declare class ValidationError extends Error {
|
|
|
2059
2063
|
}
|
|
2060
2064
|
|
|
2061
2065
|
type THopTransferInfo = {
|
|
2062
|
-
chain: TChain
|
|
2066
|
+
chain: TChain;
|
|
2063
2067
|
result: {
|
|
2064
2068
|
xcmFee: TXcmFeeBase;
|
|
2065
2069
|
asset: TAssetInfo;
|
|
@@ -2071,8 +2075,8 @@ type TXcmFeeBase = {
|
|
|
2071
2075
|
};
|
|
2072
2076
|
type TTransferInfo = {
|
|
2073
2077
|
chain: {
|
|
2074
|
-
origin: TChain
|
|
2075
|
-
destination: TChain
|
|
2078
|
+
origin: TChain;
|
|
2079
|
+
destination: TChain;
|
|
2076
2080
|
ecosystem: string;
|
|
2077
2081
|
};
|
|
2078
2082
|
origin: {
|
|
@@ -2104,9 +2108,9 @@ type TTransferInfo = {
|
|
|
2104
2108
|
};
|
|
2105
2109
|
type BuildHopInfoOptions<TApi, TRes, TSigner> = {
|
|
2106
2110
|
api: IPolkadotApi<TApi, TRes, TSigner>;
|
|
2107
|
-
chain: TSubstrateChain
|
|
2111
|
+
chain: TSubstrateChain;
|
|
2108
2112
|
fee: bigint;
|
|
2109
|
-
originChain: TSubstrateChain
|
|
2113
|
+
originChain: TSubstrateChain;
|
|
2110
2114
|
currency: TCurrencyCore;
|
|
2111
2115
|
asset: TAssetInfo;
|
|
2112
2116
|
senderAddress: string;
|
|
@@ -2114,8 +2118,8 @@ type BuildHopInfoOptions<TApi, TRes, TSigner> = {
|
|
|
2114
2118
|
};
|
|
2115
2119
|
type TBuildDestInfoOptions<TApi, TRes, TSigner> = {
|
|
2116
2120
|
api: IPolkadotApi<TApi, TRes, TSigner>;
|
|
2117
|
-
origin: TSubstrateChain
|
|
2118
|
-
destination: TChain
|
|
2121
|
+
origin: TSubstrateChain;
|
|
2122
|
+
destination: TChain;
|
|
2119
2123
|
address: string;
|
|
2120
2124
|
currency: WithAmount<TCurrencyCore>;
|
|
2121
2125
|
originFee: bigint;
|
|
@@ -2130,8 +2134,8 @@ type TOriginFeeDetails = {
|
|
|
2130
2134
|
};
|
|
2131
2135
|
type TGetTransferInfoOptionsBase<TRes> = {
|
|
2132
2136
|
buildTx: TTxFactory<TRes>;
|
|
2133
|
-
origin: TSubstrateChain
|
|
2134
|
-
destination: TChain
|
|
2137
|
+
origin: TSubstrateChain;
|
|
2138
|
+
destination: TChain;
|
|
2135
2139
|
senderAddress: string;
|
|
2136
2140
|
ahAddress?: string;
|
|
2137
2141
|
address: string;
|
|
@@ -2141,14 +2145,14 @@ type TGetTransferInfoOptionsBase<TRes> = {
|
|
|
2141
2145
|
};
|
|
2142
2146
|
type TGetTransferInfoOptions<TApi, TRes, TSigner> = WithApi<TGetTransferInfoOptionsBase<TRes>, TApi, TRes, TSigner>;
|
|
2143
2147
|
|
|
2144
|
-
type TChainWithApi<TApi, TRes, TSigner, T = TSubstrateChain
|
|
2148
|
+
type TChainWithApi<TApi, TRes, TSigner, T = TSubstrateChain> = {
|
|
2145
2149
|
api: IPolkadotApi<TApi, TRes, TSigner>;
|
|
2146
2150
|
chain: T;
|
|
2147
2151
|
};
|
|
2148
2152
|
type TTypeAndThenCallContext<TApi, TRes, TSigner> = {
|
|
2149
2153
|
origin: TChainWithApi<TApi, TRes, TSigner>;
|
|
2150
2154
|
dest: TChainWithApi<TApi, TRes, TSigner>;
|
|
2151
|
-
reserve: TChainWithApi<TApi, TRes, TSigner, TChain
|
|
2155
|
+
reserve: TChainWithApi<TApi, TRes, TSigner, TChain>;
|
|
2152
2156
|
isSubBridge: boolean;
|
|
2153
2157
|
isSnowbridge: boolean;
|
|
2154
2158
|
isRelayAsset: boolean;
|
|
@@ -2161,7 +2165,7 @@ type TTypeAndThenFees = {
|
|
|
2161
2165
|
destFee: bigint;
|
|
2162
2166
|
};
|
|
2163
2167
|
type TTypeAndThenOverrides = {
|
|
2164
|
-
reserveChain?: TSubstrateChain
|
|
2168
|
+
reserveChain?: TSubstrateChain;
|
|
2165
2169
|
noFeeAsset?: boolean;
|
|
2166
2170
|
};
|
|
2167
2171
|
|
|
@@ -2171,13 +2175,15 @@ declare const createClientPoolHelpers: <TClient>(clientPool: ClientCache<TClient
|
|
|
2171
2175
|
releaseClient: (ws: TUrl) => void;
|
|
2172
2176
|
};
|
|
2173
2177
|
|
|
2178
|
+
declare const resolveChainApi: <TApi>(config: TBuilderOptions<TApiOrUrl<TApi>> | undefined, chain: TSubstrateChain, createApiInstance: (wsUrl: TUrl, chain: TSubstrateChain) => Promise<TApi>) => Promise<TApi>;
|
|
2179
|
+
|
|
2174
2180
|
declare const createClientCache: <T>(maxSize: number, pingClient: (client: T) => Promise<void>, onEviction?: (key: TClientKey, value: TClientEntry<T>) => void, extensionMs?: number) => ClientCache<T>;
|
|
2175
2181
|
|
|
2176
2182
|
declare const blake2b256: (msg: Uint8Array) => Uint8Array<ArrayBufferLike>;
|
|
2177
2183
|
declare const blake2b512: (msg: Uint8Array) => Uint8Array<ArrayBufferLike>;
|
|
2178
2184
|
declare const deriveAccountId: (raw: Uint8Array) => Uint8Array;
|
|
2179
2185
|
declare const encodeSs58: (payload: Uint8Array, network: number) => string;
|
|
2180
|
-
declare const convertSs58: <TApi, TRes, TSigner>(api: IPolkadotApi<TApi, TRes, TSigner>, address: string, chain: TSubstrateChain
|
|
2186
|
+
declare const convertSs58: <TApi, TRes, TSigner>(api: IPolkadotApi<TApi, TRes, TSigner>, address: string, chain: TSubstrateChain) => string;
|
|
2181
2187
|
|
|
2182
2188
|
declare const getAssetBalanceInternal: <TApi, TRes, TSigner>({ api, address, chain, asset }: TGetAssetBalanceOptions<TApi, TRes, TSigner>) => Promise<bigint>;
|
|
2183
2189
|
declare const getBalanceInternal: <TApi, TRes, TSigner>(options: TGetBalanceOptions<TApi, TRes, TSigner>) => Promise<bigint>;
|
|
@@ -2185,11 +2191,11 @@ declare const getBalance: <TApi, TRes, TSigner>(options: TGetBalanceOptions<TApi
|
|
|
2185
2191
|
|
|
2186
2192
|
declare const getEthErc20Balance: (chain: TExternalChain, asset: TAssetInfo, address: string) => Promise<bigint>;
|
|
2187
2193
|
|
|
2188
|
-
declare const getMoonbeamErc20Balance: (chain: TSubstrateChain
|
|
2194
|
+
declare const getMoonbeamErc20Balance: (chain: TSubstrateChain, assetId: string, address: string) => Promise<bigint>;
|
|
2189
2195
|
|
|
2190
|
-
declare const getChainConfig: (chain: TSubstrateChain
|
|
2196
|
+
declare const getChainConfig: (chain: TSubstrateChain) => TChainConfig;
|
|
2191
2197
|
|
|
2192
|
-
declare const getChainProviders: (chain: TSubstrateChain
|
|
2198
|
+
declare const getChainProviders: (chain: TSubstrateChain) => string[];
|
|
2193
2199
|
|
|
2194
2200
|
/**
|
|
2195
2201
|
* Retrieves the parachain ID for a specified chain.
|
|
@@ -2197,7 +2203,7 @@ declare const getChainProviders: (chain: TSubstrateChain$1) => string[];
|
|
|
2197
2203
|
* @param chain - The chain for which to get the paraId.
|
|
2198
2204
|
* @returns The parachain ID of the chain.
|
|
2199
2205
|
*/
|
|
2200
|
-
declare const getParaId: (chain: TChain
|
|
2206
|
+
declare const getParaId: (chain: TChain) => number;
|
|
2201
2207
|
|
|
2202
2208
|
/**
|
|
2203
2209
|
* Retrieves the chain name corresponding to a specified parachain ID.
|
|
@@ -2205,7 +2211,7 @@ declare const getParaId: (chain: TChain$1) => number;
|
|
|
2205
2211
|
* @param paraId - The parachain ID.
|
|
2206
2212
|
* @returns The chain name if found; otherwise, null.
|
|
2207
2213
|
*/
|
|
2208
|
-
declare const getTChain: (paraId: number, ecosystem: TRelaychain | TExternalChain) => TChain
|
|
2214
|
+
declare const getTChain: (paraId: number, ecosystem: TRelaychain | TExternalChain) => TChain | null;
|
|
2209
2215
|
|
|
2210
2216
|
declare const claimAssets: <TApi, TRes, TSigner>(options: TAssetClaimOptions<TApi, TRes, TSigner>) => Promise<TRes>;
|
|
2211
2217
|
|
|
@@ -2238,7 +2244,7 @@ declare const getFailureInfo: (result: TDryRunResult) => Pick<TDryRunResult, "fa
|
|
|
2238
2244
|
declare const traverseXcmHops: <TApi, TRes, TSigner, THopResult>(config: HopTraversalConfig<TApi, TRes, TSigner, THopResult>) => Promise<HopTraversalResult<THopResult>>;
|
|
2239
2245
|
declare const addEthereumBridgeFees: <TApi, TRes, TSigner, TResult extends {
|
|
2240
2246
|
fee?: bigint;
|
|
2241
|
-
}>(api: IPolkadotApi<TApi, TRes, TSigner>, bridgeHubResult: TResult | undefined, destination: TChain
|
|
2247
|
+
}>(api: IPolkadotApi<TApi, TRes, TSigner>, bridgeHubResult: TResult | undefined, destination: TChain, assetHubChain: TSubstrateChain) => Promise<TResult | undefined>;
|
|
2242
2248
|
|
|
2243
2249
|
declare const calcPreviewMintAmount: (balance: bigint, desired: bigint) => bigint | null;
|
|
2244
2250
|
declare const wrapTxBypass: <TApi, TRes, TSigner>(dryRunOptions: TDryRunBypassOptions<TApi, TRes, TSigner>, options?: TBypassOptions) => Promise<TRes>;
|
|
@@ -2247,7 +2253,7 @@ declare const getParaEthTransferFees: <TApi, TRes, TSigner>(ahApi: IPolkadotApi<
|
|
|
2247
2253
|
|
|
2248
2254
|
declare const transferMoonbeamEvm: <TApi, TRes, TSigner>(options: TEvmBuilderOptions<TApi, TRes, TSigner>) => Promise<string>;
|
|
2249
2255
|
|
|
2250
|
-
declare const transferMoonbeamToEth: <TApi, TRes, TSigner>(from: TSubstrateChain
|
|
2256
|
+
declare const transferMoonbeamToEth: <TApi, TRes, TSigner>(from: TSubstrateChain, { api, to, signer, address, ahAddress, currency }: TEvmBuilderOptions<TApi, TRes, TSigner>) => Promise<`0x${string}`>;
|
|
2251
2257
|
|
|
2252
2258
|
declare const getOriginXcmFee: <TApi, TRes, TSigner>(options: TGetOriginXcmFeeOptions<TApi, TRes, TSigner>) => Promise<TXcmFeeDetail & {
|
|
2253
2259
|
forwardedXcms?: unknown;
|
|
@@ -2303,18 +2309,18 @@ declare const createTypeAndThenCall: <TApi, TRes, TSigner>(options: TPolkadotXCM
|
|
|
2303
2309
|
* by dry-running both variants and preferring the one that succeeds. If both fail, returns the
|
|
2304
2310
|
* AssetHub variant. Supports only relaychain assets.
|
|
2305
2311
|
*/
|
|
2306
|
-
declare const createTypeThenAutoReserve: <TApi, TRes, TSigner>(chain: TSubstrateChain
|
|
2312
|
+
declare const createTypeThenAutoReserve: <TApi, TRes, TSigner>(chain: TSubstrateChain, options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>) => Promise<TSerializedExtrinsics>;
|
|
2307
2313
|
|
|
2308
|
-
declare const validateCurrency: (currency: TCurrencyInput
|
|
2309
|
-
declare const validateDestination: (origin: TSubstrateChain
|
|
2310
|
-
declare const validateAssetSpecifiers: (assetCheckEnabled: boolean, currency: TCurrencyInput
|
|
2314
|
+
declare const validateCurrency: (currency: TCurrencyInput, feeAsset?: TCurrencyInput) => void;
|
|
2315
|
+
declare const validateDestination: (origin: TSubstrateChain, destination: TDestination) => void;
|
|
2316
|
+
declare const validateAssetSpecifiers: (assetCheckEnabled: boolean, currency: TCurrencyInput) => void;
|
|
2311
2317
|
declare const validateTransact: <TApi, TRes, TSigner>({ api, from, to, senderAddress, address, transactOptions }: TSendOptions<TApi, TRes, TSigner>) => ValidationError | undefined;
|
|
2312
2318
|
|
|
2313
2319
|
declare const verifyEdOnDestination: <TApi, TRes, TSigner>(options: TVerifyEdOnDestinationOptions<TApi, TRes, TSigner>) => Promise<boolean>;
|
|
2314
2320
|
|
|
2315
2321
|
declare const compareAddresses: <TApi, TRes, TSigner>(api: IPolkadotApi<TApi, TRes, TSigner>, addr1: string, addr2: string) => boolean;
|
|
2316
2322
|
|
|
2317
|
-
declare const validateAddress: <TApi, TRes, TSigner>(api: IPolkadotApi<TApi, TRes, TSigner>, address: TAddress, chain: TChain
|
|
2323
|
+
declare const validateAddress: <TApi, TRes, TSigner>(api: IPolkadotApi<TApi, TRes, TSigner>, address: TAddress, chain: TChain, isDestination?: boolean) => void;
|
|
2318
2324
|
|
|
2319
2325
|
declare const validateDestinationAddress: <TApi, TRes, TSigner>(address: TAddress, destination: TDestination, api: IPolkadotApi<TApi, TRes, TSigner>) => void;
|
|
2320
2326
|
|
|
@@ -2347,9 +2353,9 @@ declare const createTransferOrSwap: <TApi, TRes, TSigner>(options: TSendOptions<
|
|
|
2347
2353
|
|
|
2348
2354
|
declare const isConfig: <TApi>(value: any) => value is TBuilderConfig<TApi>;
|
|
2349
2355
|
|
|
2350
|
-
declare const getAssetReserveChain: (chain: TSubstrateChain
|
|
2356
|
+
declare const getAssetReserveChain: (chain: TSubstrateChain, assetLocation: TLocation) => TSubstrateChain;
|
|
2351
2357
|
|
|
2352
|
-
declare const getChainVersion: <TApi, TRes, TSigner>(chain: TChain
|
|
2358
|
+
declare const getChainVersion: <TApi, TRes, TSigner>(chain: TChain) => Version;
|
|
2353
2359
|
|
|
2354
2360
|
/**
|
|
2355
2361
|
* Gets the relay chain (Polkadot, Kusama, Westend, or Paseo) of a given chain.
|
|
@@ -2357,17 +2363,13 @@ declare const getChainVersion: <TApi, TRes, TSigner>(chain: TChain$1) => Version
|
|
|
2357
2363
|
* @param chain - The chain to evaluate.
|
|
2358
2364
|
* @returns The corresponding relay chain.
|
|
2359
2365
|
*/
|
|
2360
|
-
declare const getRelayChainOf: (chain: TSubstrateChain
|
|
2361
|
-
|
|
2362
|
-
declare const createChainClient: <TApi, TRes, TSigner>(api: IPolkadotApi<TApi, TRes, TSigner>, chain: TSubstrateChain$1) => Promise<TApi>;
|
|
2366
|
+
declare const getRelayChainOf: (chain: TSubstrateChain) => TRelaychain;
|
|
2363
2367
|
|
|
2364
|
-
declare const
|
|
2368
|
+
declare const createChainClient: <TApi, TRes, TSigner>(api: IPolkadotApi<TApi, TRes, TSigner>, chain: TSubstrateChain) => Promise<TApi>;
|
|
2365
2369
|
|
|
2366
|
-
declare const
|
|
2370
|
+
declare const resolveModuleError: (chain: TSubstrateChain, error: TModuleError) => TDryRunError;
|
|
2367
2371
|
|
|
2368
|
-
declare const
|
|
2369
|
-
|
|
2370
|
-
declare const padFee: (raw: bigint, origin: TSubstrateChain$1, dest: TChain$1, side: "origin" | "destination") => bigint;
|
|
2372
|
+
declare const padFee: (raw: bigint, origin: TSubstrateChain, dest: TChain, side: "origin" | "destination") => bigint;
|
|
2371
2373
|
declare const padValueBy: (amount: bigint, percent: number) => bigint;
|
|
2372
2374
|
|
|
2373
2375
|
/**
|
|
@@ -2383,12 +2385,12 @@ declare const getEvmPrivateKeyHex: (path: string) => "0x5fb92d6e98884f76de468fa3
|
|
|
2383
2385
|
declare const createBeneficiaryLocXTokens: <TApi, TRes, TSigner>({ api, address: recipientAddress, origin, destination, version, paraId }: TCreateBeneficiaryXTokensOptions<TApi, TRes, TSigner>) => TLocation;
|
|
2384
2386
|
declare const createBeneficiaryLocation: <TApi, TRes, TSigner>({ api, address, version }: TCreateBeneficiaryOptions<TApi, TRes, TSigner>) => TLocation;
|
|
2385
2387
|
|
|
2386
|
-
declare const createDestination: (version: Version, origin: TSubstrateChain
|
|
2387
|
-
declare const createVersionedDestination: (version: Version, origin: TSubstrateChain
|
|
2388
|
+
declare const createDestination: (version: Version, origin: TSubstrateChain, destination: TDestination, chainId?: number, junction?: TJunction, parents?: Parents) => TLocation;
|
|
2389
|
+
declare const createVersionedDestination: (version: Version, origin: TSubstrateChain, destination: TDestination, chainId?: number, junction?: TJunction, parents?: Parents) => TXcmVersioned<TLocation>;
|
|
2388
2390
|
|
|
2389
2391
|
declare const createX1Payload: (version: Version, junction: TJunction) => TJunctions;
|
|
2390
2392
|
|
|
2391
|
-
declare const getChainLocation: (chain: TChain
|
|
2393
|
+
declare const getChainLocation: (chain: TChain, destChain: TChain) => TLocation;
|
|
2392
2394
|
|
|
2393
2395
|
/**
|
|
2394
2396
|
* This function localizes a location by removing the `Parachain` junction
|
|
@@ -2399,28 +2401,28 @@ declare const getChainLocation: (chain: TChain$1, destChain: TChain$1) => TLocat
|
|
|
2399
2401
|
* @param location - The location to localize
|
|
2400
2402
|
* @returns The localized location
|
|
2401
2403
|
*/
|
|
2402
|
-
declare const localizeLocation: (chain: TChain
|
|
2404
|
+
declare const localizeLocation: (chain: TChain, location: TLocation, origin?: TChain) => TLocation;
|
|
2403
2405
|
|
|
2404
2406
|
declare const reverseTransformLocation: (location: TLocation) => TLocation;
|
|
2405
2407
|
|
|
2406
2408
|
declare const normalizeAmount: (amount: bigint) => bigint;
|
|
2407
2409
|
|
|
2408
|
-
declare const resolveDestChain: (originChain: TSubstrateChain
|
|
2410
|
+
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
2411
|
|
|
2410
2412
|
declare const resolveParaId: (paraId: number | undefined, destination: TDestination) => number | undefined;
|
|
2411
2413
|
|
|
2412
|
-
declare const createRouterBuilder: <TApi, TRes, TSigner>(options: TSendOptionsWithSwap<TApi, TRes, TSigner>) => Promise<
|
|
2413
|
-
from:
|
|
2414
|
+
declare const createRouterBuilder: <TApi, TRes, TSigner>(options: TSendOptionsWithSwap<TApi, TRes, TSigner>) => Promise<SwapModule.RouterBuilderCore<object & {
|
|
2415
|
+
from: SwapModule.EXCHANGE_CHAINS | undefined;
|
|
2414
2416
|
} & {
|
|
2415
|
-
exchange:
|
|
2417
|
+
exchange: SwapModule.EXCHANGE_CHAINS;
|
|
2416
2418
|
} & {
|
|
2417
|
-
to:
|
|
2419
|
+
to: SwapModule.EXCHANGE_CHAINS | undefined;
|
|
2418
2420
|
} & {
|
|
2419
|
-
currencyFrom:
|
|
2421
|
+
currencyFrom: SwapModule.EXCHANGE_CHAINS;
|
|
2420
2422
|
} & {
|
|
2421
|
-
currencyTo:
|
|
2423
|
+
currencyTo: SwapModule.EXCHANGE_CHAINS;
|
|
2422
2424
|
} & {
|
|
2423
|
-
amount:
|
|
2425
|
+
amount: SwapModule.EXCHANGE_CHAINS;
|
|
2424
2426
|
} & {
|
|
2425
2427
|
senderAddress: string;
|
|
2426
2428
|
} & {
|
|
@@ -2431,9 +2433,10 @@ declare const createRouterBuilder: <TApi, TRes, TSigner>(options: TSendOptionsWi
|
|
|
2431
2433
|
slippagePct: string;
|
|
2432
2434
|
}>>;
|
|
2433
2435
|
declare const executeWithRouter: <TApi, TRes, TSigner, T>(options: TSendOptionsWithSwap<TApi, TRes, TSigner>, executor: (builder: Awaited<ReturnType<typeof createRouterBuilder>>) => Promise<T>) => Promise<T>;
|
|
2436
|
+
declare const normalizeExchange: (exchange: TExchangeInput) => TExchangeInput;
|
|
2434
2437
|
|
|
2435
|
-
declare const abstractDecimals: <TApi, TRes, TSigner>(amount: TAmount
|
|
2436
|
-
declare const applyDecimalAbstraction: (amount: TAmount
|
|
2438
|
+
declare const abstractDecimals: <TApi, TRes, TSigner>(amount: TAmount, decimals: number | undefined, api: IPolkadotApi<TApi, TRes, TSigner>) => bigint;
|
|
2439
|
+
declare const applyDecimalAbstraction: (amount: TAmount, decimals: number | undefined, shouldAbstract: boolean) => bigint;
|
|
2437
2440
|
|
|
2438
2441
|
declare const createAssetsFilter: (asset: TAsset, version: Version) => {
|
|
2439
2442
|
Wild: {
|
|
@@ -2450,9 +2453,9 @@ declare const createBaseExecuteXcm: <TRes>(options: TCreateBaseTransferXcmOption
|
|
|
2450
2453
|
suffixXcm?: unknown[];
|
|
2451
2454
|
}) => unknown[];
|
|
2452
2455
|
|
|
2453
|
-
declare const createExecuteCall: (chain: TSubstrateChain
|
|
2456
|
+
declare const createExecuteCall: (chain: TSubstrateChain, xcm: TXcmVersioned<any>, maxWeight: TWeight) => TSerializedExtrinsics;
|
|
2454
2457
|
|
|
2455
|
-
declare const createExecuteExchangeXcm: <TApi, TRes, TSigner>(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>, origin: TSubstrateChain
|
|
2458
|
+
declare const createExecuteExchangeXcm: <TApi, TRes, TSigner>(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>, origin: TSubstrateChain, weight: TWeight, originExecutionFee: bigint, destExecutionFee: bigint) => TRes;
|
|
2456
2459
|
|
|
2457
2460
|
declare const createDirectExecuteXcm: <TApi, TRes, TSigner>(options: TCreateTransferXcmOptions<TApi, TRes, TSigner>) => Promise<OneKey<_paraspell_sdk_common.Version, unknown[]>>;
|
|
2458
2461
|
|
|
@@ -2464,7 +2467,7 @@ declare const getLocalTransferAmount: <TApi, TRes, TSigner>({ assetInfo, balance
|
|
|
2464
2467
|
|
|
2465
2468
|
declare const handleToAhTeleport: <TApi, TRes, TSigner>(origin: TParachain, input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>, defaultTx: TRes) => Promise<TRes>;
|
|
2466
2469
|
|
|
2467
|
-
declare const throwUnsupportedCurrency: (currency: TCurrencyInput
|
|
2470
|
+
declare const throwUnsupportedCurrency: (currency: TCurrencyInput, chain: string, { isDestination }?: {
|
|
2468
2471
|
isDestination: boolean;
|
|
2469
2472
|
}) => never;
|
|
2470
2473
|
|
|
@@ -2473,8 +2476,8 @@ declare const formatUnits: typeof formatUnits$1;
|
|
|
2473
2476
|
|
|
2474
2477
|
declare const addXcmVersionHeader: <T, V extends Version>(obj: T, version: V) => OneKey<V, T>;
|
|
2475
2478
|
declare const selectXcmVersion: (forcedVersion: Version | undefined, originVersion: Version, destMaxVersion?: Version) => Version;
|
|
2476
|
-
declare const pickCompatibleXcmVersion: (origin: TSubstrateChain
|
|
2477
|
-
declare const pickRouterCompatibleXcmVersion: (origin: TSubstrateChain
|
|
2479
|
+
declare const pickCompatibleXcmVersion: (origin: TSubstrateChain, destination: TDestination, override?: Version) => Version;
|
|
2480
|
+
declare const pickRouterCompatibleXcmVersion: (origin: TSubstrateChain | undefined, exchangeChain: TSubstrateChain, destination: TChain | undefined) => Version;
|
|
2478
2481
|
|
|
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,
|
|
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
|
|
2482
|
+
export { API_TYPES, AmountTooLowError, AssetClaimBuilder, BaseAssetsPallet, BatchMode, BatchValidationError, BridgeHaltedError, Builder, 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, 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, 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, normalizeExchange, overrideTxAmount, padFee, padValueBy, parseUnits, pickCompatibleXcmVersion, pickRouterCompatibleXcmVersion, resolveChainApi, resolveDestChain, resolveModuleError, resolveParaId, resolveTransferParams, reverseTransformLocation, selectXcmVersion, sortAssets, throwUnsupportedCurrency, transferMoonbeamEvm, transferMoonbeamToEth, traverseXcmHops, validateAddress, validateAssetSpecifiers, validateCurrency, validateDestination, validateDestinationAddress, validateTransact, verifyEdOnDestination, wrapTxBypass };
|
|
2483
|
+
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 };
|