@paraspell/sdk-core 12.9.7 → 12.10.0-rc.1
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 +222 -247
- package/dist/index.mjs +2630 -2805
- 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,48 +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
|
+
protected _api?: TApi;
|
|
45
|
+
protected _chain?: TSubstrateChain$1;
|
|
46
|
+
protected _config?: TBuilderOptions<TApiOrUrl<TApi>>;
|
|
47
|
+
protected _ttlMs: number;
|
|
48
|
+
protected _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>;
|
|
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>;
|
|
85
92
|
}
|
|
86
93
|
|
|
87
94
|
declare abstract class Chain<TApi, TRes, TSigner> {
|
|
@@ -94,24 +101,24 @@ declare abstract class Chain<TApi, TRes, TSigner> {
|
|
|
94
101
|
get ecosystem(): TRelaychain;
|
|
95
102
|
get chain(): TSubstrateChain$1;
|
|
96
103
|
get version(): Version;
|
|
97
|
-
transfer(
|
|
104
|
+
transfer(transferOptions: TTransferInternalOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
98
105
|
isRelayToParaEnabled(): boolean;
|
|
99
106
|
throwIfCantReceive(destChain: TChain$1 | undefined): void;
|
|
100
|
-
throwIfTempDisabled(options:
|
|
101
|
-
isSendingTempDisabled(_options:
|
|
107
|
+
throwIfTempDisabled(options: TTransferInternalOptions<TApi, TRes, TSigner>, destChain?: TChain$1): void;
|
|
108
|
+
isSendingTempDisabled(_options: TTransferInternalOptions<TApi, TRes, TSigner>): boolean;
|
|
102
109
|
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
103
110
|
canReceiveFrom(_origin: TChain$1): boolean;
|
|
104
|
-
shouldUseNativeAssetTeleport({ assetInfo: asset, to }:
|
|
111
|
+
shouldUseNativeAssetTeleport({ assetInfo: asset, to }: TTransferInternalOptions<TApi, TRes, TSigner>): boolean;
|
|
105
112
|
createAsset(asset: WithAmount<TAssetInfo>, version: Version): TAsset;
|
|
106
113
|
getNativeAssetSymbol(): string;
|
|
107
|
-
transferLocal(options:
|
|
114
|
+
transferLocal(options: TTransferInternalOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
108
115
|
transferLocalNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
109
116
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
110
117
|
protected transferToEthereum<TApi, TRes, TSigner>(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>, useOnlyDepositInstruction?: boolean): Promise<TRes>;
|
|
111
|
-
getBalanceNative(api:
|
|
118
|
+
getBalanceNative(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
112
119
|
getCustomCurrencyId(_asset: TAssetInfo): unknown;
|
|
113
|
-
getBalanceForeign<TApi, TRes, TSigner>(api:
|
|
114
|
-
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>;
|
|
115
122
|
}
|
|
116
123
|
|
|
117
124
|
declare class Acala<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
@@ -121,7 +128,7 @@ declare class Acala<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> impl
|
|
|
121
128
|
transferLocalNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
122
129
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
123
130
|
getCustomCurrencyId(asset: TAssetInfo): TForeignOrTokenAsset;
|
|
124
|
-
getBalance(api:
|
|
131
|
+
getBalance(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
125
132
|
}
|
|
126
133
|
|
|
127
134
|
declare class Ajuna<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
@@ -139,7 +146,7 @@ declare class AssetHubKusama<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSig
|
|
|
139
146
|
constructor();
|
|
140
147
|
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
141
148
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
142
|
-
getBalanceForeign<TApi, TRes, TSigner>(api:
|
|
149
|
+
getBalanceForeign<TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
143
150
|
}
|
|
144
151
|
|
|
145
152
|
declare class AssetHubPolkadot<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
@@ -147,7 +154,7 @@ declare class AssetHubPolkadot<TApi, TRes, TSigner> extends Chain<TApi, TRes, TS
|
|
|
147
154
|
handleEthBridgeNativeTransfer<TApi, TRes, TSigner>(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
148
155
|
transferPolkadotXCM(options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
149
156
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
150
|
-
getBalanceForeign<TApi, TRes, TSigner>(api:
|
|
157
|
+
getBalanceForeign<TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
151
158
|
}
|
|
152
159
|
|
|
153
160
|
declare class AssetHubPaseo<TApi, TRes, TSigner> extends AssetHubPolkadot<TApi, TRes, TSigner> {
|
|
@@ -326,7 +333,7 @@ declare class EnergyWebX<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner>
|
|
|
326
333
|
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
327
334
|
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
328
335
|
isRelayToParaEnabled(): boolean;
|
|
329
|
-
getBalanceForeign<TApi, TRes, TSigner>(api:
|
|
336
|
+
getBalanceForeign<TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
330
337
|
}
|
|
331
338
|
|
|
332
339
|
declare class EnergyWebXPaseo<TApi, TRes, TSigner> extends EnergyWebX<TApi, TRes, TSigner> {
|
|
@@ -352,7 +359,7 @@ declare class Interlay<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> i
|
|
|
352
359
|
transferXTokens(input: TXTokensTransferOptions<TApi, TRes, TSigner>): TRes;
|
|
353
360
|
transferLocalNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
354
361
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
355
|
-
getBalanceNative(api:
|
|
362
|
+
getBalanceNative(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
356
363
|
}
|
|
357
364
|
|
|
358
365
|
declare class Jamton<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
@@ -377,7 +384,7 @@ declare class Kintsugi<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> i
|
|
|
377
384
|
transferXTokens(input: TXTokensTransferOptions<TApi, TRes, TSigner>): TRes;
|
|
378
385
|
transferLocalNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
379
386
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
380
|
-
getBalanceNative(api:
|
|
387
|
+
getBalanceNative(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
381
388
|
}
|
|
382
389
|
|
|
383
390
|
declare class Polkadot<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
@@ -411,7 +418,7 @@ declare class Moonbeam<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> i
|
|
|
411
418
|
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
412
419
|
transferPolkadotXCM(options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
413
420
|
transferLocalNonNativeAsset(_options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
414
|
-
getBalanceForeign<TApi, TRes, TSigner>(_api:
|
|
421
|
+
getBalanceForeign<TApi, TRes, TSigner>(_api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
415
422
|
}
|
|
416
423
|
|
|
417
424
|
declare class Moonriver<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
@@ -456,7 +463,7 @@ declare class Pendulum<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> i
|
|
|
456
463
|
|
|
457
464
|
declare class Penpal<TApi, TRes, TSigner> extends Moonbeam<TApi, TRes, TSigner> {
|
|
458
465
|
constructor();
|
|
459
|
-
getBalanceForeign<TApi, TRes, TSigner>(api:
|
|
466
|
+
getBalanceForeign<TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
460
467
|
}
|
|
461
468
|
|
|
462
469
|
declare class PeopleKusama<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
@@ -497,7 +504,7 @@ declare class Unique<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> imp
|
|
|
497
504
|
constructor();
|
|
498
505
|
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
499
506
|
transferLocalNonNativeAsset(_options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
500
|
-
getBalanceForeign<TApi, TRes, TSigner>(api:
|
|
507
|
+
getBalanceForeign<TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
501
508
|
}
|
|
502
509
|
|
|
503
510
|
declare class Westend<TApi, TRes, TSigner> extends Polkadot<TApi, TRes, TSigner> {
|
|
@@ -601,7 +608,7 @@ declare const TRANSACT_ORIGINS: readonly ["Native", "SovereignAccount", "Superus
|
|
|
601
608
|
/**
|
|
602
609
|
* Supported exchange chains
|
|
603
610
|
*/
|
|
604
|
-
declare const EXCHANGE_CHAINS: readonly ["
|
|
611
|
+
declare const EXCHANGE_CHAINS: readonly ["AssetHubPolkadot", "AssetHubKusama", "AssetHubPaseo", "AssetHubWestend", "Hydration", "Karura", "Acala", "BifrostKusama", "BifrostPolkadot"];
|
|
605
612
|
|
|
606
613
|
type TExchangeChain = (typeof EXCHANGE_CHAINS)[number];
|
|
607
614
|
type TExchangeInput = TExchangeChain | TExchangeChain[] | undefined;
|
|
@@ -649,10 +656,10 @@ type TSwapEvent<TApi, TRes> = {
|
|
|
649
656
|
type TStatusChangeCallback<TApi, TRes> = (info: TSwapEvent<TApi, TRes>) => void;
|
|
650
657
|
|
|
651
658
|
type TPolkadotXCMTransferOptions<TApi, TRes, TSigner> = {
|
|
652
|
-
api:
|
|
659
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
653
660
|
chain: TSubstrateChain$1;
|
|
654
661
|
beneficiaryLocation: TLocation;
|
|
655
|
-
|
|
662
|
+
recipient: TAddress;
|
|
656
663
|
asset: TAsset;
|
|
657
664
|
overriddenAsset?: TLocation | TAssetWithFee[];
|
|
658
665
|
scenario: TScenario;
|
|
@@ -664,16 +671,16 @@ type TPolkadotXCMTransferOptions<TApi, TRes, TSigner> = {
|
|
|
664
671
|
destChain?: TChain$1;
|
|
665
672
|
paraIdTo?: number;
|
|
666
673
|
version: Version;
|
|
667
|
-
|
|
674
|
+
sender?: string;
|
|
668
675
|
ahAddress?: string;
|
|
669
676
|
pallet?: string;
|
|
670
677
|
method?: string;
|
|
671
678
|
transactOptions?: TTransactOptions<TRes>;
|
|
672
679
|
};
|
|
673
680
|
type TXTokensTransferOptions<TApi, TRes, TSigner> = {
|
|
674
|
-
api:
|
|
681
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
675
682
|
asset: WithAmount<TAssetInfo>;
|
|
676
|
-
|
|
683
|
+
recipient: TAddress;
|
|
677
684
|
scenario: TScenario;
|
|
678
685
|
origin: TSubstrateChain$1;
|
|
679
686
|
destination: TDestination;
|
|
@@ -693,7 +700,7 @@ interface IXTokensTransfer<TApi, TRes, TSigner> {
|
|
|
693
700
|
type TScenario = 'ParaToRelay' | 'ParaToPara' | 'RelayToPara';
|
|
694
701
|
type TAddress = string | TLocation;
|
|
695
702
|
type TDestination = TChain$1 | TLocation;
|
|
696
|
-
type
|
|
703
|
+
type TTransferBaseOptions<TApi, TRes, TSigner> = {
|
|
697
704
|
/**
|
|
698
705
|
* The origin chain
|
|
699
706
|
*/
|
|
@@ -701,11 +708,11 @@ type TSendBaseOptions<TApi, TRes, TSigner> = {
|
|
|
701
708
|
/**
|
|
702
709
|
* The destination address. A SS58 or H160 format.
|
|
703
710
|
*/
|
|
704
|
-
|
|
711
|
+
recipient: TAddress;
|
|
705
712
|
/**
|
|
706
713
|
* The optional sender address. A SS58 or H160 format.
|
|
707
714
|
*/
|
|
708
|
-
|
|
715
|
+
sender?: string;
|
|
709
716
|
/**
|
|
710
717
|
* The optional asset hub address. A SS58 format only.
|
|
711
718
|
*/
|
|
@@ -754,23 +761,23 @@ type TSendBaseOptions<TApi, TRes, TSigner> = {
|
|
|
754
761
|
/**
|
|
755
762
|
* Options for transferring from a parachain to another parachain or relay chain
|
|
756
763
|
*/
|
|
757
|
-
type
|
|
764
|
+
type TTransferOptions<TApi, TRes, TSigner> = WithApi<TTransferBaseOptions<TApi, TRes, TSigner>, TApi, TRes, TSigner> & {
|
|
758
765
|
isAmountAll: boolean;
|
|
759
766
|
};
|
|
760
|
-
type
|
|
767
|
+
type WithRequiredSender<TBase> = Omit<TBase, 'sender'> & {
|
|
761
768
|
/**
|
|
762
769
|
* The sender address. A SS58 or H160 format.
|
|
763
770
|
*/
|
|
764
|
-
|
|
771
|
+
sender: string;
|
|
765
772
|
};
|
|
766
773
|
type WithRequiredSwapOptions<TBase, TApi, TRes, TSigner> = Omit<TBase, 'swapOptions'> & {
|
|
767
774
|
swapOptions: TSwapOptions<TApi, TRes, TSigner>;
|
|
768
775
|
};
|
|
769
|
-
type
|
|
770
|
-
type
|
|
771
|
-
type
|
|
772
|
-
type
|
|
773
|
-
api:
|
|
776
|
+
type TTransferOptionsWithSwap<TApi, TRes, TSigner> = WithRequiredSwapOptions<Omit<TTransferOptions<TApi, TRes, TSigner>, 'isAmountAll'>, TApi, TRes, TSigner>;
|
|
777
|
+
type TTransferBaseOptionsWithSwap<TApi, TRes, TSigner> = WithRequiredSwapOptions<TTransferBaseOptions<TApi, TRes, TSigner>, TApi, TRes, TSigner>;
|
|
778
|
+
type TTransferBaseOptionsWithSender<TApi, TRes, TSigner> = WithRequiredSender<TTransferBaseOptions<TApi, TRes, TSigner>>;
|
|
779
|
+
type TTransferInternalOptions<TApi, TRes, TSigner> = Omit<TTransferBaseOptions<TApi, TRes, TSigner>, 'from' | 'feeAsset' | 'version'> & {
|
|
780
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
774
781
|
assetInfo: WithAmount<TAssetInfo>;
|
|
775
782
|
feeAsset?: TAssetInfo;
|
|
776
783
|
feeCurrency?: TCurrencyInput$1;
|
|
@@ -811,21 +818,21 @@ type TWeight<TWeightType = bigint> = {
|
|
|
811
818
|
proofSize: TWeightType;
|
|
812
819
|
};
|
|
813
820
|
type TCreateBeneficiaryOptions<TApi, TRes, TSigner> = {
|
|
814
|
-
api:
|
|
821
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
815
822
|
address: TAddress;
|
|
816
823
|
version: Version;
|
|
817
824
|
};
|
|
818
825
|
type TCreateBeneficiaryXTokensOptions<TApi, TRes, TSigner> = {
|
|
819
|
-
api:
|
|
826
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
820
827
|
origin: TSubstrateChain$1;
|
|
821
828
|
destination: TDestination;
|
|
822
|
-
|
|
829
|
+
recipient: TAddress;
|
|
823
830
|
version: Version;
|
|
824
831
|
paraId?: number;
|
|
825
832
|
};
|
|
826
833
|
type TBridgeStatus = 'Normal' | 'Halted';
|
|
827
|
-
type TTransferLocalOptions<TApi, TRes, TSigner> = Omit<
|
|
828
|
-
|
|
834
|
+
type TTransferLocalOptions<TApi, TRes, TSigner> = Omit<TTransferInternalOptions<TApi, TRes, TSigner>, 'recipient'> & {
|
|
835
|
+
recipient: string;
|
|
829
836
|
balance: bigint;
|
|
830
837
|
};
|
|
831
838
|
type TTransferFeeEstimates = {
|
|
@@ -838,8 +845,8 @@ type TCreateBaseTransferXcmOptions<TRes> = {
|
|
|
838
845
|
assetInfo: WithAmount<TAssetInfo>;
|
|
839
846
|
feeAssetInfo?: TAssetInfo;
|
|
840
847
|
fees: TTransferFeeEstimates;
|
|
841
|
-
|
|
842
|
-
|
|
848
|
+
recipient: string;
|
|
849
|
+
sender?: string;
|
|
843
850
|
version: Version;
|
|
844
851
|
useJitWithdraw?: boolean;
|
|
845
852
|
useFeeAssetOnHops?: boolean;
|
|
@@ -849,14 +856,14 @@ type TCreateBaseTransferXcmOptions<TRes> = {
|
|
|
849
856
|
type TCreateTransferXcmOptions<TApi, TRes, TSigner> = WithApi<TCreateBaseTransferXcmOptions<TRes>, TApi, TRes, TSigner>;
|
|
850
857
|
type TCreateBaseSwapXcmOptions = {
|
|
851
858
|
chain?: TSubstrateChain$1;
|
|
852
|
-
exchangeChain:
|
|
859
|
+
exchangeChain: TExchangeChain;
|
|
853
860
|
destChain?: TChain$1;
|
|
854
861
|
assetInfoFrom: WithAmount<TAssetInfo>;
|
|
855
862
|
assetInfoTo: WithAmount<TAssetInfo>;
|
|
856
863
|
currencyTo: TCurrencyInput$1;
|
|
857
864
|
feeAssetInfo?: TAssetInfo;
|
|
858
|
-
|
|
859
|
-
|
|
865
|
+
sender: string;
|
|
866
|
+
recipient: string;
|
|
860
867
|
calculateMinAmountOut: (amountIn: bigint, assetTo?: TAssetInfo) => Promise<bigint>;
|
|
861
868
|
};
|
|
862
869
|
type TCreateSwapXcmOptions<TApi, TRes, TSigner> = WithApi<TCreateBaseSwapXcmOptions, TApi, TRes, TSigner>;
|
|
@@ -872,14 +879,15 @@ type TCreateSwapXcmInternalOptions<TApi, TRes, TSigner> = WithApi<TCreateBaseSwa
|
|
|
872
879
|
paraIdTo?: number;
|
|
873
880
|
};
|
|
874
881
|
type TCreateEthBridgeInstructionsOptions<TApi, TRes, TSigner> = {
|
|
875
|
-
api:
|
|
876
|
-
|
|
882
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
883
|
+
recipient: TAddress;
|
|
877
884
|
assetInfo: TAssetInfo;
|
|
878
|
-
|
|
885
|
+
sender: string;
|
|
879
886
|
ahAddress?: string;
|
|
880
887
|
version: Version;
|
|
881
888
|
};
|
|
882
889
|
|
|
890
|
+
/** @deprecated Asset claim functionality is deprecated and will be removed in v14. */
|
|
883
891
|
type TAssetClaimOptionsBase = {
|
|
884
892
|
chain: TSubstrateChain$1;
|
|
885
893
|
currency: WithComplexAmount<TCurrencyCore> | TAsset<TAmount$1>[] | WithComplexAmount<TCurrencyCore>[];
|
|
@@ -899,17 +907,19 @@ type TSetBalanceRes = {
|
|
|
899
907
|
declare abstract class BaseAssetsPallet {
|
|
900
908
|
protected palletName: TAssetsPallet;
|
|
901
909
|
constructor(palletName: TAssetsPallet);
|
|
902
|
-
abstract mint<TApi, TRes, TSigner>(address: string, assetInfo: WithAmount<TAssetInfo>, balance: bigint, chain: TSubstrateChain$1, api:
|
|
903
|
-
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>;
|
|
904
912
|
}
|
|
905
913
|
|
|
906
914
|
/**
|
|
907
915
|
* Builder class for constructing asset claim transactions.
|
|
916
|
+
*
|
|
917
|
+
* @deprecated Asset claim functionality is deprecated and will be removed in v14.
|
|
908
918
|
*/
|
|
909
919
|
declare class AssetClaimBuilder<TApi, TRes, TSigner, T extends Partial<TAssetClaimOptionsBase & TBuilderInternalOptions<TSigner>> = object> {
|
|
910
|
-
readonly api:
|
|
920
|
+
readonly api: PolkadotApi<TApi, TRes, TSigner>;
|
|
911
921
|
readonly _options: T;
|
|
912
|
-
constructor(api:
|
|
922
|
+
constructor(api: PolkadotApi<TApi, TRes, TSigner>, options?: T);
|
|
913
923
|
/**
|
|
914
924
|
* Specifies the assets to be claimed.
|
|
915
925
|
*
|
|
@@ -925,8 +935,8 @@ declare class AssetClaimBuilder<TApi, TRes, TSigner, T extends Partial<TAssetCla
|
|
|
925
935
|
* @param address - The sender address.
|
|
926
936
|
* @returns
|
|
927
937
|
*/
|
|
928
|
-
|
|
929
|
-
|
|
938
|
+
sender(sender: TSender<TSigner>): AssetClaimBuilder<TApi, TRes, TSigner, T & {
|
|
939
|
+
sender: string;
|
|
930
940
|
}>;
|
|
931
941
|
/**
|
|
932
942
|
* Specifies the account address on which the assets will be claimed.
|
|
@@ -968,20 +978,20 @@ declare class AssetClaimBuilder<TApi, TRes, TSigner, T extends Partial<TAssetCla
|
|
|
968
978
|
}
|
|
969
979
|
|
|
970
980
|
declare class BatchTransactionManager<TApi, TRes, TSigner> {
|
|
971
|
-
transactionOptions:
|
|
972
|
-
addTransaction(options:
|
|
981
|
+
transactionOptions: TBatchedTransferOptions<TApi, TRes, TSigner>[];
|
|
982
|
+
addTransaction(options: TBatchedTransferOptions<TApi, TRes, TSigner>): void;
|
|
973
983
|
isEmpty(): boolean;
|
|
974
|
-
buildBatch(api:
|
|
984
|
+
buildBatch(api: PolkadotApi<TApi, TRes, TSigner>, from: TSubstrateChain$1, options?: TBatchOptions): Promise<TRes>;
|
|
975
985
|
}
|
|
976
986
|
|
|
977
987
|
/**
|
|
978
988
|
* A builder class for constructing Para-to-Para, Para-to-Relay, Relay-to-Para transactions and asset claims.
|
|
979
989
|
*/
|
|
980
|
-
declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<
|
|
990
|
+
declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TTransferBaseOptions<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>> = object> {
|
|
981
991
|
readonly batchManager: BatchTransactionManager<TApi, TRes, TSigner>;
|
|
982
|
-
readonly api:
|
|
992
|
+
readonly api: PolkadotApi<TApi, TRes, TSigner>;
|
|
983
993
|
readonly _options: T;
|
|
984
|
-
constructor(api:
|
|
994
|
+
constructor(api: PolkadotApi<TApi, TRes, TSigner>, batchManager: BatchTransactionManager<TApi, TRes, TSigner>, options?: T);
|
|
985
995
|
/**
|
|
986
996
|
* Specifies the origin chain for the transaction.
|
|
987
997
|
*
|
|
@@ -1004,6 +1014,7 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TSendBaseOpt
|
|
|
1004
1014
|
/**
|
|
1005
1015
|
* Initiates the process to claim assets from a specified chain.
|
|
1006
1016
|
*
|
|
1017
|
+
* @deprecated Asset claim functionality is deprecated and will be removed in v14.
|
|
1007
1018
|
* @param chain - The chain from which to claim assets.
|
|
1008
1019
|
* @returns An instance of Builder
|
|
1009
1020
|
*/
|
|
@@ -1022,20 +1033,20 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TSendBaseOpt
|
|
|
1022
1033
|
/**
|
|
1023
1034
|
* Sets the recipient address.
|
|
1024
1035
|
*
|
|
1025
|
-
* @param address - The destination
|
|
1036
|
+
* @param address - The recipient address on the destination chain.
|
|
1026
1037
|
* @returns An instance of Builder
|
|
1027
1038
|
*/
|
|
1028
|
-
|
|
1029
|
-
|
|
1039
|
+
recipient(address: TAddress): GeneralBuilder<TApi, TRes, TSigner, T & {
|
|
1040
|
+
recipient: TAddress;
|
|
1030
1041
|
}>;
|
|
1031
1042
|
/**
|
|
1032
1043
|
* Sets the sender address.
|
|
1033
1044
|
*
|
|
1034
|
-
* @param
|
|
1035
|
-
* @returns
|
|
1045
|
+
* @param sender - The sender address or signer.
|
|
1046
|
+
* @returns An instance of Builder
|
|
1036
1047
|
*/
|
|
1037
|
-
|
|
1038
|
-
|
|
1048
|
+
sender(sender: TSender<TSigner>): GeneralBuilder<TApi, TRes, TSigner, T & {
|
|
1049
|
+
sender: string;
|
|
1039
1050
|
}>;
|
|
1040
1051
|
/**
|
|
1041
1052
|
* Sets the asset hub address. This is used for transfers that go through the Asset Hub and originate from an EVM chain.
|
|
@@ -1112,7 +1123,7 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TSendBaseOpt
|
|
|
1112
1123
|
*
|
|
1113
1124
|
* @returns An instance of Builder
|
|
1114
1125
|
*/
|
|
1115
|
-
addToBatch(this: GeneralBuilder<TApi, TRes, TSigner,
|
|
1126
|
+
addToBatch(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptions<TApi, TRes, TSigner>>): GeneralBuilder<TApi, TRes, TSigner, T & {
|
|
1116
1127
|
from: TSubstrateChain$1;
|
|
1117
1128
|
}>;
|
|
1118
1129
|
/**
|
|
@@ -1121,34 +1132,34 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TSendBaseOpt
|
|
|
1121
1132
|
* @param options - (Optional) Options to customize the batch transaction.
|
|
1122
1133
|
* @returns A Extrinsic representing the batched transactions.
|
|
1123
1134
|
*/
|
|
1124
|
-
buildBatch(this: GeneralBuilder<TApi, TRes, TSigner,
|
|
1125
|
-
protected buildInternal<TOptions extends
|
|
1135
|
+
buildBatch(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptions<TApi, TRes, TSigner>>, options?: TBatchOptions): Promise<TRes>;
|
|
1136
|
+
protected buildInternal<TOptions extends TTransferBaseOptions<TApi, TRes, TSigner>>(this: GeneralBuilder<TApi, TRes, TSigner, TOptions>): Promise<TBuildInternalRes<TApi, TRes, TSigner, TOptions>>;
|
|
1126
1137
|
private prepareNormalizedOptions;
|
|
1127
1138
|
/**
|
|
1128
1139
|
* Builds and returns the transfer extrinsic.
|
|
1129
1140
|
*
|
|
1130
1141
|
* @returns A Promise that resolves to the transfer extrinsic.
|
|
1131
1142
|
*/
|
|
1132
|
-
build(this: GeneralBuilder<TApi, TRes, TSigner,
|
|
1143
|
+
build(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptions<TApi, TRes, TSigner>>): Promise<TRes>;
|
|
1133
1144
|
/**
|
|
1134
1145
|
* Builds and returns multiple transfer or swap extrinsics
|
|
1135
1146
|
*
|
|
1136
1147
|
* @returns A Promise that resolves to the transfer extrinsic contexts
|
|
1137
1148
|
*/
|
|
1138
|
-
buildAll(this: GeneralBuilder<TApi, TRes, TSigner,
|
|
1149
|
+
buildAll(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptions<TApi, TRes, TSigner>>): Promise<TTransactionContext<TApi, TRes>[]>;
|
|
1139
1150
|
private validateBatchState;
|
|
1140
1151
|
private buildCommon;
|
|
1141
1152
|
private buildCommonAll;
|
|
1142
1153
|
private maybePerformXcmFormatCheck;
|
|
1143
|
-
dryRun(this: GeneralBuilder<TApi, TRes, TSigner,
|
|
1144
|
-
dryRunPreview(this: GeneralBuilder<TApi, TRes, TSigner,
|
|
1145
|
-
protected createTxFactory<TOptions extends
|
|
1154
|
+
dryRun(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner>>): Promise<TDryRunResult>;
|
|
1155
|
+
dryRunPreview(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner>>, dryRunOptions?: TDryRunPreviewOptions): Promise<TDryRunResult>;
|
|
1156
|
+
protected createTxFactory<TOptions extends TTransferBaseOptions<TApi, TRes, TSigner>>(this: GeneralBuilder<TApi, TRes, TSigner, TOptions>): TTxFactory<TRes>;
|
|
1146
1157
|
/**
|
|
1147
1158
|
* Returns the XCM fee for the transfer using dryRun or paymentInfo function.
|
|
1148
1159
|
*
|
|
1149
1160
|
* @returns An origin and destination fee.
|
|
1150
1161
|
*/
|
|
1151
|
-
getXcmFee<TDisableFallback extends boolean = false>(this: GeneralBuilder<TApi, TRes, TSigner,
|
|
1162
|
+
getXcmFee<TDisableFallback extends boolean = false>(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner>>, options?: TGetXcmFeeBuilderOptions & {
|
|
1152
1163
|
disableFallback: TDisableFallback;
|
|
1153
1164
|
}): Promise<TGetXcmFeeResult<TDisableFallback>>;
|
|
1154
1165
|
/**
|
|
@@ -1156,67 +1167,44 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TSendBaseOpt
|
|
|
1156
1167
|
*
|
|
1157
1168
|
* @returns An origin fee.
|
|
1158
1169
|
*/
|
|
1159
|
-
getOriginXcmFee(this: GeneralBuilder<TApi, TRes, TSigner,
|
|
1170
|
+
getOriginXcmFee(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner>>, { disableFallback }?: TGetXcmFeeBuilderOptions): Promise<TXcmFeeDetail & {
|
|
1160
1171
|
forwardedXcms?: unknown;
|
|
1161
1172
|
destParaId?: number;
|
|
1162
1173
|
}>;
|
|
1163
|
-
/**
|
|
1164
|
-
* Estimates the origin and destination XCM fee using the `paymentInfo` function.
|
|
1165
|
-
*
|
|
1166
|
-
* @deprecated This function is deprecated and will be removed in a future version.
|
|
1167
|
-
* Please use `builder.getXcmFee()` instead, where `builder` is an instance of `Builder()`.
|
|
1168
|
-
* Will be removed in v13.
|
|
1169
|
-
* For more details, see the documentation:
|
|
1170
|
-
* {@link https://paraspell.github.io/docs/sdk/xcmPallet.html#xcm-fee-origin-and-dest}
|
|
1171
|
-
*
|
|
1172
|
-
* @returns An origin and destination fee estimate.
|
|
1173
|
-
*/
|
|
1174
|
-
getXcmFeeEstimate(this: GeneralBuilder<TApi, TRes, TSigner, TSendBaseOptionsWithSenderAddress<TApi, TRes, TSigner>>): Promise<TGetXcmFeeEstimateResult>;
|
|
1175
|
-
/**
|
|
1176
|
-
* Estimates the origin XCM fee using paymentInfo function.
|
|
1177
|
-
*
|
|
1178
|
-
* @deprecated This function is deprecated and will be removed in a future version.
|
|
1179
|
-
* Please use `builder.getOriginXcmFee()` instead, where `builder` is an instance of `Builder()`.
|
|
1180
|
-
* Will be removed in v13.
|
|
1181
|
-
* For more details, see the documentation:
|
|
1182
|
-
* {@link https://paraspell.github.io/docs/sdk/xcmPallet.html#xcm-fee-origin-and-dest}
|
|
1183
|
-
*
|
|
1184
|
-
* @returns An origin fee estimate.
|
|
1185
|
-
*/
|
|
1186
|
-
getOriginXcmFeeEstimate(this: GeneralBuilder<TApi, TRes, TSigner, TSendBaseOptionsWithSenderAddress<TApi, TRes, TSigner>>): Promise<TGetXcmFeeEstimateDetail>;
|
|
1187
1174
|
/**
|
|
1188
1175
|
* Returns the max transferable amount for the transfer
|
|
1189
1176
|
*
|
|
1190
1177
|
* @returns The max transferable amount.
|
|
1191
1178
|
*/
|
|
1192
|
-
getTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner,
|
|
1179
|
+
getTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner>>): Promise<bigint>;
|
|
1193
1180
|
/**
|
|
1194
1181
|
* Returns the min transferable amount for the transfer
|
|
1195
1182
|
*
|
|
1196
1183
|
* @returns The min transferable amount.
|
|
1197
1184
|
*/
|
|
1198
|
-
getMinTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner,
|
|
1185
|
+
getMinTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner>>): Promise<bigint>;
|
|
1199
1186
|
/**
|
|
1200
1187
|
* Returns the max transferable amount for the transfer
|
|
1201
1188
|
*
|
|
1202
1189
|
* @returns The max transferable amount.
|
|
1203
1190
|
*/
|
|
1204
|
-
verifyEdOnDestination(this: GeneralBuilder<TApi, TRes, TSigner,
|
|
1191
|
+
verifyEdOnDestination(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner>>): Promise<boolean>;
|
|
1205
1192
|
/**
|
|
1206
1193
|
* Returns the transfer info for the transfer
|
|
1207
1194
|
*
|
|
1208
1195
|
* @returns The transfer info.
|
|
1209
1196
|
*/
|
|
1210
|
-
getTransferInfo(this: GeneralBuilder<TApi, TRes, TSigner,
|
|
1197
|
+
getTransferInfo(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner>>): Promise<TTransferInfo>;
|
|
1211
1198
|
/**
|
|
1212
1199
|
* Returns the receivable amount on the destination after the transfer
|
|
1213
1200
|
*
|
|
1214
1201
|
* @returns The computed receivable amount.
|
|
1215
1202
|
* @throws \{UnableToComputeError\} Thrown when the receivable amount cannot be determined.
|
|
1216
1203
|
*/
|
|
1217
|
-
getReceivableAmount(this: GeneralBuilder<TApi, TRes, TSigner,
|
|
1218
|
-
getBestAmountOut(this: GeneralBuilder<TApi, TRes, TSigner,
|
|
1219
|
-
signAndSubmit(this: GeneralBuilder<TApi, TRes, TSigner,
|
|
1204
|
+
getReceivableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner>>): Promise<bigint>;
|
|
1205
|
+
getBestAmountOut(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSwap<TApi, TRes, TSigner>>): Promise<_paraspell_swap.TGetBestAmountOutResult>;
|
|
1206
|
+
signAndSubmit(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>>): Promise<string>;
|
|
1207
|
+
signAndSubmitAll(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>>): Promise<string[]>;
|
|
1220
1208
|
/**
|
|
1221
1209
|
* Returns the API instance used by the builder.
|
|
1222
1210
|
*
|
|
@@ -1236,7 +1224,7 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TSendBaseOpt
|
|
|
1236
1224
|
* @param api - The API instance to use for building transactions. If not provided, a new instance will be created.
|
|
1237
1225
|
* @returns A new Builder instance.
|
|
1238
1226
|
*/
|
|
1239
|
-
declare const Builder: <TApi, TRes, TSigner>(api:
|
|
1227
|
+
declare const Builder: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>) => GeneralBuilder<TApi, TRes, TSigner, object>;
|
|
1240
1228
|
|
|
1241
1229
|
type TSwapConfig = {
|
|
1242
1230
|
currencyTo: TCurrencyCore;
|
|
@@ -1246,8 +1234,7 @@ type TDryRunBaseOptions<TRes> = {
|
|
|
1246
1234
|
tx: TRes;
|
|
1247
1235
|
origin: TSubstrateChain$1;
|
|
1248
1236
|
destination: TChain$1;
|
|
1249
|
-
|
|
1250
|
-
address: string;
|
|
1237
|
+
sender: string;
|
|
1251
1238
|
currency: TCurrencyInputWithAmount;
|
|
1252
1239
|
version?: Version;
|
|
1253
1240
|
feeAsset?: TCurrencyInput$1;
|
|
@@ -1270,7 +1257,7 @@ type TDryRunCallBaseOptions<TRes> = {
|
|
|
1270
1257
|
*/
|
|
1271
1258
|
destination: TDestination;
|
|
1272
1259
|
/**
|
|
1273
|
-
* The address to dry-run with
|
|
1260
|
+
* The address to dry-run with
|
|
1274
1261
|
*/
|
|
1275
1262
|
address: string;
|
|
1276
1263
|
/**
|
|
@@ -1330,8 +1317,6 @@ type TDryRunChainResult = TDryRunChainSuccess | TDryRunChainFailure;
|
|
|
1330
1317
|
type THopInfo = {
|
|
1331
1318
|
chain: TChain$1;
|
|
1332
1319
|
result: TDryRunChainResult;
|
|
1333
|
-
/** @deprecated Use `result.isExchange` instead. Will be removed in v13. */
|
|
1334
|
-
isExchange?: boolean;
|
|
1335
1320
|
};
|
|
1336
1321
|
type TChainEndpoint = 'origin' | 'destination' | TChain$1;
|
|
1337
1322
|
type TDryRunResult = {
|
|
@@ -1343,7 +1328,7 @@ type TDryRunResult = {
|
|
|
1343
1328
|
hops: THopInfo[];
|
|
1344
1329
|
};
|
|
1345
1330
|
type TResolveHopParams<TApi, TRes, TSigner> = {
|
|
1346
|
-
api:
|
|
1331
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
1347
1332
|
tx: TRes;
|
|
1348
1333
|
originChain: TSubstrateChain$1;
|
|
1349
1334
|
currentChain: TSubstrateChain$1;
|
|
@@ -1354,7 +1339,7 @@ type TResolveHopParams<TApi, TRes, TSigner> = {
|
|
|
1354
1339
|
hasPassedExchange: boolean;
|
|
1355
1340
|
};
|
|
1356
1341
|
type HopProcessParams<TApi, TRes, TSigner> = {
|
|
1357
|
-
api:
|
|
1342
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
1358
1343
|
currentChain: TSubstrateChain$1;
|
|
1359
1344
|
currentOrigin: TSubstrateChain$1;
|
|
1360
1345
|
currentAsset: TAssetInfo;
|
|
@@ -1363,7 +1348,7 @@ type HopProcessParams<TApi, TRes, TSigner> = {
|
|
|
1363
1348
|
isDestination: boolean;
|
|
1364
1349
|
};
|
|
1365
1350
|
type HopTraversalConfig<TApi, TRes, TSigner, THopResult> = {
|
|
1366
|
-
api:
|
|
1351
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
1367
1352
|
origin: TSubstrateChain$1;
|
|
1368
1353
|
destination: TChain$1;
|
|
1369
1354
|
currency: TCurrencyCore;
|
|
@@ -1514,8 +1499,8 @@ type TGetXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolean> = {
|
|
|
1514
1499
|
/**
|
|
1515
1500
|
* The sender address
|
|
1516
1501
|
*/
|
|
1517
|
-
|
|
1518
|
-
|
|
1502
|
+
sender: string;
|
|
1503
|
+
recipient: string;
|
|
1519
1504
|
currency: WithAmount<TCurrencyCore>;
|
|
1520
1505
|
version?: Version;
|
|
1521
1506
|
feeAsset?: TCurrencyInput$1;
|
|
@@ -1528,8 +1513,6 @@ type TGetXcmFeeInternalOptions<TApi, TRes, TSigner, TDisableFallback extends boo
|
|
|
1528
1513
|
tx: TRes;
|
|
1529
1514
|
useRootOrigin: boolean;
|
|
1530
1515
|
};
|
|
1531
|
-
type TGetXcmFeeEstimateOptions<TApi, TRes, TSigner> = Omit<TGetXcmFeeInternalOptions<TApi, TRes, TSigner>, 'disableFallback' | 'useRootOrigin' | 'buildTx' | 'version'>;
|
|
1532
|
-
type TGetOriginXcmFeeEstimateOptions<TApi, TRes, TSigner> = Omit<TGetXcmFeeInternalOptions<TApi, TRes, TSigner>, 'disableFallback' | 'address' | 'useRootOrigin' | 'buildTx' | 'version'>;
|
|
1533
1516
|
type TGetXcmFeeBuilderOptions = {
|
|
1534
1517
|
disableFallback: boolean;
|
|
1535
1518
|
};
|
|
@@ -1537,7 +1520,7 @@ type TGetOriginXcmFeeBaseOptions<TRes> = {
|
|
|
1537
1520
|
buildTx: TTxFactory<TRes>;
|
|
1538
1521
|
origin: TSubstrateChain$1;
|
|
1539
1522
|
destination: TChain$1;
|
|
1540
|
-
|
|
1523
|
+
sender: string;
|
|
1541
1524
|
currency: WithAmount<TCurrencyCore>;
|
|
1542
1525
|
version?: Version;
|
|
1543
1526
|
feeAsset?: TCurrencyInput$1;
|
|
@@ -1552,8 +1535,8 @@ type TGetFeeForDestChainBaseOptions<TRes> = {
|
|
|
1552
1535
|
prevChain: TSubstrateChain$1;
|
|
1553
1536
|
origin: TSubstrateChain$1;
|
|
1554
1537
|
destination: TChain$1;
|
|
1555
|
-
|
|
1556
|
-
|
|
1538
|
+
sender: string;
|
|
1539
|
+
recipient: string;
|
|
1557
1540
|
currency: WithAmount<TCurrencyCore>;
|
|
1558
1541
|
forwardedXcms: any;
|
|
1559
1542
|
tx: TRes;
|
|
@@ -1609,14 +1592,10 @@ type TDestXcmFeeDetail<TDisableFallback extends boolean> = TConditionalXcmFeeDet
|
|
|
1609
1592
|
type TConditionalXcmFeeHopInfo<TDisableFallback extends boolean> = {
|
|
1610
1593
|
chain: TChain$1;
|
|
1611
1594
|
result: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
1612
|
-
/** @deprecated - Use `result.isExchange` instead. Will be removed in v13. */
|
|
1613
|
-
isExchange?: boolean;
|
|
1614
1595
|
};
|
|
1615
1596
|
type TXcmFeeHopInfo = {
|
|
1616
1597
|
chain: TChain$1;
|
|
1617
1598
|
result: TXcmFeeDetail;
|
|
1618
|
-
/** @deprecated - Use `result.isExchange` instead. Will be removed in v13. */
|
|
1619
|
-
isExchange?: boolean;
|
|
1620
1599
|
};
|
|
1621
1600
|
type TGetXcmFeeResult<TDisableFallback extends boolean = boolean> = {
|
|
1622
1601
|
failureReason?: string;
|
|
@@ -1625,15 +1604,6 @@ type TGetXcmFeeResult<TDisableFallback extends boolean = boolean> = {
|
|
|
1625
1604
|
destination: TConditionalXcmFeeDetail<TDisableFallback>;
|
|
1626
1605
|
hops: TConditionalXcmFeeHopInfo<TDisableFallback>[];
|
|
1627
1606
|
};
|
|
1628
|
-
type TGetXcmFeeEstimateDetail = {
|
|
1629
|
-
fee: bigint;
|
|
1630
|
-
asset: TAssetInfo;
|
|
1631
|
-
sufficient?: boolean;
|
|
1632
|
-
};
|
|
1633
|
-
type TGetXcmFeeEstimateResult = {
|
|
1634
|
-
origin: TGetXcmFeeEstimateDetail;
|
|
1635
|
-
destination: TGetXcmFeeEstimateDetail;
|
|
1636
|
-
};
|
|
1637
1607
|
type TPaymentInfo = {
|
|
1638
1608
|
partialFee: bigint;
|
|
1639
1609
|
weight: TWeight;
|
|
@@ -1673,7 +1643,7 @@ type TGetTransferableAmountOptionsBase<TRes> = {
|
|
|
1673
1643
|
/**
|
|
1674
1644
|
* The sender address of the account.
|
|
1675
1645
|
*/
|
|
1676
|
-
|
|
1646
|
+
sender: string;
|
|
1677
1647
|
/**
|
|
1678
1648
|
* The chain on which to query the balance.
|
|
1679
1649
|
*/
|
|
@@ -1692,8 +1662,8 @@ type TGetTransferableAmountOptionsBase<TRes> = {
|
|
|
1692
1662
|
};
|
|
1693
1663
|
type TGetTransferableAmountOptions<TApi, TRes, TSigner> = WithApi<TGetTransferableAmountOptionsBase<TRes>, TApi, TRes, TSigner>;
|
|
1694
1664
|
type TGetMinTransferableAmountOptions<TApi, TRes, TSigner> = WithApi<TGetTransferableAmountOptionsBase<TRes> & {
|
|
1695
|
-
|
|
1696
|
-
builder: GeneralBuilder<TApi, TRes, TSigner,
|
|
1665
|
+
recipient: string;
|
|
1666
|
+
builder: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner>>;
|
|
1697
1667
|
}, TApi, TRes, TSigner>;
|
|
1698
1668
|
type TVerifyEdOnDestinationOptionsBase<TRes> = {
|
|
1699
1669
|
/**
|
|
@@ -1707,11 +1677,11 @@ type TVerifyEdOnDestinationOptionsBase<TRes> = {
|
|
|
1707
1677
|
/**
|
|
1708
1678
|
* The address of the account.
|
|
1709
1679
|
*/
|
|
1710
|
-
|
|
1680
|
+
recipient: string;
|
|
1711
1681
|
/**
|
|
1712
1682
|
* The account of the sender.
|
|
1713
1683
|
*/
|
|
1714
|
-
|
|
1684
|
+
sender: string;
|
|
1715
1685
|
/**
|
|
1716
1686
|
* The currency to query.
|
|
1717
1687
|
*/
|
|
@@ -1742,7 +1712,7 @@ type TEvmBuilderOptionsBase = {
|
|
|
1742
1712
|
/**
|
|
1743
1713
|
* The Polkadot destination address.
|
|
1744
1714
|
*/
|
|
1745
|
-
|
|
1715
|
+
recipient: string;
|
|
1746
1716
|
/**
|
|
1747
1717
|
* The AssetHub address
|
|
1748
1718
|
*/
|
|
@@ -1797,22 +1767,22 @@ type TBuilderConfig<TApi> = Partial<{
|
|
|
1797
1767
|
abstractDecimals: boolean;
|
|
1798
1768
|
xcmFormatCheck: boolean;
|
|
1799
1769
|
}>;
|
|
1800
|
-
type TCreateTxsOptions<TApi, TRes, TSigner> = Pick<
|
|
1801
|
-
type
|
|
1802
|
-
builder: GeneralBuilder<TApi, TRes, TSigner,
|
|
1770
|
+
type TCreateTxsOptions<TApi, TRes, TSigner> = Pick<TTransferOptions<TApi, TRes, TSigner>, 'api' | 'from' | 'to' | 'currency'>;
|
|
1771
|
+
type TBatchedTransferOptions<TApi, TRes, TSigner> = Omit<TTransferOptions<TApi, TRes, TSigner>, 'isAmountAll'> & {
|
|
1772
|
+
builder: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptions<TApi, TRes, TSigner>>;
|
|
1803
1773
|
};
|
|
1804
|
-
type TBuildInternalResBase<TApi, TRes, TSigner, TOptions extends
|
|
1805
|
-
options:
|
|
1774
|
+
type TBuildInternalResBase<TApi, TRes, TSigner, TOptions extends TTransferBaseOptions<TApi, TRes, TSigner> = TTransferBaseOptions<TApi, TRes, TSigner>> = {
|
|
1775
|
+
options: TTransferOptions<TApi, TRes, TSigner> & TOptions;
|
|
1806
1776
|
};
|
|
1807
|
-
type TBuildInternalRes<TApi, TRes, TSigner, TOptions extends
|
|
1777
|
+
type TBuildInternalRes<TApi, TRes, TSigner, TOptions extends TTransferBaseOptions<TApi, TRes, TSigner> = TTransferBaseOptions<TApi, TRes, TSigner>> = TBuildInternalResBase<TApi, TRes, TSigner, TOptions> & {
|
|
1808
1778
|
tx: TRes;
|
|
1809
1779
|
};
|
|
1810
|
-
type TBuildAllInternalRes<TApi, TRes, TSigner, TOptions extends
|
|
1780
|
+
type TBuildAllInternalRes<TApi, TRes, TSigner, TOptions extends TTransferBaseOptions<TApi, TRes, TSigner> = TTransferBaseOptions<TApi, TRes, TSigner>> = TBuildInternalResBase<TApi, TRes, TSigner, TOptions> & {
|
|
1811
1781
|
txContexts: TTransactionContext<TApi, TRes>[];
|
|
1812
1782
|
};
|
|
1813
1783
|
type TSender<TSigner> = string | TSigner;
|
|
1814
1784
|
type TBuilderInternalOptions<TSigner> = {
|
|
1815
|
-
|
|
1785
|
+
senderSource?: TSender<TSigner>;
|
|
1816
1786
|
};
|
|
1817
1787
|
|
|
1818
1788
|
type TProviderEntry = {
|
|
@@ -1877,6 +1847,13 @@ declare class AmountTooLowError extends Error {
|
|
|
1877
1847
|
constructor(message?: string);
|
|
1878
1848
|
}
|
|
1879
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
|
+
|
|
1880
1857
|
/**
|
|
1881
1858
|
* Error thrown when a batch operation is invalid or cannot be executed.
|
|
1882
1859
|
*/
|
|
@@ -2020,6 +1997,18 @@ declare class ScenarioNotSupportedError extends Error {
|
|
|
2020
1997
|
constructor({ chain, scenario }: TScenarioNotSupportedContext);
|
|
2021
1998
|
}
|
|
2022
1999
|
|
|
2000
|
+
/**
|
|
2001
|
+
* Error thrown when a submitted transaction encounters a dispatch error on-chain.
|
|
2002
|
+
*/
|
|
2003
|
+
declare class SubmitTransactionError extends Error {
|
|
2004
|
+
/**
|
|
2005
|
+
* Constructs a new SubmitTransactionError.
|
|
2006
|
+
*
|
|
2007
|
+
* @param message - The dispatch error details.
|
|
2008
|
+
*/
|
|
2009
|
+
constructor(message: string);
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2023
2012
|
declare class TransferToAhNotSupported extends Error {
|
|
2024
2013
|
constructor(message?: string);
|
|
2025
2014
|
}
|
|
@@ -2099,20 +2088,20 @@ type TTransferInfo = {
|
|
|
2099
2088
|
};
|
|
2100
2089
|
};
|
|
2101
2090
|
type BuildHopInfoOptions<TApi, TRes, TSigner> = {
|
|
2102
|
-
api:
|
|
2091
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
2103
2092
|
chain: TSubstrateChain$1;
|
|
2104
2093
|
fee: bigint;
|
|
2105
2094
|
originChain: TSubstrateChain$1;
|
|
2106
2095
|
currency: TCurrencyCore;
|
|
2107
2096
|
asset: TAssetInfo;
|
|
2108
|
-
|
|
2097
|
+
sender: string;
|
|
2109
2098
|
ahAddress?: string;
|
|
2110
2099
|
};
|
|
2111
2100
|
type TBuildDestInfoOptions<TApi, TRes, TSigner> = {
|
|
2112
|
-
api:
|
|
2101
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
2113
2102
|
origin: TSubstrateChain$1;
|
|
2114
2103
|
destination: TChain$1;
|
|
2115
|
-
|
|
2104
|
+
recipient: string;
|
|
2116
2105
|
currency: WithAmount<TCurrencyCore>;
|
|
2117
2106
|
originFee: bigint;
|
|
2118
2107
|
isFeeAssetAh: boolean;
|
|
@@ -2128,9 +2117,9 @@ type TGetTransferInfoOptionsBase<TRes> = {
|
|
|
2128
2117
|
buildTx: TTxFactory<TRes>;
|
|
2129
2118
|
origin: TSubstrateChain$1;
|
|
2130
2119
|
destination: TChain$1;
|
|
2131
|
-
|
|
2120
|
+
sender: string;
|
|
2132
2121
|
ahAddress?: string;
|
|
2133
|
-
|
|
2122
|
+
recipient: string;
|
|
2134
2123
|
currency: WithAmount<TCurrencyCore>;
|
|
2135
2124
|
version: Version | undefined;
|
|
2136
2125
|
feeAsset?: TCurrencyCore;
|
|
@@ -2138,7 +2127,7 @@ type TGetTransferInfoOptionsBase<TRes> = {
|
|
|
2138
2127
|
type TGetTransferInfoOptions<TApi, TRes, TSigner> = WithApi<TGetTransferInfoOptionsBase<TRes>, TApi, TRes, TSigner>;
|
|
2139
2128
|
|
|
2140
2129
|
type TChainWithApi<TApi, TRes, TSigner, T = TSubstrateChain$1> = {
|
|
2141
|
-
api:
|
|
2130
|
+
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
2142
2131
|
chain: T;
|
|
2143
2132
|
};
|
|
2144
2133
|
type TTypeAndThenCallContext<TApi, TRes, TSigner> = {
|
|
@@ -2175,7 +2164,7 @@ declare const blake2b256: (msg: Uint8Array) => Uint8Array<ArrayBufferLike>;
|
|
|
2175
2164
|
declare const blake2b512: (msg: Uint8Array) => Uint8Array<ArrayBufferLike>;
|
|
2176
2165
|
declare const deriveAccountId: (raw: Uint8Array) => Uint8Array;
|
|
2177
2166
|
declare const encodeSs58: (payload: Uint8Array, network: number) => string;
|
|
2178
|
-
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;
|
|
2179
2168
|
|
|
2180
2169
|
declare const getAssetBalanceInternal: <TApi, TRes, TSigner>({ api, address, chain, asset }: TGetAssetBalanceOptions<TApi, TRes, TSigner>) => Promise<bigint>;
|
|
2181
2170
|
declare const getBalanceInternal: <TApi, TRes, TSigner>(options: TGetBalanceOptions<TApi, TRes, TSigner>) => Promise<bigint>;
|
|
@@ -2205,9 +2194,12 @@ declare const getParaId: (chain: TChain$1) => number;
|
|
|
2205
2194
|
*/
|
|
2206
2195
|
declare const getTChain: (paraId: number, ecosystem: TRelaychain | TExternalChain) => TChain$1 | null;
|
|
2207
2196
|
|
|
2197
|
+
/**
|
|
2198
|
+
* @deprecated Asset claim functionality is deprecated and will be removed in v14.
|
|
2199
|
+
*/
|
|
2208
2200
|
declare const claimAssets: <TApi, TRes, TSigner>(options: TAssetClaimOptions<TApi, TRes, TSigner>) => Promise<TRes>;
|
|
2209
2201
|
|
|
2210
|
-
declare const resolveTransferParams: <TApi, TRes, TSigner>(options:
|
|
2202
|
+
declare const resolveTransferParams: <TApi, TRes, TSigner>(options: TTransferOptions<TApi, TRes, TSigner>) => {
|
|
2211
2203
|
resolvedFeeAsset: TAssetInfo | undefined;
|
|
2212
2204
|
resolvedVersion: _paraspell_sdk_common.Version;
|
|
2213
2205
|
overriddenAsset: _paraspell_sdk_common.TLocation | _paraspell_assets.TAssetWithFee[] | undefined;
|
|
@@ -2223,7 +2215,7 @@ declare const resolveTransferParams: <TApi, TRes, TSigner>(options: TSendOptions
|
|
|
2223
2215
|
alias?: string;
|
|
2224
2216
|
};
|
|
2225
2217
|
};
|
|
2226
|
-
declare const createTransfer: <TApi, TRes, TSigner>(options:
|
|
2218
|
+
declare const createTransfer: <TApi, TRes, TSigner>(options: TTransferOptions<TApi, TRes, TSigner>) => Promise<TRes>;
|
|
2227
2219
|
|
|
2228
2220
|
declare const dryRun: <TApi, TRes, TSigner>(options: TDryRunOptions<TApi, TRes, TSigner>) => Promise<TDryRunResult>;
|
|
2229
2221
|
|
|
@@ -2236,32 +2228,23 @@ declare const getFailureInfo: (result: TDryRunResult) => Pick<TDryRunResult, "fa
|
|
|
2236
2228
|
declare const traverseXcmHops: <TApi, TRes, TSigner, THopResult>(config: HopTraversalConfig<TApi, TRes, TSigner, THopResult>) => Promise<HopTraversalResult<THopResult>>;
|
|
2237
2229
|
declare const addEthereumBridgeFees: <TApi, TRes, TSigner, TResult extends {
|
|
2238
2230
|
fee?: bigint;
|
|
2239
|
-
}>(api:
|
|
2231
|
+
}>(api: PolkadotApi<TApi, TRes, TSigner>, bridgeHubResult: TResult | undefined, destination: TChain$1, assetHubChain: TSubstrateChain$1) => Promise<TResult | undefined>;
|
|
2240
2232
|
|
|
2241
2233
|
declare const calcPreviewMintAmount: (balance: bigint, desired: bigint) => bigint | null;
|
|
2242
2234
|
declare const wrapTxBypass: <TApi, TRes, TSigner>(dryRunOptions: TDryRunBypassOptions<TApi, TRes, TSigner>, options?: TBypassOptions) => Promise<TRes>;
|
|
2243
2235
|
|
|
2244
|
-
declare const getParaEthTransferFees: <TApi, TRes, TSigner>(ahApi:
|
|
2236
|
+
declare const getParaEthTransferFees: <TApi, TRes, TSigner>(ahApi: PolkadotApi<TApi, TRes, TSigner>, shouldDisconnect?: boolean) => Promise<[bigint, bigint]>;
|
|
2245
2237
|
|
|
2246
2238
|
declare const transferMoonbeamEvm: <TApi, TRes, TSigner>(options: TEvmBuilderOptions<TApi, TRes, TSigner>) => Promise<string>;
|
|
2247
2239
|
|
|
2248
|
-
declare const transferMoonbeamToEth: <TApi, TRes, TSigner>(from: TSubstrateChain$1, { api, to, signer,
|
|
2240
|
+
declare const transferMoonbeamToEth: <TApi, TRes, TSigner>(from: TSubstrateChain$1, { api, to, signer, recipient, ahAddress, currency }: TEvmBuilderOptions<TApi, TRes, TSigner>) => Promise<`0x${string}`>;
|
|
2249
2241
|
|
|
2250
2242
|
declare const getOriginXcmFee: <TApi, TRes, TSigner>(options: TGetOriginXcmFeeOptions<TApi, TRes, TSigner>) => Promise<TXcmFeeDetail & {
|
|
2251
2243
|
forwardedXcms?: unknown;
|
|
2252
2244
|
destParaId?: number;
|
|
2253
2245
|
}>;
|
|
2254
2246
|
|
|
2255
|
-
|
|
2256
|
-
* @deprecated This function is deprecated and will be removed in a future version.
|
|
2257
|
-
* Please use `builder.getOriginXcmFee()` instead, where `builder` is an instance of `Builder()`.
|
|
2258
|
-
* Will be removed in v13.
|
|
2259
|
-
* For more details, see the documentation:
|
|
2260
|
-
* {@link https://paraspell.github.io/docs/sdk/xcmPallet.html#xcm-fee-origin-and-dest}
|
|
2261
|
-
*/
|
|
2262
|
-
declare const getOriginXcmFeeEstimate: <TApi, TRes, TSigner>({ api, tx, origin, destination, currency, senderAddress, feeAsset }: TGetOriginXcmFeeEstimateOptions<TApi, TRes, TSigner>) => Promise<TGetXcmFeeEstimateDetail>;
|
|
2263
|
-
|
|
2264
|
-
declare const getOriginXcmFeeInternal: <TApi, TRes, TSigner>({ api, tx, origin, destination, senderAddress, disableFallback, feeAsset, currency, version, useRootOrigin }: TGetOriginXcmFeeInternalOptions<TApi, TRes, TSigner>) => Promise<TXcmFeeDetail & {
|
|
2247
|
+
declare const getOriginXcmFeeInternal: <TApi, TRes, TSigner>({ api, tx, origin, destination, sender, disableFallback, feeAsset, currency, version, useRootOrigin }: TGetOriginXcmFeeInternalOptions<TApi, TRes, TSigner>) => Promise<TXcmFeeDetail & {
|
|
2265
2248
|
forwardedXcms?: any;
|
|
2266
2249
|
destParaId?: number;
|
|
2267
2250
|
}>;
|
|
@@ -2269,25 +2252,16 @@ declare const getOriginXcmFeeInternal: <TApi, TRes, TSigner>({ api, tx, origin,
|
|
|
2269
2252
|
declare const getXcmFeeInternal: <TApi, TRes, TSigner, TDisableFallback extends boolean>(options: TGetXcmFeeOptions<TApi, TRes, TSigner, TDisableFallback>) => Promise<TGetXcmFeeResult<TDisableFallback>>;
|
|
2270
2253
|
declare const getXcmFee: <TApi, TRes, TSigner, TDisableFallback extends boolean>(options: TGetXcmFeeOptions<TApi, TRes, TSigner, TDisableFallback>) => Promise<TGetXcmFeeResult<TDisableFallback>>;
|
|
2271
2254
|
|
|
2272
|
-
|
|
2273
|
-
* @deprecated This function is deprecated and will be removed in a future version.
|
|
2274
|
-
* Please use `builder.getXcmFee()` instead, where `builder` is an instance of `Builder()`.
|
|
2275
|
-
* Will be removed in v13.
|
|
2276
|
-
* For more details, see the documentation:
|
|
2277
|
-
* {@link https://paraspell.github.io/docs/sdk/xcmPallet.html#xcm-fee-origin-and-dest}
|
|
2278
|
-
*/
|
|
2279
|
-
declare const getXcmFeeEstimate: <TApi, TRes, TSigner>(options: TGetXcmFeeEstimateOptions<TApi, TRes, TSigner>) => Promise<TGetXcmFeeEstimateResult>;
|
|
2280
|
-
|
|
2281
|
-
declare const getXcmFeeOnce: <TApi, TRes, TSigner, TDisableFallback extends boolean>({ api, tx, origin, destination, senderAddress, address, currency, feeAsset, version, disableFallback, swapConfig, useRootOrigin, skipReverseFeeCalculation }: TGetXcmFeeInternalOptions<TApi, TRes, TSigner, TDisableFallback>) => Promise<TGetXcmFeeResult<TDisableFallback>>;
|
|
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>>;
|
|
2282
2256
|
|
|
2283
|
-
declare const getBridgeStatus: <TApi, TRes, TSigner>(api:
|
|
2257
|
+
declare const getBridgeStatus: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>) => Promise<TBridgeStatus>;
|
|
2284
2258
|
|
|
2285
|
-
declare const getTransferInfo: <TApi, TRes, TSigner>({ api, buildTx, origin, destination,
|
|
2259
|
+
declare const getTransferInfo: <TApi, TRes, TSigner>({ api, buildTx, origin, destination, sender, ahAddress, recipient, currency, feeAsset, version }: TGetTransferInfoOptions<TApi, TRes, TSigner>) => Promise<TTransferInfo>;
|
|
2286
2260
|
|
|
2287
|
-
declare const getMinTransferableAmountInternal: <TApi, TRes, TSigner>({ api, origin,
|
|
2261
|
+
declare const getMinTransferableAmountInternal: <TApi, TRes, TSigner>({ api, origin, sender, recipient, origin: chain, destination, currency, feeAsset, buildTx, builder, version }: TGetMinTransferableAmountOptions<TApi, TRes, TSigner>) => Promise<bigint>;
|
|
2288
2262
|
declare const getMinTransferableAmount: <TApi, TRes, TSigner>(options: TGetMinTransferableAmountOptions<TApi, TRes, TSigner>) => Promise<bigint>;
|
|
2289
2263
|
|
|
2290
|
-
declare const getTransferableAmountInternal: <TApi, TRes, TSigner>({ api,
|
|
2264
|
+
declare const getTransferableAmountInternal: <TApi, TRes, TSigner>({ api, sender, origin: chain, destination, currency, buildTx, feeAsset, version }: TGetTransferableAmountOptions<TApi, TRes, TSigner>) => Promise<bigint>;
|
|
2291
2265
|
declare const getTransferableAmount: <TApi, TRes, TSigner>(options: TGetTransferableAmountOptions<TApi, TRes, TSigner>) => Promise<bigint>;
|
|
2292
2266
|
|
|
2293
2267
|
declare const constructTypeAndThenCall: <TApi, TRes, TSigner>(context: TTypeAndThenCallContext<TApi, TRes, TSigner>, fees?: TTypeAndThenFees | null) => Promise<TSerializedExtrinsics>;
|
|
@@ -2306,21 +2280,21 @@ declare const createTypeThenAutoReserve: <TApi, TRes, TSigner>(chain: TSubstrate
|
|
|
2306
2280
|
declare const validateCurrency: (currency: TCurrencyInput$1, feeAsset?: TCurrencyInput$1) => void;
|
|
2307
2281
|
declare const validateDestination: (origin: TSubstrateChain$1, destination: TDestination) => void;
|
|
2308
2282
|
declare const validateAssetSpecifiers: (assetCheckEnabled: boolean, currency: TCurrencyInput$1) => void;
|
|
2309
|
-
declare const validateTransact: <TApi, TRes, TSigner>({ api, from, to,
|
|
2283
|
+
declare const validateTransact: <TApi, TRes, TSigner>({ api, from, to, sender, recipient: address, transactOptions }: TTransferOptions<TApi, TRes, TSigner>) => ValidationError | undefined;
|
|
2310
2284
|
|
|
2311
2285
|
declare const verifyEdOnDestination: <TApi, TRes, TSigner>(options: TVerifyEdOnDestinationOptions<TApi, TRes, TSigner>) => Promise<boolean>;
|
|
2312
2286
|
|
|
2313
|
-
declare const compareAddresses: <TApi, TRes, TSigner>(api:
|
|
2287
|
+
declare const compareAddresses: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, addr1: string, addr2: string) => boolean;
|
|
2314
2288
|
|
|
2315
|
-
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;
|
|
2316
2290
|
|
|
2317
|
-
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;
|
|
2318
2292
|
|
|
2319
2293
|
declare const assertToIsString: (to: TDestination, overrideMsg?: string) => asserts to is Exclude<TDestination, TLocation>;
|
|
2320
2294
|
declare const assertAddressIsString: (address: TAddress) => asserts address is Exclude<TAddress, TLocation>;
|
|
2321
|
-
declare const
|
|
2295
|
+
declare const assertSender: (address: string | undefined) => asserts address is string;
|
|
2322
2296
|
declare const assertHasId: (asset: TAssetInfo) => asserts asset is TAssetInfoWithId;
|
|
2323
|
-
declare const
|
|
2297
|
+
declare const assertSenderSource: <TSigner>(sender?: TSender<TSigner>) => asserts sender is TSender<TSigner>;
|
|
2324
2298
|
declare const isSenderSigner: <TSigner>(sender: TSender<TSigner>) => sender is TSigner;
|
|
2325
2299
|
declare const assertSwapSupport: <TApi, TRes, TSigner>(options: TSwapOptions<TApi, TRes, TSigner> | undefined) => void;
|
|
2326
2300
|
|
|
@@ -2338,10 +2312,10 @@ declare const maybeOverrideAsset: (version: Version, amount: bigint, asset: TAss
|
|
|
2338
2312
|
declare const sortAssets: (assets: TAsset[]) => TAsset[];
|
|
2339
2313
|
|
|
2340
2314
|
declare const computeOverridenAmount: <TApi, TRes, TSigner>(options: TCreateTxsOptions<TApi, TRes, TSigner>, increaseAmount: string, relative?: boolean) => number | bigint;
|
|
2341
|
-
declare const overrideTxAmount: <TApi, TRes, TSigner>(options: TCreateTxsOptions<TApi, TRes, TSigner>, builder: GeneralBuilder<TApi, TRes, TSigner,
|
|
2342
|
-
declare const createTxOverrideAmount: <TApi, TRes, TSigner>(options: TCreateTxsOptions<TApi, TRes, TSigner>, builder: GeneralBuilder<TApi, TRes, TSigner,
|
|
2343
|
-
declare const createTransferOrSwapAll: <TApi, TRes, TSigner>(options:
|
|
2344
|
-
declare const createTransferOrSwap: <TApi, TRes, TSigner>(options:
|
|
2315
|
+
declare const overrideTxAmount: <TApi, TRes, TSigner>(options: TCreateTxsOptions<TApi, TRes, TSigner>, builder: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptions<TApi, TRes, TSigner>>, amount: string, relative?: boolean) => Promise<TRes>;
|
|
2316
|
+
declare const createTxOverrideAmount: <TApi, TRes, TSigner>(options: TCreateTxsOptions<TApi, TRes, TSigner>, builder: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptions<TApi, TRes, TSigner>>, amount?: string, relative?: boolean) => Promise<TRes>;
|
|
2317
|
+
declare const createTransferOrSwapAll: <TApi, TRes, TSigner>(options: TTransferOptions<TApi, TRes, TSigner>) => Promise<TTransactionContext<TApi, TRes>[]>;
|
|
2318
|
+
declare const createTransferOrSwap: <TApi, TRes, TSigner>(options: TTransferOptions<TApi, TRes, TSigner>) => Promise<TRes>;
|
|
2345
2319
|
|
|
2346
2320
|
declare const isConfig: <TApi>(value: any) => value is TBuilderConfig<TApi>;
|
|
2347
2321
|
|
|
@@ -2357,7 +2331,7 @@ declare const getChainVersion: <TApi, TRes, TSigner>(chain: TChain$1) => Version
|
|
|
2357
2331
|
*/
|
|
2358
2332
|
declare const getRelayChainOf: (chain: TSubstrateChain$1) => TRelaychain;
|
|
2359
2333
|
|
|
2360
|
-
declare const createChainClient: <TApi, TRes, TSigner>(api:
|
|
2334
|
+
declare const createChainClient: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, chain: TSubstrateChain$1) => Promise<TApi>;
|
|
2361
2335
|
|
|
2362
2336
|
declare const resolveModuleError: (chain: TSubstrateChain$1, error: TModuleError) => TDryRunError;
|
|
2363
2337
|
|
|
@@ -2374,7 +2348,7 @@ declare const getChain: <TApi, TRes, TSigner, T extends keyof ReturnType<typeof
|
|
|
2374
2348
|
|
|
2375
2349
|
declare const getEvmPrivateKeyHex: (path: string) => "0x5fb92d6e98884f76de468fa3f6278f8807c48bebc13595d45af5bdc4da702133" | "0x8075991ce870b93a8870eca0c0f91913d12f47948ca0fd25b49c6fa7cdbeee8b" | "0x0b6e18cafb6ed99687ec547bd28139cafdd2bffe70e6b688025de6b445aa5c5b" | "0x39539ab1876910bbf3a223d84a29e28f1cb4e2e456503e7e91ed39b2e7223d68" | "0x7dce9bc8babb68fec1409be38c8e1a52650206a7ed90ff956ae8a6d15eeaaef4" | "0xb9d2ea9a615f3165812e8d44de0d24da9bbd164b65c4f0573e1ce2c8dbd9c8df" | undefined;
|
|
2376
2350
|
|
|
2377
|
-
declare const createBeneficiaryLocXTokens: <TApi, TRes, TSigner>({ api,
|
|
2351
|
+
declare const createBeneficiaryLocXTokens: <TApi, TRes, TSigner>({ api, recipient, origin, destination, version, paraId }: TCreateBeneficiaryXTokensOptions<TApi, TRes, TSigner>) => TLocation;
|
|
2378
2352
|
declare const createBeneficiaryLocation: <TApi, TRes, TSigner>({ api, address, version }: TCreateBeneficiaryOptions<TApi, TRes, TSigner>) => TLocation;
|
|
2379
2353
|
|
|
2380
2354
|
declare const createDestination: (version: Version, origin: TSubstrateChain$1, destination: TDestination, chainId?: number, junction?: TJunction, parents?: Parents) => TLocation;
|
|
@@ -2409,7 +2383,8 @@ interface TSwapExtension {
|
|
|
2409
2383
|
declare const registerSwapExtension: (extension: TSwapExtension) => void;
|
|
2410
2384
|
declare const getSwapExtensionOrThrow: () => TSwapExtension;
|
|
2411
2385
|
|
|
2412
|
-
declare const
|
|
2386
|
+
declare const convertBuilderConfig: <TApi>(config: TBuilderOptions<TApiOrUrl<TApi>> | undefined) => TBuilderConfig<TUrl> | undefined;
|
|
2387
|
+
declare const createRouterBuilder: <TApi, TRes, TSigner>(options: TTransferOptionsWithSwap<TApi, TRes, TSigner>) => _paraspell_swap.RouterBuilderCore<unknown, unknown, unknown, object & {
|
|
2413
2388
|
from: TSubstrateChain | undefined;
|
|
2414
2389
|
} & {
|
|
2415
2390
|
exchange: TExchangeInput;
|
|
@@ -2422,18 +2397,18 @@ declare const createRouterBuilder: <TApi, TRes, TSigner>(options: TSendOptionsWi
|
|
|
2422
2397
|
} & {
|
|
2423
2398
|
amount: TAmount;
|
|
2424
2399
|
} & {
|
|
2425
|
-
|
|
2400
|
+
sender: string;
|
|
2426
2401
|
} & {
|
|
2427
2402
|
evmSenderAddress: string | undefined;
|
|
2428
2403
|
} & {
|
|
2429
|
-
|
|
2404
|
+
recipient: string | undefined;
|
|
2430
2405
|
} & {
|
|
2431
2406
|
slippagePct: string;
|
|
2432
2407
|
}>;
|
|
2433
|
-
declare const executeWithRouter: <TApi, TRes, TSigner, T>(options:
|
|
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>;
|
|
2434
2409
|
declare const normalizeExchange: (exchange: TExchangeInput) => TExchangeInput;
|
|
2435
2410
|
|
|
2436
|
-
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;
|
|
2437
2412
|
declare const applyDecimalAbstraction: (amount: TAmount$1, decimals: number | undefined, shouldAbstract: boolean) => bigint;
|
|
2438
2413
|
|
|
2439
2414
|
declare const createAssetsFilter: (asset: TAsset, version: Version) => {
|
|
@@ -2477,5 +2452,5 @@ declare const selectXcmVersion: (forcedVersion: Version | undefined, originVersi
|
|
|
2477
2452
|
declare const pickCompatibleXcmVersion: (origin: TSubstrateChain$1, destination: TDestination, override?: Version) => Version;
|
|
2478
2453
|
declare const pickRouterCompatibleXcmVersion: (origin: TSubstrateChain$1 | undefined, exchangeChain: TSubstrateChain$1, destination: TChain$1 | undefined) => Version;
|
|
2479
2454
|
|
|
2480
|
-
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,
|
|
2481
|
-
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 };
|