@paraspell/sdk-core 8.7.1 → 8.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. package/README.md +2 -8
  2. package/dist/index.cjs +2421 -15714
  3. package/dist/index.d.ts +1146 -1517
  4. package/dist/index.mjs +2248 -15515
  5. package/package.json +5 -5
package/dist/index.d.ts CHANGED
@@ -1,3 +1,10 @@
1
+ import * as _paraspell_assets from '@paraspell/assets';
2
+ import { TMultiAsset, TCurrencyInputWithAmount, TCurrencyInput, WithAmount, TAsset, TMultiAssetWithFee, TCurrencyCore, TAmount } from '@paraspell/assets';
3
+ export * from '@paraspell/assets';
4
+ import { TMultiLocation, TNodeDotKsmWithRelayChains, TNodeWithRelayChains, TNodePolkadotKusama, TNode, TJunction, TEcosystemType, TJunctions } from '@paraspell/sdk-common';
5
+ export * from '@paraspell/sdk-common';
6
+ import { TPallet } from '@paraspell/pallets';
7
+ export * from '@paraspell/pallets';
1
8
  import { Signer, AbstractProvider, Contract } from 'ethers';
2
9
  import { WalletClient, GetContractReturnType, Abi } from 'viem';
3
10
 
@@ -6,144 +13,6 @@ type WithApi<TBase, TApi, TRes> = TBase & {
6
13
  };
7
14
  type TApiOrUrl<TApi> = TApi | string | string[];
8
15
 
9
- type TJunctionType = 'Parachain' | 'AccountId32' | 'AccountIndex64' | 'AccountKey20' | 'PalletInstance' | 'GeneralIndex' | 'GeneralKey' | 'OnlyChild' | 'Plurality' | 'GlobalConsensus';
10
- type TNetworkId = string | null;
11
- type TBodyId = string | null;
12
- type TBodyPart = string | null;
13
- type TStringOrNumber = string | number;
14
- type TStringOrNumberOrBigInt = TStringOrNumber | bigint;
15
- type THexString = string;
16
- type TJunctionParachain = {
17
- Parachain: TStringOrNumberOrBigInt | undefined;
18
- };
19
- type TJunctionAccountId32 = {
20
- AccountId32: {
21
- network?: TNetworkId;
22
- id: THexString;
23
- };
24
- };
25
- type TJunctionAccountIndex64 = {
26
- AccountIndex64: {
27
- network: TNetworkId;
28
- index: TStringOrNumberOrBigInt;
29
- };
30
- };
31
- type TJunctionAccountKey20 = {
32
- AccountKey20: {
33
- network?: TNetworkId;
34
- key: THexString;
35
- };
36
- };
37
- type TJunctionPalletInstance = {
38
- PalletInstance: TStringOrNumberOrBigInt;
39
- };
40
- type TJunctionGeneralIndex = {
41
- GeneralIndex: TStringOrNumberOrBigInt;
42
- };
43
- type TJunctionGeneralKey = {
44
- GeneralKey: {
45
- length: TStringOrNumberOrBigInt;
46
- data: THexString;
47
- };
48
- };
49
- type TJunctionOnlyChild = {
50
- OnlyChild: string;
51
- };
52
- type TJunctionPlurality = {
53
- Plurality: {
54
- id: TBodyId;
55
- part: TBodyPart;
56
- };
57
- };
58
- type TJunctionGlobalConsensus = {
59
- GlobalConsensus: TNetworkId | object;
60
- };
61
- type TJunction = TJunctionParachain | TJunctionAccountId32 | TJunctionAccountIndex64 | TJunctionAccountKey20 | TJunctionPalletInstance | TJunctionGeneralIndex | TJunctionGeneralKey | TJunctionOnlyChild | TJunctionPlurality | TJunctionGlobalConsensus;
62
- interface TJunctions {
63
- Here?: null;
64
- X1?: TJunction | [TJunction];
65
- X2?: [TJunction, TJunction];
66
- X3?: [TJunction, TJunction, TJunction];
67
- X4?: [TJunction, TJunction, TJunction, TJunction];
68
- X5?: [TJunction, TJunction, TJunction, TJunction, TJunction];
69
- X6?: [TJunction, TJunction, TJunction, TJunction, TJunction, TJunction];
70
- X7?: [TJunction, TJunction, TJunction, TJunction, TJunction, TJunction, TJunction];
71
- X8?: [TJunction, TJunction, TJunction, TJunction, TJunction, TJunction, TJunction, TJunction];
72
- }
73
- interface TMultiLocation {
74
- parents: TStringOrNumber;
75
- interior: TJunctions | 'Here';
76
- }
77
-
78
- type AtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
79
- [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
80
- }[Keys];
81
- type TBaseAsset = {
82
- symbol: string;
83
- decimals?: number;
84
- manuallyAdded?: boolean;
85
- alias?: string;
86
- existentialDeposit?: string;
87
- };
88
- type TNativeAsset = TBaseAsset & {
89
- isNative: true;
90
- multiLocation?: object;
91
- };
92
- type TForeignAsset = TBaseAsset & AtLeastOne<{
93
- assetId?: string;
94
- multiLocation?: object;
95
- }>;
96
- type TAsset = TNativeAsset | TForeignAsset;
97
- type TNodeAssets = {
98
- relayChainAssetSymbol: TRelayChainSymbol;
99
- nativeAssetSymbol: string;
100
- isEVM: boolean;
101
- supportsDryRunApi: boolean;
102
- nativeAssets: TNativeAsset[];
103
- otherAssets: TForeignAsset[];
104
- };
105
- type TAssetJsonMap = Record<TNodeWithRelayChains, TNodeAssets>;
106
-
107
- type TCurrency = string | number | bigint;
108
- type TSymbolSpecifier = {
109
- type: 'Native' | 'Foreign' | 'ForeignAbstract';
110
- value: string;
111
- };
112
- type TOverrideMultiLocationSpecifier = {
113
- type: 'Override';
114
- value: TMultiLocation;
115
- };
116
- type TCurrencySymbolValue = string | TSymbolSpecifier;
117
- type TCurrencySymbol = {
118
- symbol: TCurrencySymbolValue;
119
- };
120
- type TCurrencyCore = TCurrencySymbol | {
121
- id: TCurrency;
122
- } | {
123
- multilocation: TMultiLocationValue;
124
- };
125
- type TMultiAssetWithFee = TMultiAsset & {
126
- isFeeAsset?: boolean;
127
- };
128
- type TMultiLocationValue = string | TMultiLocation;
129
- type TMultiLocationValueWithOverride = TMultiLocationValue | TOverrideMultiLocationSpecifier;
130
- type TCurrencyInputWithAmount = WithAmount<TCurrencySymbol | {
131
- id: TCurrency;
132
- } | {
133
- multilocation: TMultiLocationValueWithOverride;
134
- }> | {
135
- multiasset: TMultiAsset[] | WithAmount<TCurrencyCore>[];
136
- };
137
- type TCurrencyInput = TCurrencySymbol | {
138
- id: TCurrency;
139
- } | {
140
- multilocation: TMultiLocationValueWithOverride;
141
- } | {
142
- multiasset: TMultiAsset[] | WithAmount<TCurrencyCore>[];
143
- };
144
- type WithAmount<TBase> = TBase & {
145
- amount: TAmount;
146
- };
147
16
  type OneKey<K extends string, V = unknown> = {
148
17
  [P in K]: Record<P, V> & Partial<Record<Exclude<K, P>, never>> extends infer O ? {
149
18
  [Q in keyof O]: O[Q];
@@ -189,1358 +58,1274 @@ type TBifrostToken = {
189
58
  };
190
59
  type TXTokensCurrencySelection = TXcmVersioned<TMultiLocation | TMultiAsset | TMultiAsset[]> | TXcmForeignAsset | TForeignAssetId | TForeignOrTokenAsset | TXcmAsset | TMantaAsset | TOtherReserveAsset | TBifrostToken | string | bigint | number | undefined;
191
60
 
192
- declare const ETH_CHAIN_ID: bigint;
193
- declare const ETHEREUM_JUNCTION: TJunction;
194
- /**
195
- * Supported nodes excluding relay chains and Ethereum.
196
- */
197
- declare const NODE_NAMES_DOT_KSM: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Heima", "Moonbeam", "Parallel", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Calamari", "CrustShadow", "Crab", "Imbue", "InvArchTinker", "Karura", "Kintsugi", "Moonriver", "ParallelHeiko", "Picasso", "Quartz", "RobonomicsKusama", "RobonomicsPolkadot", "PeoplePolkadot", "PeopleKusama", "Shiden", "Turing", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Zeitgeist", "Collectives", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec"];
61
+ type TRelaychain = 'Polkadot' | 'Kusama';
62
+
63
+ type TPolkadotXCMTransferOptions<TApi, TRes> = {
64
+ api: IPolkadotApi<TApi, TRes>;
65
+ header: TXcmVersioned<TMultiLocation>;
66
+ addressSelection: TXcmVersioned<TMultiLocation>;
67
+ address: TAddress;
68
+ currencySelection: TXcmVersioned<TMultiAsset[]>;
69
+ overriddenAsset?: TMultiLocation | TMultiAssetWithFee[];
70
+ scenario: TScenario;
71
+ asset: WithAmount<TAsset>;
72
+ feeAsset?: TAsset;
73
+ destination: TDestination;
74
+ paraIdTo?: number;
75
+ version?: Version;
76
+ senderAddress?: string;
77
+ pallet?: string;
78
+ method?: string;
79
+ };
80
+ type TXTokensTransferOptions<TApi, TRes> = {
81
+ api: IPolkadotApi<TApi, TRes>;
82
+ asset: WithAmount<TAsset>;
83
+ addressSelection: TXcmVersioned<TMultiLocation>;
84
+ fees: number;
85
+ scenario: TScenario;
86
+ origin: TNodePolkadotKusama;
87
+ destination: TDestination;
88
+ paraIdTo?: number;
89
+ overriddenAsset?: TMultiLocation | TMultiAssetWithFee[];
90
+ pallet?: string;
91
+ method?: string;
92
+ };
93
+ type TXTransferTransferOptions<TApi, TRes> = {
94
+ api: IPolkadotApi<TApi, TRes>;
95
+ asset: WithAmount<TAsset>;
96
+ recipientAddress: TAddress;
97
+ origin: TNodePolkadotKusama;
98
+ paraId?: number;
99
+ destination: TDestination;
100
+ overriddenAsset?: TMultiLocation | TMultiAsset[];
101
+ pallet?: string;
102
+ method?: string;
103
+ };
104
+ interface IPolkadotXCMTransfer {
105
+ transferPolkadotXCM: <TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>) => Promise<TRes>;
106
+ }
107
+ interface IXTokensTransfer {
108
+ transferXTokens: <TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>) => TRes;
109
+ }
110
+ interface IXTransferTransfer {
111
+ transferXTransfer: <TApi, TRes>(input: TXTransferTransferOptions<TApi, TRes>) => TRes;
112
+ }
113
+ type TScenario = 'ParaToRelay' | 'ParaToPara' | 'RelayToPara';
198
114
  /**
199
- * Supported nodes including Ethereum.
115
+ * The XCM version.
200
116
  */
201
- declare const NODE_NAMES: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Heima", "Moonbeam", "Parallel", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Calamari", "CrustShadow", "Crab", "Imbue", "InvArchTinker", "Karura", "Kintsugi", "Moonriver", "ParallelHeiko", "Picasso", "Quartz", "RobonomicsKusama", "RobonomicsPolkadot", "PeoplePolkadot", "PeopleKusama", "Shiden", "Turing", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Zeitgeist", "Collectives", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec", "Ethereum"];
117
+ declare enum Version {
118
+ V1 = "V1",
119
+ V2 = "V2",
120
+ V3 = "V3",
121
+ V4 = "V4"
122
+ }
202
123
  /**
203
- * Supported nodes including relay chains and Ethereum.
124
+ * The supported XCM versions for asset claims.
204
125
  */
205
- declare const NODES_WITH_RELAY_CHAINS: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Heima", "Moonbeam", "Parallel", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Calamari", "CrustShadow", "Crab", "Imbue", "InvArchTinker", "Karura", "Kintsugi", "Moonriver", "ParallelHeiko", "Picasso", "Quartz", "RobonomicsKusama", "RobonomicsPolkadot", "PeoplePolkadot", "PeopleKusama", "Shiden", "Turing", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Zeitgeist", "Collectives", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec", "Ethereum", "Polkadot", "Kusama"];
126
+ type TVersionClaimAssets = Version.V3 | Version.V2;
127
+ type TAddress = string | TMultiLocation;
128
+ type TDestination = TNodeWithRelayChains | TMultiLocation;
129
+ type TRelayToParaDestination = TNodePolkadotKusama | TMultiLocation;
130
+ type TSendBaseOptions = {
131
+ /**
132
+ * The origin node
133
+ */
134
+ from: TNodeDotKsmWithRelayChains;
135
+ /**
136
+ * The destination address. A SS58 or H160 format.
137
+ */
138
+ address: TAddress;
139
+ /**
140
+ * The optional sender address. A SS58
141
+ */
142
+ senderAddress?: string;
143
+ /**
144
+ * The destination node or multi-location
145
+ */
146
+ to: TDestination;
147
+ /**
148
+ * The currency to transfer. Either ID, symbol, multi-location, or multi-asset
149
+ */
150
+ currency: TCurrencyInputWithAmount;
151
+ /**
152
+ * The optional fee asset. Either ID, symbol, or multi-location
153
+ */
154
+ feeAsset?: TCurrencyInput;
155
+ /**
156
+ * The optional destination parachain ID
157
+ */
158
+ paraIdTo?: number;
159
+ /**
160
+ * The optional overrided XCM version
161
+ */
162
+ version?: Version;
163
+ /**
164
+ * The optional pallet override
165
+ */
166
+ pallet?: string;
167
+ /**
168
+ * The optional pallet method override
169
+ */
170
+ method?: string;
171
+ };
206
172
  /**
207
- * Supported nodes including relay chains and excluding Ethereum.
173
+ * Options for transferring from a parachain to another parachain or relay chain
208
174
  */
209
- declare const NODES_WITH_RELAY_CHAINS_DOT_KSM: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Heima", "Moonbeam", "Parallel", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Calamari", "CrustShadow", "Crab", "Imbue", "InvArchTinker", "Karura", "Kintsugi", "Moonriver", "ParallelHeiko", "Picasso", "Quartz", "RobonomicsKusama", "RobonomicsPolkadot", "PeoplePolkadot", "PeopleKusama", "Shiden", "Turing", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Zeitgeist", "Collectives", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec", "Polkadot", "Kusama"];
175
+ type TSendOptions<TApi, TRes> = WithApi<TSendBaseOptions, TApi, TRes>;
176
+ type TSendInternalOptions<TApi, TRes> = Omit<TSendBaseOptions, 'from' | 'currency' | 'feeAsset'> & {
177
+ api: IPolkadotApi<TApi, TRes>;
178
+ asset: WithAmount<TAsset>;
179
+ feeAsset?: TAsset;
180
+ overriddenAsset?: TMultiLocation | TMultiAssetWithFee[];
181
+ };
182
+ type TRelayToParaBaseOptions = {
183
+ /**
184
+ * The origin node
185
+ */
186
+ origin: TRelaychain;
187
+ /**
188
+ * The destination node or multi-location
189
+ */
190
+ destination: TRelayToParaDestination;
191
+ /**
192
+ * The destination address. A SS58 or H160 format.
193
+ */
194
+ address: TAddress;
195
+ /**
196
+ * The optional destination parachain ID
197
+ */
198
+ paraIdTo?: number;
199
+ /**
200
+ * The optional overrided XCM version
201
+ */
202
+ version?: Version;
203
+ /**
204
+ * The DOT or KSM asset to transfer
205
+ */
206
+ asset: WithAmount<TAsset>;
207
+ /**
208
+ * The optional pallet override
209
+ */
210
+ pallet?: string;
211
+ /**
212
+ * The optional pallet method override
213
+ */
214
+ method?: string;
215
+ };
216
+ type TRelayToParaOverrides = {
217
+ section: TXcmPalletSection;
218
+ includeFee: boolean;
219
+ };
210
220
  /**
211
- * Supported XCM pallets.
221
+ * Options for transferring from a relay chain to a parachain
212
222
  */
