@paraspell/sdk-core 8.6.0 → 8.6.1

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