@paraspell/sdk-core 12.10.0-rc.0 → 12.10.0-rc.2
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 +100 -87
- package/dist/index.mjs +2096 -2050
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _paraspell_sdk_common from '@paraspell/sdk-common';
|
|
2
|
-
import {
|
|
2
|
+
import { TSubstrateChain as TSubstrateChain$1, TChain as TChain$1, 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
5
|
import { TAssetInfo, WithAmount, TAsset, TCurrencyCore, TCurrencyInputWithAmount, TCurrencyInput as TCurrencyInput$1, TAssetWithFee, WithComplexAmount, TAmount as TAmount$1, TAssetInfoWithId } from '@paraspell/assets';
|
|
@@ -11,7 +11,7 @@ import * as _paraspell_swap from '@paraspell/swap';
|
|
|
11
11
|
import { RouterBuilder } from '@paraspell/swap';
|
|
12
12
|
|
|
13
13
|
type WithApi<TBase, TApi, TRes, TSigner> = TBase & {
|
|
14
|
-
api:
|
|
14
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
15
15
|
};
|
|
16
16
|
type TUrl = string | string[];
|
|
17
17
|
type TApiOrUrl<TApi> = TApi | TUrl;
|
|
@@ -40,49 +40,55 @@ type ClientCache<T> = {
|
|
|
40
40
|
declare const API_TYPES: readonly ["PAPI", "PJS", "DEDOT"];
|
|
41
41
|
type TApiType = (typeof API_TYPES)[number];
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
43
|
+
declare abstract class PolkadotApi<TApi, TRes, TSigner> {
|
|
44
|
+
_api?: TApi;
|
|
45
|
+
_chain?: TSubstrateChain$1;
|
|
46
|
+
readonly _config?: TBuilderOptions<TApiOrUrl<TApi>>;
|
|
47
|
+
_ttlMs: number;
|
|
48
|
+
_disconnectAllowed: boolean;
|
|
49
|
+
abstract readonly type: TApiType;
|
|
50
|
+
constructor(config?: TBuilderOptions<TApiOrUrl<TApi>>);
|
|
51
|
+
get api(): TApi;
|
|
52
|
+
set disconnectAllowed(allowed: boolean);
|
|
53
|
+
get disconnectAllowed(): boolean;
|
|
54
|
+
get config(): TBuilderOptions<TApiOrUrl<TApi>> | undefined;
|
|
55
|
+
abstract init(chain: TChain$1, clientTtlMs?: number): Promise<void>;
|
|
56
|
+
abstract createApiInstance(wsUrl: TUrl, chain: TSubstrateChain$1): Promise<TApi>;
|
|
57
|
+
abstract accountToHex(address: string, isPrefixed?: boolean): string;
|
|
58
|
+
abstract accountToUint8a(address: string): Uint8Array;
|
|
59
|
+
abstract deserializeExtrinsics(serialized: TSerializedExtrinsics): TRes;
|
|
60
|
+
abstract txFromHex(hex: string): Promise<TRes>;
|
|
61
|
+
abstract queryState<T>(serialized: TSerializedStateQuery): Promise<T>;
|
|
62
|
+
abstract queryRuntimeApi<T>(serialized: TSerializedRuntimeApiQuery): Promise<T>;
|
|
63
|
+
abstract callBatchMethod(calls: TRes[], mode: BatchMode): TRes;
|
|
64
|
+
abstract callDispatchAsMethod(call: TRes, address: string): TRes;
|
|
65
|
+
abstract objectToHex(obj: unknown, typeName: string, version: Version): Promise<string>;
|
|
66
|
+
abstract hexToUint8a(hex: string): Uint8Array;
|
|
67
|
+
abstract stringToUint8a(str: string): Uint8Array;
|
|
68
|
+
abstract getMethod(tx: TRes): string;
|
|
69
|
+
abstract getTypeThenAssetCount(tx: TRes): number | undefined;
|
|
70
|
+
abstract hasMethod(pallet: TPallet, method: string): Promise<boolean>;
|
|
71
|
+
abstract getPaymentInfo(tx: TRes, address: string): Promise<{
|
|
64
72
|
partialFee: bigint;
|
|
65
73
|
weight: TWeight;
|
|
66
74
|
}>;
|
|
67
|
-
quoteAhPrice(fromMl: TLocation, toMl: TLocation, amountIn: bigint, includeFee?: boolean): Promise<bigint | undefined>;
|
|
68
|
-
getXcmWeight(xcm: any): Promise<TWeight>;
|
|
69
|
-
getXcmPaymentApiFee(chain: TSubstrateChain$1, localXcm: any, forwardedXcm: any, asset: TAssetInfo, version: Version, transformXcm: boolean): Promise<bigint>;
|
|
70
|
-
getEvmStorage(contract: string, slot: string): Promise<string>;
|
|
71
|
-
getFromRpc(module: string, method: string, key: string): Promise<string>;
|
|
72
|
-
blake2AsHex(data: Uint8Array): string;
|
|
73
|
-
clone():
|
|
74
|
-
createApiForChain(chain: TSubstrateChain$1): Promise<
|
|
75
|
-
getDryRunCall(options: TDryRunCallBaseOptions<TRes>): Promise<TDryRunChainResult>;
|
|
76
|
-
getDryRunXcm(options: TDryRunXcmBaseOptions<TRes>): Promise<TDryRunChainResult>;
|
|
77
|
-
getBridgeStatus(): Promise<TBridgeStatus>;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
signAndSubmit(tx: TRes, sender: TSender<TSigner>): Promise<string>;
|
|
85
|
-
signAndSubmitFinalized(tx: TRes, sender: TSender<TSigner>): Promise<string>;
|
|
75
|
+
abstract quoteAhPrice(fromMl: TLocation, toMl: TLocation, amountIn: bigint, includeFee?: boolean): Promise<bigint | undefined>;
|
|
76
|
+
abstract getXcmWeight(xcm: any): Promise<TWeight>;
|
|
77
|
+
abstract getXcmPaymentApiFee(chain: TSubstrateChain$1, localXcm: any, forwardedXcm: any, asset: TAssetInfo, version: Version, transformXcm: boolean): Promise<bigint>;
|
|
78
|
+
abstract getEvmStorage(contract: string, slot: string): Promise<string>;
|
|
79
|
+
abstract getFromRpc(module: string, method: string, key: string): Promise<string>;
|
|
80
|
+
abstract blake2AsHex(data: Uint8Array): string;
|
|
81
|
+
abstract clone(): PolkadotApi<TApi, TRes, TSigner>;
|
|
82
|
+
abstract createApiForChain(chain: TSubstrateChain$1): Promise<PolkadotApi<TApi, TRes, TSigner>>;
|
|
83
|
+
abstract getDryRunCall(options: TDryRunCallBaseOptions<TRes>): Promise<TDryRunChainResult>;
|
|
84
|
+
abstract getDryRunXcm(options: TDryRunXcmBaseOptions<TRes>): Promise<TDryRunChainResult>;
|
|
85
|
+
abstract getBridgeStatus(): Promise<TBridgeStatus>;
|
|
86
|
+
abstract disconnect(force?: boolean): Promise<void>;
|
|
87
|
+
abstract validateSubstrateAddress(address: string): boolean;
|
|
88
|
+
abstract deriveAddress(path: string): string;
|
|
89
|
+
abstract deriveAddress(sender: TSender<TSigner>): string;
|
|
90
|
+
abstract signAndSubmit(tx: TRes, sender: TSender<TSigner>): Promise<string>;
|
|
91
|
+
abstract signAndSubmitFinalized(tx: TRes, sender: TSender<TSigner>): Promise<string>;
|
|
86
92
|
}
|
|
87
93
|
|
|
88
94
|
declare abstract class Chain<TApi, TRes, TSigner> {
|
|
@@ -109,10 +115,10 @@ declare abstract class Chain<TApi, TRes, TSigner> {
|
|
|
109
115
|
transferLocalNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
110
116
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
111
117
|
protected transferToEthereum<TApi, TRes, TSigner>(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>, useOnlyDepositInstruction?: boolean): Promise<TRes>;
|
|
112
|
-
getBalanceNative(api:
|
|
118
|
+
getBalanceNative(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
113
119
|
getCustomCurrencyId(_asset: TAssetInfo): unknown;
|
|
114
|
-
getBalanceForeign<TApi, TRes, TSigner>(api:
|
|
115
|
-
getBalance(api:
|
|
120
|
+
getBalanceForeign<TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
121
|
+
getBalance(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
116
122
|
}
|
|
117
123
|
|
|
118
124
|
declare class Acala<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
@@ -122,7 +128,7 @@ declare class Acala<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> impl
|
|
|
122
128
|
transferLocalNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
123
129
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
124
130
|
getCustomCurrencyId(asset: TAssetInfo): TForeignOrTokenAsset;
|
|
125
|
-
getBalance(api:
|
|
131
|
+
getBalance(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
126
132
|
}
|
|
127
133
|
|
|
128
134
|
declare class Ajuna<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
@@ -140,7 +146,7 @@ declare class AssetHubKusama<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSig
|
|
|
140
146
|
constructor();
|
|
141
147
|
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
142
148
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
143
|
-
getBalanceForeign<TApi, TRes, TSigner>(api:
|
|
149
|
+
getBalanceForeign<TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
144
150
|
}
|
|
145
151
|
|
|
146
152
|
declare class AssetHubPolkadot<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
@@ -148,7 +154,7 @@ declare class AssetHubPolkadot<TApi, TRes, TSigner> extends Chain<TApi, TRes, TS
|
|
|
148
154
|
handleEthBridgeNativeTransfer<TApi, TRes, TSigner>(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
149
155
|
transferPolkadotXCM(options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
150
156
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
151
|
-
getBalanceForeign<TApi, TRes, TSigner>(api:
|
|
157
|
+
getBalanceForeign<TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
152
158
|
}
|
|
153
159
|
|
|
154
160
|
declare class AssetHubPaseo<TApi, TRes, TSigner> extends AssetHubPolkadot<TApi, TRes, TSigner> {
|
|
@@ -327,7 +333,7 @@ declare class EnergyWebX<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner>
|
|
|
327
333
|
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
328
334
|
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
329
335
|
isRelayToParaEnabled(): boolean;
|
|
330
|
-
getBalanceForeign<TApi, TRes, TSigner>(api:
|
|
336
|
+
getBalanceForeign<TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
331
337
|
}
|
|
332
338
|
|
|
333
339
|
declare class EnergyWebXPaseo<TApi, TRes, TSigner> extends EnergyWebX<TApi, TRes, TSigner> {
|
|
@@ -353,7 +359,7 @@ declare class Interlay<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> i
|
|
|
353
359
|
transferXTokens(input: TXTokensTransferOptions<TApi, TRes, TSigner>): TRes;
|
|
354
360
|
transferLocalNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
355
361
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
356
|
-
getBalanceNative(api:
|
|
362
|
+
getBalanceNative(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
357
363
|
}
|
|
358
364
|
|
|
359
365
|
declare class Jamton<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
@@ -378,7 +384,7 @@ declare class Kintsugi<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> i
|
|
|
378
384
|
transferXTokens(input: TXTokensTransferOptions<TApi, TRes, TSigner>): TRes;
|
|
379
385
|
transferLocalNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
380
386
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
381
|
-
getBalanceNative(api:
|
|
387
|
+
getBalanceNative(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
382
388
|
}
|
|
383
389
|
|
|
384
390
|
declare class Polkadot<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
@@ -412,7 +418,7 @@ declare class Moonbeam<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> i
|
|
|
412
418
|
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
413
419
|
transferPolkadotXCM(options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
414
420
|
transferLocalNonNativeAsset(_options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
415
|
-
getBalanceForeign<TApi, TRes, TSigner>(_api:
|
|
421
|
+
getBalanceForeign<TApi, TRes, TSigner>(_api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
416
422
|
}
|
|
417
423
|
|
|
418
424
|
declare class Moonriver<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
@@ -457,7 +463,7 @@ declare class Pendulum<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> i
|
|
|
457
463
|
|
|
458
464
|
declare class Penpal<TApi, TRes, TSigner> extends Moonbeam<TApi, TRes, TSigner> {
|
|
459
465
|
constructor();
|
|
460
|
-
getBalanceForeign<TApi, TRes, TSigner>(api:
|
|
466
|
+
getBalanceForeign<TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
461
467
|
}
|
|
462
468
|
|
|
463
469
|
declare class PeopleKusama<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
@@ -498,7 +504,7 @@ declare class Unique<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> imp
|
|
|
498
504
|
constructor();
|
|
499
505
|
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
500
506
|
transferLocalNonNativeAsset(_options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
501
|
-
getBalanceForeign<TApi, TRes, TSigner>(api:
|
|
507
|
+
getBalanceForeign<TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
502
508
|
}
|
|
503
509
|
|
|
504
510
|
declare class Westend<TApi, TRes, TSigner> extends Polkadot<TApi, TRes, TSigner> {
|
|
@@ -602,7 +608,7 @@ declare const TRANSACT_ORIGINS: readonly ["Native", "SovereignAccount", "Superus
|
|
|
602
608
|
/**
|
|
603
609
|
* Supported exchange chains
|
|
604
610
|
*/
|
|
605
|
-
declare const EXCHANGE_CHAINS: readonly ["
|
|
611
|
+
declare const EXCHANGE_CHAINS: readonly ["AssetHubPolkadot", "AssetHubKusama", "AssetHubPaseo", "AssetHubWestend", "Hydration", "Karura", "Acala", "BifrostKusama", "BifrostPolkadot"];
|
|
606
612
|
|
|
607
613
|
type TExchangeChain = (typeof EXCHANGE_CHAINS)[number];
|
|
608
614
|
type TExchangeInput = TExchangeChain | TExchangeChain[] | undefined;
|
|
@@ -650,7 +656,7 @@ type TSwapEvent<TApi, TRes> = {
|
|
|
650
656
|
type TStatusChangeCallback<TApi, TRes> = (info: TSwapEvent<TApi, TRes>) => void;
|
|
651
657
|
|
|
652
658
|
type TPolkadotXCMTransferOptions<TApi, TRes, TSigner> = {
|
|
653
|
-
api:
|
|
659
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
654
660
|
chain: TSubstrateChain$1;
|
|
655
661
|
beneficiaryLocation: TLocation;
|
|
656
662
|
recipient: TAddress;
|
|
@@ -672,7 +678,7 @@ type TPolkadotXCMTransferOptions<TApi, TRes, TSigner> = {
|
|
|
672
678
|
transactOptions?: TTransactOptions<TRes>;
|
|
673
679
|
};
|
|
674
680
|
type TXTokensTransferOptions<TApi, TRes, TSigner> = {
|
|
675
|
-
api:
|
|
681
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
676
682
|
asset: WithAmount<TAssetInfo>;
|
|
677
683
|
recipient: TAddress;
|
|
678
684
|
scenario: TScenario;
|
|
@@ -771,7 +777,7 @@ type TTransferOptionsWithSwap<TApi, TRes, TSigner> = WithRequiredSwapOptions<Omi
|
|
|
771
777
|
type TTransferBaseOptionsWithSwap<TApi, TRes, TSigner> = WithRequiredSwapOptions<TTransferBaseOptions<TApi, TRes, TSigner>, TApi, TRes, TSigner>;
|
|
772
778
|
type TTransferBaseOptionsWithSender<TApi, TRes, TSigner> = WithRequiredSender<TTransferBaseOptions<TApi, TRes, TSigner>>;
|
|
773
779
|
type TTransferInternalOptions<TApi, TRes, TSigner> = Omit<TTransferBaseOptions<TApi, TRes, TSigner>, 'from' | 'feeAsset' | 'version'> & {
|
|
774
|
-
api:
|
|
780
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
775
781
|
assetInfo: WithAmount<TAssetInfo>;
|
|
776
782
|
feeAsset?: TAssetInfo;
|
|
777
783
|
feeCurrency?: TCurrencyInput$1;
|
|
@@ -812,12 +818,12 @@ type TWeight<TWeightType = bigint> = {
|
|
|
812
818
|
proofSize: TWeightType;
|
|
813
819
|
};
|
|
814
820
|
type TCreateBeneficiaryOptions<TApi, TRes, TSigner> = {
|
|
815
|
-
api:
|
|
821
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
816
822
|
address: TAddress;
|
|
817
823
|
version: Version;
|
|
818
824
|
};
|
|
819
825
|
type TCreateBeneficiaryXTokensOptions<TApi, TRes, TSigner> = {
|
|
820
|
-
api:
|
|
826
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
821
827
|
origin: TSubstrateChain$1;
|
|
822
828
|
destination: TDestination;
|
|
823
829
|
recipient: TAddress;
|
|
@@ -850,7 +856,7 @@ type TCreateBaseTransferXcmOptions<TRes> = {
|
|
|
850
856
|
type TCreateTransferXcmOptions<TApi, TRes, TSigner> = WithApi<TCreateBaseTransferXcmOptions<TRes>, TApi, TRes, TSigner>;
|
|
851
857
|
type TCreateBaseSwapXcmOptions = {
|
|
852
858
|
chain?: TSubstrateChain$1;
|
|
853
|
-
exchangeChain:
|
|
859
|
+
exchangeChain: TExchangeChain;
|
|
854
860
|
destChain?: TChain$1;
|
|
855
861
|
assetInfoFrom: WithAmount<TAssetInfo>;
|
|
856
862
|
assetInfoTo: WithAmount<TAssetInfo>;
|
|
@@ -873,7 +879,7 @@ type TCreateSwapXcmInternalOptions<TApi, TRes, TSigner> = WithApi<TCreateBaseSwa
|
|
|
873
879
|
paraIdTo?: number;
|
|
874
880
|
};
|
|
875
881
|
type TCreateEthBridgeInstructionsOptions<TApi, TRes, TSigner> = {
|
|
876
|
-
api:
|
|
882
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
877
883
|
recipient: TAddress;
|
|
878
884
|
assetInfo: TAssetInfo;
|
|
879
885
|
sender: string;
|
|
@@ -901,8 +907,8 @@ type TSetBalanceRes = {
|
|
|
901
907
|
declare abstract class BaseAssetsPallet {
|
|
902
908
|
protected palletName: TAssetsPallet;
|
|
903
909
|
constructor(palletName: TAssetsPallet);
|
|
904
|
-
abstract mint<TApi, TRes, TSigner>(address: string, assetInfo: WithAmount<TAssetInfo>, balance: bigint, chain: TSubstrateChain$1, api:
|
|
905
|
-
abstract getBalance<TApi, TRes, TSigner>(api:
|
|
910
|
+
abstract mint<TApi, TRes, TSigner>(address: string, assetInfo: WithAmount<TAssetInfo>, balance: bigint, chain: TSubstrateChain$1, api: PolkadotApi<TApi, TRes, TSigner>): Promise<TSetBalanceRes>;
|
|
911
|
+
abstract getBalance<TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo, customCurrencyId?: unknown): Promise<bigint>;
|
|
906
912
|
}
|
|
907
913
|
|
|
908
914
|
/**
|
|
@@ -911,9 +917,9 @@ declare abstract class BaseAssetsPallet {
|
|
|
911
917
|
* @deprecated Asset claim functionality is deprecated and will be removed in v14.
|
|
912
918
|
*/
|
|
913
919
|
declare class AssetClaimBuilder<TApi, TRes, TSigner, T extends Partial<TAssetClaimOptionsBase & TBuilderInternalOptions<TSigner>> = object> {
|
|
914
|
-
readonly api:
|
|
920
|
+
readonly api: PolkadotApi<TApi, TRes, TSigner>;
|
|
915
921
|
readonly _options: T;
|
|
916
|
-
constructor(api:
|
|
922
|
+
constructor(api: PolkadotApi<TApi, TRes, TSigner>, options?: T);
|
|
917
923
|
/**
|
|
918
924
|
* Specifies the assets to be claimed.
|
|
919
925
|
*
|
|
@@ -975,7 +981,7 @@ declare class BatchTransactionManager<TApi, TRes, TSigner> {
|
|
|
975
981
|
transactionOptions: TBatchedTransferOptions<TApi, TRes, TSigner>[];
|
|
976
982
|
addTransaction(options: TBatchedTransferOptions<TApi, TRes, TSigner>): void;
|
|
977
983
|
isEmpty(): boolean;
|
|
978
|
-
buildBatch(api:
|
|
984
|
+
buildBatch(api: PolkadotApi<TApi, TRes, TSigner>, from: TSubstrateChain$1, options?: TBatchOptions): Promise<TRes>;
|
|
979
985
|
}
|
|
980
986
|
|
|
981
987
|
/**
|
|
@@ -983,9 +989,9 @@ declare class BatchTransactionManager<TApi, TRes, TSigner> {
|
|
|
983
989
|
*/
|
|
984
990
|
declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TTransferBaseOptions<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>> = object> {
|
|
985
991
|
readonly batchManager: BatchTransactionManager<TApi, TRes, TSigner>;
|
|
986
|
-
readonly api:
|
|
992
|
+
readonly api: PolkadotApi<TApi, TRes, TSigner>;
|
|
987
993
|
readonly _options: T;
|
|
988
|
-
constructor(api:
|
|
994
|
+
constructor(api: PolkadotApi<TApi, TRes, TSigner>, batchManager: BatchTransactionManager<TApi, TRes, TSigner>, options?: T);
|
|
989
995
|
/**
|
|
990
996
|
* Specifies the origin chain for the transaction.
|
|
991
997
|
*
|
|
@@ -1218,7 +1224,7 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TTransferBas
|
|
|
1218
1224
|
* @param api - The API instance to use for building transactions. If not provided, a new instance will be created.
|
|
1219
1225
|
* @returns A new Builder instance.
|
|
1220
1226
|
*/
|
|
1221
|
-
declare const Builder: <TApi, TRes, TSigner>(api:
|
|
1227
|
+
declare const Builder: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>) => GeneralBuilder<TApi, TRes, TSigner, object>;
|
|
1222
1228
|
|
|
1223
1229
|
type TSwapConfig = {
|
|
1224
1230
|
currencyTo: TCurrencyCore;
|
|
@@ -1322,7 +1328,7 @@ type TDryRunResult = {
|
|
|
1322
1328
|
hops: THopInfo[];
|
|
1323
1329
|
};
|
|
1324
1330
|
type TResolveHopParams<TApi, TRes, TSigner> = {
|
|
1325
|
-
api:
|
|
1331
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
1326
1332
|
tx: TRes;
|
|
1327
1333
|
originChain: TSubstrateChain$1;
|
|
1328
1334
|
currentChain: TSubstrateChain$1;
|
|
@@ -1333,7 +1339,7 @@ type TResolveHopParams<TApi, TRes, TSigner> = {
|
|
|
1333
1339
|
hasPassedExchange: boolean;
|
|
1334
1340
|
};
|
|
1335
1341
|
type HopProcessParams<TApi, TRes, TSigner> = {
|
|
1336
|
-
api:
|
|
1342
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
1337
1343
|
currentChain: TSubstrateChain$1;
|
|
1338
1344
|
currentOrigin: TSubstrateChain$1;
|
|
1339
1345
|
currentAsset: TAssetInfo;
|
|
@@ -1342,7 +1348,7 @@ type HopProcessParams<TApi, TRes, TSigner> = {
|
|
|
1342
1348
|
isDestination: boolean;
|
|
1343
1349
|
};
|
|
1344
1350
|
type HopTraversalConfig<TApi, TRes, TSigner, THopResult> = {
|
|
1345
|
-
api:
|
|
1351
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
1346
1352
|
origin: TSubstrateChain$1;
|
|
1347
1353
|
destination: TChain$1;
|
|
1348
1354
|
currency: TCurrencyCore;
|
|
@@ -1841,6 +1847,13 @@ declare class AmountTooLowError extends Error {
|
|
|
1841
1847
|
constructor(message?: string);
|
|
1842
1848
|
}
|
|
1843
1849
|
|
|
1850
|
+
/**
|
|
1851
|
+
* Error thrown when an API operation is attempted before the API has been initialized.
|
|
1852
|
+
*/
|
|
1853
|
+
declare class ApiNotInitializedError extends Error {
|
|
1854
|
+
constructor();
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1844
1857
|
/**
|
|
1845
1858
|
* Error thrown when a batch operation is invalid or cannot be executed.
|
|
1846
1859
|
*/
|
|
@@ -2075,7 +2088,7 @@ type TTransferInfo = {
|
|
|
2075
2088
|
};
|
|
2076
2089
|
};
|
|
2077
2090
|
type BuildHopInfoOptions<TApi, TRes, TSigner> = {
|
|
2078
|
-
api:
|
|
2091
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
2079
2092
|
chain: TSubstrateChain$1;
|
|
2080
2093
|
fee: bigint;
|
|
2081
2094
|
originChain: TSubstrateChain$1;
|
|
@@ -2085,7 +2098,7 @@ type BuildHopInfoOptions<TApi, TRes, TSigner> = {
|
|
|
2085
2098
|
ahAddress?: string;
|
|
2086
2099
|
};
|
|
2087
2100
|
type TBuildDestInfoOptions<TApi, TRes, TSigner> = {
|
|
2088
|
-
api:
|
|
2101
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
2089
2102
|
origin: TSubstrateChain$1;
|
|
2090
2103
|
destination: TChain$1;
|
|
2091
2104
|
recipient: string;
|
|
@@ -2114,7 +2127,7 @@ type TGetTransferInfoOptionsBase<TRes> = {
|
|
|
2114
2127
|
type TGetTransferInfoOptions<TApi, TRes, TSigner> = WithApi<TGetTransferInfoOptionsBase<TRes>, TApi, TRes, TSigner>;
|
|
2115
2128
|
|
|
2116
2129
|
type TChainWithApi<TApi, TRes, TSigner, T = TSubstrateChain$1> = {
|
|
2117
|
-
api:
|
|
2130
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
2118
2131
|
chain: T;
|
|
2119
2132
|
};
|
|
2120
2133
|
type TTypeAndThenCallContext<TApi, TRes, TSigner> = {
|
|
@@ -2151,7 +2164,7 @@ declare const blake2b256: (msg: Uint8Array) => Uint8Array<ArrayBufferLike>;
|
|
|
2151
2164
|
declare const blake2b512: (msg: Uint8Array) => Uint8Array<ArrayBufferLike>;
|
|
2152
2165
|
declare const deriveAccountId: (raw: Uint8Array) => Uint8Array;
|
|
2153
2166
|
declare const encodeSs58: (payload: Uint8Array, network: number) => string;
|
|
2154
|
-
declare const convertSs58: <TApi, TRes, TSigner>(api:
|
|
2167
|
+
declare const convertSs58: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: string, chain: TSubstrateChain$1) => string;
|
|
2155
2168
|
|
|
2156
2169
|
declare const getAssetBalanceInternal: <TApi, TRes, TSigner>({ api, address, chain, asset }: TGetAssetBalanceOptions<TApi, TRes, TSigner>) => Promise<bigint>;
|
|
2157
2170
|
declare const getBalanceInternal: <TApi, TRes, TSigner>(options: TGetBalanceOptions<TApi, TRes, TSigner>) => Promise<bigint>;
|
|
@@ -2215,12 +2228,12 @@ declare const getFailureInfo: (result: TDryRunResult) => Pick<TDryRunResult, "fa
|
|
|
2215
2228
|
declare const traverseXcmHops: <TApi, TRes, TSigner, THopResult>(config: HopTraversalConfig<TApi, TRes, TSigner, THopResult>) => Promise<HopTraversalResult<THopResult>>;
|
|
2216
2229
|
declare const addEthereumBridgeFees: <TApi, TRes, TSigner, TResult extends {
|
|
2217
2230
|
fee?: bigint;
|
|
2218
|
-
}>(api:
|
|
2231
|
+
}>(api: PolkadotApi<TApi, TRes, TSigner>, bridgeHubResult: TResult | undefined, destination: TChain$1, assetHubChain: TSubstrateChain$1) => Promise<TResult | undefined>;
|
|
2219
2232
|
|
|
2220
2233
|
declare const calcPreviewMintAmount: (balance: bigint, desired: bigint) => bigint | null;
|
|
2221
2234
|
declare const wrapTxBypass: <TApi, TRes, TSigner>(dryRunOptions: TDryRunBypassOptions<TApi, TRes, TSigner>, options?: TBypassOptions) => Promise<TRes>;
|
|
2222
2235
|
|
|
2223
|
-
declare const getParaEthTransferFees: <TApi, TRes, TSigner>(ahApi:
|
|
2236
|
+
declare const getParaEthTransferFees: <TApi, TRes, TSigner>(ahApi: PolkadotApi<TApi, TRes, TSigner>, shouldDisconnect?: boolean) => Promise<[bigint, bigint]>;
|
|
2224
2237
|
|
|
2225
2238
|
declare const transferMoonbeamEvm: <TApi, TRes, TSigner>(options: TEvmBuilderOptions<TApi, TRes, TSigner>) => Promise<string>;
|
|
2226
2239
|
|
|
@@ -2241,7 +2254,7 @@ declare const getXcmFee: <TApi, TRes, TSigner, TDisableFallback extends boolean>
|
|
|
2241
2254
|
|
|
2242
2255
|
declare const getXcmFeeOnce: <TApi, TRes, TSigner, TDisableFallback extends boolean>({ api, tx, origin, destination, sender, recipient, currency, feeAsset, version, disableFallback, swapConfig, useRootOrigin, skipReverseFeeCalculation }: TGetXcmFeeInternalOptions<TApi, TRes, TSigner, TDisableFallback>) => Promise<TGetXcmFeeResult<TDisableFallback>>;
|
|
2243
2256
|
|
|
2244
|
-
declare const getBridgeStatus: <TApi, TRes, TSigner>(api:
|
|
2257
|
+
declare const getBridgeStatus: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>) => Promise<TBridgeStatus>;
|
|
2245
2258
|
|
|
2246
2259
|
declare const getTransferInfo: <TApi, TRes, TSigner>({ api, buildTx, origin, destination, sender, ahAddress, recipient, currency, feeAsset, version }: TGetTransferInfoOptions<TApi, TRes, TSigner>) => Promise<TTransferInfo>;
|
|
2247
2260
|
|
|
@@ -2271,11 +2284,11 @@ declare const validateTransact: <TApi, TRes, TSigner>({ api, from, to, sender, r
|
|
|
2271
2284
|
|
|
2272
2285
|
declare const verifyEdOnDestination: <TApi, TRes, TSigner>(options: TVerifyEdOnDestinationOptions<TApi, TRes, TSigner>) => Promise<boolean>;
|
|
2273
2286
|
|
|
2274
|
-
declare const compareAddresses: <TApi, TRes, TSigner>(api:
|
|
2287
|
+
declare const compareAddresses: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, addr1: string, addr2: string) => boolean;
|
|
2275
2288
|
|
|
2276
|
-
declare const validateAddress: <TApi, TRes, TSigner>(api:
|
|
2289
|
+
declare const validateAddress: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: TAddress, chain: TChain$1, isDestination?: boolean) => void;
|
|
2277
2290
|
|
|
2278
|
-
declare const validateDestinationAddress: <TApi, TRes, TSigner>(address: TAddress, destination: TDestination, api:
|
|
2291
|
+
declare const validateDestinationAddress: <TApi, TRes, TSigner>(address: TAddress, destination: TDestination, api: PolkadotApi<TApi, TRes, TSigner>) => void;
|
|
2279
2292
|
|
|
2280
2293
|
declare const assertToIsString: (to: TDestination, overrideMsg?: string) => asserts to is Exclude<TDestination, TLocation>;
|
|
2281
2294
|
declare const assertAddressIsString: (address: TAddress) => asserts address is Exclude<TAddress, TLocation>;
|
|
@@ -2318,7 +2331,7 @@ declare const getChainVersion: <TApi, TRes, TSigner>(chain: TChain$1) => Version
|
|
|
2318
2331
|
*/
|
|
2319
2332
|
declare const getRelayChainOf: (chain: TSubstrateChain$1) => TRelaychain;
|
|
2320
2333
|
|
|
2321
|
-
declare const createChainClient: <TApi, TRes, TSigner>(api:
|
|
2334
|
+
declare const createChainClient: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, chain: TSubstrateChain$1) => Promise<TApi>;
|
|
2322
2335
|
|
|
2323
2336
|
declare const resolveModuleError: (chain: TSubstrateChain$1, error: TModuleError) => TDryRunError;
|
|
2324
2337
|
|
|
@@ -2395,7 +2408,7 @@ declare const createRouterBuilder: <TApi, TRes, TSigner>(options: TTransferOptio
|
|
|
2395
2408
|
declare const executeWithRouter: <TApi, TRes, TSigner, T>(options: TTransferOptionsWithSwap<TApi, TRes, TSigner>, executor: (builder: ReturnType<typeof createRouterBuilder<TApi, TRes, TSigner>>) => Promise<T>) => Promise<T>;
|
|
2396
2409
|
declare const normalizeExchange: (exchange: TExchangeInput) => TExchangeInput;
|
|
2397
2410
|
|
|
2398
|
-
declare const abstractDecimals: <TApi, TRes, TSigner>(amount: TAmount$1, decimals: number | undefined, api:
|
|
2411
|
+
declare const abstractDecimals: <TApi, TRes, TSigner>(amount: TAmount$1, decimals: number | undefined, api: PolkadotApi<TApi, TRes, TSigner>) => bigint;
|
|
2399
2412
|
declare const applyDecimalAbstraction: (amount: TAmount$1, decimals: number | undefined, shouldAbstract: boolean) => bigint;
|
|
2400
2413
|
|
|
2401
2414
|
declare const createAssetsFilter: (asset: TAsset, version: Version) => {
|
|
@@ -2439,5 +2452,5 @@ declare const selectXcmVersion: (forcedVersion: Version | undefined, originVersi
|
|
|
2439
2452
|
declare const pickCompatibleXcmVersion: (origin: TSubstrateChain$1, destination: TDestination, override?: Version) => Version;
|
|
2440
2453
|
declare const pickRouterCompatibleXcmVersion: (origin: TSubstrateChain$1 | undefined, exchangeChain: TSubstrateChain$1, destination: TChain$1 | undefined) => Version;
|
|
2441
2454
|
|
|
2442
|
-
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, SubmitTransactionError, TRANSACT_ORIGINS, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, TypeAndThenUnavailableError, UnableToComputeError, UnsupportedOperationError, ValidationError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, applyDecimalAbstraction, assertAddressIsString, assertHasId, assertSender, assertSenderSource, assertSwapSupport, assertToIsString, blake2b256, blake2b512, calcPreviewMintAmount, claimAssets, compareAddresses, computeOverridenAmount, constructTypeAndThenCall, convertBuilderConfig, 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, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getRelayChainOf, getSwapExtensionOrThrow, getTChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeInternal, getXcmFeeOnce, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, isSenderSigner, keyFromWs, localizeLocation, maybeOverrideAsset, maybeOverrideAssets, normalizeAmount, normalizeExchange, overrideTxAmount, padFee, padValueBy, parseUnits, pickCompatibleXcmVersion, pickRouterCompatibleXcmVersion, registerSwapExtension, resolveChainApi, resolveDestChain, resolveModuleError, resolveParaId, resolveTransferParams, reverseTransformLocation, selectXcmVersion, sortAssets, throwUnsupportedCurrency, transferMoonbeamEvm, transferMoonbeamToEth, traverseXcmHops, validateAddress, validateAssetSpecifiers, validateCurrency, validateDestination, validateDestinationAddress, validateTransact, verifyEdOnDestination, wrapTxBypass };
|
|
2443
|
-
export type { BuildHopInfoOptions, ClientCache, HopProcessParams, HopTraversalConfig, HopTraversalResult,
|
|
2455
|
+
export { API_TYPES, AmountTooLowError, ApiNotInitializedError, 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, PolkadotApi, PolkadotXcmError, PolkadotXcmExecutionError, ProviderUnavailableError, RELAY_LOCATION, RoutingResolutionError, RuntimeApiUnavailableError, ScenarioNotSupportedError, SubmitTransactionError, TRANSACT_ORIGINS, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, TypeAndThenUnavailableError, UnableToComputeError, UnsupportedOperationError, ValidationError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, applyDecimalAbstraction, assertAddressIsString, assertHasId, assertSender, assertSenderSource, assertSwapSupport, assertToIsString, blake2b256, blake2b512, calcPreviewMintAmount, claimAssets, compareAddresses, computeOverridenAmount, constructTypeAndThenCall, convertBuilderConfig, 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, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getRelayChainOf, getSwapExtensionOrThrow, getTChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeInternal, getXcmFeeOnce, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, isSenderSigner, keyFromWs, localizeLocation, maybeOverrideAsset, maybeOverrideAssets, normalizeAmount, normalizeExchange, overrideTxAmount, padFee, padValueBy, parseUnits, pickCompatibleXcmVersion, pickRouterCompatibleXcmVersion, registerSwapExtension, resolveChainApi, resolveDestChain, resolveModuleError, resolveParaId, resolveTransferParams, reverseTransformLocation, selectXcmVersion, sortAssets, throwUnsupportedCurrency, transferMoonbeamEvm, transferMoonbeamToEth, traverseXcmHops, validateAddress, validateAssetSpecifiers, validateCurrency, validateDestination, validateDestinationAddress, validateTransact, verifyEdOnDestination, wrapTxBypass };
|
|
2456
|
+
export type { BuildHopInfoOptions, ClientCache, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotXCMTransfer, IXTokensTransfer, OneKey, TAddress, TApiOrUrl, TApiType, TAssetClaimInternalOptions, TAssetClaimOptions, TAssetClaimOptionsBase, TBatchOptions, TBatchedTransferOptions, 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, TGetOriginXcmFeeInternalOptions, TGetOriginXcmFeeOptions, TGetReverseTxFeeOptions, TGetTransferInfoOptions, TGetTransferInfoOptionsBase, TGetTransferableAmountOptions, TGetTransferableAmountOptionsBase, TGetXcmFeeBaseOptions, TGetXcmFeeBuilderOptions, TGetXcmFeeInternalOptions, TGetXcmFeeOptions, TGetXcmFeeResult, THopInfo, THopTransferInfo, TMantaAsset, TModuleError, TNativeTokenAsset, TOriginFeeDetails, TOtherReserveAsset, TPaymentInfo, TPolkadotXCMTransferOptions, TPolkadotXcmMethod, TProviderEntry, TReserveAsset, TResolveHopParams, TScenario, TSelfReserveAsset, TSender, TSerializeEthTransferOptions, TSerializedEthTransfer, TSerializedExtrinsics, TSerializedRuntimeApiQuery, TSerializedStateQuery, TSetBalanceRes, TStatusChangeCallback, TSwapConfig, TSwapEvent, TSwapEventType, TSwapExtension, TSwapFeeEstimates, TSwapOptions, TTransactOptions, TTransactOrigin, TTransactionContext, TTransactionType, TTransferBaseOptions, TTransferBaseOptionsWithSender, TTransferBaseOptionsWithSwap, TTransferFeeEstimates, TTransferInfo, TTransferInternalOptions, TTransferLocalOptions, TTransferOptions, TTransferOptionsWithSwap, TTxFactory, TTypeAndThenCallContext, TTypeAndThenFees, TTypeAndThenOverrides, TUrl, TVerifyEdOnDestinationOptions, TVerifyEdOnDestinationOptionsBase, TWeight, TXTokensCurrencySelection, TXTokensMethod, TXTokensTransferOptions, TXcmAsset, TXcmFeeBase, TXcmFeeDetail, TXcmFeeDetailError, TXcmFeeDetailSuccess, TXcmFeeDetailWithFallback, TXcmFeeHopInfo, TXcmFeeHopResult, TXcmFeeSwapConfig, TXcmForeignAsset, TXcmPalletMethod, TXcmVersioned, TZeitgeistAsset, WithApi, WithRequiredSender, WithRequiredSwapOptions };
|