213
- declare const SUPPORTED_PALLETS: readonly ["XTokens", "OrmlXTokens", "PolkadotXcm", "RelayerXcm", "XTransfer", "XcmPallet"];
214
-
215
- declare abstract class ParachainNode<TApi, TRes> {
216
- private readonly _node;
217
- private readonly _info;
218
- private readonly _type;
219
- private readonly _version;
220
- protected _assetCheckEnabled: boolean;
221
- constructor(node: TNodePolkadotKusama, info: string, type: TEcosystemType, version: Version);
222
- get info(): string;
223
- get type(): TEcosystemType;
224
- get node(): TNodePolkadotKusama;
225
- get version(): Version;
226
- get assetCheckEnabled(): boolean;
227
- protected canUseXTokens(_: TSendInternalOptions<TApi, TRes>): boolean;
228
- transfer(options: TSendInternalOptions<TApi, TRes>): Promise<TRes>;
229
- getRelayToParaOverrides(): TRelayToParaOverrides;
230
- transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCall;
231
- createCurrencySpec(amount: TAmount, scenario: TScenario, version: Version, _asset?: TAsset): TXcmVersioned<TMultiAsset[]>;
232
- createPolkadotXcmHeader(scenario: TScenario, version: Version, destination: TDestination, paraId?: number): TXcmVersioned<TMultiLocation>;
233
- getNativeAssetSymbol(): string;
234
- protected transferToEthereum<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
235
- }
236
-
237
- declare class Acala<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
238
- constructor();
239
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
240
- }
241
-
242
- declare class Altair<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
243
- constructor();
244
- private getCurrencySelection;
245
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
246
- }
223
+ type TRelayToParaOptions<TApi, TRes> = WithApi<TRelayToParaBaseOptions, TApi, TRes>;
224
+ type TSerializedApiCall = {
225
+ module: TPallet | 'Utility';
226
+ section: string;
227
+ parameters: Record<string, unknown>;
228
+ };
229
+ type TDestWeight = {
230
+ ref_time: bigint;
231
+ proof_size: bigint;
232
+ };
233
+ type TXTransferSection = 'transfer';
234
+ type TXTokensSection = 'transfer' | 'transfer_multiasset' | 'transfer_multiassets';
235
+ type TPolkadotXcmSection = 'limited_teleport_assets' | 'limited_reserve_transfer_assets' | 'reserve_transfer_assets' | 'reserve_withdraw_assets' | 'transfer_assets';
236
+ type TXcmPalletSection = 'limited_teleport_assets' | 'reserve_transfer_assets' | 'limited_reserve_transfer_assets';
237
+ type TWeight = {
238
+ refTime: bigint;
239
+ proofSize: bigint;
240
+ };
247
241
 
248
- declare class Amplitude<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
249
- constructor();
250
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
251
- }
242
+ type TAssetClaimOptionsBase = {
243
+ node: TNodeWithRelayChains;
244
+ multiAssets: TMultiAsset[];
245
+ address: TAddress;
246
+ version?: TVersionClaimAssets;
247
+ };
248
+ type TAssetClaimOptions<TApi, TRes> = WithApi<TAssetClaimOptionsBase, TApi, TRes>;
252
249
 
253
- declare class AssetHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
254
- constructor();
255
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
256
- getRelayToParaOverrides(): TRelayToParaOverrides;
257
- createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): {
258
- V1: TMultiAsset[];
259
- V2?: undefined;
260
- V3?: undefined;
261
- V4?: undefined;
262
- } | {
263
- V2: TMultiAsset[];
264
- V1?: undefined;
265
- V3?: undefined;
266
- V4?: undefined;
267
- } | {
268
- V3: TMultiAsset[];
269
- V1?: undefined;
270
- V2?: undefined;
271
- V4?: undefined;
272
- } | {
273
- V4: TMultiAsset[];
274
- V1?: undefined;
275
- V2?: undefined;
276
- V3?: undefined;
277
- };
278
- }
279
-
280
- declare class AssetHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
281
- constructor();
282
- handleBridgeTransfer<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>, targetChain: 'Polkadot' | 'Kusama'): TRes;
283
- handleEthBridgeTransfer<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
284
- handleMythosTransfer<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
285
- handleBifrostEthTransfer: <TApi_1, TRes_1>(input: TPolkadotXCMTransferOptions<TApi_1, TRes_1>) => TRes_1;
286
- patchInput<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TPolkadotXCMTransferOptions<TApi, TRes>;
287
- private getSection;
288
- private handleExecuteTransfer;
289
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
290
- getRelayToParaOverrides(): TRelayToParaOverrides;
291
- createCurrencySpec(amount: TAmount, scenario: TScenario, version: Version, asset?: TAsset): {
292
- V1: TMultiAsset[];
293
- V2?: undefined;
294
- V3?: undefined;
295
- V4?: undefined;
296
- } | {
297
- V2: TMultiAsset[];
298
- V1?: undefined;
299
- V3?: undefined;
300
- V4?: undefined;
301
- } | {
302
- V3: TMultiAsset[];
303
- V1?: undefined;
304
- V2?: undefined;
305
- V4?: undefined;
306
- } | {
307
- V4: TMultiAsset[];
308
- V1?: undefined;
309
- V2?: undefined;
310
- V3?: undefined;
311
- };
312
- }
313
-
314
- declare class Astar<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer, IXTokensTransfer {
315
- constructor();
316
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
317
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
318
- protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
319
- }
320
-
321
- declare class Bajun<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
322
- constructor();
323
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
324
- transferRelayToPara(): TSerializedApiCall;
325
- }
326
-
327
- declare class Basilisk<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
328
- constructor();
329
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
330
- }
331
-
332
- declare class BifrostKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
333
- constructor();
334
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
335
- }
336
-
337
- declare class BifrostPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer, IPolkadotXCMTransfer {
338
- constructor();
339
- getCurrencySelection(asset: TAsset): {
340
- Native: string;
341
- VToken?: undefined;
342
- Token?: undefined;
343
- VSToken2?: undefined;
344
- VToken2?: undefined;
345
- Token2?: undefined;
346
- } | {
347
- VToken: string;
348
- Native?: undefined;
349
- Token?: undefined;
350
- VSToken2?: undefined;
351
- VToken2?: undefined;
352
- Token2?: undefined;
353
- } | {
354
- Token: string;
355
- Native?: undefined;
356
- VToken?: undefined;
357
- VSToken2?: undefined;
358
- VToken2?: undefined;
359
- Token2?: undefined;
360
- } | {
361
- VSToken2: number;
362
- Native?: undefined;
363
- VToken?: undefined;
364
- Token?: undefined;
365
- VToken2?: undefined;
366
- Token2?: undefined;
367
- } | {
368
- VToken2: number;
369
- Native?: undefined;
370
- VToken?: undefined;
371
- Token?: undefined;
372
- VSToken2?: undefined;
373
- Token2?: undefined;
374
- } | {
375
- Token2: number;
376
- Native?: undefined;
377
- VToken?: undefined;
378
- Token?: undefined;
379
- VSToken2?: undefined;
380
- VToken2?: undefined;
381
- };
382
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
383
- transferToAssetHub<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
384
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
385
- protected canUseXTokens({ asset, to: destination }: TSendInternalOptions<TApi, TRes>): boolean;
386
- }
387
-
388
- declare class Bitgreen<TApi, TRes> extends ParachainNode<TApi, TRes> {
389
- constructor();
390
- }
391
-
392
- declare class BridgeHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
393
- constructor();
394
- _assetCheckEnabled: boolean;
395
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
396
- getRelayToParaOverrides(): TRelayToParaOverrides;
397
- }
398
-
399
- declare class BridgeHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
400
- constructor();
401
- _assetCheckEnabled: boolean;
402
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
403
- getRelayToParaOverrides(): TRelayToParaOverrides;
404
- }
405
-
406
- declare class Calamari<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
407
- constructor();
408
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
409
- }
410
-
411
- declare class Centrifuge<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
412
- constructor();
413
- private getCurrencySelection;
414
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
415
- }
416
-
417
- declare class Collectives<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
418
- constructor();
419
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
420
- getRelayToParaOverrides(): TRelayToParaOverrides;
421
- createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): TXcmVersioned<TMultiAsset[]>;
422
- }
423
-
424
- declare class ComposableFinance<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
425
- constructor();
426
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
427
- }
428
-
429
- declare class CoretimeKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
430
- constructor();
431
- _assetCheckEnabled: boolean;
432
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
433
- getRelayToParaOverrides(): TRelayToParaOverrides;
434
- }
435
-
436
- declare class CoretimePolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
437
- constructor();
438
- _assetCheckEnabled: boolean;
439
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
440
- getRelayToParaOverrides(): TRelayToParaOverrides;
441
- }
442
-
443
- declare class Crab<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
444
- constructor();
445
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
446
- transferRelayToPara(): TSerializedApiCall;
447
- createCurrencySpec(amount: string, scenario: TScenario, version: Version, _asset?: TAsset): {
448
- V1: TMultiAsset[];
449
- V2?: undefined;
450
- V3?: undefined;
451
- V4?: undefined;
452
- } | {
453
- V2: TMultiAsset[];
454
- V1?: undefined;
455
- V3?: undefined;
456
- V4?: undefined;
457
- } | {
458
- V3: TMultiAsset[];
459
- V1?: undefined;
460
- V2?: undefined;
461
- V4?: undefined;
462
- } | {
463
- V4: TMultiAsset[];
464
- V1?: undefined;
465
- V2?: undefined;
466
- V3?: undefined;
467
- };
468
- }
469
-
470
- declare class Crust<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
471
- constructor();
472
- private getCurrencySelection;
473
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
474
- }
475
-
476
- declare class CrustShadow<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
477
- constructor();
478
- private getCurrencySelection;
479
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
480
- }
481
-
482
- declare class Curio<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
483
- constructor();
484
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
485
- }
486
-
487
- declare class Darwinia<TApi, TRes> extends ParachainNode<TApi, TRes> {
488
- constructor();
489
- transferRelayToPara(): TSerializedApiCall;
490
- }
491
-
492
- declare class Encointer<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
493
- constructor();
494
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
495
- getRelayToParaOverrides(): TRelayToParaOverrides;
496
- }
497
-
498
- declare class Heima<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
499
- constructor();
500
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
501
- }
502
-
503
- declare class Hydration<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer, IPolkadotXCMTransfer {
504
- private static NATIVE_ASSET_ID;
505
- constructor();
506
- transferToAssetHub<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
507
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
508
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
509
- protected canUseXTokens({ to: destination, asset }: TSendInternalOptions<TApi, TRes>): boolean;
510
- }
511
-
512
- declare class Imbue<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
513
- constructor();
514
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
515
- }
516
-
517
- declare class Interlay<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
518
- constructor();
519
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
520
- }
521
-
522
- declare class InvArchTinker<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
523
- constructor();
524
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
525
- }
526
-
527
- declare class Karura<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
528
- constructor();
529
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
530
- }
531
-
532
- declare class KiltSpiritnet<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
533
- constructor();
534
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
535
- transferRelayToPara(): TSerializedApiCall;
536
- }
537
-
538
- declare class Kintsugi<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
539
- constructor();
540
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
541
- }
542
-
543
- declare class Manta<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
544
- constructor();
545
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
546
- }
547
-
548
- declare class Moonbeam<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
549
- constructor();
550
- private getMultiLocation;
551
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
552
- getRelayToParaOverrides(): TRelayToParaOverrides;
553
- }
554
-
555
- declare class Moonriver<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
556
- constructor();
557
- private getMultiLocation;
558
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
559
- getRelayToParaOverrides(): TRelayToParaOverrides;
560
- }
561
-
562
- declare class Mythos<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
563
- constructor();
564
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
565
- transferRelayToPara(): TSerializedApiCall;
566
- }
567
-
568
- declare class NeuroWeb<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
569
- constructor();
570
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
571
- }
572
-
573
- declare class Nodle<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
574
- constructor();
575
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
576
- transferRelayToPara(): TSerializedApiCall;
577
- }
578
-
579
- declare class Parallel<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
580
- constructor();
581
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
582
- }
583
-
584
- declare class ParallelHeiko<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
585
- constructor();
586
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
587
- }
588
-
589
- declare class Peaq<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
590
- constructor();
591
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
592
- transferRelayToPara(): TSerializedApiCall;
593
- }
594
-
595
- declare class Pendulum<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
596
- constructor();
597
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
598
- transferRelayToPara(): TSerializedApiCall;
599
- }
600
-
601
- declare class PeopleKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
602
- constructor();
603
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
604
- getRelayToParaOverrides(): TRelayToParaOverrides;
605
- }
606
-
607
- declare class PeoplePolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
608
- constructor();
609
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
610
- getRelayToParaOverrides(): TRelayToParaOverrides;
611
- }
612
-
613
- declare class Phala<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTransferTransfer {
614
- constructor();
615
- transferXTransfer<TApi, TRes>(input: TXTransferTransferOptions<TApi, TRes>): TRes;
616
- }
617
-
618
- declare class Picasso<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
619
- constructor();
620
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
621
- }
622
-
623
- declare class Polimec<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
624
- constructor();
625
- private getAssetMultiLocation;
626
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
627
- transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCall;
628
- }
629
-
630
- declare class Quartz<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
631
- private static NATIVE_ASSET_ID;
632
- constructor();
633
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
634
- }
635
-
636
- declare class RobonomicsKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
637
- constructor();
638
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
639
- }
640
-
641
- declare class RobonomicsPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
642
- constructor();
643
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
644
- }
645
-
646
- declare class Shiden<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer, IXTokensTransfer {
647
- constructor();
648
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
649
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
650
- protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
651
- }
652
-
653
- declare class Subsocial<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
654
- constructor();
655
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
656
- }
657
-
658
- declare class Turing<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
659
- constructor();
660
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
661
- }
662
-
663
- declare class Unique<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
664
- private static NATIVE_ASSET_ID;
665
- constructor();
666
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
667
- }
668
-
669
- declare class Zeitgeist<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
670
- constructor();
671
- private getCurrencySelection;
672
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
673
- }
674
-
675
- declare const nodes: <TApi, TRes>() => {
676
- AssetHubPolkadot: AssetHubPolkadot<TApi, TRes>;
677
- Acala: Acala<TApi, TRes>;
678
- Astar: Astar<TApi, TRes>;
679
- Unique: Unique<TApi, TRes>;
680
- Crust: Crust<TApi, TRes>;
681
- BifrostPolkadot: BifrostPolkadot<TApi, TRes>;
682
- BridgeHubPolkadot: BridgeHubPolkadot<TApi, TRes>;
683
- BridgeHubKusama: BridgeHubKusama<TApi, TRes>;
684
- Bitgreen: Bitgreen<TApi, TRes>;
685
- Centrifuge: Centrifuge<TApi, TRes>;
686
- ComposableFinance: ComposableFinance<TApi, TRes>;
687
- Darwinia: Darwinia<TApi, TRes>;
688
- Hydration: Hydration<TApi, TRes>;
689
- Interlay: Interlay<TApi, TRes>;
690
- Heima: Heima<TApi, TRes>;
691
- Moonbeam: Moonbeam<TApi, TRes>;
692
- Parallel: Parallel<TApi, TRes>;
693
- AssetHubKusama: AssetHubKusama<TApi, TRes>;
694
- CoretimeKusama: CoretimeKusama<TApi, TRes>;
695
- CoretimePolkadot: CoretimePolkadot<TApi, TRes>;
696
- Encointer: Encointer<TApi, TRes>;
697
- Altair: Altair<TApi, TRes>;
698
- Amplitude: Amplitude<TApi, TRes>;
699
- Bajun: Bajun<TApi, TRes>;
700
- Basilisk: Basilisk<TApi, TRes>;
701
- BifrostKusama: BifrostKusama<TApi, TRes>;
702
- Calamari: Calamari<TApi, TRes>;
703
- CrustShadow: CrustShadow<TApi, TRes>;
704
- Crab: Crab<TApi, TRes>;
705
- Imbue: Imbue<TApi, TRes>;
706
- InvArchTinker: InvArchTinker<TApi, TRes>;
707
- Karura: Karura<TApi, TRes>;
708
- Kintsugi: Kintsugi<TApi, TRes>;
709
- Moonriver: Moonriver<TApi, TRes>;
710
- ParallelHeiko: ParallelHeiko<TApi, TRes>;
711
- Picasso: Picasso<TApi, TRes>;
712
- Quartz: Quartz<TApi, TRes>;
713
- RobonomicsKusama: RobonomicsKusama<TApi, TRes>;
714
- RobonomicsPolkadot: RobonomicsPolkadot<TApi, TRes>;
715
- PeoplePolkadot: PeoplePolkadot<TApi, TRes>;
716
- PeopleKusama: PeopleKusama<TApi, TRes>;
717
- Shiden: Shiden<TApi, TRes>;
718
- Turing: Turing<TApi, TRes>;
719
- Manta: Manta<TApi, TRes>;
720
- Nodle: Nodle<TApi, TRes>;
721
- NeuroWeb: NeuroWeb<TApi, TRes>;
722
- Pendulum: Pendulum<TApi, TRes>;
723
- Zeitgeist: Zeitgeist<TApi, TRes>;
724
- Collectives: Collectives<TApi, TRes>;
725
- Phala: Phala<TApi, TRes>;
726
- Subsocial: Subsocial<TApi, TRes>;
727
- KiltSpiritnet: KiltSpiritnet<TApi, TRes>;
728
- Curio: Curio<TApi, TRes>;
729
- Mythos: Mythos<TApi, TRes>;
730
- Peaq: Peaq<TApi, TRes>;
731
- Polimec: Polimec<TApi, TRes>;
732
- };
733
-
734
- type TRelaychain = 'Polkadot' | 'Kusama';
735
- type TNode = (typeof NODE_NAMES)[number];
736
- type TNodePolkadotKusama = Exclude<TNode, 'Ethereum'>;
737
- type TNodeWithRelayChains = (typeof NODES_WITH_RELAY_CHAINS)[number];
738
- type TNodeDotKsmWithRelayChains = Exclude<TNodeWithRelayChains, 'Ethereum'>;
739
-
740
- type TPallet = (typeof SUPPORTED_PALLETS)[number];
741
- type TPalletDetails = {
742
- name: TPallet;
743
- index: number;
744
- };
745
- interface TPalletMap {
746
- defaultPallet: TPallet;
747
- supportedPallets: TPalletDetails[];
748
- }
749
- type TPalletJsonMap = Record<TNodeDotKsmWithRelayChains, TPalletMap>;
750
-
751
- type TPolkadotXCMTransferOptions<TApi, TRes> = {
752
- api: IPolkadotApi<TApi, TRes>;
753
- header: TXcmVersioned<TMultiLocation>;
754
- addressSelection: TXcmVersioned<TMultiLocation>;
755
- address: TAddress;
756
- currencySelection: TXcmVersioned<TMultiAsset[]>;
757
- overriddenAsset?: TMultiLocation | TMultiAssetWithFee[];
758
- scenario: TScenario;
759
- asset: WithAmount<TAsset>;
760
- feeAsset?: TAsset;
761
- destination: TDestination;
762
- paraIdTo?: number;
763
- version?: Version;
764
- senderAddress?: string;
765
- pallet?: string;
766
- method?: string;
767
- };
768
- type TXTokensTransferOptions<TApi, TRes> = {
769
- api: IPolkadotApi<TApi, TRes>;
770
- asset: WithAmount<TAsset>;
771
- addressSelection: TXcmVersioned<TMultiLocation>;
772
- fees: number;
773
- scenario: TScenario;
774
- origin: TNodePolkadotKusama;
775
- destination: TDestination;
776
- paraIdTo?: number;
777
- overriddenAsset?: TMultiLocation | TMultiAssetWithFee[];
778
- pallet?: string;
779
- method?: string;
250
+ type TBalanceResponse = {
251
+ free?: string;
252
+ balance?: string;
780
253
  };
781
- type TXTransferTransferOptions<TApi, TRes> = {
782
- api: IPolkadotApi<TApi, TRes>;
783
- asset: WithAmount<TAsset>;
784
- recipientAddress: TAddress;
785
- origin: TNodePolkadotKusama;
786
- paraId?: number;
787
- destination: TDestination;
788
- overriddenAsset?: TMultiLocation | TMultiAsset[];
789
- pallet?: string;
790
- method?: string;
254
+ /**
255
+ * Retrieves the native asset balance for a given account on a specified node.
256
+ */
257
+ type TGetBalanceNativeOptionsBase = {
258
+ /**
259
+ * The address of the account.
260
+ */
261
+ address: string;
262
+ /**
263
+ * The node on which to query the balance.
264
+ */
265
+ node: TNodeDotKsmWithRelayChains;
266
+ /**
267
+ * The native currency to query.
268
+ */
269
+ currency?: {
270
+ symbol: string;
271
+ };
791
272
  };
792
- interface IPolkadotXCMTransfer {
793
- transferPolkadotXCM: <TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>) => Promise<TRes>;
794
- }
795
- interface IXTokensTransfer {
796
- transferXTokens: <TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>) => TRes;
797
- }
798
- interface IXTransferTransfer {
799
- transferXTransfer: <TApi, TRes>(input: TXTransferTransferOptions<TApi, TRes>) => TRes;
800
- }
801
- type TScenario = 'ParaToRelay' | 'ParaToPara' | 'RelayToPara';
273
+ type TGetBalanceNativeOptions<TApi, TRes> = WithApi<TGetBalanceNativeOptionsBase, TApi, TRes>;
802
274
  /**
803
- * The XCM version.
275
+ * Retrieves the balance of a foreign asset for a given account on a specified node.
804
276
  */
