@paraspell/sdk-core 13.7.1 → 13.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +405 -345
- package/dist/index.mjs +876 -823
- package/package.json +6 -9
package/dist/index.d.ts
CHANGED
|
@@ -2,14 +2,14 @@ import * as _paraspell_sdk_common from '@paraspell/sdk-common';
|
|
|
2
2
|
import { TSubstrateChain, TChain, Version, TRelaychain, TParachain, TLocation, TExternalChain, TJunction, Parents, TJunctions } from '@paraspell/sdk-common';
|
|
3
3
|
export * from '@paraspell/sdk-common';
|
|
4
4
|
import * as _paraspell_assets from '@paraspell/assets';
|
|
5
|
-
import { TChainAssetsInfo, TAssetInfo, TCurrencyInput, WithAmount, TAsset, TCurrencyInputWithAmount, TCustomAssetInfo, TCustomCtx, TCustomAssetsMap,
|
|
5
|
+
import { TChainAssetsInfo, TAssetInfo, TCurrencyInput, WithAmount, TAsset, TCurrencyInputWithAmount, WithComplexAmount, TCurrencyCore, TSingleCurrencyInputWithAmount, TCustomAssetInfo, TCustomCtx, TCustomAssetsMap, TSingleCurrencyInput, TAmount, TAssetWithFee, TAssetInfoWithId } from '@paraspell/assets';
|
|
6
6
|
export * from '@paraspell/assets';
|
|
7
7
|
import { TPallet, TPalletEntry, TAssetsPallet, TCustomChainPallets, TCrosschainPallet } from '@paraspell/pallets';
|
|
8
8
|
export * from '@paraspell/pallets';
|
|
9
9
|
import { WalletClient, TransactionSerializableEIP1559, Address, formatUnits as formatUnits$1, parseUnits as parseUnits$1 } from 'viem';
|
|
10
10
|
|
|
11
|
-
type WithApi<TBase, TApi, TRes, TSigner> = TBase & {
|
|
12
|
-
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
11
|
+
type WithApi<TBase, TApi, TRes, TSigner, TCustomChain extends string = never> = TBase & {
|
|
12
|
+
api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
|
|
13
13
|
};
|
|
14
14
|
type TUrl = string | string[];
|
|
15
15
|
type TApiOrUrl<TApi> = TApi | TUrl;
|
|
@@ -61,17 +61,17 @@ declare abstract class PolkadotApi<TApi, TRes, TSigner, TCustomChain extends str
|
|
|
61
61
|
getAssets(chain: TChain): TAssetInfo[];
|
|
62
62
|
getNativeAssets(chain: TChain): TAssetInfo[];
|
|
63
63
|
getOtherAssets(chain: TChain): TAssetInfo[];
|
|
64
|
-
findAssetInfo(chain: TChain, currency: TCurrencyInput, destination?: TChain | null): TAssetInfo | null;
|
|
65
|
-
findAssetInfoOrThrow(chain: TChain, currency: TCurrencyInput, destination?: TChain | null): TAssetInfo;
|
|
66
|
-
findAssetInfoOnDest(origin: TChain, destination: TChain, currency: TCurrencyInput, originAsset?: TAssetInfo | null): TAssetInfo | null;
|
|
64
|
+
findAssetInfo(chain: TChain | TCustomChain, currency: TCurrencyInput, destination?: TChain | null): TAssetInfo | null;
|
|
65
|
+
findAssetInfoOrThrow(chain: TChain | TCustomChain, currency: TCurrencyInput, destination?: TChain | null): TAssetInfo;
|
|
66
|
+
findAssetInfoOnDest(origin: TChain | TCustomChain, destination: TChain, currency: TCurrencyInput, originAsset?: TAssetInfo | null): TAssetInfo | null;
|
|
67
67
|
findAssetOnDestOrThrow(origin: TChain, destination: TChain, currency: TCurrencyInput): TAssetInfo;
|
|
68
|
-
findNativeAssetInfo(chain: TChain): TAssetInfo | null;
|
|
69
|
-
findNativeAssetInfoOrThrow(chain: TChain): TAssetInfo;
|
|
70
|
-
isChainEvm(chain: TChain): boolean;
|
|
71
|
-
getNativeAssetSymbol(chain: TChain): string;
|
|
72
|
-
getRelayChainSymbol(chain: TChain): string;
|
|
73
|
-
hasDryRunSupport(chain: TChain): boolean;
|
|
74
|
-
hasXcmPaymentApiSupport(chain: TChain): boolean;
|
|
68
|
+
findNativeAssetInfo(chain: TChain | TCustomChain): TAssetInfo | null;
|
|
69
|
+
findNativeAssetInfoOrThrow(chain: TChain | TCustomChain): TAssetInfo;
|
|
70
|
+
isChainEvm(chain: TChain | TCustomChain): boolean;
|
|
71
|
+
getNativeAssetSymbol(chain: TChain | TCustomChain): string;
|
|
72
|
+
getRelayChainSymbol(chain: TChain | TCustomChain): string;
|
|
73
|
+
hasDryRunSupport(chain: TChain | TCustomChain): boolean;
|
|
74
|
+
hasXcmPaymentApiSupport(chain: TChain | TCustomChain): boolean;
|
|
75
75
|
init(chain: TChain | TCustomChain, clientTtlMs?: number, destination?: TDestination): Promise<void>;
|
|
76
76
|
setCustomCtx(ctx: TFullCustomCtx): void;
|
|
77
77
|
private hydrateCustomChain;
|
|
@@ -106,8 +106,8 @@ declare abstract class PolkadotApi<TApi, TRes, TSigner, TCustomChain extends str
|
|
|
106
106
|
abstract blake2AsHex(data: Uint8Array): string;
|
|
107
107
|
abstract clone(): PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
|
|
108
108
|
abstract createApiForChain(chain: TSubstrateChain): Promise<PolkadotApi<TApi, TRes, TSigner, TCustomChain>>;
|
|
109
|
-
abstract getDryRunCall(options: TDryRunCallBaseOptions<TRes>): Promise<TDryRunChainResult>;
|
|
110
|
-
abstract getDryRunXcm(options: TDryRunXcmBaseOptions<TRes>): Promise<TDryRunChainResult>;
|
|
109
|
+
abstract getDryRunCall(options: TDryRunCallBaseOptions<TRes, TCustomChain>): Promise<TDryRunChainResult>;
|
|
110
|
+
abstract getDryRunXcm(options: TDryRunXcmBaseOptions<TRes, TCustomChain>): Promise<TDryRunChainResult>;
|
|
111
111
|
abstract getBridgeStatus(): Promise<TBridgeStatus>;
|
|
112
112
|
abstract disconnect(force?: boolean): Promise<void>;
|
|
113
113
|
abstract validateSubstrateAddress(address: string): boolean;
|
|
@@ -129,25 +129,25 @@ declare abstract class Chain<TApi, TRes, TSigner, TCustomChain extends string =
|
|
|
129
129
|
constructor(chain: TSubstrateChain | TCustomChain, info: string, ecosystem: TRelaychain, version: Version);
|
|
130
130
|
get info(): string;
|
|
131
131
|
get ecosystem(): TRelaychain;
|
|
132
|
-
get chain(): TSubstrateChain;
|
|
132
|
+
get chain(): TSubstrateChain | TCustomChain;
|
|
133
133
|
get version(): Version;
|
|
134
|
-
transfer(transferOptions: TTransferInternalOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
134
|
+
transfer(transferOptions: TTransferInternalOptions<TApi, TRes, TSigner, TCustomChain>): Promise<TRes>;
|
|
135
135
|
isRelayToParaEnabled(): boolean;
|
|
136
136
|
throwIfCantReceive(destChain: TChain | undefined): void;
|
|
137
|
-
throwIfTempDisabled(options: TTransferInternalOptions<TApi, TRes, TSigner>, destChain?: TChain): void;
|
|
138
|
-
isSendingTempDisabled(_options: TTransferInternalOptions<TApi, TRes, TSigner>): boolean;
|
|
137
|
+
throwIfTempDisabled(options: TTransferInternalOptions<TApi, TRes, TSigner, TCustomChain>, destChain?: TChain): void;
|
|
138
|
+
isSendingTempDisabled(_options: TTransferInternalOptions<TApi, TRes, TSigner, TCustomChain>): boolean;
|
|
139
139
|
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
140
|
-
canReceiveFrom(_origin: TChain | TCustomChain): boolean;
|
|
141
|
-
shouldUseNativeAssetTeleport({ api, assetInfo: asset, to }: TTransferInternalOptions<TApi, TRes, TSigner>): boolean;
|
|
142
|
-
createAsset(api: PolkadotApi<TApi, TRes, TSigner>, asset: WithAmount<TAssetInfo>, version: Version): TAsset;
|
|
143
|
-
getNativeAssetSymbol(api: PolkadotApi<TApi, TRes, TSigner>): string;
|
|
144
|
-
transferLocal(options: TTransferInternalOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
145
|
-
transferLocalNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
146
|
-
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
147
|
-
getBalanceNative(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
148
|
-
getCustomCurrencyId(_api: PolkadotApi<TApi, TRes, TSigner>, _asset: TAssetInfo): unknown;
|
|
149
|
-
getBalanceForeign(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
150
|
-
getBalance(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
140
|
+
canReceiveFrom<TCustomChain extends string = never>(_origin: TChain | TCustomChain): boolean;
|
|
141
|
+
shouldUseNativeAssetTeleport({ api, assetInfo: asset, to }: TTransferInternalOptions<TApi, TRes, TSigner, TCustomChain>): boolean;
|
|
142
|
+
createAsset(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, asset: WithAmount<TAssetInfo>, version: Version): TAsset;
|
|
143
|
+
getNativeAssetSymbol<TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>): string;
|
|
144
|
+
transferLocal(options: TTransferInternalOptions<TApi, TRes, TSigner, TCustomChain>): Promise<TRes>;
|
|
145
|
+
transferLocalNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner, TCustomChain>): Promise<TRes>;
|
|
146
|
+
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner, TCustomChain>): TRes;
|
|
147
|
+
getBalanceNative(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
148
|
+
getCustomCurrencyId(_api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, _asset: TAssetInfo): unknown;
|
|
149
|
+
getBalanceForeign(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
150
|
+
getBalance(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
declare class Acala<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
@@ -156,7 +156,7 @@ declare class Acala<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> impl
|
|
|
156
156
|
isRelayToParaEnabled(): boolean;
|
|
157
157
|
transferLocalNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
158
158
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
159
|
-
getCustomCurrencyId(_api: PolkadotApi<TApi, TRes, TSigner>, asset: TAssetInfo): TForeignOrTokenAsset;
|
|
159
|
+
getCustomCurrencyId<TCustomChain extends string = never>(_api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, asset: TAssetInfo): TForeignOrTokenAsset;
|
|
160
160
|
getBalance(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo): Promise<bigint>;
|
|
161
161
|
}
|
|
162
162
|
|
|
@@ -215,7 +215,7 @@ declare class Basilisk<TApi, TRes, TSigner> extends Hydration<TApi, TRes, TSigne
|
|
|
215
215
|
|
|
216
216
|
declare class BifrostPolkadot<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
217
217
|
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
218
|
-
getCustomCurrencyId(api: PolkadotApi<TApi, TRes, TSigner>, asset: TAssetInfo): {
|
|
218
|
+
getCustomCurrencyId<TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, asset: TAssetInfo): {
|
|
219
219
|
Native: string;
|
|
220
220
|
VToken?: undefined;
|
|
221
221
|
Token?: undefined;
|
|
@@ -290,7 +290,7 @@ declare class BridgeHubWestend<TApi, TRes, TSigner> extends BridgeHubPolkadot<TA
|
|
|
290
290
|
|
|
291
291
|
declare class Centrifuge<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IXTokensTransfer<TApi, TRes, TSigner> {
|
|
292
292
|
constructor();
|
|
293
|
-
getCustomCurrencyId(api: PolkadotApi<TApi, TRes, TSigner>, asset: TAssetInfo): "Native" | {
|
|
293
|
+
getCustomCurrencyId<TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, asset: TAssetInfo): "Native" | {
|
|
294
294
|
ForeignAsset: number;
|
|
295
295
|
};
|
|
296
296
|
transferXTokens(input: TXTokensTransferOptions<TApi, TRes, TSigner>): TRes;
|
|
@@ -314,7 +314,7 @@ declare class CoretimeKusama<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSig
|
|
|
314
314
|
declare class CoretimePolkadot<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
315
315
|
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
316
316
|
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
317
|
-
canReceiveFrom(origin: TChain): boolean;
|
|
317
|
+
canReceiveFrom<TCustomChain extends string = never>(origin: TChain | TCustomChain): boolean;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
declare class CoretimePaseo<TApi, TRes, TSigner> extends CoretimePolkadot<TApi, TRes, TSigner> {
|
|
@@ -383,7 +383,7 @@ declare class HydrationPaseo<TApi, TRes, TSigner> extends Hydration<TApi, TRes,
|
|
|
383
383
|
|
|
384
384
|
declare class Interlay<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IXTokensTransfer<TApi, TRes, TSigner> {
|
|
385
385
|
constructor();
|
|
386
|
-
getCustomCurrencyId(_api: PolkadotApi<TApi, TRes, TSigner>, asset: TAssetInfo): TForeignOrTokenAsset;
|
|
386
|
+
getCustomCurrencyId<TCustomChain extends string = never>(_api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, asset: TAssetInfo): TForeignOrTokenAsset;
|
|
387
387
|
transferXTokens(input: TXTokensTransferOptions<TApi, TRes, TSigner>): TRes;
|
|
388
388
|
transferLocalNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
389
389
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
@@ -392,7 +392,7 @@ declare class Interlay<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> i
|
|
|
392
392
|
|
|
393
393
|
declare class Jamton<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
394
394
|
constructor();
|
|
395
|
-
getCustomCurrencyId(_api: PolkadotApi<TApi, TRes, TSigner>, asset: TAssetInfo): {
|
|
395
|
+
getCustomCurrencyId<TCustomChain extends string = never>(_api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, asset: TAssetInfo): {
|
|
396
396
|
Native: number;
|
|
397
397
|
ForeignAsset?: undefined;
|
|
398
398
|
} | {
|
|
@@ -408,7 +408,7 @@ declare class Karura<TApi, TRes, TSigner> extends Acala<TApi, TRes, TSigner> {
|
|
|
408
408
|
|
|
409
409
|
declare class Kintsugi<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IXTokensTransfer<TApi, TRes, TSigner> {
|
|
410
410
|
constructor();
|
|
411
|
-
getCustomCurrencyId(_api: PolkadotApi<TApi, TRes, TSigner>, asset: TAssetInfo): TForeignOrTokenAsset;
|
|
411
|
+
getCustomCurrencyId<TCustomChain extends string = never>(_api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, asset: TAssetInfo): TForeignOrTokenAsset;
|
|
412
412
|
transferXTokens(input: TXTokensTransferOptions<TApi, TRes, TSigner>): TRes;
|
|
413
413
|
transferLocalNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
414
414
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
@@ -467,7 +467,7 @@ declare class Peaq<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> imple
|
|
|
467
467
|
|
|
468
468
|
declare class Pendulum<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IXTokensTransfer<TApi, TRes, TSigner> {
|
|
469
469
|
constructor();
|
|
470
|
-
getCustomCurrencyId(api: PolkadotApi<TApi, TRes, TSigner>, asset: TAssetInfo): TXcmAsset;
|
|
470
|
+
getCustomCurrencyId<TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, asset: TAssetInfo): TXcmAsset;
|
|
471
471
|
transferXTokens(input: TXTokensTransferOptions<TApi, TRes, TSigner>): TRes;
|
|
472
472
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
473
473
|
}
|
|
@@ -525,14 +525,14 @@ declare class Westend<TApi, TRes, TSigner> extends Polkadot<TApi, TRes, TSigner>
|
|
|
525
525
|
declare class Xode<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
526
526
|
constructor();
|
|
527
527
|
transferPolkadotXCM(options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
528
|
-
canReceiveFrom(origin: TChain): boolean;
|
|
528
|
+
canReceiveFrom<TCustomChain extends string = never>(origin: TChain | TCustomChain): boolean;
|
|
529
529
|
}
|
|
530
530
|
|
|
531
531
|
declare class Zeitgeist<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
532
532
|
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
533
|
-
getCustomCurrencyId(_api: PolkadotApi<TApi, TRes, TSigner>, asset: TAssetInfo): TZeitgeistAsset | TXcmForeignAsset;
|
|
533
|
+
getCustomCurrencyId<TCustomChain extends string = never>(_api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, asset: TAssetInfo): TZeitgeistAsset | TXcmForeignAsset;
|
|
534
534
|
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
535
|
-
canReceiveFrom(origin: TChain): boolean;
|
|
535
|
+
canReceiveFrom<TCustomChain extends string = never>(origin: TChain | TCustomChain): boolean;
|
|
536
536
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
537
537
|
}
|
|
538
538
|
|
|
@@ -623,10 +623,10 @@ declare const EXCHANGE_CHAINS: readonly ["AssetHubPolkadot", "AssetHubKusama", "
|
|
|
623
623
|
*
|
|
624
624
|
* @deprecated Asset claim functionality is deprecated and will be removed in v14.
|
|
625
625
|
*/
|
|
626
|
-
declare class AssetClaimBuilder<TApi, TRes, TSigner, T extends Partial<TAssetClaimOptionsBase & TBuilderInternalOptions<TSigner>> = object> {
|
|
627
|
-
readonly api: PolkadotApi<TApi, TRes, TSigner>;
|
|
626
|
+
declare class AssetClaimBuilder<TApi, TRes, TSigner, T extends Partial<TAssetClaimOptionsBase & TBuilderInternalOptions<TSigner>> = object, TCustomChain extends string = never> {
|
|
627
|
+
readonly api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
|
|
628
628
|
readonly _options: T;
|
|
629
|
-
constructor(api: PolkadotApi<TApi, TRes, TSigner>, options?: T);
|
|
629
|
+
constructor(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, options?: T);
|
|
630
630
|
/**
|
|
631
631
|
* Specifies the assets to be claimed.
|
|
632
632
|
*
|
|
@@ -635,7 +635,7 @@ declare class AssetClaimBuilder<TApi, TRes, TSigner, T extends Partial<TAssetCla
|
|
|
635
635
|
*/
|
|
636
636
|
currency(currency: TAssetClaimOptionsBase['currency']): AssetClaimBuilder<TApi, TRes, TSigner, T & {
|
|
637
637
|
currency: TAssetClaimOptionsBase['currency'];
|
|
638
|
-
}>;
|
|
638
|
+
}, TCustomChain>;
|
|
639
639
|
/**
|
|
640
640
|
* Sets the sender address.
|
|
641
641
|
*
|
|
@@ -644,7 +644,7 @@ declare class AssetClaimBuilder<TApi, TRes, TSigner, T extends Partial<TAssetCla
|
|
|
644
644
|
*/
|
|
645
645
|
sender(sender: TSender<TSigner>): AssetClaimBuilder<TApi, TRes, TSigner, T & {
|
|
646
646
|
sender: string;
|
|
647
|
-
}>;
|
|
647
|
+
}, TCustomChain>;
|
|
648
648
|
/**
|
|
649
649
|
* Specifies the account address on which the assets will be claimed.
|
|
650
650
|
*
|
|
@@ -653,7 +653,7 @@ declare class AssetClaimBuilder<TApi, TRes, TSigner, T extends Partial<TAssetCla
|
|
|
653
653
|
*/
|
|
654
654
|
address(address: TAddress): AssetClaimBuilder<TApi, TRes, TSigner, T & {
|
|
655
655
|
address: TAddress;
|
|
656
|
-
}>;
|
|
656
|
+
}, TCustomChain>;
|
|
657
657
|
/**
|
|
658
658
|
* Sets the XCM version to be used for the asset claim.
|
|
659
659
|
*
|
|
@@ -662,7 +662,7 @@ declare class AssetClaimBuilder<TApi, TRes, TSigner, T extends Partial<TAssetCla
|
|
|
662
662
|
*/
|
|
663
663
|
xcmVersion(version: Version): AssetClaimBuilder<TApi, TRes, TSigner, T & {
|
|
664
664
|
version: Version;
|
|
665
|
-
}>;
|
|
665
|
+
}, TCustomChain>;
|
|
666
666
|
/**
|
|
667
667
|
* Builds and returns the asset claim extrinsic.
|
|
668
668
|
*
|
|
@@ -684,21 +684,21 @@ declare class AssetClaimBuilder<TApi, TRes, TSigner, T extends Partial<TAssetCla
|
|
|
684
684
|
disconnect(): Promise<void>;
|
|
685
685
|
}
|
|
686
686
|
|
|
687
|
-
declare class BatchTransactionManager<TApi, TRes, TSigner> {
|
|
688
|
-
transactionOptions: TBatchedTransferOptions<TApi, TRes, TSigner>[];
|
|
689
|
-
addTransaction(options: TBatchedTransferOptions<TApi, TRes, TSigner>): void;
|
|
687
|
+
declare class BatchTransactionManager<TApi, TRes, TSigner, TCustomChain extends string = never> {
|
|
688
|
+
transactionOptions: TBatchedTransferOptions<TApi, TRes, TSigner, TCustomChain>[];
|
|
689
|
+
addTransaction(options: TBatchedTransferOptions<TApi, TRes, TSigner, TCustomChain>): void;
|
|
690
690
|
isEmpty(): boolean;
|
|
691
|
-
buildBatch(api: PolkadotApi<TApi, TRes, TSigner>, from: TSubstrateChain, options?: TBatchOptions): Promise<TRes>;
|
|
691
|
+
buildBatch(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, from: TSubstrateChain, options?: TBatchOptions): Promise<TRes>;
|
|
692
692
|
}
|
|
693
693
|
|
|
694
694
|
/**
|
|
695
695
|
* A builder class for constructing Para-to-Para, Para-to-Relay, Relay-to-Para transactions and asset claims.
|
|
696
696
|
*/
|
|
697
697
|
declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TTransferBaseOptions<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>> = object, TCustomChain extends string = never> {
|
|
698
|
-
readonly batchManager: BatchTransactionManager<TApi, TRes, TSigner>;
|
|
699
|
-
readonly api: PolkadotApi<TApi, TRes, TSigner>;
|
|
698
|
+
readonly batchManager: BatchTransactionManager<TApi, TRes, TSigner, TCustomChain>;
|
|
699
|
+
readonly api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
|
|
700
700
|
readonly _options: T;
|
|
701
|
-
constructor(api: PolkadotApi<TApi, TRes, TSigner>, batchManager: BatchTransactionManager<TApi, TRes, TSigner>, options?: T);
|
|
701
|
+
constructor(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, batchManager: BatchTransactionManager<TApi, TRes, TSigner, TCustomChain>, options?: T);
|
|
702
702
|
/**
|
|
703
703
|
* Specifies the origin chain for the transaction.
|
|
704
704
|
*
|
|
@@ -727,15 +727,15 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TTransferBas
|
|
|
727
727
|
*/
|
|
728
728
|
claimFrom(chain: TSubstrateChain): AssetClaimBuilder<TApi, TRes, TSigner, {
|
|
729
729
|
chain: TSubstrateChain;
|
|
730
|
-
}>;
|
|
730
|
+
}, TCustomChain>;
|
|
731
731
|
/**
|
|
732
732
|
* Specifies the currency to be used in the transaction. Symbol, ID, location or multi-asset.
|
|
733
733
|
*
|
|
734
734
|
* @param currency - The currency to be transferred.
|
|
735
735
|
* @returns An instance of Builder
|
|
736
736
|
*/
|
|
737
|
-
currency(currency:
|
|
738
|
-
currency:
|
|
737
|
+
currency<TCurrency extends TCurrencyInputWithAmount>(currency: TCurrency): GeneralBuilder<TApi, TRes, TSigner, T & {
|
|
738
|
+
currency: TCurrency;
|
|
739
739
|
}, TCustomChain>;
|
|
740
740
|
/**
|
|
741
741
|
* Sets the recipient address.
|
|
@@ -763,7 +763,7 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TTransferBas
|
|
|
763
763
|
*/
|
|
764
764
|
ahAddress(address: string | undefined): GeneralBuilder<TApi, TRes, TSigner, T & {
|
|
765
765
|
ahAddress: string | undefined;
|
|
766
|
-
},
|
|
766
|
+
}, TCustomChain>;
|
|
767
767
|
/**
|
|
768
768
|
* Sets the XCM version to be used for the transfer.
|
|
769
769
|
*
|
|
@@ -772,7 +772,7 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TTransferBas
|
|
|
772
772
|
*/
|
|
773
773
|
xcmVersion(version: Version): GeneralBuilder<TApi, TRes, TSigner, T & {
|
|
774
774
|
version: Version;
|
|
775
|
-
},
|
|
775
|
+
}, TCustomChain>;
|
|
776
776
|
/**
|
|
777
777
|
* Whether to keep the account alive after the transfer.
|
|
778
778
|
*
|
|
@@ -781,7 +781,7 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TTransferBas
|
|
|
781
781
|
*/
|
|
782
782
|
keepAlive(keepAlive: boolean): GeneralBuilder<TApi, TRes, TSigner, T & {
|
|
783
783
|
keepAlive: boolean;
|
|
784
|
-
},
|
|
784
|
+
}, TCustomChain>;
|
|
785
785
|
/**
|
|
786
786
|
* Sets a custom pallet for the transaction.
|
|
787
787
|
*
|
|
@@ -792,7 +792,7 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TTransferBas
|
|
|
792
792
|
customPallet(pallet: string | undefined, method: string | undefined): GeneralBuilder<TApi, TRes, TSigner, T & {
|
|
793
793
|
pallet: string | undefined;
|
|
794
794
|
method: string | undefined;
|
|
795
|
-
},
|
|
795
|
+
}, TCustomChain>;
|
|
796
796
|
/**
|
|
797
797
|
* Optional fee asset for the transaction.
|
|
798
798
|
*
|
|
@@ -801,7 +801,7 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TTransferBas
|
|
|
801
801
|
*/
|
|
802
802
|
feeAsset(currency: TCurrencyInput | undefined): GeneralBuilder<TApi, TRes, TSigner, T & {
|
|
803
803
|
feeAsset: TCurrencyInput | undefined;
|
|
804
|
-
},
|
|
804
|
+
}, TCustomChain>;
|
|
805
805
|
/**
|
|
806
806
|
* Sets the hex of the encoded transaction call to apply on the destination chain
|
|
807
807
|
*
|
|
@@ -816,7 +816,7 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TTransferBas
|
|
|
816
816
|
originKind: "Native" | "SovereignAccount" | "Superuser" | "Xcm" | undefined;
|
|
817
817
|
maxWeight: TWeight | undefined;
|
|
818
818
|
};
|
|
819
|
-
},
|
|
819
|
+
}, TCustomChain>;
|
|
820
820
|
/**
|
|
821
821
|
* Performs a token swap as part of the transfer, using the specified exchange and destination currency.
|
|
822
822
|
*
|
|
@@ -841,7 +841,7 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TTransferBas
|
|
|
841
841
|
* @returns A Extrinsic representing the batched transactions.
|
|
842
842
|
*/
|
|
843
843
|
buildBatch(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptions<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>, options?: TBatchOptions): Promise<TRes>;
|
|
844
|
-
protected buildInternal<TOptions extends TTransferBaseOptions<TApi, TRes, TSigner>>(this: GeneralBuilder<TApi, TRes, TSigner, TOptions, TCustomChain>): Promise<TBuildInternalRes<TApi, TRes, TSigner, TOptions>>;
|
|
844
|
+
protected buildInternal<TOptions extends TTransferBaseOptions<TApi, TRes, TSigner>>(this: GeneralBuilder<TApi, TRes, TSigner, TOptions, TCustomChain>): Promise<TBuildInternalRes<TApi, TRes, TSigner, TOptions, TCustomChain>>;
|
|
845
845
|
private prepareNormalizedOptions;
|
|
846
846
|
/**
|
|
847
847
|
* Builds and returns the transfer extrinsic.
|
|
@@ -883,37 +883,82 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TTransferBas
|
|
|
883
883
|
getOriginXcmFee<TDisableFallback extends boolean = false>(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>, options?: TGetXcmFeeBuilderOptions & {
|
|
884
884
|
disableFallback: TDisableFallback;
|
|
885
885
|
}): Promise<TXcmFeeDetailWithForwardedXcm<TDisableFallback>>;
|
|
886
|
+
/**
|
|
887
|
+
* Returns the max transferable amount for each provided asset.
|
|
888
|
+
*
|
|
889
|
+
* @returns The max transferable amounts in the order the assets were provided.
|
|
890
|
+
*/
|
|
891
|
+
getTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
|
|
892
|
+
currency: WithComplexAmount<TCurrencyCore>[];
|
|
893
|
+
}, TCustomChain>): Promise<bigint[]>;
|
|
886
894
|
/**
|
|
887
895
|
* Returns the max transferable amount for the transfer
|
|
888
896
|
*
|
|
889
897
|
* @returns The max transferable amount.
|
|
890
898
|
*/
|
|
891
|
-
getTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner
|
|
899
|
+
getTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
|
|
900
|
+
currency: TSingleCurrencyInputWithAmount;
|
|
901
|
+
}, TCustomChain>): Promise<bigint>;
|
|
902
|
+
getTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<bigint | bigint[]>;
|
|
903
|
+
/**
|
|
904
|
+
* Returns the min transferable amount for each provided asset.
|
|
905
|
+
*
|
|
906
|
+
* @returns The min transferable amounts in the order the assets were provided.
|
|
907
|
+
*/
|
|
908
|
+
getMinTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
|
|
909
|
+
currency: WithComplexAmount<TCurrencyCore>[];
|
|
910
|
+
}, TCustomChain>): Promise<bigint[]>;
|
|
892
911
|
/**
|
|
893
912
|
* Returns the min transferable amount for the transfer
|
|
894
913
|
*
|
|
895
914
|
* @returns The min transferable amount.
|
|
896
915
|
*/
|
|
897
|
-
getMinTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner
|
|
916
|
+
getMinTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
|
|
917
|
+
currency: TSingleCurrencyInputWithAmount;
|
|
918
|
+
}, TCustomChain>): Promise<bigint>;
|
|
919
|
+
getMinTransferableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<bigint | bigint[]>;
|
|
898
920
|
/**
|
|
899
921
|
* Returns the max transferable amount for the transfer
|
|
900
922
|
*
|
|
901
923
|
* @returns The max transferable amount.
|
|
902
924
|
*/
|
|
903
925
|
verifyEdOnDestination(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<boolean>;
|
|
926
|
+
/**
|
|
927
|
+
* Returns the transfer info for each provided asset.
|
|
928
|
+
*
|
|
929
|
+
* @returns The transfer info with per-asset selected and received currency details.
|
|
930
|
+
*/
|
|
931
|
+
getTransferInfo(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
|
|
932
|
+
currency: WithComplexAmount<TCurrencyCore>[];
|
|
933
|
+
}, TCustomChain>): Promise<TTransferInfo<WithComplexAmount<TCurrencyCore>[]>>;
|
|
904
934
|
/**
|
|
905
935
|
* Returns the transfer info for the transfer
|
|
906
936
|
*
|
|
907
937
|
* @returns The transfer info.
|
|
908
938
|
*/
|
|
909
|
-
getTransferInfo(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner
|
|
939
|
+
getTransferInfo(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
|
|
940
|
+
currency: TSingleCurrencyInputWithAmount;
|
|
941
|
+
}, TCustomChain>): Promise<TTransferInfo>;
|
|
942
|
+
getTransferInfo(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<TTransferInfo<TCurrencyInputWithAmount>>;
|
|
943
|
+
/**
|
|
944
|
+
* Returns the receivable amount on the destination for each provided asset.
|
|
945
|
+
*
|
|
946
|
+
* @returns The computed receivable amounts in the order the assets were provided.
|
|
947
|
+
* @throws \{UnableToComputeError\} Thrown when a receivable amount cannot be determined.
|
|
948
|
+
*/
|
|
949
|
+
getReceivableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
|
|
950
|
+
currency: WithComplexAmount<TCurrencyCore>[];
|
|
951
|
+
}, TCustomChain>): Promise<bigint[]>;
|
|
910
952
|
/**
|
|
911
953
|
* Returns the receivable amount on the destination after the transfer
|
|
912
954
|
*
|
|
913
955
|
* @returns The computed receivable amount.
|
|
914
956
|
* @throws \{UnableToComputeError\} Thrown when the receivable amount cannot be determined.
|
|
915
957
|
*/
|
|
916
|
-
getReceivableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner
|
|
958
|
+
getReceivableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner> & {
|
|
959
|
+
currency: TSingleCurrencyInputWithAmount;
|
|
960
|
+
}, TCustomChain>): Promise<bigint>;
|
|
961
|
+
getReceivableAmount(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<bigint | bigint[]>;
|
|
917
962
|
getBestAmountOut(this: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSwap<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>): Promise<{
|
|
918
963
|
exchange: TExchangeChain;
|
|
919
964
|
amountOut: bigint;
|
|
@@ -941,7 +986,7 @@ declare class GeneralBuilder<TApi, TRes, TSigner, T extends Partial<TTransferBas
|
|
|
941
986
|
* @param api - The API instance to use for building transactions. If not provided, a new instance will be created.
|
|
942
987
|
* @returns A new Builder instance.
|
|
943
988
|
*/
|
|
944
|
-
declare const Builder: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner>) => GeneralBuilder<TApi, TRes, TSigner, object, TCustomChain>;
|
|
989
|
+
declare const Builder: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>) => GeneralBuilder<TApi, TRes, TSigner, object, TCustomChain>;
|
|
945
990
|
|
|
946
991
|
type TProviderEntry = {
|
|
947
992
|
name: string;
|
|
@@ -1004,12 +1049,12 @@ type TEvmTransferOptionsBase = {
|
|
|
1004
1049
|
recipient: string;
|
|
1005
1050
|
ahAddress?: string;
|
|
1006
1051
|
};
|
|
1007
|
-
type TEvmTransferOptions<TApi, TRes, TSigner> = WithApi<TEvmTransferOptionsBase & {
|
|
1052
|
+
type TEvmTransferOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TEvmTransferOptionsBase & {
|
|
1008
1053
|
signer: WalletClient;
|
|
1009
|
-
}, TApi, TRes, TSigner>;
|
|
1010
|
-
type TBuildEvmTransferOptions<TApi, TRes, TSigner> = WithApi<TEvmTransferOptionsBase & {
|
|
1054
|
+
}, TApi, TRes, TSigner, TCustomChain>;
|
|
1055
|
+
type TBuildEvmTransferOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TEvmTransferOptionsBase & {
|
|
1011
1056
|
sender: string;
|
|
1012
|
-
}, TApi, TRes, TSigner>;
|
|
1057
|
+
}, TApi, TRes, TSigner, TCustomChain>;
|
|
1013
1058
|
/**
|
|
1014
1059
|
* The options for the batch builder.
|
|
1015
1060
|
*/
|
|
@@ -1049,17 +1094,17 @@ type TBuilderConfig<TApi> = Partial<{
|
|
|
1049
1094
|
type TCustomChainFrom<TOpts> = TOpts extends {
|
|
1050
1095
|
customChains: infer C;
|
|
1051
1096
|
} ? Extract<keyof C, string> : never;
|
|
1052
|
-
type TCreateTxsOptions<TApi, TRes, TSigner> = Pick<TTransferOptions<TApi, TRes, TSigner>, 'api' | 'from' | 'to' | 'currency'>;
|
|
1053
|
-
type TBatchedTransferOptions<TApi, TRes, TSigner> = Omit<TSubstrateTransferOptions<TApi, TRes, TSigner>, 'isAmountAll'> & {
|
|
1054
|
-
builder: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptions<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner
|
|
1097
|
+
type TCreateTxsOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = Pick<TTransferOptions<TApi, TRes, TSigner, TCustomChain>, 'api' | 'from' | 'to' | 'currency'>;
|
|
1098
|
+
type TBatchedTransferOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = Omit<TSubstrateTransferOptions<TApi, TRes, TSigner, TCustomChain>, 'isAmountAll'> & {
|
|
1099
|
+
builder: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptions<TApi, TRes, TSigner> & TBuilderInternalOptions<TSigner>, TCustomChain>;
|
|
1055
1100
|
};
|
|
1056
|
-
type TBuildInternalResBase<TApi, TRes, TSigner, TOptions extends TTransferBaseOptions<TApi, TRes, TSigner> = TTransferBaseOptions<TApi, TRes, TSigner
|
|
1057
|
-
options: TTransferOptions<TApi, TRes, TSigner> & TOptions;
|
|
1101
|
+
type TBuildInternalResBase<TApi, TRes, TSigner, TOptions extends TTransferBaseOptions<TApi, TRes, TSigner> = TTransferBaseOptions<TApi, TRes, TSigner>, TCustomChain extends string = never> = {
|
|
1102
|
+
options: TTransferOptions<TApi, TRes, TSigner, TCustomChain> & TOptions;
|
|
1058
1103
|
};
|
|
1059
|
-
type TBuildInternalRes<TApi, TRes, TSigner, TOptions extends TTransferBaseOptions<TApi, TRes, TSigner> = TTransferBaseOptions<TApi, TRes, TSigner
|
|
1104
|
+
type TBuildInternalRes<TApi, TRes, TSigner, TOptions extends TTransferBaseOptions<TApi, TRes, TSigner> = TTransferBaseOptions<TApi, TRes, TSigner>, TCustomChain extends string = never> = TBuildInternalResBase<TApi, TRes, TSigner, TOptions, TCustomChain> & {
|
|
1060
1105
|
tx: TRes;
|
|
1061
1106
|
};
|
|
1062
|
-
type TBuildAllInternalRes<TApi, TRes, TSigner, TOptions extends TTransferBaseOptions<TApi, TRes, TSigner> = TTransferBaseOptions<TApi, TRes, TSigner
|
|
1107
|
+
type TBuildAllInternalRes<TApi, TRes, TSigner, TOptions extends TTransferBaseOptions<TApi, TRes, TSigner> = TTransferBaseOptions<TApi, TRes, TSigner>, TCustomChain extends string = never> = TBuildInternalResBase<TApi, TRes, TSigner, TOptions, TCustomChain> & {
|
|
1063
1108
|
txContexts: TTransactionContext<TApi, TRes>[];
|
|
1064
1109
|
};
|
|
1065
1110
|
type TSender<TSigner> = string | TSigner;
|
|
@@ -1071,9 +1116,9 @@ type TSwapConfig = {
|
|
|
1071
1116
|
currencyTo: TCurrencyCore;
|
|
1072
1117
|
exchangeChain: TParachain;
|
|
1073
1118
|
};
|
|
1074
|
-
type TDryRunBaseOptions<TRes> = {
|
|
1119
|
+
type TDryRunBaseOptions<TRes, TCustomChain extends string = never> = {
|
|
1075
1120
|
tx: TRes;
|
|
1076
|
-
origin: TSubstrateChain;
|
|
1121
|
+
origin: TSubstrateChain | TCustomChain;
|
|
1077
1122
|
destination: TChain;
|
|
1078
1123
|
sender: string;
|
|
1079
1124
|
currency: TCurrencyInputWithAmount;
|
|
@@ -1083,8 +1128,8 @@ type TDryRunBaseOptions<TRes> = {
|
|
|
1083
1128
|
useRootOrigin?: boolean;
|
|
1084
1129
|
bypassOptions?: TBypassOptions;
|
|
1085
1130
|
};
|
|
1086
|
-
type TDryRunOptions<TApi, TRes, TSigner> = WithApi<TDryRunBaseOptions<TRes>, TApi, TRes, TSigner>;
|
|
1087
|
-
type TDryRunCallBaseOptions<TRes> = {
|
|
1131
|
+
type TDryRunOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TDryRunBaseOptions<TRes, TCustomChain>, TApi, TRes, TSigner, TCustomChain>;
|
|
1132
|
+
type TDryRunCallBaseOptions<TRes, TCustomChain extends string = never> = {
|
|
1088
1133
|
/**
|
|
1089
1134
|
* The transaction to dry-run
|
|
1090
1135
|
*/
|
|
@@ -1092,7 +1137,7 @@ type TDryRunCallBaseOptions<TRes> = {
|
|
|
1092
1137
|
/**
|
|
1093
1138
|
* The chain to dry-run on
|
|
1094
1139
|
*/
|
|
1095
|
-
chain: TSubstrateChain;
|
|
1140
|
+
chain: TSubstrateChain | TCustomChain;
|
|
1096
1141
|
/**
|
|
1097
1142
|
* The destination chain
|
|
1098
1143
|
*/
|
|
@@ -1110,12 +1155,13 @@ type TDryRunCallBaseOptions<TRes> = {
|
|
|
1110
1155
|
*/
|
|
1111
1156
|
version: Version;
|
|
1112
1157
|
asset: WithAmount<TAssetInfo>;
|
|
1158
|
+
assets?: WithAmount<TAssetInfo>[];
|
|
1113
1159
|
bypassOptions?: TBypassOptions;
|
|
1114
1160
|
feeAsset?: TAssetInfo;
|
|
1115
1161
|
};
|
|
1116
|
-
type TDryRunBypassOptions<TApi, TRes, TSigner> = WithApi<Omit<TDryRunCallBaseOptions<TRes>, 'useRootOrigin' | 'destination'>, TApi, TRes, TSigner>;
|
|
1117
|
-
type TDryRunCallOptions<TApi, TRes, TSigner> = WithApi<TDryRunCallBaseOptions<TRes>, TApi, TRes, TSigner>;
|
|
1118
|
-
type TDryRunXcmBaseOptions<TRes> = {
|
|
1162
|
+
type TDryRunBypassOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<Omit<TDryRunCallBaseOptions<TRes, TCustomChain>, 'useRootOrigin' | 'destination'>, TApi, TRes, TSigner, TCustomChain>;
|
|
1163
|
+
type TDryRunCallOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TDryRunCallBaseOptions<TRes, TCustomChain>, TApi, TRes, TSigner, TCustomChain>;
|
|
1164
|
+
type TDryRunXcmBaseOptions<TRes, TCustomChain extends string = never> = {
|
|
1119
1165
|
originLocation: any;
|
|
1120
1166
|
/**
|
|
1121
1167
|
* The XCM instructions
|
|
@@ -1130,14 +1176,14 @@ type TDryRunXcmBaseOptions<TRes> = {
|
|
|
1130
1176
|
/**
|
|
1131
1177
|
* The origin chain
|
|
1132
1178
|
*/
|
|
1133
|
-
origin: TSubstrateChain;
|
|
1179
|
+
origin: TSubstrateChain | TCustomChain;
|
|
1134
1180
|
asset: TAssetInfo;
|
|
1135
1181
|
version: Version;
|
|
1136
1182
|
feeAsset?: TAssetInfo;
|
|
1137
1183
|
amount: bigint;
|
|
1138
1184
|
originFee: bigint;
|
|
1139
1185
|
};
|
|
1140
|
-
type TDryRunXcmOptions<TApi, TRes, TSigner> = WithApi<TDryRunXcmBaseOptions<TRes>, TApi, TRes, TSigner>;
|
|
1186
|
+
type TDryRunXcmOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TDryRunXcmBaseOptions<TRes, TCustomChain>, TApi, TRes, TSigner, TCustomChain>;
|
|
1141
1187
|
type TDryRunResBase = {
|
|
1142
1188
|
asset: TAssetInfo;
|
|
1143
1189
|
isExchange?: boolean;
|
|
@@ -1168,48 +1214,49 @@ type TDryRunResult = {
|
|
|
1168
1214
|
destination?: TDryRunChainResult;
|
|
1169
1215
|
hops: THopInfo[];
|
|
1170
1216
|
};
|
|
1171
|
-
type TResolveHopParams<TApi, TRes, TSigner> = {
|
|
1172
|
-
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
1217
|
+
type TResolveHopParams<TApi, TRes, TSigner, TCustomChain extends string = never> = {
|
|
1218
|
+
api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
|
|
1173
1219
|
tx: TRes;
|
|
1174
|
-
originChain: TSubstrateChain;
|
|
1220
|
+
originChain: TSubstrateChain | TCustomChain;
|
|
1175
1221
|
currentChain: TSubstrateChain;
|
|
1176
1222
|
destination: TDestination;
|
|
1177
1223
|
asset: TAssetInfo;
|
|
1224
|
+
currentAsset: TAssetInfo;
|
|
1178
1225
|
currency: TCurrencyInputWithAmount;
|
|
1179
1226
|
swapConfig?: TSwapConfig;
|
|
1180
1227
|
hasPassedExchange: boolean;
|
|
1181
1228
|
};
|
|
1182
|
-
type HopProcessParams<TApi, TRes, TSigner> = {
|
|
1183
|
-
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
1229
|
+
type HopProcessParams<TApi, TRes, TSigner, TCustomChain extends string = never> = {
|
|
1230
|
+
api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
|
|
1184
1231
|
currentChain: TSubstrateChain;
|
|
1185
|
-
currentOrigin: TSubstrateChain;
|
|
1232
|
+
currentOrigin: TSubstrateChain | TCustomChain;
|
|
1186
1233
|
currentAsset: TAssetInfo;
|
|
1187
1234
|
forwardedXcms: any;
|
|
1188
1235
|
hasPassedExchange: boolean;
|
|
1189
1236
|
isDestination: boolean;
|
|
1190
1237
|
};
|
|
1191
|
-
type HopTraversalConfig<TApi, TRes, TSigner, THopResult> = {
|
|
1192
|
-
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
1193
|
-
origin: TSubstrateChain;
|
|
1238
|
+
type HopTraversalConfig<TApi, TRes, TSigner, THopResult, TCustomChain extends string = never> = {
|
|
1239
|
+
api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
|
|
1240
|
+
origin: TSubstrateChain | TCustomChain;
|
|
1194
1241
|
destination: TChain;
|
|
1195
|
-
|
|
1242
|
+
asset: TAssetInfo;
|
|
1196
1243
|
initialForwardedXcms: any;
|
|
1197
1244
|
initialDestParaId: number | undefined;
|
|
1198
1245
|
swapConfig?: TSwapConfig;
|
|
1199
|
-
processHop: (params: HopProcessParams<TApi, TRes, TSigner>) => Promise<THopResult>;
|
|
1246
|
+
processHop: (params: HopProcessParams<TApi, TRes, TSigner, TCustomChain>) => Promise<THopResult>;
|
|
1200
1247
|
shouldContinue: (hopResult: THopResult) => boolean;
|
|
1201
1248
|
extractNextHopData: (hopResult: THopResult) => {
|
|
1202
1249
|
forwardedXcms: any;
|
|
1203
1250
|
destParaId: number | undefined;
|
|
1204
1251
|
};
|
|
1205
1252
|
};
|
|
1206
|
-
type HopTraversalResult<THopResult> = {
|
|
1253
|
+
type HopTraversalResult<THopResult, TCustomChain extends string = never> = {
|
|
1207
1254
|
hops: Array<{
|
|
1208
1255
|
chain: TSubstrateChain;
|
|
1209
1256
|
result: THopResult;
|
|
1210
1257
|
}>;
|
|
1211
1258
|
destination?: THopResult;
|
|
1212
|
-
lastProcessedChain?: TSubstrateChain;
|
|
1259
|
+
lastProcessedChain?: TSubstrateChain | TCustomChain;
|
|
1213
1260
|
};
|
|
1214
1261
|
type TBypassOptions = {
|
|
1215
1262
|
mintFeeAssets?: boolean;
|
|
@@ -1547,7 +1594,7 @@ type TXcmFeeSwapConfig = TSwapConfig & {
|
|
|
1547
1594
|
amountOut: bigint;
|
|
1548
1595
|
};
|
|
1549
1596
|
type TTxFactory<TRes> = (amount?: string, relative?: boolean) => Promise<TRes>;
|
|
1550
|
-
type TGetXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolean> = {
|
|
1597
|
+
type TGetXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolean, TCustomChain extends string = never> = {
|
|
1551
1598
|
/**
|
|
1552
1599
|
* The transaction factory
|
|
1553
1600
|
*/
|
|
@@ -1555,7 +1602,7 @@ type TGetXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolean> = {
|
|
|
1555
1602
|
/**
|
|
1556
1603
|
* The origin chain
|
|
1557
1604
|
*/
|
|
1558
|
-
origin: TSubstrateChain;
|
|
1605
|
+
origin: TSubstrateChain | TCustomChain;
|
|
1559
1606
|
/**
|
|
1560
1607
|
* The destination chain
|
|
1561
1608
|
*/
|
|
@@ -1565,46 +1612,47 @@ type TGetXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolean> = {
|
|
|
1565
1612
|
*/
|
|
1566
1613
|
sender: string;
|
|
1567
1614
|
recipient: string;
|
|
1568
|
-
currency:
|
|
1615
|
+
currency: TCurrencyInputWithAmount;
|
|
1569
1616
|
version?: Version;
|
|
1570
1617
|
feeAsset?: TCurrencyInput;
|
|
1571
1618
|
disableFallback: TDisableFallback;
|
|
1572
1619
|
swapConfig?: TXcmFeeSwapConfig;
|
|
1573
1620
|
skipReverseFeeCalculation?: boolean;
|
|
1574
1621
|
};
|
|
1575
|
-
type TGetXcmFeeOptions<TApi, TRes, TSigner, TDisableFallback extends boolean = boolean> = WithApi<TGetXcmFeeBaseOptions<TRes, TDisableFallback>, TApi, TRes, TSigner>;
|
|
1576
|
-
type TGetXcmFeeInternalOptions<TApi, TRes, TSigner, TDisableFallback extends boolean = boolean> = Omit<TGetXcmFeeOptions<TApi, TRes, TSigner, TDisableFallback>, 'buildTx'> & {
|
|
1622
|
+
type TGetXcmFeeOptions<TApi, TRes, TSigner, TDisableFallback extends boolean = boolean, TCustomChain extends string = never> = WithApi<TGetXcmFeeBaseOptions<TRes, TDisableFallback, TCustomChain>, TApi, TRes, TSigner, TCustomChain>;
|
|
1623
|
+
type TGetXcmFeeInternalOptions<TApi, TRes, TSigner, TDisableFallback extends boolean = boolean, TCustomChain extends string = never> = Omit<TGetXcmFeeOptions<TApi, TRes, TSigner, TDisableFallback, TCustomChain>, 'buildTx'> & {
|
|
1577
1624
|
tx: TRes;
|
|
1578
1625
|
useRootOrigin: boolean;
|
|
1579
1626
|
};
|
|
1580
1627
|
type TGetXcmFeeBuilderOptions = {
|
|
1581
1628
|
disableFallback: boolean;
|
|
1582
1629
|
};
|
|
1583
|
-
type TGetOriginXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolean> = {
|
|
1630
|
+
type TGetOriginXcmFeeBaseOptions<TRes, TDisableFallback extends boolean = boolean, TCustomChain extends string = never> = {
|
|
1584
1631
|
buildTx: TTxFactory<TRes>;
|
|
1585
|
-
origin: TSubstrateChain;
|
|
1632
|
+
origin: TSubstrateChain | TCustomChain;
|
|
1586
1633
|
destination: TChain;
|
|
1587
1634
|
sender: string;
|
|
1588
|
-
currency:
|
|
1635
|
+
currency: TCurrencyInputWithAmount;
|
|
1589
1636
|
version?: Version;
|
|
1590
1637
|
feeAsset?: TCurrencyInput;
|
|
1591
1638
|
disableFallback: TDisableFallback;
|
|
1592
1639
|
useRootOrigin?: boolean;
|
|
1593
1640
|
};
|
|
1594
|
-
type TGetOriginXcmFeeOptions<TApi, TRes, TSigner, TDisableFallback extends boolean = boolean> = WithApi<TGetOriginXcmFeeBaseOptions<TRes, TDisableFallback>, TApi, TRes, TSigner>;
|
|
1595
|
-
type TGetOriginXcmFeeInternalOptions<TApi, TRes, TSigner> = Omit<TGetOriginXcmFeeOptions<TApi, TRes, TSigner>, 'buildTx'> & {
|
|
1641
|
+
type TGetOriginXcmFeeOptions<TApi, TRes, TSigner, TDisableFallback extends boolean = boolean, TCustomChain extends string = never> = WithApi<TGetOriginXcmFeeBaseOptions<TRes, TDisableFallback, TCustomChain>, TApi, TRes, TSigner, TCustomChain>;
|
|
1642
|
+
type TGetOriginXcmFeeInternalOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = Omit<TGetOriginXcmFeeOptions<TApi, TRes, TSigner, boolean, TCustomChain>, 'buildTx'> & {
|
|
1596
1643
|
tx: TRes;
|
|
1597
1644
|
};
|
|
1598
|
-
type TGetFeeForDestChainBaseOptions<TRes> = {
|
|
1599
|
-
prevChain: TSubstrateChain;
|
|
1600
|
-
origin: TSubstrateChain;
|
|
1645
|
+
type TGetFeeForDestChainBaseOptions<TRes, TCustomChain extends string = never> = {
|
|
1646
|
+
prevChain: TSubstrateChain | TCustomChain;
|
|
1647
|
+
origin: TSubstrateChain | TCustomChain;
|
|
1601
1648
|
destination: TChain;
|
|
1602
1649
|
sender: string;
|
|
1603
1650
|
recipient: string;
|
|
1604
|
-
currency:
|
|
1651
|
+
currency: TCurrencyInputWithAmount;
|
|
1652
|
+
asset: WithAmount<TAssetInfo>;
|
|
1653
|
+
currentAsset: WithAmount<TAssetInfo>;
|
|
1605
1654
|
forwardedXcms: any;
|
|
1606
1655
|
tx: TRes;
|
|
1607
|
-
asset: TAssetInfo;
|
|
1608
1656
|
version: Version;
|
|
1609
1657
|
originFee: bigint;
|
|
1610
1658
|
feeAsset?: TCurrencyInput;
|
|
@@ -1613,8 +1661,8 @@ type TGetFeeForDestChainBaseOptions<TRes> = {
|
|
|
1613
1661
|
swapConfig?: TXcmFeeSwapConfig;
|
|
1614
1662
|
skipReverseFeeCalculation?: boolean;
|
|
1615
1663
|
};
|
|
1616
|
-
type TGetFeeForDestChainOptions<TApi, TRes, TSigner> = WithApi<TGetFeeForDestChainBaseOptions<TRes>, TApi, TRes, TSigner>;
|
|
1617
|
-
type TGetReverseTxFeeOptions<TApi, TRes, TSigner> = Omit<TGetFeeForDestChainOptions<TApi, TRes, TSigner>, 'destination' | 'disableFallback' | 'forwardedXcms' | 'asset' | 'originFee' | 'prevChain' | 'version'> & {
|
|
1664
|
+
type TGetFeeForDestChainOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TGetFeeForDestChainBaseOptions<TRes, TCustomChain>, TApi, TRes, TSigner, TCustomChain>;
|
|
1665
|
+
type TGetReverseTxFeeOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = Omit<TGetFeeForDestChainOptions<TApi, TRes, TSigner, TCustomChain>, 'destination' | 'disableFallback' | 'forwardedXcms' | 'asset' | 'originFee' | 'prevChain' | 'version'> & {
|
|
1618
1666
|
destination: TSubstrateChain;
|
|
1619
1667
|
};
|
|
1620
1668
|
type TFeeType = 'dryRun' | 'paymentInfo' | 'noFeeRequired';
|
|
@@ -1673,6 +1721,90 @@ type TPaymentInfo = {
|
|
|
1673
1721
|
weight: TWeight;
|
|
1674
1722
|
};
|
|
1675
1723
|
|
|
1724
|
+
type TGetBalanceCommonOptions<TCustomChain extends string = never> = {
|
|
1725
|
+
/**
|
|
1726
|
+
* The address of the account.
|
|
1727
|
+
*/
|
|
1728
|
+
address: string;
|
|
1729
|
+
/**
|
|
1730
|
+
* The chain on which to query the balance.
|
|
1731
|
+
*/
|
|
1732
|
+
chain: TChain | TCustomChain;
|
|
1733
|
+
};
|
|
1734
|
+
/**
|
|
1735
|
+
* Retrieves the asset balance for a given account on a specified chain.
|
|
1736
|
+
*/
|
|
1737
|
+
type TGetAssetBalanceOptionsBase<TCustomChain extends string = never> = TGetBalanceCommonOptions<TCustomChain> & {
|
|
1738
|
+
/**
|
|
1739
|
+
* The resolved asset to query balance for.
|
|
1740
|
+
*/
|
|
1741
|
+
asset: TAssetInfo;
|
|
1742
|
+
};
|
|
1743
|
+
/**
|
|
1744
|
+
* Retrieves the currency balance for a given account on a specified chain.
|
|
1745
|
+
*/
|
|
1746
|
+
type TGetBalanceOptionsBase<TCustomChain extends string = never> = TGetBalanceCommonOptions<TCustomChain> & {
|
|
1747
|
+
/**
|
|
1748
|
+
* The currency to query.
|
|
1749
|
+
*/
|
|
1750
|
+
currency?: TCurrencyCore;
|
|
1751
|
+
};
|
|
1752
|
+
type TGetBalanceOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TGetBalanceOptionsBase<TCustomChain>, TApi, TRes, TSigner, TCustomChain>;
|
|
1753
|
+
type TGetAssetBalanceOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TGetAssetBalanceOptionsBase<TCustomChain>, TApi, TRes, TSigner, TCustomChain>;
|
|
1754
|
+
type TGetTransferableAmountOptionsBase<TRes, TCurrency = WithAmount<TCurrencyCore>> = {
|
|
1755
|
+
/**
|
|
1756
|
+
* The sender address of the account.
|
|
1757
|
+
*/
|
|
1758
|
+
sender: string;
|
|
1759
|
+
/**
|
|
1760
|
+
* The chain on which to query the balance.
|
|
1761
|
+
*/
|
|
1762
|
+
origin: TSubstrateChain;
|
|
1763
|
+
/**
|
|
1764
|
+
* The destination chain.
|
|
1765
|
+
*/
|
|
1766
|
+
destination: TChain;
|
|
1767
|
+
/**
|
|
1768
|
+
* The currency to query.
|
|
1769
|
+
*/
|
|
1770
|
+
currency: TCurrency;
|
|
1771
|
+
version: Version | undefined;
|
|
1772
|
+
buildTx: TTxFactory<TRes>;
|
|
1773
|
+
feeAsset?: TCurrencyInput;
|
|
1774
|
+
};
|
|
1775
|
+
type TGetTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain extends string = never, TCurrency = WithAmount<TCurrencyCore>> = WithApi<TGetTransferableAmountOptionsBase<TRes, TCurrency>, TApi, TRes, TSigner, TCustomChain>;
|
|
1776
|
+
type TPerAssetResult<TCurrency, TValue> = TCurrency extends unknown[] ? TValue[] : TValue;
|
|
1777
|
+
type TGetMinTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain extends string = never, TCurrency = WithAmount<TCurrencyCore>> = WithApi<TGetTransferableAmountOptionsBase<TRes, TCurrency> & {
|
|
1778
|
+
recipient: string;
|
|
1779
|
+
builder: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner>, TCustomChain>;
|
|
1780
|
+
}, TApi, TRes, TSigner, TCustomChain>;
|
|
1781
|
+
type TVerifyEdOnDestinationOptionsBase<TRes> = {
|
|
1782
|
+
/**
|
|
1783
|
+
* The origin chain.
|
|
1784
|
+
*/
|
|
1785
|
+
origin: TSubstrateChain;
|
|
1786
|
+
/**
|
|
1787
|
+
* The destination chain.
|
|
1788
|
+
*/
|
|
1789
|
+
destination: TChain;
|
|
1790
|
+
/**
|
|
1791
|
+
* The address of the account.
|
|
1792
|
+
*/
|
|
1793
|
+
recipient: string;
|
|
1794
|
+
/**
|
|
1795
|
+
* The account of the sender.
|
|
1796
|
+
*/
|
|
1797
|
+
sender: string;
|
|
1798
|
+
/**
|
|
1799
|
+
* The currency to query.
|
|
1800
|
+
*/
|
|
1801
|
+
currency: TCurrencyInputWithAmount;
|
|
1802
|
+
version: Version | undefined;
|
|
1803
|
+
buildTx: TTxFactory<TRes>;
|
|
1804
|
+
feeAsset?: TCurrencyInput;
|
|
1805
|
+
};
|
|
1806
|
+
type TVerifyEdOnDestinationOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TVerifyEdOnDestinationOptionsBase<TRes>, TApi, TRes, TSigner, TCustomChain>;
|
|
1807
|
+
|
|
1676
1808
|
type THopTransferInfo = {
|
|
1677
1809
|
chain: TChain;
|
|
1678
1810
|
result: {
|
|
@@ -1685,70 +1817,73 @@ type TXcmFeeBase = {
|
|
|
1685
1817
|
fee: bigint;
|
|
1686
1818
|
asset: TAssetInfo;
|
|
1687
1819
|
};
|
|
1688
|
-
type
|
|
1820
|
+
type TOriginXcmFeeInfo = TXcmFeeBase & {
|
|
1821
|
+
sufficient: boolean;
|
|
1822
|
+
balance: bigint;
|
|
1823
|
+
balanceAfter: bigint;
|
|
1824
|
+
};
|
|
1825
|
+
type TSelectedCurrencyInfo = {
|
|
1826
|
+
sufficient: boolean;
|
|
1827
|
+
balance: bigint;
|
|
1828
|
+
balanceAfter: bigint;
|
|
1829
|
+
asset: TAssetInfo;
|
|
1830
|
+
};
|
|
1831
|
+
type TReceivedCurrencyInfo = {
|
|
1832
|
+
sufficient: boolean | UnableToComputeError;
|
|
1833
|
+
receivedAmount: bigint | UnableToComputeError;
|
|
1834
|
+
balance: bigint;
|
|
1835
|
+
balanceAfter: bigint | UnableToComputeError;
|
|
1836
|
+
asset: TAssetInfo;
|
|
1837
|
+
};
|
|
1838
|
+
type TTransferInfo<TCurrency = WithAmount<TCurrencyCore>> = {
|
|
1689
1839
|
chain: {
|
|
1690
1840
|
origin: TChain;
|
|
1691
1841
|
destination: TChain;
|
|
1692
1842
|
ecosystem: string;
|
|
1693
1843
|
};
|
|
1694
1844
|
origin: {
|
|
1695
|
-
selectedCurrency:
|
|
1696
|
-
|
|
1697
|
-
balance: bigint;
|
|
1698
|
-
balanceAfter: bigint;
|
|
1699
|
-
asset: TAssetInfo;
|
|
1700
|
-
};
|
|
1701
|
-
xcmFee: TXcmFeeBase & {
|
|
1702
|
-
sufficient: boolean;
|
|
1703
|
-
balance: bigint;
|
|
1704
|
-
balanceAfter: bigint;
|
|
1705
|
-
};
|
|
1845
|
+
selectedCurrency: TPerAssetResult<TCurrency, TSelectedCurrencyInfo>;
|
|
1846
|
+
xcmFee: TOriginXcmFeeInfo;
|
|
1706
1847
|
isExchange?: boolean;
|
|
1707
1848
|
};
|
|
1708
1849
|
hops: THopTransferInfo[];
|
|
1709
1850
|
destination: {
|
|
1710
|
-
receivedCurrency:
|
|
1711
|
-
sufficient: boolean | UnableToComputeError;
|
|
1712
|
-
receivedAmount: bigint | UnableToComputeError;
|
|
1713
|
-
balance: bigint;
|
|
1714
|
-
balanceAfter: bigint | UnableToComputeError;
|
|
1715
|
-
asset: TAssetInfo;
|
|
1716
|
-
};
|
|
1851
|
+
receivedCurrency: TPerAssetResult<TCurrency, TReceivedCurrencyInfo>;
|
|
1717
1852
|
xcmFee: TXcmFeeBase & {
|
|
1718
1853
|
balanceAfter: bigint | UnableToComputeError;
|
|
1719
1854
|
};
|
|
1720
1855
|
isExchange?: boolean;
|
|
1721
1856
|
};
|
|
1722
1857
|
};
|
|
1723
|
-
type TBuildOriginInfoOptions<TApi, TRes, TSigner> = {
|
|
1724
|
-
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
1858
|
+
type TBuildOriginInfoOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = {
|
|
1859
|
+
api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
|
|
1725
1860
|
origin: TSubstrateChain;
|
|
1726
1861
|
sender: string;
|
|
1727
|
-
|
|
1728
|
-
originAsset: TAssetInfo;
|
|
1862
|
+
assets: WithAmount<TAssetInfo>[];
|
|
1729
1863
|
amount: bigint;
|
|
1730
1864
|
originFee: bigint;
|
|
1731
1865
|
originFeeAsset: TAssetInfo;
|
|
1732
1866
|
isFeeAssetAh: boolean;
|
|
1733
1867
|
};
|
|
1734
|
-
type BuildHopInfoOptions<TApi, TRes, TSigner> = {
|
|
1735
|
-
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
1868
|
+
type BuildHopInfoOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = {
|
|
1869
|
+
api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
|
|
1736
1870
|
chain: TChain;
|
|
1737
1871
|
fee: bigint;
|
|
1738
1872
|
originChain: TSubstrateChain;
|
|
1739
|
-
currency:
|
|
1873
|
+
currency: TSingleCurrencyInput;
|
|
1740
1874
|
asset: TAssetInfo;
|
|
1741
1875
|
sender: string;
|
|
1742
1876
|
ahAddress?: string;
|
|
1743
1877
|
};
|
|
1744
|
-
type TBuildDestInfoOptions<TApi, TRes, TSigner> = {
|
|
1745
|
-
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
1878
|
+
type TBuildDestInfoOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = {
|
|
1879
|
+
api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
|
|
1746
1880
|
origin: TSubstrateChain;
|
|
1747
1881
|
destination: TChain;
|
|
1748
1882
|
recipient: string;
|
|
1749
|
-
currency: WithAmount<
|
|
1883
|
+
currency: WithAmount<TSingleCurrencyInput>;
|
|
1750
1884
|
originFee: bigint;
|
|
1751
1885
|
isFeeAssetAh: boolean;
|
|
1886
|
+
paysDestFee: boolean;
|
|
1752
1887
|
destFeeDetail: TXcmFeeDetail;
|
|
1753
1888
|
totalHopFee: bigint;
|
|
1754
1889
|
bridgeFee?: bigint;
|
|
@@ -1757,18 +1892,18 @@ type TOriginFeeDetails = {
|
|
|
1757
1892
|
sufficientForXCM: boolean;
|
|
1758
1893
|
xcmFee: bigint;
|
|
1759
1894
|
};
|
|
1760
|
-
type TGetTransferInfoOptionsBase<TRes
|
|
1895
|
+
type TGetTransferInfoOptionsBase<TRes, TCurrency = WithAmount<TCurrencyCore>> = {
|
|
1761
1896
|
buildTx: TTxFactory<TRes>;
|
|
1762
1897
|
origin: TSubstrateChain;
|
|
1763
1898
|
destination: TChain;
|
|
1764
1899
|
sender: string;
|
|
1765
1900
|
ahAddress?: string;
|
|
1766
1901
|
recipient: string;
|
|
1767
|
-
currency:
|
|
1902
|
+
currency: TCurrency;
|
|
1768
1903
|
version: Version | undefined;
|
|
1769
1904
|
feeAsset?: TCurrencyCore;
|
|
1770
1905
|
};
|
|
1771
|
-
type TGetTransferInfoOptions<TApi, TRes, TSigner
|
|
1906
|
+
type TGetTransferInfoOptions<TApi, TRes, TSigner, TCustomChain extends string = never, TCurrency = WithAmount<TCurrencyCore>> = WithApi<TGetTransferInfoOptionsBase<TRes, TCurrency>, TApi, TRes, TSigner, TCustomChain>;
|
|
1772
1907
|
|
|
1773
1908
|
type TExchangeChain = (typeof EXCHANGE_CHAINS)[number];
|
|
1774
1909
|
type TExchangeInput = TExchangeChain | TExchangeChain[] | undefined;
|
|
@@ -1847,11 +1982,11 @@ interface TSwapBuilder<TApi, TRes, TSigner> {
|
|
|
1847
1982
|
build(): Promise<TTransactionContext<TApi, TRes>[]>;
|
|
1848
1983
|
signAndSubmit(): Promise<string[]>;
|
|
1849
1984
|
}
|
|
1850
|
-
type TSwapBuilderFactory = <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>) => TSwapBuilder<TApi, TRes, TSigner>;
|
|
1985
|
+
type TSwapBuilderFactory = <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>) => TSwapBuilder<TApi, TRes, TSigner>;
|
|
1851
1986
|
|
|
1852
|
-
type TPolkadotXCMTransferOptions<TApi, TRes, TSigner> = {
|
|
1853
|
-
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
1854
|
-
chain: TSubstrateChain;
|
|
1987
|
+
type TPolkadotXCMTransferOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = {
|
|
1988
|
+
api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
|
|
1989
|
+
chain: TSubstrateChain | TCustomChain;
|
|
1855
1990
|
beneficiaryLocation: TLocation;
|
|
1856
1991
|
recipient: TAddress;
|
|
1857
1992
|
asset: TAsset;
|
|
@@ -1871,12 +2006,12 @@ type TPolkadotXCMTransferOptions<TApi, TRes, TSigner> = {
|
|
|
1871
2006
|
method?: string;
|
|
1872
2007
|
transactOptions?: TTransactOptions<TRes>;
|
|
1873
2008
|
};
|
|
1874
|
-
type TXTokensTransferOptions<TApi, TRes, TSigner> = {
|
|
1875
|
-
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
2009
|
+
type TXTokensTransferOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = {
|
|
2010
|
+
api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
|
|
1876
2011
|
asset: WithAmount<TAssetInfo>;
|
|
1877
2012
|
recipient: TAddress;
|
|
1878
2013
|
scenario: TScenario;
|
|
1879
|
-
origin: TSubstrateChain;
|
|
2014
|
+
origin: TSubstrateChain | TCustomChain;
|
|
1880
2015
|
destination: TDestination;
|
|
1881
2016
|
paraIdTo?: number;
|
|
1882
2017
|
version: Version;
|
|
@@ -1885,15 +2020,19 @@ type TXTokensTransferOptions<TApi, TRes, TSigner> = {
|
|
|
1885
2020
|
method?: string;
|
|
1886
2021
|
useMultiAssetTransfer?: boolean;
|
|
1887
2022
|
};
|
|
1888
|
-
interface IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
1889
|
-
transferPolkadotXCM: (input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>) => Promise<TRes>;
|
|
2023
|
+
interface IPolkadotXCMTransfer<TApi, TRes, TSigner, TCustomChain extends string = never> {
|
|
2024
|
+
transferPolkadotXCM: (input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<TRes>;
|
|
1890
2025
|
}
|
|
1891
|
-
interface IXTokensTransfer<TApi, TRes, TSigner> {
|
|
1892
|
-
transferXTokens: (input: TXTokensTransferOptions<TApi, TRes, TSigner>) => TRes;
|
|
2026
|
+
interface IXTokensTransfer<TApi, TRes, TSigner, TCustomChain extends string = never> {
|
|
2027
|
+
transferXTokens: (input: TXTokensTransferOptions<TApi, TRes, TSigner, TCustomChain>) => TRes;
|
|
1893
2028
|
}
|
|
1894
2029
|
type TScenario = 'ParaToRelay' | 'ParaToPara' | 'RelayToPara';
|
|
1895
2030
|
type TAddress = string | TLocation;
|
|
1896
2031
|
type TDestination = TChain | TLocation;
|
|
2032
|
+
type TResolvedCurrency = {
|
|
2033
|
+
assets: WithAmount<TAssetInfo>[];
|
|
2034
|
+
asset: WithAmount<TAssetInfo>;
|
|
2035
|
+
};
|
|
1897
2036
|
type TTransferBaseOptions<TApi, TRes, TSigner> = {
|
|
1898
2037
|
/**
|
|
1899
2038
|
* The origin chain
|
|
@@ -1955,13 +2094,13 @@ type TTransferBaseOptions<TApi, TRes, TSigner> = {
|
|
|
1955
2094
|
/**
|
|
1956
2095
|
* Options for transferring from a parachain to another parachain or relay chain
|
|
1957
2096
|
*/
|
|
1958
|
-
type TTransferOptions<TApi, TRes, TSigner> = WithApi<TTransferBaseOptions<TApi, TRes, TSigner>, TApi, TRes, TSigner> & {
|
|
2097
|
+
type TTransferOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TTransferBaseOptions<TApi, TRes, TSigner>, TApi, TRes, TSigner, TCustomChain> & {
|
|
1959
2098
|
isAmountAll: boolean;
|
|
1960
2099
|
};
|
|
1961
2100
|
type TSubstrateTransferBaseOptions<TApi, TRes, TSigner> = Omit<TTransferBaseOptions<TApi, TRes, TSigner>, 'from'> & {
|
|
1962
2101
|
from: TSubstrateChain;
|
|
1963
2102
|
};
|
|
1964
|
-
type TSubstrateTransferOptions<TApi, TRes, TSigner> = Omit<TTransferOptions<TApi, TRes, TSigner>, 'from'> & {
|
|
2103
|
+
type TSubstrateTransferOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = Omit<TTransferOptions<TApi, TRes, TSigner, TCustomChain>, 'from'> & {
|
|
1965
2104
|
from: TSubstrateChain;
|
|
1966
2105
|
};
|
|
1967
2106
|
type WithRequiredSender<TBase> = Omit<TBase, 'sender'> & {
|
|
@@ -1973,12 +2112,12 @@ type WithRequiredSender<TBase> = Omit<TBase, 'sender'> & {
|
|
|
1973
2112
|
type WithRequiredSwapOptions<TBase, TApi, TRes, TSigner> = Omit<TBase, 'swapOptions'> & {
|
|
1974
2113
|
swapOptions: TSwapOptions<TApi, TRes, TSigner>;
|
|
1975
2114
|
};
|
|
1976
|
-
type TTransferOptionsWithSwap<TApi, TRes, TSigner> = WithRequiredSwapOptions<Omit<TSubstrateTransferOptions<TApi, TRes, TSigner>, 'isAmountAll'>, TApi, TRes, TSigner>;
|
|
2115
|
+
type TTransferOptionsWithSwap<TApi, TRes, TSigner, TCustomChain extends string = never> = WithRequiredSwapOptions<Omit<TSubstrateTransferOptions<TApi, TRes, TSigner, TCustomChain>, 'isAmountAll'>, TApi, TRes, TSigner>;
|
|
1977
2116
|
type TTransferBaseOptionsWithSwap<TApi, TRes, TSigner> = WithRequiredSwapOptions<TTransferBaseOptions<TApi, TRes, TSigner>, TApi, TRes, TSigner>;
|
|
1978
2117
|
type TTransferBaseOptionsWithSender<TApi, TRes, TSigner> = WithRequiredSender<TTransferBaseOptions<TApi, TRes, TSigner>>;
|
|
1979
2118
|
type TSubstrateTransferBaseOptionsWithSender<TApi, TRes, TSigner> = WithRequiredSender<TSubstrateTransferBaseOptions<TApi, TRes, TSigner>>;
|
|
1980
|
-
type TTransferInternalOptions<TApi, TRes, TSigner> = Omit<TTransferBaseOptions<TApi, TRes, TSigner>, 'from' | 'feeAsset' | 'version'> & {
|
|
1981
|
-
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
2119
|
+
type TTransferInternalOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = Omit<TTransferBaseOptions<TApi, TRes, TSigner>, 'from' | 'feeAsset' | 'version'> & {
|
|
2120
|
+
api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
|
|
1982
2121
|
assetInfo: WithAmount<TAssetInfo>;
|
|
1983
2122
|
feeAsset?: TAssetInfo;
|
|
1984
2123
|
feeCurrency?: TCurrencyInput;
|
|
@@ -2018,21 +2157,21 @@ type TWeight<TWeightType = bigint> = {
|
|
|
2018
2157
|
refTime: TWeightType;
|
|
2019
2158
|
proofSize: TWeightType;
|
|
2020
2159
|
};
|
|
2021
|
-
type TCreateBeneficiaryOptions<TApi, TRes, TSigner> = {
|
|
2022
|
-
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
2160
|
+
type TCreateBeneficiaryOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = {
|
|
2161
|
+
api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
|
|
2023
2162
|
address: TAddress;
|
|
2024
2163
|
version: Version;
|
|
2025
2164
|
};
|
|
2026
|
-
type TCreateBeneficiaryXTokensOptions<TApi, TRes, TSigner> = {
|
|
2027
|
-
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
2028
|
-
origin: TSubstrateChain;
|
|
2165
|
+
type TCreateBeneficiaryXTokensOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = {
|
|
2166
|
+
api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
|
|
2167
|
+
origin: TSubstrateChain | TCustomChain;
|
|
2029
2168
|
destination: TDestination;
|
|
2030
2169
|
recipient: TAddress;
|
|
2031
2170
|
version: Version;
|
|
2032
2171
|
paraId?: number;
|
|
2033
2172
|
};
|
|
2034
2173
|
type TBridgeStatus = 'Normal' | 'Halted';
|
|
2035
|
-
type TTransferLocalOptions<TApi, TRes, TSigner> = Omit<TTransferInternalOptions<TApi, TRes, TSigner>, 'recipient'> & {
|
|
2174
|
+
type TTransferLocalOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = Omit<TTransferInternalOptions<TApi, TRes, TSigner, TCustomChain>, 'recipient'> & {
|
|
2036
2175
|
recipient: string;
|
|
2037
2176
|
balance: bigint;
|
|
2038
2177
|
};
|
|
@@ -2040,8 +2179,8 @@ type TTransferFeeEstimates = {
|
|
|
2040
2179
|
originFee: bigint;
|
|
2041
2180
|
reserveFee: bigint;
|
|
2042
2181
|
};
|
|
2043
|
-
type TCreateBaseTransferXcmOptions<TRes> = {
|
|
2044
|
-
chain: TSubstrateChain;
|
|
2182
|
+
type TCreateBaseTransferXcmOptions<TRes, TCustomChain extends string = never> = {
|
|
2183
|
+
chain: TSubstrateChain | TCustomChain;
|
|
2045
2184
|
destChain: TChain;
|
|
2046
2185
|
assetInfo: WithAmount<TAssetInfo>;
|
|
2047
2186
|
feeAssetInfo?: TAssetInfo;
|
|
@@ -2055,7 +2194,7 @@ type TCreateBaseTransferXcmOptions<TRes> = {
|
|
|
2055
2194
|
paraIdTo?: number;
|
|
2056
2195
|
transactOptions?: TTransactOptions<TRes>;
|
|
2057
2196
|
};
|
|
2058
|
-
type TCreateTransferXcmOptions<TApi, TRes, TSigner> = WithApi<TCreateBaseTransferXcmOptions<TRes>, TApi, TRes, TSigner>;
|
|
2197
|
+
type TCreateTransferXcmOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TCreateBaseTransferXcmOptions<TRes, TCustomChain>, TApi, TRes, TSigner, TCustomChain>;
|
|
2059
2198
|
type TCreateBaseSwapXcmOptions = {
|
|
2060
2199
|
chain?: TSubstrateChain;
|
|
2061
2200
|
exchangeChain: TExchangeChain;
|
|
@@ -2068,20 +2207,20 @@ type TCreateBaseSwapXcmOptions = {
|
|
|
2068
2207
|
recipient: string;
|
|
2069
2208
|
calculateMinAmountOut: (amountIn: bigint, assetTo?: TAssetInfo) => Promise<bigint>;
|
|
2070
2209
|
};
|
|
2071
|
-
type TCreateSwapXcmOptions<TApi, TRes, TSigner> = WithApi<TCreateBaseSwapXcmOptions, TApi, TRes, TSigner>;
|
|
2210
|
+
type TCreateSwapXcmOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TCreateBaseSwapXcmOptions, TApi, TRes, TSigner, TCustomChain>;
|
|
2072
2211
|
type TSwapFeeEstimates = {
|
|
2073
2212
|
originFee: bigint;
|
|
2074
2213
|
originReserveFee: bigint;
|
|
2075
2214
|
exchangeFee: bigint;
|
|
2076
2215
|
destReserveFee: bigint;
|
|
2077
2216
|
};
|
|
2078
|
-
type TCreateSwapXcmInternalOptions<TApi, TRes, TSigner> = WithApi<TCreateBaseSwapXcmOptions, TApi, TRes, TSigner> & {
|
|
2217
|
+
type TCreateSwapXcmInternalOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = WithApi<TCreateBaseSwapXcmOptions, TApi, TRes, TSigner, TCustomChain> & {
|
|
2079
2218
|
version: Version;
|
|
2080
2219
|
fees: TSwapFeeEstimates;
|
|
2081
2220
|
paraIdTo?: number;
|
|
2082
2221
|
};
|
|
2083
|
-
type TCreateEthBridgeInstructionsOptions<TApi, TRes, TSigner> = {
|
|
2084
|
-
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
2222
|
+
type TCreateEthBridgeInstructionsOptions<TApi, TRes, TSigner, TCustomChain extends string = never> = {
|
|
2223
|
+
api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
|
|
2085
2224
|
recipient: TAddress;
|
|
2086
2225
|
assetInfo: TAssetInfo;
|
|
2087
2226
|
sender: string;
|
|
@@ -2109,93 +2248,10 @@ type TSetBalanceRes = {
|
|
|
2109
2248
|
declare abstract class BaseAssetsPallet {
|
|
2110
2249
|
protected palletName: TAssetsPallet;
|
|
2111
2250
|
constructor(palletName: TAssetsPallet);
|
|
2112
|
-
abstract mint<TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: string, assetInfo: WithAmount<TAssetInfo>, balance: bigint, chain: TSubstrateChain): Promise<TSetBalanceRes>;
|
|
2113
|
-
abstract getBalance<TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: string, asset: TAssetInfo, customCurrencyId?: unknown): Promise<bigint>;
|
|
2251
|
+
abstract mint<TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, address: string, assetInfo: WithAmount<TAssetInfo>, balance: bigint, chain: TSubstrateChain | TCustomChain): Promise<TSetBalanceRes>;
|
|
2252
|
+
abstract getBalance<TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, address: string, asset: TAssetInfo, customCurrencyId?: unknown): Promise<bigint>;
|
|
2114
2253
|
}
|
|
2115
2254
|
|
|
2116
|
-
type TGetBalanceCommonOptions = {
|
|
2117
|
-
/**
|
|
2118
|
-
* The address of the account.
|
|
2119
|
-
*/
|
|
2120
|
-
address: string;
|
|
2121
|
-
/**
|
|
2122
|
-
* The chain on which to query the balance.
|
|
2123
|
-
*/
|
|
2124
|
-
chain: TChain;
|
|
2125
|
-
};
|
|
2126
|
-
/**
|
|
2127
|
-
* Retrieves the asset balance for a given account on a specified chain.
|
|
2128
|
-
*/
|
|
2129
|
-
type TGetAssetBalanceOptionsBase = TGetBalanceCommonOptions & {
|
|
2130
|
-
/**
|
|
2131
|
-
* The resolved asset to query balance for.
|
|
2132
|
-
*/
|
|
2133
|
-
asset: TAssetInfo;
|
|
2134
|
-
};
|
|
2135
|
-
/**
|
|
2136
|
-
* Retrieves the currency balance for a given account on a specified chain.
|
|
2137
|
-
*/
|
|
2138
|
-
type TGetBalanceOptionsBase = TGetBalanceCommonOptions & {
|
|
2139
|
-
/**
|
|
2140
|
-
* The currency to query.
|
|
2141
|
-
*/
|
|
2142
|
-
currency?: TCurrencyCore;
|
|
2143
|
-
};
|
|
2144
|
-
type TGetBalanceOptions<TApi, TRes, TSigner> = WithApi<TGetBalanceOptionsBase, TApi, TRes, TSigner>;
|
|
2145
|
-
type TGetAssetBalanceOptions<TApi, TRes, TSigner> = WithApi<TGetAssetBalanceOptionsBase, TApi, TRes, TSigner>;
|
|
2146
|
-
type TGetTransferableAmountOptionsBase<TRes> = {
|
|
2147
|
-
/**
|
|
2148
|
-
* The sender address of the account.
|
|
2149
|
-
*/
|
|
2150
|
-
sender: string;
|
|
2151
|
-
/**
|
|
2152
|
-
* The chain on which to query the balance.
|
|
2153
|
-
*/
|
|
2154
|
-
origin: TSubstrateChain;
|
|
2155
|
-
/**
|
|
2156
|
-
* The destination chain.
|
|
2157
|
-
*/
|
|
2158
|
-
destination: TChain;
|
|
2159
|
-
/**
|
|
2160
|
-
* The currency to query.
|
|
2161
|
-
*/
|
|
2162
|
-
currency: WithAmount<TCurrencyCore>;
|
|
2163
|
-
version: Version | undefined;
|
|
2164
|
-
buildTx: TTxFactory<TRes>;
|
|
2165
|
-
feeAsset?: TCurrencyInput;
|
|
2166
|
-
};
|
|
2167
|
-
type TGetTransferableAmountOptions<TApi, TRes, TSigner> = WithApi<TGetTransferableAmountOptionsBase<TRes>, TApi, TRes, TSigner>;
|
|
2168
|
-
type TGetMinTransferableAmountOptions<TApi, TRes, TSigner> = WithApi<TGetTransferableAmountOptionsBase<TRes> & {
|
|
2169
|
-
recipient: string;
|
|
2170
|
-
builder: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptionsWithSender<TApi, TRes, TSigner>>;
|
|
2171
|
-
}, TApi, TRes, TSigner>;
|
|
2172
|
-
type TVerifyEdOnDestinationOptionsBase<TRes> = {
|
|
2173
|
-
/**
|
|
2174
|
-
* The origin chain.
|
|
2175
|
-
*/
|
|
2176
|
-
origin: TSubstrateChain;
|
|
2177
|
-
/**
|
|
2178
|
-
* The destination chain.
|
|
2179
|
-
*/
|
|
2180
|
-
destination: TChain;
|
|
2181
|
-
/**
|
|
2182
|
-
* The address of the account.
|
|
2183
|
-
*/
|
|
2184
|
-
recipient: string;
|
|
2185
|
-
/**
|
|
2186
|
-
* The account of the sender.
|
|
2187
|
-
*/
|
|
2188
|
-
sender: string;
|
|
2189
|
-
/**
|
|
2190
|
-
* The currency to query.
|
|
2191
|
-
*/
|
|
2192
|
-
currency: WithAmount<TCurrencyCore>;
|
|
2193
|
-
version: Version | undefined;
|
|
2194
|
-
buildTx: TTxFactory<TRes>;
|
|
2195
|
-
feeAsset?: TCurrencyInput;
|
|
2196
|
-
};
|
|
2197
|
-
type TVerifyEdOnDestinationOptions<TApi, TRes, TSigner> = WithApi<TVerifyEdOnDestinationOptionsBase<TRes>, TApi, TRes, TSigner>;
|
|
2198
|
-
|
|
2199
2255
|
type OneKey<K extends string, V = unknown> = {
|
|
2200
2256
|
[P in K]: Record<P, V> & Partial<Record<Exclude<K, P>, never>> extends infer O ? {
|
|
2201
2257
|
[Q in keyof O]: O[Q];
|
|
@@ -2239,21 +2295,21 @@ type TBifrostToken = {
|
|
|
2239
2295
|
};
|
|
2240
2296
|
type TXTokensCurrencySelection = TXcmVersioned<TLocation | TAsset | TAsset[]> | TXcmForeignAsset | TForeignAssetId | TForeignOrTokenAsset | TXcmAsset | TOtherReserveAsset | TBifrostToken | string | bigint | number | undefined;
|
|
2241
2297
|
|
|
2242
|
-
type TChainWithApi<TApi, TRes, TSigner, T = TSubstrateChain> = {
|
|
2243
|
-
api: PolkadotApi<TApi, TRes, TSigner>;
|
|
2298
|
+
type TChainWithApi<TApi, TRes, TSigner, T = TSubstrateChain, TCustomChain extends string = never> = {
|
|
2299
|
+
api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>;
|
|
2244
2300
|
chain: T;
|
|
2245
2301
|
};
|
|
2246
|
-
type TTypeAndThenCallContext<TApi, TRes, TSigner> = {
|
|
2247
|
-
origin: TChainWithApi<TApi, TRes, TSigner>;
|
|
2248
|
-
dest: TChainWithApi<TApi, TRes, TSigner, TChain>;
|
|
2249
|
-
reserve: TChainWithApi<TApi, TRes, TSigner, TChain>;
|
|
2302
|
+
type TTypeAndThenCallContext<TApi, TRes, TSigner, TCustomChain extends string = never> = {
|
|
2303
|
+
origin: TChainWithApi<TApi, TRes, TSigner, TSubstrateChain | TCustomChain, TCustomChain>;
|
|
2304
|
+
dest: TChainWithApi<TApi, TRes, TSigner, TChain, TCustomChain>;
|
|
2305
|
+
reserve: TChainWithApi<TApi, TRes, TSigner, TChain | TCustomChain, TCustomChain>;
|
|
2250
2306
|
isSubBridge: boolean;
|
|
2251
2307
|
isSnowbridge: boolean;
|
|
2252
2308
|
isRelayAsset: boolean;
|
|
2253
2309
|
assetInfo: WithAmount<TAssetInfo>;
|
|
2254
2310
|
systemAsset: TAssetInfo;
|
|
2255
2311
|
bridgeHopChain?: TSubstrateChain;
|
|
2256
|
-
options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>;
|
|
2312
|
+
options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner, TCustomChain>;
|
|
2257
2313
|
};
|
|
2258
2314
|
type TTypeAndThenFees = {
|
|
2259
2315
|
hopFees: bigint;
|
|
@@ -2278,9 +2334,9 @@ declare const deriveAccountId: (raw: Uint8Array) => Uint8Array;
|
|
|
2278
2334
|
declare const encodeSs58: (payload: Uint8Array, network: number) => string;
|
|
2279
2335
|
declare const convertSs58: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: string, chain: TSubstrateChain) => string;
|
|
2280
2336
|
|
|
2281
|
-
declare const getAssetBalanceInternal: <TApi, TRes, TSigner>({ api, address, chain, asset }: TGetAssetBalanceOptions<TApi, TRes, TSigner>) => Promise<bigint>;
|
|
2282
|
-
declare const getBalanceInternal: <TApi, TRes, TSigner>(options: TGetBalanceOptions<TApi, TRes, TSigner>) => Promise<bigint>;
|
|
2283
|
-
declare const getBalance: <TApi, TRes, TSigner>(options: TGetBalanceOptions<TApi, TRes, TSigner>) => Promise<bigint>;
|
|
2337
|
+
declare const getAssetBalanceInternal: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, address, chain, asset }: TGetAssetBalanceOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<bigint>;
|
|
2338
|
+
declare const getBalanceInternal: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TGetBalanceOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<bigint>;
|
|
2339
|
+
declare const getBalance: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TGetBalanceOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<bigint>;
|
|
2284
2340
|
|
|
2285
2341
|
declare const getEthErc20Balance: (chain: TExternalChain, asset: TAssetInfo, address: string) => Promise<bigint>;
|
|
2286
2342
|
|
|
@@ -2314,15 +2370,15 @@ declare const buildCustomChainAssetsInfo: (entry: TCustomChainEntryHydrated) =>
|
|
|
2314
2370
|
declare const getTChain: (paraId: number, ecosystem: TRelaychain | TExternalChain) => TChain | null;
|
|
2315
2371
|
|
|
2316
2372
|
interface TEvmExtension {
|
|
2317
|
-
executeTransfer: <TApi, TRes, TSigner>(options: TEvmTransferOptions<TApi, TRes, TSigner>) => Promise<string>;
|
|
2318
|
-
buildTransfer: <TApi, TRes, TSigner>(options: TBuildEvmTransferOptions<TApi, TRes, TSigner>) => Promise<TransactionSerializableEIP1559>;
|
|
2373
|
+
executeTransfer: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TEvmTransferOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<string>;
|
|
2374
|
+
buildTransfer: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TBuildEvmTransferOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<TransactionSerializableEIP1559>;
|
|
2319
2375
|
}
|
|
2320
2376
|
declare const registerEvmExtension: (extension: TEvmExtension | undefined) => void;
|
|
2321
2377
|
declare const getEvmExtensionOrThrow: () => TEvmExtension;
|
|
2322
2378
|
|
|
2323
2379
|
interface TEvmSnowbridgeExtension {
|
|
2324
|
-
executeTransfer: <TApi, TRes, TSigner>(options: TEvmTransferOptions<TApi, TRes, TSigner>) => Promise<string>;
|
|
2325
|
-
buildTransfer: <TApi, TRes, TSigner>(options: TBuildEvmTransferOptions<TApi, TRes, TSigner>) => Promise<TransactionSerializableEIP1559>;
|
|
2380
|
+
executeTransfer: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TEvmTransferOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<string>;
|
|
2381
|
+
buildTransfer: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TBuildEvmTransferOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<TransactionSerializableEIP1559>;
|
|
2326
2382
|
}
|
|
2327
2383
|
declare const registerEvmSnowbridgeExtension: (extension: TEvmSnowbridgeExtension | undefined) => void;
|
|
2328
2384
|
declare const getEvmSnowbridgeExtensionOrThrow: () => TEvmSnowbridgeExtension;
|
|
@@ -2338,8 +2394,8 @@ declare const getSwapExtensionOrThrow: () => TSwapExtension;
|
|
|
2338
2394
|
*/
|
|
2339
2395
|
declare const claimAssets: <TApi, TRes, TSigner>(options: TAssetClaimOptions<TApi, TRes, TSigner>) => Promise<TRes>;
|
|
2340
2396
|
|
|
2341
|
-
declare const resolveTransferParams: <TApi, TRes, TSigner>(options: TSubstrateTransferOptions<TApi, TRes, TSigner>) => {
|
|
2342
|
-
resolvedFeeAsset: TAssetInfo | undefined;
|
|
2397
|
+
declare const resolveTransferParams: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TSubstrateTransferOptions<TApi, TRes, TSigner, TCustomChain>) => {
|
|
2398
|
+
resolvedFeeAsset: _paraspell_assets.WithOptionalAmount<TAssetInfo> | undefined;
|
|
2343
2399
|
resolvedVersion: _paraspell_sdk_common.Version;
|
|
2344
2400
|
overriddenAsset: _paraspell_sdk_common.TLocation | _paraspell_assets.TAssetWithFee[] | undefined;
|
|
2345
2401
|
normalizedAsset: {
|
|
@@ -2354,50 +2410,50 @@ declare const resolveTransferParams: <TApi, TRes, TSigner>(options: TSubstrateTr
|
|
|
2354
2410
|
alias?: string;
|
|
2355
2411
|
};
|
|
2356
2412
|
};
|
|
2357
|
-
declare const createTransfer: <TApi, TRes, TSigner>(options: TSubstrateTransferOptions<TApi, TRes, TSigner>) => Promise<TRes>;
|
|
2413
|
+
declare const createTransfer: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TSubstrateTransferOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<TRes>;
|
|
2358
2414
|
|
|
2359
|
-
declare const dryRun: <TApi, TRes, TSigner>(options: TDryRunOptions<TApi, TRes, TSigner>) => Promise<TDryRunResult>;
|
|
2415
|
+
declare const dryRun: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TDryRunOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<TDryRunResult>;
|
|
2360
2416
|
|
|
2361
|
-
declare const dryRunInternal: <TApi, TRes, TSigner>(options: TDryRunOptions<TApi, TRes, TSigner>) => Promise<TDryRunResult>;
|
|
2417
|
+
declare const dryRunInternal: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TDryRunOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<TDryRunResult>;
|
|
2362
2418
|
|
|
2363
2419
|
declare const dryRunOrigin: <TApi, TRes, TSigner>(options: TDryRunCallOptions<TApi, TRes, TSigner>) => Promise<TDryRunChainResult>;
|
|
2364
2420
|
|
|
2365
2421
|
declare const getFailureInfo: (result: TDryRunResult) => Pick<TDryRunResult, "failureReason" | "failureSubReason" | "failureChain">;
|
|
2366
2422
|
|
|
2367
|
-
declare const traverseXcmHops: <TApi, TRes, TSigner, THopResult>(config: HopTraversalConfig<TApi, TRes, TSigner, THopResult>) => Promise<HopTraversalResult<THopResult>>;
|
|
2423
|
+
declare const traverseXcmHops: <TApi, TRes, TSigner, THopResult, TCustomChain extends string = never>(config: HopTraversalConfig<TApi, TRes, TSigner, THopResult, TCustomChain>) => Promise<HopTraversalResult<THopResult, TCustomChain>>;
|
|
2368
2424
|
declare const addEthereumBridgeFees: <TApi, TRes, TSigner, TResult extends {
|
|
2369
2425
|
fee?: bigint;
|
|
2370
|
-
}>(api: PolkadotApi<TApi, TRes, TSigner>, bridgeHubResult: TResult | undefined, destination: TChain, assetHubChain: TSubstrateChain) => Promise<TResult | undefined>;
|
|
2426
|
+
}, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, bridgeHubResult: TResult | undefined, destination: TChain, assetHubChain: TSubstrateChain) => Promise<TResult | undefined>;
|
|
2371
2427
|
|
|
2372
2428
|
declare const calcPreviewMintAmount: (balance: bigint, desired: bigint) => bigint | null;
|
|
2373
|
-
declare const wrapTxBypass: <TApi, TRes, TSigner>(dryRunOptions: TDryRunBypassOptions<TApi, TRes, TSigner>, options?: TBypassOptions) => Promise<TRes>;
|
|
2429
|
+
declare const wrapTxBypass: <TApi, TRes, TSigner, TCustomChain extends string = never>(dryRunOptions: TDryRunBypassOptions<TApi, TRes, TSigner, TCustomChain>, options?: TBypassOptions) => Promise<TRes>;
|
|
2374
2430
|
|
|
2375
|
-
declare const getParaEthTransferFees: <TApi, TRes, TSigner>(ahApi: PolkadotApi<TApi, TRes, TSigner>, shouldDisconnect?: boolean) => Promise<[bigint, bigint]>;
|
|
2431
|
+
declare const getParaEthTransferFees: <TApi, TRes, TSigner, TCustomChain extends string = never>(ahApi: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, shouldDisconnect?: boolean) => Promise<[bigint, bigint]>;
|
|
2376
2432
|
|
|
2377
2433
|
declare const transferMoonbeamEvm: <TApi, TRes, TSigner>(options: TEvmTransferOptions<TApi, TRes, TSigner>) => Promise<string>;
|
|
2378
2434
|
|
|
2379
2435
|
declare const transferMoonbeamToEth: <TApi, TRes, TSigner>(from: TSubstrateChain, { api, to, signer, recipient, ahAddress, currency }: TEvmTransferOptions<TApi, TRes, TSigner>) => Promise<`0x${string}`>;
|
|
2380
2436
|
|
|
2381
|
-
declare const getOriginXcmFee: <TApi, TRes, TSigner, TDisableFallback extends boolean = boolean>(options: TGetOriginXcmFeeOptions<TApi, TRes, TSigner, TDisableFallback>) => Promise<TXcmFeeDetailWithForwardedXcm<TDisableFallback>>;
|
|
2437
|
+
declare const getOriginXcmFee: <TApi, TRes, TSigner, TDisableFallback extends boolean = boolean, TCustomChain extends string = never>(options: TGetOriginXcmFeeOptions<TApi, TRes, TSigner, TDisableFallback, TCustomChain>) => Promise<TXcmFeeDetailWithForwardedXcm<TDisableFallback>>;
|
|
2382
2438
|
|
|
2383
|
-
declare const getOriginXcmFeeInternal: <TApi, TRes, TSigner>({ api, tx, origin, destination, sender, disableFallback, feeAsset, currency, version, useRootOrigin }: TGetOriginXcmFeeInternalOptions<TApi, TRes, TSigner>) => Promise<TXcmFeeDetail & {
|
|
2439
|
+
declare const getOriginXcmFeeInternal: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, tx, origin, destination, sender, disableFallback, feeAsset, currency, version, useRootOrigin }: TGetOriginXcmFeeInternalOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<TXcmFeeDetail & {
|
|
2384
2440
|
forwardedXcms?: any;
|
|
2385
2441
|
destParaId?: number;
|
|
2386
2442
|
}>;
|
|
2387
2443
|
|
|
2388
|
-
declare const getXcmFeeInternal: <TApi, TRes, TSigner, TDisableFallback extends boolean>(options: TGetXcmFeeOptions<TApi, TRes, TSigner, TDisableFallback>) => Promise<TGetXcmFeeResult<TDisableFallback>>;
|
|
2389
|
-
declare const getXcmFee: <TApi, TRes, TSigner, TDisableFallback extends boolean>(options: TGetXcmFeeOptions<TApi, TRes, TSigner, TDisableFallback>) => Promise<TGetXcmFeeResult<TDisableFallback>>;
|
|
2444
|
+
declare const getXcmFeeInternal: <TApi, TRes, TSigner, TDisableFallback extends boolean, TCustomChain extends string = never>(options: TGetXcmFeeOptions<TApi, TRes, TSigner, TDisableFallback, TCustomChain>) => Promise<TGetXcmFeeResult<TDisableFallback>>;
|
|
2445
|
+
declare const getXcmFee: <TApi, TRes, TSigner, TDisableFallback extends boolean, TCustomChain extends string = never>(options: TGetXcmFeeOptions<TApi, TRes, TSigner, TDisableFallback, TCustomChain>) => Promise<TGetXcmFeeResult<TDisableFallback>>;
|
|
2390
2446
|
|
|
2391
|
-
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>>;
|
|
2447
|
+
declare const getXcmFeeOnce: <TApi, TRes, TSigner, TDisableFallback extends boolean, TCustomChain extends string = never>({ api, tx, origin, destination, sender, recipient, currency, feeAsset, version, disableFallback, swapConfig, useRootOrigin, skipReverseFeeCalculation }: TGetXcmFeeInternalOptions<TApi, TRes, TSigner, TDisableFallback, TCustomChain>) => Promise<TGetXcmFeeResult<TDisableFallback>>;
|
|
2392
2448
|
|
|
2393
|
-
declare const getBridgeStatus: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>) => Promise<TBridgeStatus>;
|
|
2449
|
+
declare const getBridgeStatus: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>) => Promise<TBridgeStatus>;
|
|
2394
2450
|
|
|
2395
2451
|
declare const aggregateHopFees: (hops: TXcmFeeHopInfo[], matchAsset: TAssetInfo) => {
|
|
2396
2452
|
totalHopFee: bigint;
|
|
2397
2453
|
bridgeFee?: bigint;
|
|
2398
2454
|
};
|
|
2399
2455
|
|
|
2400
|
-
declare const buildDestInfo: <TApi, TRes, TSigner>({ api, origin, destination, recipient, currency, originFee, isFeeAssetAh, destFeeDetail, totalHopFee, bridgeFee }: TBuildDestInfoOptions<TApi, TRes, TSigner>) => Promise<{
|
|
2456
|
+
declare const buildDestInfo: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, origin, destination, recipient, currency, originFee, isFeeAssetAh, paysDestFee, destFeeDetail, totalHopFee, bridgeFee }: TBuildDestInfoOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<{
|
|
2401
2457
|
receivedCurrency: {
|
|
2402
2458
|
sufficient: boolean | UnableToComputeError;
|
|
2403
2459
|
receivedAmount: bigint | UnableToComputeError;
|
|
@@ -2413,7 +2469,7 @@ declare const buildDestInfo: <TApi, TRes, TSigner>({ api, origin, destination, r
|
|
|
2413
2469
|
};
|
|
2414
2470
|
}>;
|
|
2415
2471
|
|
|
2416
|
-
declare const buildHopInfo: <TApi, TRes, TSigner>({ api, chain, fee, originChain, asset, currency }: BuildHopInfoOptions<TApi, TRes, TSigner>) => Promise<{
|
|
2472
|
+
declare const buildHopInfo: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, chain, fee, originChain, asset, currency }: BuildHopInfoOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<{
|
|
2417
2473
|
asset: _paraspell_assets.TAssetInfo;
|
|
2418
2474
|
xcmFee: {
|
|
2419
2475
|
fee: bigint;
|
|
@@ -2421,22 +2477,25 @@ declare const buildHopInfo: <TApi, TRes, TSigner>({ api, chain, fee, originChain
|
|
|
2421
2477
|
};
|
|
2422
2478
|
}>;
|
|
2423
2479
|
|
|
2424
|
-
declare const buildOriginInfo: <TApi, TRes, TSigner>({ api, origin, sender,
|
|
2480
|
+
declare const buildOriginInfo: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, origin, sender, assets, amount, originFee, originFeeAsset, isFeeAssetAh }: TBuildOriginInfoOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<{
|
|
2481
|
+
selectedCurrency: TSelectedCurrencyInfo[];
|
|
2482
|
+
xcmFee: TOriginXcmFeeInfo;
|
|
2483
|
+
}>;
|
|
2425
2484
|
|
|
2426
|
-
declare const getTransferInfo: <TApi, TRes, TSigner>({ api, buildTx, origin, destination, sender, ahAddress, recipient, currency, feeAsset, version }: TGetTransferInfoOptions<TApi, TRes, TSigner>) => Promise<TTransferInfo
|
|
2485
|
+
declare const getTransferInfo: <TApi, TRes, TSigner, TCurrency extends TCurrencyInputWithAmount, TCustomChain extends string = never>({ api, buildTx, origin, destination, sender, ahAddress, recipient, currency, feeAsset, version }: TGetTransferInfoOptions<TApi, TRes, TSigner, TCustomChain, TCurrency>) => Promise<TTransferInfo<TCurrency>>;
|
|
2427
2486
|
|
|
2428
|
-
declare const getMinTransferableAmountInternal: <TApi, TRes, TSigner>({ api, origin, sender, recipient,
|
|
2429
|
-
declare const getMinTransferableAmount: <TApi, TRes, TSigner>(options: TGetMinTransferableAmountOptions<TApi, TRes, TSigner>) => Promise<bigint
|
|
2487
|
+
declare const getMinTransferableAmountInternal: <TApi, TRes, TSigner, TCurrency extends TCurrencyInputWithAmount, TCustomChain extends string = never>({ api, origin, sender, recipient, destination, currency, feeAsset, buildTx, builder, version }: TGetMinTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain, TCurrency>) => Promise<TPerAssetResult<TCurrency, bigint>>;
|
|
2488
|
+
declare const getMinTransferableAmount: <TApi, TRes, TSigner, TCurrency extends TCurrencyInputWithAmount, TCustomChain extends string = never>(options: TGetMinTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain, TCurrency>) => Promise<TPerAssetResult<TCurrency, bigint>>;
|
|
2430
2489
|
|
|
2431
|
-
declare const getTransferableAmountInternal: <TApi, TRes, TSigner
|
|
2432
|
-
declare const getTransferableAmount: <TApi, TRes, TSigner>(options: TGetTransferableAmountOptions<TApi, TRes, TSigner>) => Promise<bigint
|
|
2490
|
+
declare const getTransferableAmountInternal: <TApi, TRes, TSigner, TCurrency extends TCurrencyInputWithAmount, TCustomChain extends string = never>(options: TGetTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain, TCurrency>) => Promise<TPerAssetResult<TCurrency, bigint>>;
|
|
2491
|
+
declare const getTransferableAmount: <TApi, TRes, TSigner, TCurrency extends TCurrencyInputWithAmount, TCustomChain extends string = never>(options: TGetTransferableAmountOptions<TApi, TRes, TSigner, TCustomChain, TCurrency>) => Promise<TPerAssetResult<TCurrency, bigint>>;
|
|
2433
2492
|
|
|
2434
2493
|
declare const resolveAssetCount: <TApi, TRes, TSigner>(overriddenAsset: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>["overriddenAsset"], isRelayAsset: boolean) => number;
|
|
2435
|
-
declare const constructTypeAndThenCall: <TApi, TRes, TSigner>(context: TTypeAndThenCallContext<TApi, TRes, TSigner>, fees?: TTypeAndThenFees | null) => Promise<TSerializedExtrinsics>;
|
|
2494
|
+
declare const constructTypeAndThenCall: <TApi, TRes, TSigner, TCustomChain extends string = never>(context: TTypeAndThenCallContext<TApi, TRes, TSigner, TCustomChain>, fees?: TTypeAndThenFees | null) => Promise<TSerializedExtrinsics>;
|
|
2436
2495
|
/**
|
|
2437
2496
|
* Creates a type and then call for transferring assets using XCM. Works only for DOT and snowbridge assets so far.
|
|
2438
2497
|
*/
|
|
2439
|
-
declare const createTypeAndThenCall: <TApi, TRes, TSigner>(options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>, overrides?: TTypeAndThenOverrides) => Promise<TSerializedExtrinsics>;
|
|
2498
|
+
declare const createTypeAndThenCall: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner, TCustomChain>, overrides?: TTypeAndThenOverrides) => Promise<TSerializedExtrinsics>;
|
|
2440
2499
|
|
|
2441
2500
|
/**
|
|
2442
2501
|
* Creates a type-and-then call but auto-selects the asset reserve between AssetHub and the Relay chain
|
|
@@ -2445,18 +2504,19 @@ declare const createTypeAndThenCall: <TApi, TRes, TSigner>(options: TPolkadotXCM
|
|
|
2445
2504
|
*/
|
|
2446
2505
|
declare const createTypeThenAutoReserve: <TApi, TRes, TSigner>(chain: TSubstrateChain, options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>) => Promise<TSerializedExtrinsics>;
|
|
2447
2506
|
|
|
2507
|
+
declare const assertNotRawAssets: (currency: TCurrencyInput) => asserts currency is Exclude<TCurrencyInput, TAsset<TAmount>[]>;
|
|
2448
2508
|
declare const validateCurrency: (currency: TCurrencyInput, feeAsset?: TCurrencyInput) => void;
|
|
2449
|
-
declare const validateDestination: <TApi, TRes, TSigner>(origin: TSubstrateChain, destination: TDestination, api: PolkadotApi<TApi, TRes, TSigner>) => void;
|
|
2509
|
+
declare const validateDestination: <TApi, TRes, TSigner, TCustomChain extends string = never>(origin: TSubstrateChain, destination: TDestination, api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>) => void;
|
|
2450
2510
|
declare const validateAssetSpecifiers: (assetCheckEnabled: boolean, currency: TCurrencyInput) => void;
|
|
2451
|
-
declare const validateTransact: <TApi, TRes, TSigner>({ api, from, to, sender, recipient: address, transactOptions }: TSubstrateTransferOptions<TApi, TRes, TSigner>) => ValidationError | undefined;
|
|
2511
|
+
declare const validateTransact: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, from, to, sender, recipient: address, currency, transactOptions }: TSubstrateTransferOptions<TApi, TRes, TSigner, TCustomChain>) => ValidationError | undefined;
|
|
2452
2512
|
|
|
2453
|
-
declare const verifyEdOnDestination: <TApi, TRes, TSigner>(options: TVerifyEdOnDestinationOptions<TApi, TRes, TSigner>) => Promise<boolean>;
|
|
2513
|
+
declare const verifyEdOnDestination: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TVerifyEdOnDestinationOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<boolean>;
|
|
2454
2514
|
|
|
2455
|
-
declare const compareAddresses: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, addr1: string, addr2: string) => boolean;
|
|
2515
|
+
declare const compareAddresses: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, addr1: string, addr2: string) => boolean;
|
|
2456
2516
|
|
|
2457
|
-
declare const validateAddress: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, address: TAddress, chain: TChain, isDestination?: boolean) => void;
|
|
2517
|
+
declare const validateAddress: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, address: TAddress, chain: TChain | TCustomChain, isDestination?: boolean) => void;
|
|
2458
2518
|
|
|
2459
|
-
declare const validateDestinationAddress: <TApi, TRes, TSigner>(address: TAddress, destination: TDestination, api: PolkadotApi<TApi, TRes, TSigner>) => void;
|
|
2519
|
+
declare const validateDestinationAddress: <TApi, TRes, TSigner, TCustomChain extends string = never>(address: TAddress, destination: TDestination, api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>) => void;
|
|
2460
2520
|
|
|
2461
2521
|
declare const assertToIsString: (to: TDestination, overrideMsg?: string) => asserts to is Exclude<TDestination, TLocation>;
|
|
2462
2522
|
declare const assertAddressIsString: (address: TAddress) => asserts address is Exclude<TAddress, TLocation>;
|
|
@@ -2482,18 +2542,18 @@ declare const formatAssetIdToERC20: (id: string) => string;
|
|
|
2482
2542
|
declare const maybeOverrideAssets: (version: Version, amount: bigint, assets: TAsset[], overriddenCurrency?: TLocation | TAsset[]) => TAsset | TAsset[];
|
|
2483
2543
|
declare const maybeOverrideAsset: (version: Version, amount: bigint, asset: TAsset, overriddenCurrency?: TLocation | TAsset[]) => TAsset;
|
|
2484
2544
|
|
|
2485
|
-
declare const sortAssets: (assets:
|
|
2545
|
+
declare const sortAssets: <T extends TAsset>(assets: T[]) => T[];
|
|
2486
2546
|
|
|
2487
|
-
declare const computeOverridenAmount: <TApi, TRes, TSigner>(options: TCreateTxsOptions<TApi, TRes, TSigner>, increaseAmount: string, relative?: boolean) => number | bigint;
|
|
2488
|
-
declare const overrideTxAmount: <TApi, TRes, TSigner>(options: TCreateTxsOptions<TApi, TRes, TSigner>, builder: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptions<TApi, TRes, TSigner
|
|
2489
|
-
declare const createTxOverrideAmount: <TApi, TRes, TSigner>(options: TCreateTxsOptions<TApi, TRes, TSigner>, builder: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptions<TApi, TRes, TSigner
|
|
2490
|
-
declare const createTransferOrSwapAll: <TApi, TRes, TSigner>(options: TSubstrateTransferOptions<TApi, TRes, TSigner>) => Promise<TTransactionContext<TApi, TRes>[]>;
|
|
2491
|
-
declare const createTransferOrSwap: <TApi, TRes, TSigner>(options: TSubstrateTransferOptions<TApi, TRes, TSigner>) => Promise<TRes>;
|
|
2547
|
+
declare const computeOverridenAmount: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TCreateTxsOptions<TApi, TRes, TSigner, TCustomChain>, increaseAmount: string, relative?: boolean) => number | bigint;
|
|
2548
|
+
declare const overrideTxAmount: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TCreateTxsOptions<TApi, TRes, TSigner, TCustomChain>, builder: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptions<TApi, TRes, TSigner>, TCustomChain>, amount: string, relative?: boolean) => Promise<TRes>;
|
|
2549
|
+
declare const createTxOverrideAmount: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TCreateTxsOptions<TApi, TRes, TSigner, TCustomChain>, builder: GeneralBuilder<TApi, TRes, TSigner, TTransferBaseOptions<TApi, TRes, TSigner>, TCustomChain>, amount?: string, relative?: boolean) => Promise<TRes>;
|
|
2550
|
+
declare const createTransferOrSwapAll: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TSubstrateTransferOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<TTransactionContext<TApi, TRes>[]>;
|
|
2551
|
+
declare const createTransferOrSwap: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TSubstrateTransferOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<TRes>;
|
|
2492
2552
|
|
|
2493
2553
|
declare const getAssetReserveChain: (chain: TSubstrateChain, assetLocation: TLocation, resolveExternalReserve?: boolean) => TChain;
|
|
2494
|
-
declare const getAssetReserveChainImpl: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner>, chain: TSubstrateChain | TCustomChain, assetLocation: TLocation, resolveExternalReserve?: boolean) => TChain | TCustomChain;
|
|
2554
|
+
declare const getAssetReserveChainImpl: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, chain: TSubstrateChain | TCustomChain, assetLocation: TLocation, resolveExternalReserve?: boolean) => TChain | TCustomChain;
|
|
2495
2555
|
|
|
2496
|
-
declare const getChainVersion: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, chain: TChain) => Version;
|
|
2556
|
+
declare const getChainVersion: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, chain: TChain | TCustomChain) => Version;
|
|
2497
2557
|
|
|
2498
2558
|
/**
|
|
2499
2559
|
* Gets the relay chain (Polkadot, Kusama, Westend, or Paseo) of a given chain.
|
|
@@ -2502,7 +2562,7 @@ declare const getChainVersion: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes
|
|
|
2502
2562
|
* @returns The corresponding relay chain.
|
|
2503
2563
|
*/
|
|
2504
2564
|
declare const getRelayChainOf: (chain: TSubstrateChain) => TRelaychain;
|
|
2505
|
-
declare const getRelayChainOfImpl: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner>, chain: TSubstrateChain | TCustomChain) => TRelaychain;
|
|
2565
|
+
declare const getRelayChainOfImpl: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, chain: TSubstrateChain | TCustomChain) => TRelaychain;
|
|
2506
2566
|
|
|
2507
2567
|
/**
|
|
2508
2568
|
* Gets the native asset symbol of the relay chain that the given chain belongs to.
|
|
@@ -2512,18 +2572,18 @@ declare const getRelayChainOfImpl: <TApi, TRes, TSigner, TCustomChain extends st
|
|
|
2512
2572
|
*/
|
|
2513
2573
|
declare const getRelayChainSymbolOf: (chain: TSubstrateChain) => string;
|
|
2514
2574
|
|
|
2515
|
-
declare const createChainClient: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, chain: TSubstrateChain) => Promise<TApi>;
|
|
2575
|
+
declare const createChainClient: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, chain: TSubstrateChain) => Promise<TApi>;
|
|
2516
2576
|
|
|
2517
2577
|
declare const resolveModuleError: (chain: TSubstrateChain, error: TModuleError) => TDryRunError;
|
|
2518
2578
|
|
|
2519
|
-
declare const createEthereumBridgeInstructions: <TApi, TRes, TSigner>({ api, sender, recipient, assetInfo, ahAddress, version }: TCreateEthBridgeInstructionsOptions<TApi, TRes, TSigner>, origin: TSubstrateChain, messageId: string, ethAsset: TAssetInfo) => unknown[];
|
|
2520
|
-
declare const createCustomXcmOnDest: <TApi, TRes, TSigner>(options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>, origin: TSubstrateChain, messageId: string, ethAsset: TAssetInfo) => {
|
|
2579
|
+
declare const createEthereumBridgeInstructions: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, sender, recipient, assetInfo, ahAddress, version }: TCreateEthBridgeInstructionsOptions<TApi, TRes, TSigner, TCustomChain>, origin: TSubstrateChain, messageId: string, ethAsset: TAssetInfo) => unknown[];
|
|
2580
|
+
declare const createCustomXcmOnDest: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner, TCustomChain>, origin: TSubstrateChain, messageId: string, ethAsset: TAssetInfo) => {
|
|
2521
2581
|
[x: string]: unknown[];
|
|
2522
2582
|
};
|
|
2523
2583
|
|
|
2524
|
-
declare const generateMessageId: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, senderAddress: string, sourceParaId: number, tokenAddress: string, recipient: string, amount: TAmount) => Promise<string>;
|
|
2584
|
+
declare const generateMessageId: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, senderAddress: string, sourceParaId: number, tokenAddress: string, recipient: string, amount: TAmount) => Promise<string>;
|
|
2525
2585
|
|
|
2526
|
-
declare const padFee: (raw: bigint, origin: TSubstrateChain, dest: TChain, side: "origin" | "destination") => bigint;
|
|
2586
|
+
declare const padFee: <TCustomChain extends string = never>(raw: bigint, origin: TSubstrateChain | TCustomChain, dest: TChain, side: "origin" | "destination") => bigint;
|
|
2527
2587
|
declare const padValueBy: (amount: bigint, percent: number) => bigint;
|
|
2528
2588
|
|
|
2529
2589
|
/**
|
|
@@ -2540,33 +2600,33 @@ declare const isConfig: <TApi>(value: any) => value is TBuilderConfig<TApi>;
|
|
|
2540
2600
|
|
|
2541
2601
|
declare const isViemSigner: (value: unknown) => value is WalletClient;
|
|
2542
2602
|
|
|
2543
|
-
declare const createBeneficiaryLocXTokens: <TApi, TRes, TSigner>({ api, recipient, origin, destination, version, paraId }: TCreateBeneficiaryXTokensOptions<TApi, TRes, TSigner>) => TLocation;
|
|
2544
|
-
declare const createBeneficiaryLocation: <TApi, TRes, TSigner>({ api, address, version }: TCreateBeneficiaryOptions<TApi, TRes, TSigner>) => TLocation;
|
|
2603
|
+
declare const createBeneficiaryLocXTokens: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, recipient, origin, destination, version, paraId }: TCreateBeneficiaryXTokensOptions<TApi, TRes, TSigner, TCustomChain>) => TLocation;
|
|
2604
|
+
declare const createBeneficiaryLocation: <TApi, TRes, TSigner, TCustomChain extends string = never>({ api, address, version }: TCreateBeneficiaryOptions<TApi, TRes, TSigner, TCustomChain>) => TLocation;
|
|
2545
2605
|
|
|
2546
|
-
declare const createDestination: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner>, version: Version, origin: TChain | TCustomChain, destination: TDestination, chainId?: number, junction?: TJunction, parents?: Parents) => TLocation;
|
|
2606
|
+
declare const createDestination: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, version: Version, origin: TChain | TCustomChain, destination: TDestination | TCustomChain, chainId?: number, junction?: TJunction, parents?: Parents) => TLocation;
|
|
2547
2607
|
declare const createVersionedDestination: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, version: Version, origin: TSubstrateChain, destination: TDestination, chainId?: number, junction?: TJunction, parents?: Parents) => TXcmVersioned<TLocation>;
|
|
2548
2608
|
|
|
2549
2609
|
declare const createX1Payload: (version: Version, junction: TJunction) => TJunctions;
|
|
2550
2610
|
|
|
2551
|
-
declare const getChainLocation: (chain: TChain, destChain: TChain) => TLocation;
|
|
2611
|
+
declare const getChainLocation: <TCustomChain extends string = never>(chain: TChain | TCustomChain, destChain: TChain | TCustomChain, customCtx?: TFullCustomCtx) => TLocation;
|
|
2552
2612
|
|
|
2553
2613
|
declare const localizeLocation: (chain: TChain, location: TLocation, origin?: TChain) => TLocation;
|
|
2554
|
-
declare const localizeLocationImpl: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner>, chain: TChain | TCustomChain, location: TLocation, origin?: TChain | TCustomChain) => TLocation;
|
|
2614
|
+
declare const localizeLocationImpl: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, chain: TChain | TCustomChain, location: TLocation, origin?: TChain | TCustomChain) => TLocation;
|
|
2555
2615
|
|
|
2556
2616
|
declare const reverseTransformLocation: (location: TLocation) => TLocation;
|
|
2557
2617
|
|
|
2558
2618
|
declare const normalizeAmount: (amount: bigint) => bigint;
|
|
2559
2619
|
|
|
2560
|
-
declare const resolveDestChain: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner>, originChain: TSubstrateChain | TCustomChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "Darwinia" | "EnergyWebX" | "Hydration" | "Interlay" | "Heima" | "Jamton" | "Moonbeam" | "CoretimePolkadot" | "Collectives" | "Crust" | "NeuroWeb" | "Pendulum" | "Mythos" | "Peaq" | "PeoplePolkadot" | "Unique" | "Xode" | "AssetHubKusama" | "BridgeHubKusama" | "Karura" | "Kintsugi" | "Moonriver" | "CoretimeKusama" | "Encointer" | "Basilisk" | "BifrostKusama" | "CrustShadow" | "Crab" | "Quartz" | "RobonomicsPolkadot" | "PeopleKusama" | "Shiden" | "Zeitgeist" | "AssetHubWestend" | "BridgeHubWestend" | "CollectivesWestend" | "CoretimeWestend" | "Penpal" | "PeopleWestend" | "AjunaPaseo" | "AssetHubPaseo" | "BifrostPaseo" | "BridgeHubPaseo" | "CoretimePaseo" | "EnergyWebXPaseo" | "HeimaPaseo" | "HydrationPaseo" | "NeuroWebPaseo" | "PeoplePaseo" | "ZeitgeistPaseo" | undefined;
|
|
2620
|
+
declare const resolveDestChain: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, originChain: TSubstrateChain | TCustomChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "Darwinia" | "EnergyWebX" | "Hydration" | "Interlay" | "Heima" | "Jamton" | "Moonbeam" | "CoretimePolkadot" | "Collectives" | "Crust" | "NeuroWeb" | "Pendulum" | "Mythos" | "Peaq" | "PeoplePolkadot" | "Unique" | "Xode" | "AssetHubKusama" | "BridgeHubKusama" | "Karura" | "Kintsugi" | "Moonriver" | "CoretimeKusama" | "Encointer" | "Basilisk" | "BifrostKusama" | "CrustShadow" | "Crab" | "Quartz" | "RobonomicsPolkadot" | "PeopleKusama" | "Shiden" | "Zeitgeist" | "AssetHubWestend" | "BridgeHubWestend" | "CollectivesWestend" | "CoretimeWestend" | "Penpal" | "PeopleWestend" | "AjunaPaseo" | "AssetHubPaseo" | "BifrostPaseo" | "BridgeHubPaseo" | "CoretimePaseo" | "EnergyWebXPaseo" | "HeimaPaseo" | "HydrationPaseo" | "NeuroWebPaseo" | "PeoplePaseo" | "ZeitgeistPaseo" | undefined;
|
|
2561
2621
|
|
|
2562
|
-
declare const resolveParaId: <TApi, TRes, TSigner>(paraId: number | undefined, destination: TDestination, api: PolkadotApi<TApi, TRes, TSigner>) => number | undefined;
|
|
2622
|
+
declare const resolveParaId: <TApi, TRes, TSigner, TCustomChain extends string = never>(paraId: number | undefined, destination: TDestination, api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>) => number | undefined;
|
|
2563
2623
|
|
|
2564
2624
|
declare const convertBuilderConfig: <TApi>(config: TBuilderOptions<TApiOrUrl<TApi>> | undefined) => TBuilderConfig<TUrl> | undefined;
|
|
2565
|
-
declare const createSwapBuilder: <TApi, TRes, TSigner>(options: TTransferOptionsWithSwap<TApi, TRes, TSigner>) => TSwapBuilder<TApi, TRes, TSigner>;
|
|
2566
|
-
declare const executeWithSwap: <TApi, TRes, TSigner, T>(options: TTransferOptionsWithSwap<TApi, TRes, TSigner>, executor: (builder: TSwapBuilder<TApi, TRes, TSigner>) => Promise<T>) => Promise<T>;
|
|
2625
|
+
declare const createSwapBuilder: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TTransferOptionsWithSwap<TApi, TRes, TSigner, TCustomChain>) => TSwapBuilder<TApi, TRes, TSigner>;
|
|
2626
|
+
declare const executeWithSwap: <TApi, TRes, TSigner, T, TCustomChain extends string = never>(options: TTransferOptionsWithSwap<TApi, TRes, TSigner, TCustomChain>, executor: (builder: TSwapBuilder<TApi, TRes, TSigner>) => Promise<T>) => Promise<T>;
|
|
2567
2627
|
declare const normalizeExchange: (exchange: TExchangeInput) => TExchangeInput;
|
|
2568
2628
|
|
|
2569
|
-
declare const abstractDecimals: <TApi, TRes, TSigner>(amount: TAmount, decimals: number | undefined, api: PolkadotApi<TApi, TRes, TSigner>) => bigint;
|
|
2629
|
+
declare const abstractDecimals: <TApi, TRes, TSigner, TCustomChain extends string = never>(amount: TAmount, decimals: number | undefined, api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>) => bigint;
|
|
2570
2630
|
declare const applyDecimalAbstraction: (amount: TAmount, decimals: number | undefined, shouldAbstract: boolean) => bigint;
|
|
2571
2631
|
|
|
2572
2632
|
declare const createAssetsFilter: (asset: TAsset, version: Version) => {
|
|
@@ -2580,19 +2640,19 @@ declare const createAssetsFilter: (asset: TAsset, version: Version) => {
|
|
|
2580
2640
|
};
|
|
2581
2641
|
};
|
|
2582
2642
|
|
|
2583
|
-
declare const createBaseExecuteXcm: <TApi, TRes, TSigner>(options: TCreateTransferXcmOptions<TApi, TRes, TSigner> & {
|
|
2643
|
+
declare const createBaseExecuteXcm: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TCreateTransferXcmOptions<TApi, TRes, TSigner, TCustomChain> & {
|
|
2584
2644
|
suffixXcm?: unknown[];
|
|
2585
2645
|
}) => unknown[];
|
|
2586
2646
|
|
|
2587
|
-
declare const createExecuteCall: (chain: TSubstrateChain, xcm: TXcmVersioned<any>, maxWeight: TWeight) => TSerializedExtrinsics;
|
|
2647
|
+
declare const createExecuteCall: <TCustomChain extends string = never>(chain: TSubstrateChain | TCustomChain, xcm: TXcmVersioned<any>, maxWeight: TWeight) => TSerializedExtrinsics;
|
|
2588
2648
|
|
|
2589
2649
|
declare const createExecuteExchangeXcm: <TApi, TRes, TSigner>(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>, origin: TSubstrateChain, weight: TWeight, originExecutionFee: bigint, destExecutionFee: bigint) => TRes;
|
|
2590
2650
|
|
|
2591
|
-
declare const createDirectExecuteXcm: <TApi, TRes, TSigner>(options: TCreateTransferXcmOptions<TApi, TRes, TSigner>) => Promise<OneKey<_paraspell_sdk_common.Version, unknown[]>>;
|
|
2651
|
+
declare const createDirectExecuteXcm: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TCreateTransferXcmOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<OneKey<_paraspell_sdk_common.Version, unknown[]>>;
|
|
2592
2652
|
|
|
2593
|
-
declare const handleExecuteTransfer: <TApi, TRes, TSigner>(options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>) => Promise<TSerializedExtrinsics>;
|
|
2653
|
+
declare const handleExecuteTransfer: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TPolkadotXCMTransferOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<TSerializedExtrinsics>;
|
|
2594
2654
|
|
|
2595
|
-
declare const handleSwapExecuteTransfer: <TApi, TRes, TSigner>(options: TCreateSwapXcmOptions<TApi, TRes, TSigner>) => Promise<TRes>;
|
|
2655
|
+
declare const handleSwapExecuteTransfer: <TApi, TRes, TSigner, TCustomChain extends string = never>(options: TCreateSwapXcmOptions<TApi, TRes, TSigner, TCustomChain>) => Promise<TRes>;
|
|
2596
2656
|
|
|
2597
2657
|
declare const getLocalTransferAmount: <TApi, TRes, TSigner>({ assetInfo, balance, isAmountAll, keepAlive }: TTransferLocalOptions<TApi, TRes, TSigner>, fee?: bigint) => bigint;
|
|
2598
2658
|
|
|
@@ -2607,8 +2667,8 @@ declare const formatUnits: typeof formatUnits$1;
|
|
|
2607
2667
|
|
|
2608
2668
|
declare const addXcmVersionHeader: <T, V extends Version>(obj: T, version: V) => OneKey<V, T>;
|
|
2609
2669
|
declare const selectXcmVersion: (forcedVersion: Version | undefined, originVersion: Version, destMaxVersion?: Version) => Version;
|
|
2610
|
-
declare const pickCompatibleXcmVersion: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, origin: TSubstrateChain, destination: TDestination, override?: Version) => Version;
|
|
2611
|
-
declare const pickRouterCompatibleXcmVersion: <TApi, TRes, TSigner>(api: PolkadotApi<TApi, TRes, TSigner>, origin: TSubstrateChain | undefined, exchangeChain: TSubstrateChain, destination: TChain | undefined) => Version;
|
|
2670
|
+
declare const pickCompatibleXcmVersion: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, origin: TSubstrateChain | TCustomChain, destination: TDestination, override?: Version) => Version;
|
|
2671
|
+
declare const pickRouterCompatibleXcmVersion: <TApi, TRes, TSigner, TCustomChain extends string = never>(api: PolkadotApi<TApi, TRes, TSigner, TCustomChain>, origin: TSubstrateChain | undefined, exchangeChain: TSubstrateChain, destination: TChain | undefined) => Version;
|
|
2612
2672
|
|
|
2613
|
-
export { API_TYPES, AmountTooLowError, ApiNotInitializedError, AssetClaimBuilder, BaseAssetsPallet, BatchMode, BatchValidationError, BridgeHaltedError, Builder, CustomChainConflictError, CustomChainInvalidError, DEFAULT_TTL_MS, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETH_MAINNET_CHAIN_ID, ETH_TESTNET_CHAIN_ID, EXCHANGE_CHAINS, EXTENSION_MS, ExtensionNotInstalledError, FeatureTemporarilyDisabledError, GeneralBuilder, InvalidAddressError, MAX_CLIENTS, MissingChainApiError, MissingParameterError, NoXCMSupportImplementedError, NumberFormatError, OverrideConflictError, PolkadotApi, PolkadotXcmError, PolkadotXcmExecutionError, ProviderUnavailableError, RELAY_LOCATION, RoutingResolutionError, RuntimeApiError, RuntimeApiUnavailableError, ScenarioNotSupportedError, SubmitTransactionError, TRANSACT_ORIGINS, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, TypeAndThenUnavailableError, UnableToComputeError, UnsupportedOperationError, ValidationError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, aggregateHopFees, applyDecimalAbstraction, assertAddressIsString, assertCurrencyCore, assertEvmAddress, assertExtensionInstalled, assertHasId, assertNotEvmTransfer, assertSender, assertSenderSource, assertSubstrateOrigin, assertSwapSupport, assertToIsString, blake2b256, blake2b512, buildCustomChainAssetsInfo, buildCustomChainConfig, buildDestInfo, buildHopInfo, buildOriginInfo, calcPreviewMintAmount, claimAssets, compareAddresses, computeOverridenAmount, constructTypeAndThenCall, convertBuilderConfig, convertSs58, createAsset, createAssetId, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createClientCache, createClientPoolHelpers, createCustomXcmOnDest, createDestination, createDirectExecuteXcm, createEthereumBridgeInstructions, createExecuteCall, createExecuteExchangeXcm, createSwapBuilder, createTransfer, createTransferOrSwap, createTransferOrSwapAll, createTxOverrideAmount, createTypeAndThenCall, createTypeThenAutoReserve, createVersionedAssets, createVersionedDestination, createX1Payload, deriveAccountId, dryRun, dryRunInternal, dryRunOrigin, encodeSs58, executeWithSwap, formatAssetIdToERC20, formatUnits, generateMessageId, getAssetBalanceInternal, getAssetReserveChain, getAssetReserveChainImpl, getBalance, getBalanceInternal, getBridgeStatus, getChain, getChainConfig, getChainConfigImpl, getChainLocation, getChainProviders, getChainProvidersImpl, getChainVersion, getEthErc20Balance, getEvmExtensionOrThrow, getEvmPrivateKeyHex, getEvmSnowbridgeExtensionOrThrow, getFailureInfo, getLocalTransferAmount, getMinTransferableAmount, getMinTransferableAmountInternal, getMoonbeamErc20Balance, getOriginXcmFee, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getParaIdImpl, getRelayChainOf, getRelayChainOfImpl, getRelayChainSymbolOf, getSwapExtensionOrThrow, getTChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeInternal, getXcmFeeOnce, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, isSenderSigner, isViemSigner, keyFromWs, localizeLocation, localizeLocationImpl, maybeOverrideAsset, maybeOverrideAssets, normalizeAmount, normalizeCustomChains, normalizeExchange, overrideTxAmount, padFee, padValueBy, parseUnits, pickCompatibleXcmVersion, pickRouterCompatibleXcmVersion, registerEvmExtension, registerEvmSnowbridgeExtension, registerSwapExtension, resolveAssetCount, resolveDestChain, resolveModuleError, resolveParaId, resolveTransferParams, reverseTransformLocation, selectXcmVersion, sortAssets, throwUnsupportedCurrency, transferMoonbeamEvm, transferMoonbeamToEth, traverseXcmHops, validateAddress, validateAssetSpecifiers, validateCurrency, validateDestination, validateDestinationAddress, validateTransact, verifyEdOnDestination, wrapTxBypass };
|
|
2614
|
-
export type { BuildHopInfoOptions, ClientCache, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotXCMTransfer, IXTokensTransfer, OneKey, TAddress, TApiOrUrl, TApiType, TAssetClaimInternalOptions, TAssetClaimOptions, TAssetClaimOptionsBase, TBatchOptions, TBatchedTransferOptions, TBifrostToken, TBridgeStatus, TBuildAllInternalRes, TBuildDestInfoOptions, TBuildEvmTransferOptions, TBuildInternalRes, TBuildInternalResBase, TBuildOriginInfoOptions, TBuilderConfig, TBuilderInternalOptions, TBuilderOptions, TBypassOptions, TCacheItem, TChainConfig, TChainConfigMap, TChainEndpoint, TChainWithApi, TClientEntry, TClientKey, TConditionalXcmFeeDetail, TConditionalXcmFeeHopInfo, TCreateBaseSwapXcmOptions, TCreateBaseTransferXcmOptions, TCreateBeneficiaryOptions, TCreateBeneficiaryXTokensOptions, TCreateEthBridgeInstructionsOptions, TCreateSwapXcmInternalOptions, TCreateSwapXcmOptions, TCreateTransferXcmOptions, TCreateTxsOptions, TCustomChainEntry, TCustomChainEntryHydrated, TCustomChainFrom, TCustomChainInput, TCustomChainPalletsInput, TCustomChainsCtx, TCustomChainsMap, TDestWeight, TDestination, TDryRunBaseOptions, TDryRunBypassOptions, TDryRunCallBaseOptions, TDryRunCallOptions, TDryRunChainFailure, TDryRunChainResult, TDryRunChainSuccess, TDryRunError, TDryRunOptions, TDryRunPreviewOptions, TDryRunResBase, TDryRunResult, TDryRunXcmBaseOptions, TDryRunXcmOptions, TEvmExtension, TEvmSnowbridgeExtension, TEvmTransferOptions, TEvmTransferOptionsBase, TExchangeChain, TExchangeInput, TFeeType, TForeignAssetId, TForeignOrNativeAsset, TForeignOrTokenAsset, TFullCustomCtx, TGetAssetBalanceOptions, TGetAssetBalanceOptionsBase, TGetBalanceCommonOptions, TGetBalanceOptions, TGetBalanceOptionsBase, TGetFeeForDestChainBaseOptions, TGetFeeForDestChainOptions, TGetMinTransferableAmountOptions, TGetOriginXcmFeeBaseOptions, TGetOriginXcmFeeInternalOptions, TGetOriginXcmFeeOptions, TGetReverseTxFeeOptions, TGetTransferInfoOptions, TGetTransferInfoOptionsBase, TGetTransferableAmountOptions, TGetTransferableAmountOptionsBase, TGetXcmFeeBaseOptions, TGetXcmFeeBuilderOptions, TGetXcmFeeInternalOptions, TGetXcmFeeOptions, TGetXcmFeeResult, THopInfo, THopTransferInfo, TModuleError, TNativeTokenAsset, TOriginFeeDetails, TOtherReserveAsset, TPaymentInfo, TPolkadotXCMTransferOptions, TPolkadotXcmMethod, TProviderEntry, TReserveAsset, TResolveHopParams, TRuntimeApi, TScenario, TSelfReserveAsset, TSender, TSerializedExtrinsics, TSerializedRuntimeApiQuery, TSerializedStateQuery, TSetBalanceRes, TStatusChangeCallback, TSubstrateTransferBaseOptions, TSubstrateTransferBaseOptionsWithSender, TSubstrateTransferOptions, TSwapBuilder, TSwapBuilderFactory, TSwapConfig, TSwapEvent, TSwapEventType, TSwapExtension, TSwapFeeEstimates, TSwapOptions, TSystemProperties, TTransactOptions, TTransactOrigin, TTransactionContext, TTransactionType, TTransferBaseOptions, TTransferBaseOptionsWithSender, TTransferBaseOptionsWithSwap, TTransferFeeEstimates, TTransferInfo, TTransferInternalOptions, TTransferLocalOptions, TTransferOptions, TTransferOptionsWithSwap, TTxFactory, TTypeAndThenCallContext, TTypeAndThenFees, TTypeAndThenOverrides, TUrl, TVerifyEdOnDestinationOptions, TVerifyEdOnDestinationOptionsBase, TWeight, TXTokensCurrencySelection, TXTokensMethod, TXTokensTransferOptions, TXcmAsset, TXcmFeeBase, TXcmFeeDetail, TXcmFeeDetailError, TXcmFeeDetailSuccess, TXcmFeeDetailWithFallback, TXcmFeeDetailWithForwardedXcm, TXcmFeeHopInfo, TXcmFeeHopResult, TXcmFeeSwapConfig, TXcmForeignAsset, TXcmPalletMethod, TXcmVersioned, TZeitgeistAsset, WithApi, WithRequiredSender, WithRequiredSwapOptions };
|
|
2673
|
+
export { API_TYPES, AmountTooLowError, ApiNotInitializedError, AssetClaimBuilder, BaseAssetsPallet, BatchMode, BatchValidationError, BridgeHaltedError, Builder, CustomChainConflictError, CustomChainInvalidError, DEFAULT_TTL_MS, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETH_MAINNET_CHAIN_ID, ETH_TESTNET_CHAIN_ID, EXCHANGE_CHAINS, EXTENSION_MS, ExtensionNotInstalledError, FeatureTemporarilyDisabledError, GeneralBuilder, InvalidAddressError, MAX_CLIENTS, MissingChainApiError, MissingParameterError, NoXCMSupportImplementedError, NumberFormatError, OverrideConflictError, PolkadotApi, PolkadotXcmError, PolkadotXcmExecutionError, ProviderUnavailableError, RELAY_LOCATION, RoutingResolutionError, RuntimeApiError, RuntimeApiUnavailableError, ScenarioNotSupportedError, SubmitTransactionError, TRANSACT_ORIGINS, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, TypeAndThenUnavailableError, UnableToComputeError, UnsupportedOperationError, ValidationError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, aggregateHopFees, applyDecimalAbstraction, assertAddressIsString, assertCurrencyCore, assertEvmAddress, assertExtensionInstalled, assertHasId, assertNotEvmTransfer, assertNotRawAssets, assertSender, assertSenderSource, assertSubstrateOrigin, assertSwapSupport, assertToIsString, blake2b256, blake2b512, buildCustomChainAssetsInfo, buildCustomChainConfig, buildDestInfo, buildHopInfo, buildOriginInfo, calcPreviewMintAmount, claimAssets, compareAddresses, computeOverridenAmount, constructTypeAndThenCall, convertBuilderConfig, convertSs58, createAsset, createAssetId, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createClientCache, createClientPoolHelpers, createCustomXcmOnDest, createDestination, createDirectExecuteXcm, createEthereumBridgeInstructions, createExecuteCall, createExecuteExchangeXcm, createSwapBuilder, createTransfer, createTransferOrSwap, createTransferOrSwapAll, createTxOverrideAmount, createTypeAndThenCall, createTypeThenAutoReserve, createVersionedAssets, createVersionedDestination, createX1Payload, deriveAccountId, dryRun, dryRunInternal, dryRunOrigin, encodeSs58, executeWithSwap, formatAssetIdToERC20, formatUnits, generateMessageId, getAssetBalanceInternal, getAssetReserveChain, getAssetReserveChainImpl, getBalance, getBalanceInternal, getBridgeStatus, getChain, getChainConfig, getChainConfigImpl, getChainLocation, getChainProviders, getChainProvidersImpl, getChainVersion, getEthErc20Balance, getEvmExtensionOrThrow, getEvmPrivateKeyHex, getEvmSnowbridgeExtensionOrThrow, getFailureInfo, getLocalTransferAmount, getMinTransferableAmount, getMinTransferableAmountInternal, getMoonbeamErc20Balance, getOriginXcmFee, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getParaIdImpl, getRelayChainOf, getRelayChainOfImpl, getRelayChainSymbolOf, getSwapExtensionOrThrow, getTChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeInternal, getXcmFeeOnce, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, isSenderSigner, isViemSigner, keyFromWs, localizeLocation, localizeLocationImpl, maybeOverrideAsset, maybeOverrideAssets, normalizeAmount, normalizeCustomChains, normalizeExchange, overrideTxAmount, padFee, padValueBy, parseUnits, pickCompatibleXcmVersion, pickRouterCompatibleXcmVersion, registerEvmExtension, registerEvmSnowbridgeExtension, registerSwapExtension, resolveAssetCount, resolveDestChain, resolveModuleError, resolveParaId, resolveTransferParams, reverseTransformLocation, selectXcmVersion, sortAssets, throwUnsupportedCurrency, transferMoonbeamEvm, transferMoonbeamToEth, traverseXcmHops, validateAddress, validateAssetSpecifiers, validateCurrency, validateDestination, validateDestinationAddress, validateTransact, verifyEdOnDestination, wrapTxBypass };
|
|
2674
|
+
export type { BuildHopInfoOptions, ClientCache, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotXCMTransfer, IXTokensTransfer, OneKey, TAddress, TApiOrUrl, TApiType, TAssetClaimInternalOptions, TAssetClaimOptions, TAssetClaimOptionsBase, TBatchOptions, TBatchedTransferOptions, TBifrostToken, TBridgeStatus, TBuildAllInternalRes, TBuildDestInfoOptions, TBuildEvmTransferOptions, TBuildInternalRes, TBuildInternalResBase, TBuildOriginInfoOptions, TBuilderConfig, TBuilderInternalOptions, TBuilderOptions, TBypassOptions, TCacheItem, TChainConfig, TChainConfigMap, TChainEndpoint, TChainWithApi, TClientEntry, TClientKey, TConditionalXcmFeeDetail, TConditionalXcmFeeHopInfo, TCreateBaseSwapXcmOptions, TCreateBaseTransferXcmOptions, TCreateBeneficiaryOptions, TCreateBeneficiaryXTokensOptions, TCreateEthBridgeInstructionsOptions, TCreateSwapXcmInternalOptions, TCreateSwapXcmOptions, TCreateTransferXcmOptions, TCreateTxsOptions, TCustomChainEntry, TCustomChainEntryHydrated, TCustomChainFrom, TCustomChainInput, TCustomChainPalletsInput, TCustomChainsCtx, TCustomChainsMap, TDestWeight, TDestination, TDryRunBaseOptions, TDryRunBypassOptions, TDryRunCallBaseOptions, TDryRunCallOptions, TDryRunChainFailure, TDryRunChainResult, TDryRunChainSuccess, TDryRunError, TDryRunOptions, TDryRunPreviewOptions, TDryRunResBase, TDryRunResult, TDryRunXcmBaseOptions, TDryRunXcmOptions, TEvmExtension, TEvmSnowbridgeExtension, TEvmTransferOptions, TEvmTransferOptionsBase, TExchangeChain, TExchangeInput, TFeeType, TForeignAssetId, TForeignOrNativeAsset, TForeignOrTokenAsset, TFullCustomCtx, TGetAssetBalanceOptions, TGetAssetBalanceOptionsBase, TGetBalanceCommonOptions, TGetBalanceOptions, TGetBalanceOptionsBase, TGetFeeForDestChainBaseOptions, TGetFeeForDestChainOptions, TGetMinTransferableAmountOptions, TGetOriginXcmFeeBaseOptions, TGetOriginXcmFeeInternalOptions, TGetOriginXcmFeeOptions, TGetReverseTxFeeOptions, TGetTransferInfoOptions, TGetTransferInfoOptionsBase, TGetTransferableAmountOptions, TGetTransferableAmountOptionsBase, TGetXcmFeeBaseOptions, TGetXcmFeeBuilderOptions, TGetXcmFeeInternalOptions, TGetXcmFeeOptions, TGetXcmFeeResult, THopInfo, THopTransferInfo, TModuleError, TNativeTokenAsset, TOriginFeeDetails, TOriginXcmFeeInfo, TOtherReserveAsset, TPaymentInfo, TPerAssetResult, TPolkadotXCMTransferOptions, TPolkadotXcmMethod, TProviderEntry, TReceivedCurrencyInfo, TReserveAsset, TResolveHopParams, TResolvedCurrency, TRuntimeApi, TScenario, TSelectedCurrencyInfo, TSelfReserveAsset, TSender, TSerializedExtrinsics, TSerializedRuntimeApiQuery, TSerializedStateQuery, TSetBalanceRes, TStatusChangeCallback, TSubstrateTransferBaseOptions, TSubstrateTransferBaseOptionsWithSender, TSubstrateTransferOptions, TSwapBuilder, TSwapBuilderFactory, TSwapConfig, TSwapEvent, TSwapEventType, TSwapExtension, TSwapFeeEstimates, TSwapOptions, TSystemProperties, TTransactOptions, TTransactOrigin, TTransactionContext, TTransactionType, TTransferBaseOptions, TTransferBaseOptionsWithSender, TTransferBaseOptionsWithSwap, TTransferFeeEstimates, TTransferInfo, TTransferInternalOptions, TTransferLocalOptions, TTransferOptions, TTransferOptionsWithSwap, TTxFactory, TTypeAndThenCallContext, TTypeAndThenFees, TTypeAndThenOverrides, TUrl, TVerifyEdOnDestinationOptions, TVerifyEdOnDestinationOptionsBase, TWeight, TXTokensCurrencySelection, TXTokensMethod, TXTokensTransferOptions, TXcmAsset, TXcmFeeBase, TXcmFeeDetail, TXcmFeeDetailError, TXcmFeeDetailSuccess, TXcmFeeDetailWithFallback, TXcmFeeDetailWithForwardedXcm, TXcmFeeHopInfo, TXcmFeeHopResult, TXcmFeeSwapConfig, TXcmForeignAsset, TXcmPalletMethod, TXcmVersioned, TZeitgeistAsset, WithApi, WithRequiredSender, WithRequiredSwapOptions };
|