805
- declare enum Version {
806
- V1 = "V1",
807
- V2 = "V2",
808
- V3 = "V3",
809
- V4 = "V4"
810
- }
277
+ type TGetBalanceForeignOptionsBase = {
278
+ address: string;
279
+ /**
280
+ * The node on which to query the balance.
281
+ */
282
+ node: TNodePolkadotKusama;
283
+ /**
284
+ * The currency to query.
285
+ */
286
+ currency: TCurrencyCore;
287
+ };
288
+ type TGetBalanceForeignOptions<TApi, TRes> = WithApi<TGetBalanceForeignOptionsBase, TApi, TRes>;
811
289
  /**
812
- * The supported XCM versions for asset claims.
290
+ * Retrieves the asset balance for a given account on a specified node.
813
291
  */
814
- type TVersionClaimAssets = Version.V3 | Version.V2;
815
- declare enum Parents {
816
- ZERO = 0,
817
- ONE = 1,
818
- TWO = 2
819
- }
820
- type TAmount = string | number | bigint;
821
- type TAddress = string | TMultiLocation;
822
- type TDestination = TNodeWithRelayChains | TMultiLocation;
823
- type TRelayToParaDestination = TNodePolkadotKusama | TMultiLocation;
824
- type TSendBaseOptions = {
292
+ type TGetAssetBalanceOptionsBase = {
293
+ /**
294
+ * The address of the account.
295
+ */
296
+ address: string;
297
+ /**
298
+ * The node on which to query the balance.
299
+ */
300
+ node: TNodeDotKsmWithRelayChains;
301
+ /**
302
+ * The currency to query.
303
+ */
304
+ currency: TCurrencyCore;
305
+ };
306
+ type TGetAssetBalanceOptions<TApi, TRes> = WithApi<TGetAssetBalanceOptionsBase, TApi, TRes>;
307
+ type TGetOriginFeeDetailsOptionsBase = {
308
+ /**
309
+ * The origin node.
310
+ */
311
+ origin: TNodeDotKsmWithRelayChains;
312
+ /**
313
+ * The destination node.
314
+ */
315
+ destination: TNodeWithRelayChains;
825
316
  /**
826
- * The origin node
317
+ * The currency to transfer.
827
318
  */
828
- from: TNodeDotKsmWithRelayChains;
319
+ currency: WithAmount<TCurrencyCore>;
829
320
  /**
830
- * The destination address. A SS58 or H160 format.
321
+ * The origin account.
831
322
  */
832
- address: TAddress;
323
+ account: string;
833
324
  /**
834
- * The optional sender address. A SS58
325
+ * The destination account.
835
326
  */
836
- senderAddress?: string;
327
+ accountDestination: string;
837
328
  /**
838
- * The destination node or multi-location
329
+ * The fee margin percentage.
839
330
  */
840
- to: TDestination;
331
+ feeMarginPercentage?: number;
332
+ };
333
+ type TGetOriginFeeDetailsOptions<TApi, TRes> = WithApi<TGetOriginFeeDetailsOptionsBase, TApi, TRes>;
334
+ type TGetMaxNativeTransferableAmountOptionsBase = {
841
335
  /**
842
- * The currency to transfer. Either ID, symbol, multi-location, or multi-asset
336
+ * The address of the account.
843
337
  */
844
- currency: TCurrencyInputWithAmount;
338
+ address: string;
845
339
  /**
846
- * The optional fee asset. Either ID, symbol, or multi-location
340
+ * The node on which to query the balance.
847
341
  */
848
- feeAsset?: TCurrencyInput;
342
+ node: TNodeDotKsmWithRelayChains;
849
343
  /**
850
- * The optional destination parachain ID
344
+ * The currency to query.
851
345
  */
852
- paraIdTo?: number;
346
+ currency?: {
347
+ symbol: string;
348
+ };
349
+ };
350
+ type TGetMaxNativeTransferableAmountOptions<TApi, TRes> = WithApi<TGetMaxNativeTransferableAmountOptionsBase, TApi, TRes>;
351
+ type TGetMaxForeignTransferableAmountOptionsBase = {
853
352
  /**
854
- * The optional overrided XCM version
353
+ * The address of the account.
855
354
  */
856
- version?: Version;
355
+ address: string;
857
356
  /**
858
- * The optional pallet override
357
+ * The node on which to query the balance.
859
358
  */
860
- pallet?: string;
359
+ node: TNodePolkadotKusama;
861
360
  /**
862
- * The optional pallet method override
361
+ * The currency to query.
863
362
  */
864
- method?: string;
865
- };
866
- /**
867
- * Options for transferring from a parachain to another parachain or relay chain
868
- */
869
- type TSendOptions<TApi, TRes> = WithApi<TSendBaseOptions, TApi, TRes>;
870
- type TSendInternalOptions<TApi, TRes> = Omit<TSendBaseOptions, 'from' | 'currency' | 'feeAsset'> & {
871
- api: IPolkadotApi<TApi, TRes>;
872
- asset: WithAmount<TAsset>;
873
- feeAsset?: TAsset;
874
- overriddenAsset?: TMultiLocation | TMultiAssetWithFee[];
363
+ currency: TCurrencyCore;
875
364
  };
876
- type TRelayToParaBaseOptions = {
365
+ type TGetMaxForeignTransferableAmountOptions<TApi, TRes> = WithApi<TGetMaxForeignTransferableAmountOptionsBase, TApi, TRes>;
366
+ type TGetTransferableAmountOptionsBase = {
877
367
  /**
878
- * The origin node
368
+ * The address of the account.
879
369
  */
880
- origin: TRelaychain;
370
+ address: string;
881
371
  /**
882
- * The destination node or multi-location
372
+ * The node on which to query the balance.
883
373
  */
884
- destination: TRelayToParaDestination;
374
+ node: TNodeDotKsmWithRelayChains;
885
375
  /**
886
- * The destination address. A SS58 or H160 format.
376
+ * The currency to query.
887
377
  */
888
- address: TAddress;
378
+ currency: TCurrencyCore;
379
+ };
380
+ type TGetTransferableAmountOptions<TApi, TRes> = WithApi<TGetTransferableAmountOptionsBase, TApi, TRes>;
381
+ type TVerifyEdOnDestinationOptionsBase = {
382
+ node: TNodeDotKsmWithRelayChains;
383
+ address: string;
384
+ currency: WithAmount<TCurrencyCore>;
385
+ };
386
+ type TVerifyEdOnDestinationOptions<TApi, TRes> = WithApi<TVerifyEdOnDestinationOptionsBase, TApi, TRes>;
387
+
388
+ type TEvmNodeFrom = Extract<TNode, 'Ethereum' | 'Moonbeam' | 'Moonriver' | 'Darwinia'>;
389
+ /**
390
+ * The options for the Ethereum to Polkadot transfer builder.
391
+ */
392
+ type TEvmBuilderOptionsBase = {
889
393
  /**
890
- * The optional destination parachain ID
394
+ * The source node. Can be either 'Ethereum', 'Moonbeam', 'Moonriver', or 'Darwinia'.
891
395
  */
892
- paraIdTo?: number;
396
+ from: TEvmNodeFrom;
893
397
  /**
894
- * The optional overrided XCM version
398
+ * The destination node on Polkadot network.
895
399
  */
896
- version?: Version;
400
+ to: TNodeWithRelayChains;
897
401
  /**
898
- * The DOT or KSM asset to transfer
402
+ * The currency to transfer. Symbol or ID.
899
403
  */
900
- asset: WithAmount<TAsset>;
404
+ currency: TCurrencyInputWithAmount;
901
405
  /**
902
- * The optional pallet override
406
+ * The Polkadot destination address.
903
407
  */
904
- pallet?: string;
408
+ address: string;
905
409
  /**
906
- * The optional pallet method override
410
+ * The AssetHub address
907
411
  */
908
- method?: string;
412
+ ahAddress?: string;
413
+ /**
414
+ * The Ethereum signer.
415
+ */
416
+ signer: Signer | WalletClient;
909
417
  };
910
- type TRelayToParaOverrides = {
911
- section: TXcmPalletSection;
912
- includeFee: boolean;
418
+ type TEvmBuilderOptions<TApi, TRes> = WithApi<TEvmBuilderOptionsBase, TApi, TRes> & {
419
+ provider?: AbstractProvider;
420
+ };
421
+ type TSerializeEthTransferOptions = Omit<TEvmBuilderOptionsBase, 'signer'> & {
422
+ destAddress: string;
423
+ };
424
+ type TSerializedEthTransfer = {
425
+ token: string;
426
+ destinationParaId: number;
427
+ destinationFee: bigint;
428
+ amount: bigint;
429
+ fee: bigint;
913
430
  };
914
431
  /**
915
- * Options for transferring from a relay chain to a parachain
432
+ * The options for the batch builder.
916
433
  */
917
- type TRelayToParaOptions<TApi, TRes> = WithApi<TRelayToParaBaseOptions, TApi, TRes>;
918
- type TSerializedApiCall = {
919
- module: TPallet | 'Utility';
920
- section: string;
921
- parameters: Record<string, unknown>;
434
+ declare enum BatchMode {
435
+ /**
436
+ * Does not commit if one of the calls in the batch fails.
437
+ */
438
+ BATCH_ALL = "BATCH_ALL",
439
+ /**
440
+ * Commits each successful call regardless if a call fails.
441
+ */
442
+ BATCH = "BATCH"
443
+ }
444
+ /**
445
+ * The options for the batch builder.
446
+ */
447
+ type TBatchOptions = {
448
+ /**
449
+ * The batch mode. Can be either:
450
+ * `BATCH_ALL` - does not commit if one of the calls in the batch fails.
451
+ * `BATCH` - commits each successful call regardless if a call fails.
452
+ */
453
+ mode: BatchMode;
922
454
  };
923
- type TDestWeight = {
924
- ref_time: bigint;
925
- proof_size: bigint;
455
+
456
+ type TProviderEntry = {
457
+ name: string;
458
+ endpoint: string;
926
459
  };
927
- type TXTransferSection = 'transfer';
928
- type TXTokensSection = 'transfer' | 'transfer_multiasset' | 'transfer_multiassets';
929
- type TPolkadotXcmSection = 'limited_teleport_assets' | 'limited_reserve_transfer_assets' | 'reserve_transfer_assets' | 'reserve_withdraw_assets' | 'transfer_assets';
930
- type TXcmPalletSection = 'limited_teleport_assets' | 'reserve_transfer_assets' | 'limited_reserve_transfer_assets';
931
- type TWeight = {
932
- refTime: bigint;
933
- proofSize: bigint;
460
+ type TNodeConfig = {
461
+ name: string;
462
+ info: string;
463
+ paraId: number;
464
+ providers: TProviderEntry[];
465
+ };
466
+ type TNodeConfigMap = Record<TNodeDotKsmWithRelayChains, TNodeConfig>;
467
+
468
+ type TDryRunBaseOptions<TRes> = {
469
+ /**
470
+ * The transaction to dry-run
471
+ */
472
+ tx: TRes;
473
+ /**
474
+ * The node to dry-run on
475
+ */
476
+ node: TNodeDotKsmWithRelayChains;
477
+ /**
478
+ * The address to dry-run with
479
+ */
480
+ address: string;
481
+ };
482
+ type TDryRunOptions<TApi, TRes> = WithApi<TDryRunBaseOptions<TRes>, TApi, TRes>;
483
+ type TDryRunResult = {
484
+ success: true;
485
+ fee: bigint;
486
+ weight?: TWeight;
487
+ } | {
488
+ success: false;
489
+ failureReason: string;
490
+ };
491
+ declare enum XTokensError {
492
+ AssetHasNoReserve = "AssetHasNoReserve",
493
+ NotCrossChainTransfer = "NotCrossChainTransfer",
494
+ InvalidDest = "InvalidDest",
495
+ NotCrossChainTransferableCurrency = "NotCrossChainTransferableCurrency",
496
+ UnweighableMessage = "UnweighableMessage",
497
+ XcmExecutionFailed = "XcmExecutionFailed",
498
+ CannotReanchor = "CannotReanchor",
499
+ InvalidAncestry = "InvalidAncestry",
500
+ InvalidAsset = "InvalidAsset",
501
+ DestinationNotInvertible = "DestinationNotInvertible",
502
+ BadVersion = "BadVersion",
503
+ DistinctReserveForAssetAndFee = "DistinctReserveForAssetAndFee",
504
+ ZeroFee = "ZeroFee",
505
+ ZeroAmount = "ZeroAmount",
506
+ TooManyAssetsBeingSent = "TooManyAssetsBeingSent",
507
+ AssetIndexNonExistent = "AssetIndexNonExistent",
508
+ FeeNotEnough = "FeeNotEnough",
509
+ NotSupportedLocation = "NotSupportedLocation",
510
+ MinXcmFeeNotDefined = "MinXcmFeeNotDefined",
511
+ RateLimited = "RateLimited"
512
+ }
513
+ declare enum PolkadotXcmError {
514
+ Unreachable = "Unreachable",
515
+ SendFailure = "SendFailure",
516
+ Filtered = "Filtered",
517
+ UnweighableMessage = "UnweighableMessage",
518
+ DestinationNotInvertible = "DestinationNotInvertible",
519
+ Empty = "Empty",
520
+ CannotReanchor = "CannotReanchor",
521
+ TooManyAssets = "TooManyAssets",
522
+ InvalidOrigin = "InvalidOrigin",
523
+ BadVersion = "BadVersion",
524
+ BadLocation = "BadLocation",
525
+ NoSubscription = "NoSubscription",
526
+ AlreadySubscribed = "AlreadySubscribed",
527
+ CannotCheckOutTeleport = "CannotCheckOutTeleport",
528
+ LowBalance = "LowBalance",
529
+ TooManyLocks = "TooManyLocks",
530
+ AccountNotSovereign = "AccountNotSovereign",
531
+ FeesNotMet = "FeesNotMet",
532
+ LockNotFound = "LockNotFound",
533
+ InUse = "InUse",
534
+ REMOVED = "REMOVED",
535
+ InvalidAssetUnknownReserve = "InvalidAssetUnknownReserve",
536
+ InvalidAssetUnsupportedReserve = "InvalidAssetUnsupportedReserve",
537
+ TooManyReserves = "TooManyReserves",
538
+ LocalExecutionIncomplete = "LocalExecutionIncomplete"
539
+ }
540
+ type TModuleError = {
541
+ index: string;
542
+ error: string;
934
543
  };
935
544
 
936
- type TMultiAsset = TMultiAssetV3 | TMultiAssetV4;
937
- interface TMultiAssetV3 {
938
- id: {
939
- Concrete: TMultiLocation;
545
+ type TEdJsonMap = Record<TNodeDotKsmWithRelayChains, string | null>;
546
+
547
+ type TTransferInfo = {
548
+ chain: {
549
+ origin: TNodeWithRelayChains;
550
+ destination: TNodeWithRelayChains;
551
+ ecosystem: string;
940
552
  };
941
- fun: {
942
- Fungible: TAmount;
553
+ currencyBalanceOrigin: {
554
+ balance: bigint;
555
+ currency: string;
943
556
  };
944
- }
945
- interface TMultiAssetV4 {
946
- id: TMultiLocation;
947
- fun: {
948
- Fungible: TAmount;
557
+ originFeeBalance: {
558
+ balance: bigint;
559
+ expectedBalanceAfterXCMFee: bigint;
560
+ xcmFee: {
561
+ sufficientForXCM: boolean;
562
+ xcmFee: bigint;
563
+ };
564
+ existentialDeposit: bigint;
565
+ asset: string;
566
+ minNativeTransferableAmount: bigint;
567
+ maxNativeTransferableAmount: bigint;
949
568
  };
950
- }
951
-
952
- type TAssetClaimOptionsBase = {
953
- node: TNodeWithRelayChains;
954
- multiAssets: TMultiAsset[];
955
- address: TAddress;
956
- version?: TVersionClaimAssets;
957
- };
958
- type TAssetClaimOptions<TApi, TRes> = WithApi<TAssetClaimOptionsBase, TApi, TRes>;
959
-
960
- type TBalanceResponse = {
961
- free?: string;
962
- balance?: string;
963
- };
964
- /**
965
- * Retrieves the native asset balance for a given account on a specified node.
966
- */
967
- type TGetBalanceNativeOptionsBase = {
968
- /**
969
- * The address of the account.
970
- */
971
- address: string;
972
- /**
973
- * The node on which to query the balance.
974
- */
975
- node: TNodeDotKsmWithRelayChains;
976
- /**
977
- * The native currency to query.
978
- */
979
- currency?: {
980
- symbol: string;
569
+ destinationFeeBalance: {
570
+ balance: bigint;
571
+ currency: string;
572
+ existentialDeposit: bigint;
981
573
  };
982
574
  };
983
- type TGetBalanceNativeOptions<TApi, TRes> = WithApi<TGetBalanceNativeOptionsBase, TApi, TRes>;
984
- /**
985
- * Retrieves the balance of a foreign asset for a given account on a specified node.
986
- */
987
- type TGetBalanceForeignOptionsBase = {
988
- address: string;
989
- /**
990
- * The node on which to query the balance.
991
- */
992
- node: TNodePolkadotKusama;
993
- /**
994
- * The currency to query.
995
- */
996
- currency: TCurrencyCore;
575
+ type TOriginFeeDetails = {
576
+ sufficientForXCM: boolean;
577
+ xcmFee: bigint;
997
578
  };
998
- type TGetBalanceForeignOptions<TApi, TRes> = WithApi<TGetBalanceForeignOptionsBase, TApi, TRes>;
579
+ type TGetTransferInfoOptionsBase = {
580
+ origin: TNodeDotKsmWithRelayChains;
581
+ destination: TNodeDotKsmWithRelayChains;
582
+ accountOrigin: string;
583
+ accountDestination: string;
584
+ currency: WithAmount<TCurrencyCore>;
585
+ };
586
+ type TGetTransferInfoOptions<TApi, TRes> = WithApi<TGetTransferInfoOptionsBase, TApi, TRes>;
587
+
588
+ interface IPolkadotApi<TApi, TRes> {
589
+ setApi(api?: TApiOrUrl<TApi>): void;
590
+ getApi(): TApi;
591
+ getApiOrUrl(): TApiOrUrl<TApi> | undefined;
592
+ init(node: TNodeWithRelayChains): Promise<void>;
593
+ createApiInstance: (wsUrl: string | string[]) => Promise<TApi>;
594
+ accountToHex(address: string, isPrefixed?: boolean): string;
595
+ callTxMethod(serializedCall: TSerializedApiCall): TRes;
596
+ callBatchMethod(calls: TRes[], mode: BatchMode): TRes;
597
+ objectToHex(obj: unknown, typeName: string): Promise<string>;
598
+ hexToUint8a(hex: string): Uint8Array;
599
+ stringToUint8a(str: string): Uint8Array;
600
+ calculateTransactionFee(tx: TRes, address: string): Promise<bigint>;
601
+ quoteAhPrice(fromMl: TMultiLocation, toMl: TMultiLocation, amountIn: bigint, includeFee?: boolean): Promise<bigint | undefined>;
602
+ getBalanceNative(address: string): Promise<bigint>;
603
+ getBalanceNativeAcala(address: string, symbol: string): Promise<bigint>;
604
+ getBalanceForeignPolkadotXcm(address: string, id?: string): Promise<bigint>;
605
+ getMythosForeignBalance(address: string): Promise<bigint>;
606
+ getAssetHubForeignBalance(address: string, multiLocation: TMultiLocation): Promise<bigint>;
607
+ getForeignAssetsByIdBalance(address: string, assetId: string): Promise<bigint>;
608
+ getBalanceForeignXTokens(node: TNodePolkadotKusama, address: string, asset: TAsset): Promise<bigint>;
609
+ getBalanceForeignBifrost(address: string, asset: TAsset): Promise<bigint>;
610
+ getBalanceForeignAssetsAccount(address: string, assetId: bigint | number): Promise<bigint>;
611
+ getFromRpc(module: string, method: string, key: string): Promise<string>;
612
+ blake2AsHex(data: Uint8Array): string;
613
+ clone(): IPolkadotApi<TApi, TRes>;
614
+ createApiForNode(node: TNodeWithRelayChains): Promise<IPolkadotApi<TApi, TRes>>;
615
+ getDryRun(options: TDryRunBaseOptions<TRes>): Promise<TDryRunResult>;
616
+ setDisconnectAllowed(allowed: boolean): void;
617
+ getDisconnectAllowed(): boolean;
618
+ disconnect(force?: boolean): Promise<void>;
619
+ }
620
+
999
621
  /**
1000
- * Retrieves the asset balance for a given account on a specified node.
622
+ * Builder class for constructing asset claim transactions.
1001
623
  */
1002
- type TGetAssetBalanceOptionsBase = {
1003
- /**
1004
- * The address of the account.
1005
- */
1006
- address: string;
1007
- /**
1008
- * The node on which to query the balance.
1009
- */
1010
- node: TNodeDotKsmWithRelayChains;
1011
- /**
1012
- * The currency to query.
1013
- */
1014
- currency: TCurrencyCore;
1015
- };
1016
- type TGetAssetBalanceOptions<TApi, TRes> = WithApi<TGetAssetBalanceOptionsBase, TApi, TRes>;
1017
- type TGetOriginFeeDetailsOptionsBase = {
1018
- /**
1019
- * The origin node.
1020
- */
1021
- origin: TNodeDotKsmWithRelayChains;
1022
- /**
1023
- * The destination node.
1024
- */
1025
- destination: TNodeWithRelayChains;
624
+ declare class AssetClaimBuilder<TApi, TRes, T extends Partial<TAssetClaimOptionsBase> = object> {
625
+ readonly api: IPolkadotApi<TApi, TRes>;
626
+ readonly _options: T;
627
+ constructor(api: IPolkadotApi<TApi, TRes>, options?: T);
1026
628
  /**
1027
- * The currency to transfer.
629
+ * Specifies the assets to be claimed.
630
+ *
631
+ * @param multiAssets - An array of assets to claim in a multi-asset format.
632
+ * @returns An instance of Builder
1028
633
  */
1029
- currency: WithAmount<TCurrencyCore>;
634
+ fungible(multiAssets: TMultiAsset[]): AssetClaimBuilder<TApi, TRes, T & {
635
+ multiAssets: TMultiAsset[];
636
+ }>;
1030
637
  /**
1031
- * The origin account.
638
+ * Specifies the account address on which the assets will be claimed.
639
+ *
640
+ * @param address - The destination account address.
641
+ * @returns An instance of Builder
1032
642
  */
1033
- account: string;
643
+ account(address: TAddress): AssetClaimBuilder<TApi, TRes, T & {
644
+ address: TAddress;
645
+ }>;
1034
646
  /**
1035
- * The destination account.
647
+ * Sets the XCM version to be used for the asset claim.
648
+ *
649
+ * @param version - The XCM version.
650
+ * @returns An instance of Builder
1036
651
  */
1037
- accountDestination: string;
652
+ xcmVersion(version: TVersionClaimAssets): AssetClaimBuilder<TApi, TRes, T & {
653
+ version: TVersionClaimAssets;
654
+ }>;
1038
655
  /**
1039
- * The fee margin percentage.
656
+ * Builds and returns the asset claim extrinsic.
657
+ *
658
+ * @returns A Promise that resolves to the asset claim extrinsic.
1040
659
  */
1041
- feeMarginPercentage?: number;
1042
- };
1043
- type TGetOriginFeeDetailsOptions<TApi, TRes> = WithApi<TGetOriginFeeDetailsOptionsBase, TApi, TRes>;
1044
- type TGetMaxNativeTransferableAmountOptionsBase = {
660
+ build(this: AssetClaimBuilder<TApi, TRes, TAssetClaimOptionsBase>): Promise<TRes>;
1045
661
  /**
1046
- * The address of the account.
662
+ * Returns the API instance used by the builder.
663
+ *
664
+ * @returns The API instance.
1047
665
  */
1048
- address: string;
666
+ getApi(): TApi;
1049
667
  /**
1050
- * The node on which to query the balance.
668
+ * Disconnects the API.
669
+ *
670
+ * @returns A Promise that resolves when the API is disconnected.
1051
671
  */
1052
- node: TNodeDotKsmWithRelayChains;
672
+ disconnect(): Promise<void>;
673
+ }
674
+
675
+ declare class BatchTransactionManager<TApi, TRes> {
676
+ transactionOptions: TSendOptions<TApi, TRes>[];
677
+ addTransaction(options: TSendOptions<TApi, TRes>): void;
678
+ isEmpty(): boolean;
679
+ buildBatch(api: IPolkadotApi<TApi, TRes>, from: TNodeDotKsmWithRelayChains, options?: TBatchOptions): Promise<TRes>;
680
+ }
681
+
682
+ /**
683
+ * A builder class for constructing Para-to-Para, Para-to-Relay, Relay-to-Para transactions and asset claims.
684
+ */
685
+ declare class GeneralBuilder<TApi, TRes, T extends Partial<TSendBaseOptions> = object> {
686
+ readonly batchManager: BatchTransactionManager<TApi, TRes>;
687
+ readonly api: IPolkadotApi<TApi, TRes>;
688
+ readonly _options: T;
689
+ constructor(api: IPolkadotApi<TApi, TRes>, batchManager: BatchTransactionManager<TApi, TRes>, options?: T);
1053
690
  /**
1054
- * The currency to query.
691
+ * Specifies the origin node for the transaction.
692
+ *
693
+ * @param node - The node from which the transaction originates.
694
+ * @returns An instance of Builder
1055
695
  */
1056
- currency?: {
1057
- symbol: string;
1058
- };
1059
- };
1060
- type TGetMaxNativeTransferableAmountOptions<TApi, TRes> = WithApi<TGetMaxNativeTransferableAmountOptionsBase, TApi, TRes>;
1061
- type TGetMaxForeignTransferableAmountOptionsBase = {
696
+ from(node: TNodeDotKsmWithRelayChains): GeneralBuilder<TApi, TRes, T & {
697
+ from: TNodeDotKsmWithRelayChains;
698
+ }>;
1062
699
  /**
1063
- * The address of the account.
700
+ * Specifies the destination node for the transaction.
701
+ *
702
+ * @param node - The node to which the transaction is sent.
703
+ * @param paraIdTo - (Optional) The parachain ID of the destination node.
704
+ * @returns An instance of Builder
1064
705
  */
1065
- address: string;
706
+ to(node: TDestination, paraIdTo?: number): GeneralBuilder<TApi, TRes, T & {
707
+ to: TDestination;
708
+ }>;
1066
709
  /**
1067
- * The node on which to query the balance.
710
+ * Initiates the process to claim assets from a specified node.
711
+ *
712
+ * @param node - The node from which to claim assets.
713
+ * @returns An instance of Builder
1068
714
  */
1069
- node: TNodePolkadotKusama;
715
+ claimFrom(node: TNodeWithRelayChains): AssetClaimBuilder<TApi, TRes, {
716
+ node: TNodeWithRelayChains;
717
+ }>;
1070
718
  /**
1071
- * The currency to query.
719
+ * Specifies the currency to be used in the transaction. Symbol, ID, multi-location or multi-asset.
720
+ *
721
+ * @param currency - The currency to be transferred.
722
+ * @returns An instance of Builder
1072
723
  */
1073
- currency: TCurrencyCore;
1074
- };
1075
- type TGetMaxForeignTransferableAmountOptions<TApi, TRes> = WithApi<TGetMaxForeignTransferableAmountOptionsBase, TApi, TRes>;
1076
- type TGetTransferableAmountOptionsBase = {
724
+ currency(currency: TCurrencyInputWithAmount): GeneralBuilder<TApi, TRes, T & {
725
+ currency: TCurrencyInputWithAmount;
726
+ }>;
1077
727
  /**
1078
- * The address of the account.
728
+ * Sets the recipient address.
729
+ *
730
+ * @param address - The destination address.
731
+ * @returns An instance of Builder
1079
732
  */
1080
- address: string;
733
+ address(address: TAddress, senderAddress?: string): GeneralBuilder<TApi, TRes, T & {
734
+ address: TAddress;
735
+ }>;
1081
736
  /**
1082
- * The node on which to query the balance.
737
+ * Sets the XCM version to be used for the transfer.
738
+ *
739
+ * @param version - The XCM version.
740
+ * @returns An instance of Builder
1083
741
  */
1084
- node: TNodeDotKsmWithRelayChains;
742
+ xcmVersion(version: Version): GeneralBuilder<TApi, TRes, T & {
743
+ version: Version;
744
+ }>;
1085
745
  /**
1086
- * The currency to query.
746
+ * Sets a custom pallet for the transaction.
747
+ *
748
+ * @param palletName - The name of the custom pallet to be used.
749
+ * @returns An instance of the Builder.
1087
750
  */
1088
- currency: TCurrencyCore;
1089
- };
1090
- type TGetTransferableAmountOptions<TApi, TRes> = WithApi<TGetTransferableAmountOptionsBase, TApi, TRes>;
1091
- type TVerifyEdOnDestinationOptionsBase = {
1092
- node: TNodeDotKsmWithRelayChains;
1093
- address: string;
1094
- currency: WithAmount<TCurrencyCore>;
1095
- };
1096
- type TVerifyEdOnDestinationOptions<TApi, TRes> = WithApi<TVerifyEdOnDestinationOptionsBase, TApi, TRes>;
1097
-
1098
- type TEvmNodeFrom = Extract<TNode, 'Ethereum' | 'Moonbeam' | 'Moonriver' | 'Darwinia'>;
1099
- /**
1100
- * The options for the Ethereum to Polkadot transfer builder.
1101
- */
1102
- type TEvmBuilderOptionsBase = {
751
+ customPallet(pallet: string, method: string): GeneralBuilder<TApi, TRes, T & {
752
+ pallet: string;
753
+ method: string;
754
+ }>;
1103
755
  /**
1104
- * The source node. Can be either 'Ethereum', 'Moonbeam', 'Moonriver', or 'Darwinia'.
756
+ * Optional fee asset for the transaction.
757
+ *
758
+ * @param currency - The currency to be used for the fee.
759
+ * @returns An instance of the Builder
1105
760
  */
1106
- from: TEvmNodeFrom;
761
+ feeAsset(currency: TCurrencyInput | undefined): GeneralBuilder<TApi, TRes, T & {
762
+ feeAsset: TCurrencyInput | undefined;
763
+ }>;
1107
764
  /**
1108
- * The destination node on Polkadot network.
765
+ * Adds the transfer transaction to the batch.
766
+ *
767
+ * @returns An instance of Builder
1109
768
  */
1110
- to: TNodeWithRelayChains;
769
+ addToBatch(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>): GeneralBuilder<TApi, TRes, T & {
770
+ from: TNodeDotKsmWithRelayChains;
771
+ }>;
1111
772
  /**
1112
- * The currency to transfer. Symbol or ID.
773
+ * Builds and returns the batched transaction based on the configured parameters.
774
+ *
775
+ * @param options - (Optional) Options to customize the batch transaction.
776
+ * @returns A Extrinsic representing the batched transactions.
1113
777
  */
1114
- currency: TCurrencyInputWithAmount;
778
+ buildBatch(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>, options?: TBatchOptions): Promise<TRes>;
1115
779
  /**
1116
- * The Polkadot destination address.
780
+ * Builds and returns the transfer extrinsic.
781
+ *
782
+ * @returns A Promise that resolves to the transfer extrinsic.
1117
783
  */
1118
- address: string;
784
+ build(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>): Promise<TRes>;
785
+ dryRun(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>, senderAddress: string): Promise<TDryRunResult>;
1119
786
  /**
1120
- * The AssetHub address
787
+ * Returns the API instance used by the builder.
788
+ *
789
+ * @returns The API instance.
1121
790
  */
1122
- ahAddress?: string;
791
+ getApi(): TApi;
1123
792
  /**
1124
- * The Ethereum signer.
793
+ * Disconnects the API.
794
+ *
795
+ * @returns A Promise that resolves when the API is disconnected.
1125
796
  */
1126
- signer: Signer | WalletClient;
1127
- };
1128
- type TEvmBuilderOptions<TApi, TRes> = WithApi<TEvmBuilderOptionsBase, TApi, TRes> & {
1129
- provider?: AbstractProvider;
1130
- };
1131
- type TSerializeEthTransferOptions = Omit<TEvmBuilderOptionsBase, 'signer'> & {
1132
- destAddress: string;
1133
- };
1134
- type TSerializedEthTransfer = {
1135
- token: string;
1136
- destinationParaId: number;
1137
- destinationFee: bigint;
1138
- amount: bigint;
1139
- fee: bigint;
1140
- };
797
+ disconnect(): Promise<void>;
798
+ }
1141
799
  /**
1142
- * The options for the batch builder.
800
+ * Creates a new Builder instance.
801
+ *
802
+ * @param api - The API instance to use for building transactions. If not provided, a new instance will be created.
803
+ * @returns A new Builder instance.
1143
804
  */
1144
- declare enum BatchMode {
1145
- /**
1146
- * Does not commit if one of the calls in the batch fails.
1147
- */
1148
- BATCH_ALL = "BATCH_ALL",
1149
- /**
1150
- * Commits each successful call regardless if a call fails.
1151
- */
1152
- BATCH = "BATCH"
805
+ declare const Builder: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>) => GeneralBuilder<TApi, TRes, object>;
806
+
807
+ declare const ETH_CHAIN_ID: bigint;
808
+ declare const ETHEREUM_JUNCTION: TJunction;
809
+
810
+ declare abstract class ParachainNode<TApi, TRes> {
811
+ private readonly _node;
812
+ private readonly _info;
813
+ private readonly _type;
814
+ private readonly _version;
815
+ protected _assetCheckEnabled: boolean;
816
+ constructor(node: TNodePolkadotKusama, info: string, type: TEcosystemType, version: Version);
817
+ get info(): string;
818
+ get type(): TEcosystemType;
819
+ get node(): TNodePolkadotKusama;
820
+ get version(): Version;
821
+ get assetCheckEnabled(): boolean;
822
+ protected canUseXTokens(_: TSendInternalOptions<TApi, TRes>): boolean;
823
+ transfer(options: TSendInternalOptions<TApi, TRes>): Promise<TRes>;
824
+ getRelayToParaOverrides(): TRelayToParaOverrides;
825
+ transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCall;
826
+ createCurrencySpec(amount: TAmount, scenario: TScenario, version: Version, _asset?: TAsset): TXcmVersioned<TMultiAsset[]>;
827
+ createPolkadotXcmHeader(scenario: TScenario, version: Version, destination: TDestination, paraId?: number): TXcmVersioned<TMultiLocation>;
828
+ getNativeAssetSymbol(): string;
829
+ protected transferToEthereum<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
830
+ }
831
+
832
+ declare class Acala<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
833
+ constructor();
834
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
835
+ }
836
+
837
+ declare class Altair<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
838
+ constructor();
839
+ private getCurrencySelection;
840
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
841
+ }
842
+
843
+ declare class Amplitude<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
844
+ constructor();
845
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
846
+ }
847
+
848
+ declare class AssetHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
849
+ constructor();
850
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
851
+ getRelayToParaOverrides(): TRelayToParaOverrides;
852
+ createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): {
853
+ V1: _paraspell_assets.TMultiAsset[];
854
+ V2?: undefined;
855
+ V3?: undefined;
856
+ V4?: undefined;
857
+ } | {
858
+ V2: _paraspell_assets.TMultiAsset[];
859
+ V1?: undefined;
860
+ V3?: undefined;
861
+ V4?: undefined;
862
+ } | {
863
+ V3: _paraspell_assets.TMultiAsset[];
864
+ V1?: undefined;
865
+ V2?: undefined;
866
+ V4?: undefined;
867
+ } | {
868
+ V4: _paraspell_assets.TMultiAsset[];
869
+ V1?: undefined;
870
+ V2?: undefined;
871
+ V3?: undefined;
872
+ };
873
+ }
874
+
875
+ declare class AssetHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
876
+ constructor();
877
+ handleBridgeTransfer<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>, targetChain: 'Polkadot' | 'Kusama'): TRes;
878
+ handleEthBridgeTransfer<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
879
+ handleMythosTransfer<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
880
+ handleBifrostEthTransfer: <TApi_1, TRes_1>(input: TPolkadotXCMTransferOptions<TApi_1, TRes_1>) => TRes_1;
881
+ patchInput<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TPolkadotXCMTransferOptions<TApi, TRes>;
882
+ private getSection;
883
+ private handleExecuteTransfer;
884
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
885
+ getRelayToParaOverrides(): TRelayToParaOverrides;
886
+ createCurrencySpec(amount: TAmount, scenario: TScenario, version: Version, asset?: TAsset): {
887
+ V1: _paraspell_assets.TMultiAsset[];
888
+ V2?: undefined;
889
+ V3?: undefined;
890
+ V4?: undefined;
891
+ } | {
892
+ V2: _paraspell_assets.TMultiAsset[];
893
+ V1?: undefined;
894
+ V3?: undefined;
895
+ V4?: undefined;
896
+ } | {
897
+ V3: _paraspell_assets.TMultiAsset[];
898
+ V1?: undefined;
899
+ V2?: undefined;
900
+ V4?: undefined;
901
+ } | {
902
+ V4: _paraspell_assets.TMultiAsset[];
903
+ V1?: undefined;
904
+ V2?: undefined;
905
+ V3?: undefined;
906
+ };
907
+ }
908
+
909
+ declare class Astar<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer, IXTokensTransfer {
910
+ constructor();
911
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
912
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
913
+ protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
914
+ }
915
+
916
+ declare class Bajun<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
917
+ constructor();
918
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
919
+ transferRelayToPara(): TSerializedApiCall;
920
+ }
921
+
922
+ declare class Basilisk<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
923
+ constructor();
924
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
925
+ }
926
+
927
+ declare class BifrostKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
928
+ constructor();
929
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
930
+ }
931
+
932
+ declare class BifrostPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer, IPolkadotXCMTransfer {
933
+ constructor();
934
+ getCurrencySelection(asset: TAsset): {
935
+ Native: string;
936
+ VToken?: undefined;
937
+ Token?: undefined;
938
+ VSToken2?: undefined;
939
+ VToken2?: undefined;
940
+ Token2?: undefined;
941
+ } | {
942
+ VToken: string;
943
+ Native?: undefined;
944
+ Token?: undefined;
945
+ VSToken2?: undefined;
946
+ VToken2?: undefined;
947
+ Token2?: undefined;
948
+ } | {
949
+ Token: string;
950
+ Native?: undefined;
951
+ VToken?: undefined;
952
+ VSToken2?: undefined;
953
+ VToken2?: undefined;
954
+ Token2?: undefined;
955
+ } | {
956
+ VSToken2: number;
957
+ Native?: undefined;
958
+ VToken?: undefined;
959
+ Token?: undefined;
960
+ VToken2?: undefined;
961
+ Token2?: undefined;
962
+ } | {
963
+ VToken2: number;
964
+ Native?: undefined;
965
+ VToken?: undefined;
966
+ Token?: undefined;
967
+ VSToken2?: undefined;
968
+ Token2?: undefined;
969
+ } | {
970
+ Token2: number;
971
+ Native?: undefined;
972
+ VToken?: undefined;
973
+ Token?: undefined;
974
+ VSToken2?: undefined;
975
+ VToken2?: undefined;
976
+ };
977
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
978
+ transferToAssetHub<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
979
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
980
+ protected canUseXTokens({ asset, to: destination }: TSendInternalOptions<TApi, TRes>): boolean;
1153
981
  }
1154
- /**
1155
- * The options for the batch builder.
1156
- */
1157
- type TBatchOptions = {
1158
- /**
1159
- * The batch mode. Can be either:
1160
- * `BATCH_ALL` - does not commit if one of the calls in the batch fails.
1161
- * `BATCH` - commits each successful call regardless if a call fails.
1162
- */
1163
- mode: BatchMode;
1164
- };
1165
982
 
1166
- type TProviderEntry = {
1167
- name: string;
1168
- endpoint: string;
1169
- };
1170
- type TNodeConfig = {
1171
- name: string;
1172
- info: string;
1173
- paraId: number;
1174
- providers: TProviderEntry[];
1175
- };
1176
- type TNodeConfigMap = Record<TNodeDotKsmWithRelayChains, TNodeConfig>;
983
+ declare class Bitgreen<TApi, TRes> extends ParachainNode<TApi, TRes> {
984
+ constructor();
985
+ }
1177
986
 
1178
- type TDryRunBaseOptions<TRes> = {
1179
- /**
1180
- * The transaction to dry-run
1181
- */
1182
- tx: TRes;
1183
- /**
1184
- * The node to dry-run on
1185
- */
1186
- node: TNodeDotKsmWithRelayChains;
1187
- /**
1188
- * The address to dry-run with
1189
- */
1190
- address: string;
1191
- };
1192
- type TDryRunOptions<TApi, TRes> = WithApi<TDryRunBaseOptions<TRes>, TApi, TRes>;
1193
- type TDryRunResult = {
1194
- success: true;
1195
- fee: bigint;
1196
- weight?: TWeight;
1197
- } | {
1198
- success: false;
1199
- failureReason: string;
1200
- };
1201
- declare enum XTokensError {
1202
- AssetHasNoReserve = "AssetHasNoReserve",
1203
- NotCrossChainTransfer = "NotCrossChainTransfer",
1204
- InvalidDest = "InvalidDest",
1205
- NotCrossChainTransferableCurrency = "NotCrossChainTransferableCurrency",
1206
- UnweighableMessage = "UnweighableMessage",
1207
- XcmExecutionFailed = "XcmExecutionFailed",
1208
- CannotReanchor = "CannotReanchor",
1209
- InvalidAncestry = "InvalidAncestry",
1210
- InvalidAsset = "InvalidAsset",
1211
- DestinationNotInvertible = "DestinationNotInvertible",
1212
- BadVersion = "BadVersion",
1213
- DistinctReserveForAssetAndFee = "DistinctReserveForAssetAndFee",
1214
- ZeroFee = "ZeroFee",
1215
- ZeroAmount = "ZeroAmount",
1216
- TooManyAssetsBeingSent = "TooManyAssetsBeingSent",
1217
- AssetIndexNonExistent = "AssetIndexNonExistent",
1218
- FeeNotEnough = "FeeNotEnough",
1219
- NotSupportedLocation = "NotSupportedLocation",
1220
- MinXcmFeeNotDefined = "MinXcmFeeNotDefined",
1221
- RateLimited = "RateLimited"
987
+ declare class BridgeHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
988
+ constructor();
989
+ _assetCheckEnabled: boolean;
990
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
991
+ getRelayToParaOverrides(): TRelayToParaOverrides;
1222
992
  }
1223
- declare enum PolkadotXcmError {
1224
- Unreachable = "Unreachable",
1225
- SendFailure = "SendFailure",
1226
- Filtered = "Filtered",
1227
- UnweighableMessage = "UnweighableMessage",
1228
- DestinationNotInvertible = "DestinationNotInvertible",
1229
- Empty = "Empty",
1230
- CannotReanchor = "CannotReanchor",
1231
- TooManyAssets = "TooManyAssets",
1232
- InvalidOrigin = "InvalidOrigin",
1233
- BadVersion = "BadVersion",
1234
- BadLocation = "BadLocation",
1235
- NoSubscription = "NoSubscription",
1236
- AlreadySubscribed = "AlreadySubscribed",
1237
- CannotCheckOutTeleport = "CannotCheckOutTeleport",
1238
- LowBalance = "LowBalance",
1239
- TooManyLocks = "TooManyLocks",
1240
- AccountNotSovereign = "AccountNotSovereign",
1241
- FeesNotMet = "FeesNotMet",
1242
- LockNotFound = "LockNotFound",
1243
- InUse = "InUse",
1244
- REMOVED = "REMOVED",
1245
- InvalidAssetUnknownReserve = "InvalidAssetUnknownReserve",
1246
- InvalidAssetUnsupportedReserve = "InvalidAssetUnsupportedReserve",
1247
- TooManyReserves = "TooManyReserves",
1248
- LocalExecutionIncomplete = "LocalExecutionIncomplete"
993
+
994
+ declare class BridgeHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
995
+ constructor();
996
+ _assetCheckEnabled: boolean;
997
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
998
+ getRelayToParaOverrides(): TRelayToParaOverrides;
1249
999
  }
1250
- type TModuleError = {
1251
- index: string;
1252
- error: string;
1253
- };
1254
1000
 
1255
- type TEdJsonMap = Record<TNodeDotKsmWithRelayChains, string | null>;
1001
+ declare class Calamari<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1002
+ constructor();
1003
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1004
+ }
1256
1005
 
1257
- type TEcosystemType = 'polkadot' | 'kusama' | 'ethereum';
1258
- type TRelayChainSymbol = 'DOT' | 'KSM';
1006
+ declare class Centrifuge<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1007
+ constructor();
1008
+ private getCurrencySelection;
1009
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1010
+ }
1259
1011
 
1260
- type TTransferInfo = {
1261
- chain: {
1262
- origin: TNodeWithRelayChains;
1263
- destination: TNodeWithRelayChains;
1264
- ecosystem: string;
1265
- };
1266
- currencyBalanceOrigin: {
1267
- balance: bigint;
1268
- currency: string;
1269
- };
1270
- originFeeBalance: {
1271
- balance: bigint;
1272
- expectedBalanceAfterXCMFee: bigint;
1273
- xcmFee: {
1274
- sufficientForXCM: boolean;
1275
- xcmFee: bigint;
1276
- };
1277
- existentialDeposit: bigint;
1278
- asset: string;
1279
- minNativeTransferableAmount: bigint;
1280
- maxNativeTransferableAmount: bigint;
1281
- };
1282
- destinationFeeBalance: {
1283
- balance: bigint;
1284
- currency: string;
1285
- existentialDeposit: bigint;
1012
+ declare class Collectives<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1013
+ constructor();
1014
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1015
+ getRelayToParaOverrides(): TRelayToParaOverrides;
1016
+ createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): TXcmVersioned<_paraspell_assets.TMultiAsset[]>;
1017
+ }
1018
+
1019
+ declare class ComposableFinance<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1020
+ constructor();
1021
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1022
+ }
1023
+
1024
+ declare class CoretimeKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1025
+ constructor();
1026
+ _assetCheckEnabled: boolean;
1027
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1028
+ getRelayToParaOverrides(): TRelayToParaOverrides;
1029
+ }
1030
+
1031
+ declare class CoretimePolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1032
+ constructor();
1033
+ _assetCheckEnabled: boolean;
1034
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1035
+ getRelayToParaOverrides(): TRelayToParaOverrides;
1036
+ }
1037
+
1038
+ declare class Crab<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1039
+ constructor();
1040
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1041
+ transferRelayToPara(): TSerializedApiCall;
1042
+ createCurrencySpec(amount: string, scenario: TScenario, version: Version, _asset?: TAsset): {
1043
+ V1: _paraspell_assets.TMultiAsset[];
1044
+ V2?: undefined;
1045
+ V3?: undefined;
1046
+ V4?: undefined;
1047
+ } | {
1048
+ V2: _paraspell_assets.TMultiAsset[];
1049
+ V1?: undefined;
1050
+ V3?: undefined;
1051
+ V4?: undefined;
1052
+ } | {
1053
+ V3: _paraspell_assets.TMultiAsset[];
1054
+ V1?: undefined;
1055
+ V2?: undefined;
1056
+ V4?: undefined;
1057
+ } | {
1058
+ V4: _paraspell_assets.TMultiAsset[];
1059
+ V1?: undefined;
1060
+ V2?: undefined;
1061
+ V3?: undefined;
1286
1062
  };
1287
- };
1288
- type TOriginFeeDetails = {
1289
- sufficientForXCM: boolean;
1290
- xcmFee: bigint;
1291
- };
1292
- type TGetTransferInfoOptionsBase = {
1293
- origin: TNodeDotKsmWithRelayChains;
1294
- destination: TNodeDotKsmWithRelayChains;
1295
- accountOrigin: string;
1296
- accountDestination: string;
1297
- currency: WithAmount<TCurrencyCore>;
1298
- };
1299
- type TGetTransferInfoOptions<TApi, TRes> = WithApi<TGetTransferInfoOptionsBase, TApi, TRes>;
1063
+ }
1064
+
1065
+ declare class Crust<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1066
+ constructor();
1067
+ private getCurrencySelection;
1068
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1069
+ }
1070
+
1071
+ declare class CrustShadow<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1072
+ constructor();
1073
+ private getCurrencySelection;
1074
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1075
+ }
1076
+
1077
+ declare class Curio<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1078
+ constructor();
1079
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1080
+ }
1081
+
1082
+ declare class Darwinia<TApi, TRes> extends ParachainNode<TApi, TRes> {
1083
+ constructor();
1084
+ transferRelayToPara(): TSerializedApiCall;
1085
+ }
1086
+
1087
+ declare class Encointer<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1088
+ constructor();
1089
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1090
+ getRelayToParaOverrides(): TRelayToParaOverrides;
1091
+ }
1092
+
1093
+ declare class Heima<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1094
+ constructor();
1095
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1096
+ }
1300
1097
 
1301
- interface IPolkadotApi<TApi, TRes> {
1302
- setApi(api?: TApiOrUrl<TApi>): void;
1303
- getApi(): TApi;
1304
- getApiOrUrl(): TApiOrUrl<TApi> | undefined;
1305
- init(node: TNodeWithRelayChains): Promise<void>;
1306
- createApiInstance: (wsUrl: string | string[]) => Promise<TApi>;
1307
- accountToHex(address: string, isPrefixed?: boolean): string;
1308
- callTxMethod(serializedCall: TSerializedApiCall): TRes;
1309
- callBatchMethod(calls: TRes[], mode: BatchMode): TRes;
1310
- objectToHex(obj: unknown, typeName: string): Promise<string>;
1311
- hexToUint8a(hex: string): Uint8Array;
1312
- stringToUint8a(str: string): Uint8Array;
1313
- calculateTransactionFee(tx: TRes, address: string): Promise<bigint>;
1314
- quoteAhPrice(fromMl: TMultiLocation, toMl: TMultiLocation, amountIn: bigint, includeFee?: boolean): Promise<bigint | undefined>;
1315
- getBalanceNative(address: string): Promise<bigint>;
1316
- getBalanceNativeAcala(address: string, symbol: string): Promise<bigint>;
1317
- getBalanceForeignPolkadotXcm(address: string, id?: string): Promise<bigint>;
1318
- getMythosForeignBalance(address: string): Promise<bigint>;
1319
- getAssetHubForeignBalance(address: string, multiLocation: TMultiLocation): Promise<bigint>;
1320
- getForeignAssetsByIdBalance(address: string, assetId: string): Promise<bigint>;
1321
- getBalanceForeignXTokens(node: TNodePolkadotKusama, address: string, asset: TAsset): Promise<bigint>;
1322
- getBalanceForeignBifrost(address: string, asset: TAsset): Promise<bigint>;
1323
- getBalanceForeignAssetsAccount(address: string, assetId: bigint | number): Promise<bigint>;
1324
- getFromRpc(module: string, method: string, key: string): Promise<string>;
1325
- blake2AsHex(data: Uint8Array): string;
1326
- clone(): IPolkadotApi<TApi, TRes>;
1327
- createApiForNode(node: TNodeWithRelayChains): Promise<IPolkadotApi<TApi, TRes>>;
1328
- getDryRun(options: TDryRunBaseOptions<TRes>): Promise<TDryRunResult>;
1329
- setDisconnectAllowed(allowed: boolean): void;
1330
- getDisconnectAllowed(): boolean;
1331
- disconnect(force?: boolean): Promise<void>;
1098
+ declare class Hydration<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer, IPolkadotXCMTransfer {
1099
+ private static NATIVE_ASSET_ID;
1100
+ constructor();
1101
+ transferToAssetHub<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
1102
+ transferToPolimec<TApi, TRes>(options: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
1103
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1104
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1105
+ protected canUseXTokens({ to: destination, asset }: TSendInternalOptions<TApi, TRes>): boolean;
1332
1106
  }
1333
1107
 
1334
- /**
1335
- * Builder class for constructing asset claim transactions.
1336
- */
1337
- declare class AssetClaimBuilder<TApi, TRes, T extends Partial<TAssetClaimOptionsBase> = object> {
1338
- readonly api: IPolkadotApi<TApi, TRes>;
1339
- readonly _options: T;
1340
- constructor(api: IPolkadotApi<TApi, TRes>, options?: T);
1341
- /**
1342
- * Specifies the assets to be claimed.
1343
- *
1344
- * @param multiAssets - An array of assets to claim in a multi-asset format.
1345
- * @returns An instance of Builder
1346
- */
1347
- fungible(multiAssets: TMultiAsset[]): AssetClaimBuilder<TApi, TRes, T & {
1348
- multiAssets: TMultiAsset[];
1349
- }>;
1350
- /**
1351
- * Specifies the account address on which the assets will be claimed.
1352
- *
1353
- * @param address - The destination account address.
1354
- * @returns An instance of Builder
1355
- */
1356
- account(address: TAddress): AssetClaimBuilder<TApi, TRes, T & {
1357
- address: TAddress;
1358
- }>;
1359
- /**
1360
- * Sets the XCM version to be used for the asset claim.
1361
- *
1362
- * @param version - The XCM version.
1363
- * @returns An instance of Builder
1364
- */
1365
- xcmVersion(version: TVersionClaimAssets): AssetClaimBuilder<TApi, TRes, T & {
1366
- version: TVersionClaimAssets;
1367
- }>;
1368
- /**
1369
- * Builds and returns the asset claim extrinsic.
1370
- *
1371
- * @returns A Promise that resolves to the asset claim extrinsic.
1372
- */
1373
- build(this: AssetClaimBuilder<TApi, TRes, TAssetClaimOptionsBase>): Promise<TRes>;
1374
- /**
1375
- * Returns the API instance used by the builder.
1376
- *
1377
- * @returns The API instance.
1378
- */
1379
- getApi(): TApi;
1380
- /**
1381
- * Disconnects the API.
1382
- *
1383
- * @returns A Promise that resolves when the API is disconnected.
1384
- */
1385
- disconnect(): Promise<void>;
1108
+ declare class Imbue<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1109
+ constructor();
1110
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1386
1111
  }
1387
1112
 
1388
- declare class BatchTransactionManager<TApi, TRes> {
1389
- transactionOptions: TSendOptions<TApi, TRes>[];
1390
- addTransaction(options: TSendOptions<TApi, TRes>): void;
1391
- isEmpty(): boolean;
1392
- buildBatch(api: IPolkadotApi<TApi, TRes>, from: TNodeDotKsmWithRelayChains, options?: TBatchOptions): Promise<TRes>;
1113
+ declare class Interlay<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1114
+ constructor();
1115
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1393
1116
  }
1394
1117
 
1395
- /**
1396
- * A builder class for constructing Para-to-Para, Para-to-Relay, Relay-to-Para transactions and asset claims.
1397
- */
1398
- declare class GeneralBuilder<TApi, TRes, T extends Partial<TSendBaseOptions> = object> {
1399
- readonly batchManager: BatchTransactionManager<TApi, TRes>;
1400
- readonly api: IPolkadotApi<TApi, TRes>;
1401
- readonly _options: T;
1402
- constructor(api: IPolkadotApi<TApi, TRes>, batchManager: BatchTransactionManager<TApi, TRes>, options?: T);
1403
- /**
1404
- * Specifies the origin node for the transaction.
1405
- *
1406
- * @param node - The node from which the transaction originates.
1407
- * @returns An instance of Builder
1408
- */
1409
- from(node: TNodeDotKsmWithRelayChains): GeneralBuilder<TApi, TRes, T & {
1410
- from: TNodeDotKsmWithRelayChains;
1411
- }>;
1412
- /**
1413
- * Specifies the destination node for the transaction.
1414
- *
1415
- * @param node - The node to which the transaction is sent.
1416
- * @param paraIdTo - (Optional) The parachain ID of the destination node.
1417
- * @returns An instance of Builder
1418
- */
1419
- to(node: TDestination, paraIdTo?: number): GeneralBuilder<TApi, TRes, T & {
1420
- to: TDestination;
1421
- }>;
1422
- /**
1423
- * Initiates the process to claim assets from a specified node.
1424
- *
1425
- * @param node - The node from which to claim assets.
1426
- * @returns An instance of Builder
1427
- */
1428
- claimFrom(node: TNodeWithRelayChains): AssetClaimBuilder<TApi, TRes, {
1429
- node: TNodeWithRelayChains;
1430
- }>;
1431
- /**
1432
- * Specifies the currency to be used in the transaction. Symbol, ID, multi-location or multi-asset.
1433
- *
1434
- * @param currency - The currency to be transferred.
1435
- * @returns An instance of Builder
1436
- */
1437
- currency(currency: TCurrencyInputWithAmount): GeneralBuilder<TApi, TRes, T & {
1438
- currency: TCurrencyInputWithAmount;
1439
- }>;
1440
- /**
1441
- * Sets the recipient address.
1442
- *
1443
- * @param address - The destination address.
1444
- * @returns An instance of Builder
1445
- */
1446
- address(address: TAddress, senderAddress?: string): GeneralBuilder<TApi, TRes, T & {
1447
- address: TAddress;
1448
- }>;
1449
- /**
1450
- * Sets the XCM version to be used for the transfer.
1451
- *
1452
- * @param version - The XCM version.
1453
- * @returns An instance of Builder
1454
- */
1455
- xcmVersion(version: Version): GeneralBuilder<TApi, TRes, T & {
1456
- version: Version;
1457
- }>;
1458
- /**
1459
- * Sets a custom pallet for the transaction.
1460
- *
1461
- * @param palletName - The name of the custom pallet to be used.
1462
- * @returns An instance of the Builder.
1463
- */
1464
- customPallet(pallet: string, method: string): GeneralBuilder<TApi, TRes, T & {
1465
- pallet: string;
1466
- method: string;
1467
- }>;
1468
- /**
1469
- * Optional fee asset for the transaction.
1470
- *
1471
- * @param currency - The currency to be used for the fee.
1472
- * @returns An instance of the Builder
1473
- */
1474
- feeAsset(currency: TCurrencyInput | undefined): GeneralBuilder<TApi, TRes, T & {
1475
- feeAsset: TCurrencyInput | undefined;
1476
- }>;
1477
- /**
1478
- * Adds the transfer transaction to the batch.
1479
- *
1480
- * @returns An instance of Builder
1481
- */
1482
- addToBatch(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>): GeneralBuilder<TApi, TRes, T & {
1483
- from: TNodeDotKsmWithRelayChains;
1484
- }>;
1485
- /**
1486
- * Builds and returns the batched transaction based on the configured parameters.
1487
- *
1488
- * @param options - (Optional) Options to customize the batch transaction.
1489
- * @returns A Extrinsic representing the batched transactions.
1490
- */
1491
- buildBatch(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>, options?: TBatchOptions): Promise<TRes>;
1492
- /**
1493
- * Builds and returns the transfer extrinsic.
1494
- *
1495
- * @returns A Promise that resolves to the transfer extrinsic.
1496
- */
1497
- build(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>): Promise<TRes>;
1498
- dryRun(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>, senderAddress: string): Promise<TDryRunResult>;
1499
- /**
1500
- * Returns the API instance used by the builder.
1501
- *
1502
- * @returns The API instance.
1503
- */
1504
- getApi(): TApi;
1505
- /**
1506
- * Disconnects the API.
1507
- *
1508
- * @returns A Promise that resolves when the API is disconnected.
1509
- */
1510
- disconnect(): Promise<void>;
1118
+ declare class InvArchTinker<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1119
+ constructor();
1120
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1121
+ }
1122
+
1123
+ declare class Karura<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1124
+ constructor();
1125
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1126
+ }
1127
+
1128
+ declare class KiltSpiritnet<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1129
+ constructor();
1130
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1131
+ transferRelayToPara(): TSerializedApiCall;
1132
+ }
1133
+
1134
+ declare class Kintsugi<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1135
+ constructor();
1136
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1137
+ }
1138
+
1139
+ declare class Manta<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1140
+ constructor();
1141
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1142
+ }
1143
+
1144
+ declare class Moonbeam<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1145
+ constructor();
1146
+ private getMultiLocation;
1147
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1148
+ getRelayToParaOverrides(): TRelayToParaOverrides;
1149
+ }
1150
+
1151
+ declare class Moonriver<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1152
+ constructor();
1153
+ private getMultiLocation;
1154
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1155
+ getRelayToParaOverrides(): TRelayToParaOverrides;
1511
1156
  }
1512
- /**
1513
- * Creates a new Builder instance.
1514
- *
1515
- * @param api - The API instance to use for building transactions. If not provided, a new instance will be created.
1516
- * @returns A new Builder instance.
1517
- */
1518
- declare const Builder: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>) => GeneralBuilder<TApi, TRes, object>;
1519
1157
 
1520
- /**
1521
- * Error thrown when multiple assets with the same symbol are found.
1522
- */
1523
- declare class DuplicateAssetError extends Error {
1524
- /**
1525
- * Constructs a new DuplicateAssetError.
1526
- *
1527
- * @param symbol - The symbol of the asset causing the duplication error.
1528
- */
1529
- constructor(msg: string);
1158
+ declare class Mythos<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1159
+ constructor();
1160
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1161
+ transferRelayToPara(): TSerializedApiCall;
1530
1162
  }
1531
1163
 
1532
- /**
1533
- * Error thrown when multiple assets with the same symbol are found.
1534
- */
1535
- declare class DuplicateAssetIdError extends Error {
1536
- /**
1537
- * Constructs a new DuplicateAssetError.
1538
- *
1539
- * @param symbol - The symbol of the asset causing the duplication error.
1540
- */
1541
- constructor(id: string);
1164
+ declare class NeuroWeb<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1165
+ constructor();
1166
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1167
+ }
1168
+
1169
+ declare class Nodle<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1170
+ constructor();
1171
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1172
+ transferRelayToPara(): TSerializedApiCall;
1173
+ }
1174
+
1175
+ declare class Parallel<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1176
+ constructor();
1177
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1178
+ }
1179
+
1180
+ declare class ParallelHeiko<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1181
+ constructor();
1182
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1183
+ }
1184
+
1185
+ declare class Peaq<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1186
+ constructor();
1187
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1188
+ transferRelayToPara(): TSerializedApiCall;
1189
+ }
1190
+
1191
+ declare class Pendulum<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1192
+ constructor();
1193
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1194
+ transferRelayToPara(): TSerializedApiCall;
1195
+ }
1196
+
1197
+ declare class PeopleKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1198
+ constructor();
1199
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1200
+ getRelayToParaOverrides(): TRelayToParaOverrides;
1201
+ }
1202
+
1203
+ declare class PeoplePolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1204
+ constructor();
1205
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1206
+ getRelayToParaOverrides(): TRelayToParaOverrides;
1207
+ }
1208
+
1209
+ declare class Phala<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTransferTransfer {
1210
+ constructor();
1211
+ transferXTransfer<TApi, TRes>(input: TXTransferTransferOptions<TApi, TRes>): TRes;
1212
+ }
1213
+
1214
+ declare class Picasso<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1215
+ constructor();
1216
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1217
+ }
1218
+
1219
+ declare class Polimec<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1220
+ constructor();
1221
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1222
+ transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCall;
1223
+ }
1224
+
1225
+ declare class Quartz<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1226
+ private static NATIVE_ASSET_ID;
1227
+ constructor();
1228
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1229
+ }
1230
+
1231
+ declare class RobonomicsKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1232
+ constructor();
1233
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1234
+ }
1235
+
1236
+ declare class RobonomicsPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1237
+ constructor();
1238
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1239
+ }
1240
+
1241
+ declare class Shiden<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer, IXTokensTransfer {
1242
+ constructor();
1243
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1244
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1245
+ protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
1246
+ }
1247
+
1248
+ declare class Subsocial<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
1249
+ constructor();
1250
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
1251
+ }
1252
+
1253
+ declare class Turing<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1254
+ constructor();
1255
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1256
+ }
1257
+
1258
+ declare class Unique<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1259
+ private static NATIVE_ASSET_ID;
1260
+ constructor();
1261
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1262
+ }
1263
+
1264
+ declare class Zeitgeist<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
1265
+ constructor();
1266
+ private getCurrencySelection;
1267
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
1542
1268
  }
1543
1269
 
1270
+ declare const nodes: <TApi, TRes>() => {
1271
+ AssetHubPolkadot: AssetHubPolkadot<TApi, TRes>;
1272
+ Acala: Acala<TApi, TRes>;
1273
+ Astar: Astar<TApi, TRes>;
1274
+ Unique: Unique<TApi, TRes>;
1275
+ Crust: Crust<TApi, TRes>;
1276
+ BifrostPolkadot: BifrostPolkadot<TApi, TRes>;
1277
+ BridgeHubPolkadot: BridgeHubPolkadot<TApi, TRes>;
1278
+ BridgeHubKusama: BridgeHubKusama<TApi, TRes>;
1279
+ Bitgreen: Bitgreen<TApi, TRes>;
1280
+ Centrifuge: Centrifuge<TApi, TRes>;
1281
+ ComposableFinance: ComposableFinance<TApi, TRes>;
1282
+ Darwinia: Darwinia<TApi, TRes>;
1283
+ Hydration: Hydration<TApi, TRes>;
1284
+ Interlay: Interlay<TApi, TRes>;
1285
+ Heima: Heima<TApi, TRes>;
1286
+ Moonbeam: Moonbeam<TApi, TRes>;
1287
+ Parallel: Parallel<TApi, TRes>;
1288
+ AssetHubKusama: AssetHubKusama<TApi, TRes>;
1289
+ CoretimeKusama: CoretimeKusama<TApi, TRes>;
1290
+ CoretimePolkadot: CoretimePolkadot<TApi, TRes>;
1291
+ Encointer: Encointer<TApi, TRes>;
1292
+ Altair: Altair<TApi, TRes>;
1293
+ Amplitude: Amplitude<TApi, TRes>;
1294
+ Bajun: Bajun<TApi, TRes>;
1295
+ Basilisk: Basilisk<TApi, TRes>;
1296
+ BifrostKusama: BifrostKusama<TApi, TRes>;
1297
+ Calamari: Calamari<TApi, TRes>;
1298
+ CrustShadow: CrustShadow<TApi, TRes>;
1299
+ Crab: Crab<TApi, TRes>;
1300
+ Imbue: Imbue<TApi, TRes>;
1301
+ InvArchTinker: InvArchTinker<TApi, TRes>;
1302
+ Karura: Karura<TApi, TRes>;
1303
+ Kintsugi: Kintsugi<TApi, TRes>;
1304
+ Moonriver: Moonriver<TApi, TRes>;
1305
+ ParallelHeiko: ParallelHeiko<TApi, TRes>;
1306
+ Picasso: Picasso<TApi, TRes>;
1307
+ Quartz: Quartz<TApi, TRes>;
1308
+ RobonomicsKusama: RobonomicsKusama<TApi, TRes>;
1309
+ RobonomicsPolkadot: RobonomicsPolkadot<TApi, TRes>;
1310
+ PeoplePolkadot: PeoplePolkadot<TApi, TRes>;
1311
+ PeopleKusama: PeopleKusama<TApi, TRes>;
1312
+ Shiden: Shiden<TApi, TRes>;
1313
+ Turing: Turing<TApi, TRes>;
1314
+ Manta: Manta<TApi, TRes>;
1315
+ Nodle: Nodle<TApi, TRes>;
1316
+ NeuroWeb: NeuroWeb<TApi, TRes>;
1317
+ Pendulum: Pendulum<TApi, TRes>;
1318
+ Zeitgeist: Zeitgeist<TApi, TRes>;
1319
+ Collectives: Collectives<TApi, TRes>;
1320
+ Phala: Phala<TApi, TRes>;
1321
+ Subsocial: Subsocial<TApi, TRes>;
1322
+ KiltSpiritnet: KiltSpiritnet<TApi, TRes>;
1323
+ Curio: Curio<TApi, TRes>;
1324
+ Mythos: Mythos<TApi, TRes>;
1325
+ Peaq: Peaq<TApi, TRes>;
1326
+ Polimec: Polimec<TApi, TRes>;
1327
+ };
1328
+
1544
1329
  /**
1545
1330
  * Error thrown when nodes from different relay chains are incompatible.
1546
1331
  */
@@ -1565,18 +1350,6 @@ declare class InvalidAddressError extends Error {
1565
1350
  constructor(message: string);
1566
1351
  }
1567
1352
 
1568
- /**
1569
- * Used to inform user, that currency they wish to use is not registered on either origin or destination Parachain
1570
- */
1571
- declare class InvalidCurrencyError extends Error {
1572
- /**
1573
- * Constructs a new InvalidCurrencyError.
1574
- *
1575
- * @param message - The error message.
1576
- */
1577
- constructor(message: string);
1578
- }
1579
-
1580
1353
  /**
1581
1354
  * Used to inform user, that Parachain they wish to use is not supported yet
1582
1355
  */
@@ -1627,92 +1400,6 @@ declare const getNodeProviders: (node: TNodeDotKsmWithRelayChains) => string[];
1627
1400
  */
1628
1401
  declare const getParaId: (node: TNodeWithRelayChains) => number;
1629
1402
 
1630
- declare const claimAssets: <TApi, TRes>(options: TAssetClaimOptions<TApi, TRes>) => Promise<TRes>;
1631
-
1632
- declare const getAssetMultiLocation: (node: TNodeWithRelayChains, currency: TCurrencyInput) => TMultiLocation | null;
1633
-
1634
- /**
1635
- * Retrieves the existential deposit value for a given node.
1636
- *
1637
- * @param node - The node for which to get the existential deposit.
1638
- * @returns The existential deposit as a string if available; otherwise, null.
1639
- */
1640
- declare const getExistentialDeposit: (node: TNodeWithRelayChains, currency?: TCurrencyCore) => string | null;
1641
-
1642
- /**
1643
- * Retrieves the assets object for a given node containing the native and foreign assets.
1644
- *
1645
- * @param node - The node for which to retrieve the assets object.
1646
- * @returns The assets object associated with the given node.
1647
- */
1648
- declare const getAssetsObject: (node: TNodeWithRelayChains) => TNodeAssets;
1649
- declare const isNodeEvm: (node: TNodeWithRelayChains) => boolean;
1650
- /**
1651
- * Retrieves the asset ID for a given symbol on a specified node.
1652
- *
1653
- * @param node - The node to search for the asset.
1654
- * @param symbol - The symbol of the asset.
1655
- * @returns The asset ID if found; otherwise, null.
1656
- */
1657
- declare const getAssetId: (node: TNodeWithRelayChains, symbol: string) => string | null;
1658
- /**
1659
- * Retrieves the relay chain asset symbol for a specified node.
1660
- *
1661
- * @param node - The node for which to get the relay chain symbol.
1662
- * @returns The relay chain asset symbol.
1663
- */
1664
- declare const getRelayChainSymbol: (node: TNodeWithRelayChains) => TRelayChainSymbol;
1665
- /**
1666
- * Retrieves the list of native assets for a specified node.
1667
- *
1668
- * @param node - The node for which to get native assets.
1669
- * @returns An array of native asset details.
1670
- */
1671
- declare const getNativeAssets: (node: TNodeWithRelayChains) => TNativeAsset[];
1672
- /**
1673
- * Retrieves the list of other (non-native) assets for a specified node.
1674
- *
1675
- * @param node - The node for which to get other assets.
1676
- * @returns An array of other asset details.
1677
- */
1678
- declare const getOtherAssets: (node: TNodeWithRelayChains) => TForeignAsset[];
1679
- /**
1680
- * Retrieves the complete list of assets for a specified node, including relay chain asset, native, and other assets.
1681
- *
1682
- * @param node - The node for which to get the assets.
1683
- * @returns An array of objects of all assets associated with the node.
1684
- */
1685
- declare const getAssets: (node: TNodeWithRelayChains) => TAsset[];
1686
- /**
1687
- * Retrieves the symbols of all assets (relay chain, native, and other assets) for a specified node.
1688
- *
1689
- * @param node - The node for which to get asset symbols.
1690
- * @returns An array of asset symbols.
1691
- */
1692
- declare const getAllAssetsSymbols: (node: TNodeWithRelayChains) => string[];
1693
- /**
1694
- * Retrieves the symbol of the native asset for a specified node.
1695
- *
1696
- * @param node - The node for which to get the native asset symbol.
1697
- * @returns The symbol of the native asset.
1698
- */
1699
- declare const getNativeAssetSymbol: (node: TNodeWithRelayChains) => string;
1700
- /**
1701
- * Determines whether a specified node supports an asset with the given symbol.
1702
- *
1703
- * @param node - The node to check for asset support.
1704
- * @param symbol - The symbol of the asset to check.
1705
- * @returns True if the asset is supported; otherwise, false.
1706
- */
1707
- declare const hasSupportForAsset: (node: TNodeWithRelayChains, symbol: string) => boolean;
1708
- /**
1709
- * Retrieves the number of decimals for an asset with the given symbol on a specified node.
1710
- *
1711
- * @param node - The node where the asset is located.
1712
- * @param symbol - The symbol of the asset.
1713
- * @returns The number of decimals if the asset is found; otherwise, null.
1714
- */
1715
- declare const getAssetDecimals: (node: TNodeWithRelayChains, symbol: string) => number | null;
1716
1403
  /**
1717
1404
  * Retrieves the node name corresponding to a specified parachain ID.
1718
1405
  *
@@ -1720,18 +1407,8 @@ declare const getAssetDecimals: (node: TNodeWithRelayChains, symbol: string) =>
1720
1407
  * @returns The node name if found; otherwise, null.
1721
1408
  */
1722
1409
  declare const getTNode: (paraId: number, ecosystem: TEcosystemType) => TNodeWithRelayChains | null;
1723
- declare const hasDryRunSupport: (node: TNodeWithRelayChains) => boolean;
1724
1410
 
1725
- declare const Native: (symbol: string) => TSymbolSpecifier;
1726
- declare const Foreign: (symbol: string) => TSymbolSpecifier;
1727
- declare const ForeignAbstract: (symbol: string) => TSymbolSpecifier;
1728
-
1729
- declare const findBestMatches: <T extends {
1730
- symbol: string;
1731
- alias?: string;
1732
- }>(assets: T[], value: string, property?: "symbol" | "alias") => T[];
1733
- declare const findAssetBySymbol: (node: TNodeWithRelayChains, destination: TNodeWithRelayChains | null, otherAssets: TForeignAsset[], nativeAssets: TNativeAsset[], symbol: TCurrencySymbolValue) => TAsset | undefined;
1734
- declare const findAssetById: (assets: TForeignAsset[], assetId: TCurrency) => TForeignAsset | undefined;
1411
+ declare const claimAssets: <TApi, TRes>(options: TAssetClaimOptions<TApi, TRes>) => Promise<TRes>;
1735
1412
 
1736
1413
  declare const getAssetBalanceInternal: <TApi, TRes>({ address, node, currency, api }: TGetAssetBalanceOptions<TApi, TRes>) => Promise<bigint>;
1737
1414
  declare const getAssetBalance: <TApi, TRes>(options: TGetAssetBalanceOptions<TApi, TRes>) => Promise<bigint>;
@@ -1742,55 +1419,17 @@ declare const getBalanceForeign: <TApi, TRes>(options: TGetBalanceForeignOptions
1742
1419
  declare const getBalanceNativeInternal: <TApi, TRes>({ address, node, api, currency }: TGetBalanceNativeOptions<TApi, TRes>) => Promise<bigint>;
1743
1420
  declare const getBalanceNative: <TApi, TRes>(options: TGetBalanceNativeOptions<TApi, TRes>) => Promise<bigint>;
1744
1421
 
1745
- declare const findAssetByMultiLocation: (foreignAssets: TForeignAsset[], multiLocation: string | TMultiLocation) => TForeignAsset | undefined;
1746
-
1747
- declare const getAssetBySymbolOrId: (node: TNodeWithRelayChains, currency: TCurrencyInput, destination: TNodeWithRelayChains | null) => TAsset | null;
1748
-
1749
1422
  declare const getOriginFeeDetailsInternal: <TApi, TRes>({ api, account, accountDestination, currency, origin, destination, feeMarginPercentage }: TGetOriginFeeDetailsOptions<TApi, TRes>) => Promise<TOriginFeeDetails>;
1750
1423
  declare const getOriginFeeDetails: <TApi, TRes>(options: TGetOriginFeeDetailsOptions<TApi, TRes>) => Promise<TOriginFeeDetails>;
1751
1424
 
1752
- /**
1753
- * Normalizes an asset symbol by stripping the 'xc' prefix (if present) and converting it to lowercase.
1754
- *
1755
- * @param symbol - The symbol to normalize.
1756
- * @returns The normalized symbol.
1757
- */
1758
- declare const normalizeSymbol: (symbol: string | undefined) => string;
1759
- /**
1760
- * Retrieves the list of assets that are supported for transfers between two specified nodes.
1761
- *
1762
- * @param origin - The origin node.
1763
- * @param destination - The destination node.
1764
- * @returns An array of assets supported between the origin and destination nodes.
1765
- */
1766
- declare const getSupportedAssets: (origin: TNodeWithRelayChains, destination: TNodeWithRelayChains) => TAsset[];
1767
-
1768
1425
  declare const getMaxNativeTransferableAmount: <TApi, TRes>({ api, address, node, currency }: TGetMaxNativeTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
1769
1426
  declare const getMaxForeignTransferableAmount: <TApi, TRes>({ api, address, node, currency }: TGetMaxForeignTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
1770
1427
  declare const getTransferableAmount: <TApi, TRes>({ api, address, node, currency }: TGetTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
1771
1428
 
1772
- declare const Override: (multiLocation: TMultiLocation) => TOverrideMultiLocationSpecifier;
1773
-
1774
1429
  declare const getTransferInfo: <TApi, TRes>({ origin, destination, accountOrigin, accountDestination, currency, api }: TGetTransferInfoOptions<TApi, TRes>) => Promise<TTransferInfo>;
1775
1430
 
1776
1431
  declare const verifyEdOnDestination: <TApi, TRes>(options: TVerifyEdOnDestinationOptions<TApi, TRes>) => Promise<boolean>;
1777
1432
 
1778
- /**
1779
- * Retrieves the default pallet for a specified node.
1780
- *
1781
- * @param node - The node for which to get the default pallet.
1782
- * @returns The default pallet associated with the node.
1783
- */
1784
- declare const getDefaultPallet: (node: TNodeDotKsmWithRelayChains) => TPallet;
1785
- /**
1786
- * Retrieves the list of supported pallets for a specified node.
1787
- *
1788
- * @param node - The node for which to get supported pallets.
1789
- * @returns An array of pallets supported by the node.
1790
- */
1791
- declare const getSupportedPallets: (node: TNodeDotKsmWithRelayChains) => TPallet[];
1792
- declare const getSupportedPalletsDetails: (node: TNodeDotKsmWithRelayChains) => TPalletDetails[];
1793
-
1794
1433
  declare const getParaEthTransferFees: <TApi, TRes>(ahApi: IPolkadotApi<TApi, TRes>) => Promise<[bigint, bigint]>;
1795
1434
 
1796
1435
  declare const transferMoonbeamEvm: <TApi, TRes>({ api, from, to, signer, address, currency }: TEvmBuilderOptions<TApi, TRes>) => Promise<string>;
@@ -1806,18 +1445,10 @@ declare const send: <TApi, TRes>(options: TSendOptions<TApi, TRes>) => Promise<T
1806
1445
 
1807
1446
  declare const transferRelayToPara: <TApi, TRes>(options: TRelayToParaOptions<TApi, TRes>) => Promise<TRes>;
1808
1447
 
1809
- declare const isAssetEqual: (asset1: TAsset, asset2: TAsset) => boolean;
1810
-
1811
- declare const isForeignAsset: (asset: TAsset) => asset is TForeignAsset;
1812
-
1813
- declare const isSymbolSpecifier: (currencySymbolValue: TCurrencySymbolValue) => currencySymbolValue is TSymbolSpecifier;
1814
-
1815
1448
  declare const createApiInstanceForNode: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>, node: TNodeDotKsmWithRelayChains) => Promise<TApi>;
1816
1449
 
1817
1450
  declare const createX1Payload: (version: Version, junction: TJunction) => TJunctions;
1818
1451
 
1819
- declare const deepEqual: (obj1: unknown, obj2: unknown) => boolean;
1820
-
1821
1452
  declare const computeFeeFromDryRun: (dryRun: any, node: TNodeDotKsmWithRelayChains, executionFee: bigint) => bigint;
1822
1453
 
1823
1454
  declare const computeFeeFromDryRunPjs: (dryRun: any, node: TNodeDotKsmWithRelayChains, executionFee: bigint) => bigint;
@@ -1838,8 +1469,6 @@ declare const getFees: (scenario: TScenario) => number;
1838
1469
  */
1839
1470
  declare const getNode: <TApi, TRes, T extends keyof ReturnType<typeof nodes>>(node: T) => ReturnType<typeof nodes<TApi, TRes>>[T];
1840
1471
 
1841
- declare const isOverrideMultiLocationSpecifier: (multiLocationSpecifier: TMultiLocationValueWithOverride) => multiLocationSpecifier is TOverrideMultiLocationSpecifier;
1842
-
1843
1472
  declare const transformMultiLocation: (multiLocation: TMultiLocation) => TMultiLocation;
1844
1473
 
1845
1474
  declare const resolveParaId: (paraId: number | undefined, destination: TDestination) => number | undefined;
@@ -1861,4 +1490,4 @@ declare const determineRelayChain: (node: TNodeWithRelayChains) => TRelaychain;
1861
1490
  */
1862
1491
  declare const isRelayChain: (node: TNodeWithRelayChains) => node is "Polkadot" | "Kusama";
1863
1492
 
1864
- export { AssetClaimBuilder, BatchMode, Builder, DuplicateAssetError, DuplicateAssetIdError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, Foreign, ForeignAbstract, GeneralBuilder, type IPolkadotApi, type IPolkadotXCMTransfer, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidAddressError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Native, NoXCMSupportImplementedError, NodeNotSupportedError, type OneKey, Override, Parents, PolkadotXcmError, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TApiOrUrl, type TAsset, type TAssetClaimOptions, type TAssetClaimOptionsBase, type TAssetJsonMap, type TBalanceResponse, type TBatchOptions, type TBifrostToken, type TCurrency, type TCurrencyCore, type TCurrencyInput, type TCurrencyInputWithAmount, type TCurrencySymbol, type TCurrencySymbolValue, type TDestWeight, type TDestination, type TDryRunBaseOptions, type TDryRunOptions, type TDryRunResult, type TEcosystemType, type TEdJsonMap, type TEvmBuilderOptions, type TEvmBuilderOptionsBase, type TEvmNodeFrom, type TForeignAsset, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TGetAssetBalanceOptions, type TGetAssetBalanceOptionsBase, type TGetBalanceForeignOptions, type TGetBalanceForeignOptionsBase, type TGetBalanceNativeOptions, type TGetBalanceNativeOptionsBase, type TGetMaxForeignTransferableAmountOptions, type TGetMaxForeignTransferableAmountOptionsBase, type TGetMaxNativeTransferableAmountOptions, type TGetMaxNativeTransferableAmountOptionsBase, type TGetOriginFeeDetailsOptions, type TGetOriginFeeDetailsOptionsBase, type TGetTransferInfoOptions, type TGetTransferInfoOptionsBase, type TGetTransferableAmountOptions, type TGetTransferableAmountOptionsBase, type TJunction, type TJunctionGeneralIndex, type TJunctionParachain, type TJunctionType, type TJunctions, type TMantaAsset, type TModuleError, type TMultiAsset, type TMultiAssetV3, type TMultiAssetV4, type TMultiAssetWithFee, type TMultiLocation, type TMultiLocationValue, type TMultiLocationValueWithOverride, type TNativeAsset, type TNativeTokenAsset, type TNode, type TNodeAssets, type TNodeConfig, type TNodeConfigMap, type TNodeDotKsmWithRelayChains, type TNodePolkadotKusama, type TNodeWithRelayChains, type TNodleAsset, type TOriginFeeDetails, type TOtherReserveAsset, type TOverrideMultiLocationSpecifier, type TPallet, type TPalletDetails, type TPalletJsonMap, type TPalletMap, type TPolkadotXCMTransferOptions, type TPolkadotXcmSection, type TProviderEntry, type TRelayChainSymbol, type TRelayToParaDestination, type TRelayToParaOptions, type TRelayToParaOverrides, type TRelaychain, type TReserveAsset, type TScenario, type TSelfReserveAsset, type TSendBaseOptions, type TSendInternalOptions, type TSendOptions, type TSerializeEthTransferOptions, type TSerializedApiCall, type TSerializedEthTransfer, type TSymbolSpecifier, type TTransferInfo, type TVerifyEdOnDestinationOptions, type TVerifyEdOnDestinationOptionsBase, type TVersionClaimAssets, type TWeight, type TXTokensCurrencySelection, type TXTokensSection, type TXTokensTransferOptions, type TXTransferSection, type TXTransferTransferOptions, type TXcmAsset, type TXcmForeignAsset, type TXcmPalletSection, type TXcmVersioned, type TZeitgeistAsset, Version, type WithAmount, type WithApi, XTokensError, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, createApiInstanceForNode, createX1Payload, deepEqual, determineRelayChain, findAssetById, findAssetByMultiLocation, findAssetBySymbol, findBestMatches, generateAddressMultiLocationV4, generateAddressPayload, getAllAssetsSymbols, getAssetBalance, getAssetBalanceInternal, getAssetBySymbolOrId, getAssetDecimals, getAssetId, getAssetMultiLocation, getAssets, getAssetsObject, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getDefaultPallet, getDryRun, getExistentialDeposit, getFees, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getNativeAssetSymbol, getNativeAssets, getNode, getNodeConfig, getNodeProviders, getOriginFeeDetails, getOriginFeeDetailsInternal, getOtherAssets, getParaEthTransferFees, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getSupportedPalletsDetails, getTNode, getTransferInfo, getTransferableAmount, hasDryRunSupport, hasSupportForAsset, isAssetEqual, isEthersContract, isEthersSigner, isForeignAsset, isNodeEvm, isOverrideMultiLocationSpecifier, isRelayChain, isSymbolSpecifier, normalizeSymbol, resolveModuleError, resolveParaId, send, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, transformMultiLocation, validateAddress, verifyEdOnDestination };
1493
+ export { AssetClaimBuilder, BatchMode, Builder, ETHEREUM_JUNCTION, ETH_CHAIN_ID, GeneralBuilder, type IPolkadotApi, type IPolkadotXCMTransfer, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidAddressError, NoXCMSupportImplementedError, NodeNotSupportedError, type OneKey, PolkadotXcmError, ScenarioNotSupportedError, type TAddress, type TApiOrUrl, type TAssetClaimOptions, type TAssetClaimOptionsBase, type TBalanceResponse, type TBatchOptions, type TBifrostToken, type TDestWeight, type TDestination, type TDryRunBaseOptions, type TDryRunOptions, type TDryRunResult, type TEdJsonMap, type TEvmBuilderOptions, type TEvmBuilderOptionsBase, type TEvmNodeFrom, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TGetAssetBalanceOptions, type TGetAssetBalanceOptionsBase, type TGetBalanceForeignOptions, type TGetBalanceForeignOptionsBase, type TGetBalanceNativeOptions, type TGetBalanceNativeOptionsBase, type TGetMaxForeignTransferableAmountOptions, type TGetMaxForeignTransferableAmountOptionsBase, type TGetMaxNativeTransferableAmountOptions, type TGetMaxNativeTransferableAmountOptionsBase, type TGetOriginFeeDetailsOptions, type TGetOriginFeeDetailsOptionsBase, type TGetTransferInfoOptions, type TGetTransferInfoOptionsBase, type TGetTransferableAmountOptions, type TGetTransferableAmountOptionsBase, type TMantaAsset, type TModuleError, type TNativeTokenAsset, type TNodeConfig, type TNodeConfigMap, type TNodleAsset, type TOriginFeeDetails, type TOtherReserveAsset, type TPolkadotXCMTransferOptions, type TPolkadotXcmSection, type TProviderEntry, type TRelayToParaDestination, type TRelayToParaOptions, type TRelayToParaOverrides, type TRelaychain, type TReserveAsset, type TScenario, type TSelfReserveAsset, type TSendBaseOptions, type TSendInternalOptions, type TSendOptions, type TSerializeEthTransferOptions, type TSerializedApiCall, type TSerializedEthTransfer, type TTransferInfo, type TVerifyEdOnDestinationOptions, type TVerifyEdOnDestinationOptionsBase, type TVersionClaimAssets, type TWeight, type TXTokensCurrencySelection, type TXTokensSection, type TXTokensTransferOptions, type TXTransferSection, type TXTransferTransferOptions, type TXcmAsset, type TXcmForeignAsset, type TXcmPalletSection, type TXcmVersioned, type TZeitgeistAsset, Version, type WithApi, XTokensError, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, createApiInstanceForNode, createX1Payload, determineRelayChain, generateAddressMultiLocationV4, generateAddressPayload, getAssetBalance, getAssetBalanceInternal, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getDryRun, getFees, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getNode, getNodeConfig, getNodeProviders, getOriginFeeDetails, getOriginFeeDetailsInternal, getParaEthTransferFees, getParaId, getTNode, getTransferInfo, getTransferableAmount, isEthersContract, isEthersSigner, isRelayChain, resolveModuleError, resolveParaId, send, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, transformMultiLocation, validateAddress, verifyEdOnDestination };