@paraspell/sdk-core 8.6.0 → 8.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/dist/index.cjs +18768 -18792
  2. package/dist/index.d.ts +1026 -944
  3. package/dist/index.mjs +18769 -18794
  4. package/package.json +2 -2
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
  /**
@@ -45,7 +231,7 @@ declare abstract class ParachainNode<TApi, TRes> {
45
231
  transfer(options: TSendInternalOptions<TApi, TRes>): Promise<TRes>;
46
232
  getRelayToParaOverrides(): TRelayToParaOverrides;
47
233
  transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCall;
48
- createCurrencySpec(amount: TAmount, scenario: TScenario, version: Version, _asset?: TAsset, overridedMultiLocation?: TMultiLocation | TMultiAsset[]): TXcmVersioned<TMultiAsset[]>;
234
+ createCurrencySpec(amount: TAmount, scenario: TScenario, version: Version, _asset?: TAsset): TXcmVersioned<TMultiAsset[]>;
49
235
  createPolkadotXcmHeader(scenario: TScenario, version: Version, destination: TDestination, paraId?: number): TXcmVersioned<TMultiLocation>;
50
236
  getNativeAssetSymbol(): string;
51
237
  protected transferToEthereum<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
@@ -56,15 +242,97 @@ 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): {
261
+ V1: TMultiAsset[];
262
+ V2?: undefined;
263
+ V3?: undefined;
264
+ V4?: undefined;
265
+ } | {
266
+ V2: TMultiAsset[];
267
+ V1?: undefined;
268
+ V3?: undefined;
269
+ V4?: undefined;
270
+ } | {
271
+ V3: TMultiAsset[];
272
+ V1?: undefined;
273
+ V2?: undefined;
274
+ V4?: undefined;
275
+ } | {
276
+ V4: TMultiAsset[];
277
+ V1?: undefined;
278
+ V2?: undefined;
279
+ V3?: undefined;
280
+ };
281
+ }
282
+
283
+ declare class AssetHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
284
+ constructor();
285
+ handleBridgeTransfer<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>, targetChain: 'Polkadot' | 'Kusama'): TRes;
286
+ handleEthBridgeTransfer<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
287
+ handleMythosTransfer<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
288
+ handleBifrostEthTransfer: <TApi_1, TRes_1>(input: TPolkadotXCMTransferOptions<TApi_1, TRes_1>) => TRes_1;
289
+ patchInput<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TPolkadotXCMTransferOptions<TApi, TRes>;
290
+ private getSection;
291
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
292
+ getRelayToParaOverrides(): TRelayToParaOverrides;
293
+ createCurrencySpec(amount: TAmount, scenario: TScenario, version: Version, asset?: TAsset): {
294
+ V1: TMultiAsset[];
295
+ V2?: undefined;
296
+ V3?: undefined;
297
+ V4?: undefined;
298
+ } | {
299
+ V2: TMultiAsset[];
300
+ V1?: undefined;
301
+ V3?: undefined;
302
+ V4?: undefined;
303
+ } | {
304
+ V3: TMultiAsset[];
305
+ V1?: undefined;
306
+ V2?: undefined;
307
+ V4?: undefined;
308
+ } | {
309
+ V4: TMultiAsset[];
310
+ V1?: undefined;
311
+ V2?: undefined;
312
+ V3?: undefined;
313
+ };
314
+ }
315
+
316
+ declare class Astar<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer, IXTokensTransfer {
317
+ constructor();
318
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
319
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
320
+ protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
321
+ }
322
+
323
+ declare class Bajun<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
324
+ constructor();
325
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
326
+ transferRelayToPara(): TSerializedApiCall;
327
+ }
328
+
329
+ declare class Basilisk<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
330
+ constructor();
331
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
332
+ }
333
+
334
+ declare class BifrostKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
66
335
  constructor();
67
- private getCurrencySelection;
68
336
  transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
69
337
  }
70
338
 
@@ -116,121 +384,139 @@ declare class BifrostPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> impl
116
384
  transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
117
385
  transferToAssetHub<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
118
386
  transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
119
- protected canUseXTokens({ asset, destination }: TSendInternalOptions<TApi, TRes>): boolean;
387
+ protected canUseXTokens({ asset, to: destination }: TSendInternalOptions<TApi, TRes>): boolean;
120
388
  }
121
389
 
122
390
  declare class Bitgreen<TApi, TRes> extends ParachainNode<TApi, TRes> {
123
391
  constructor();
124
392
  }
125
393
 
126
- declare class Centrifuge<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
394
+ declare class BridgeHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
127
395
  constructor();
128
- private getCurrencySelection;
129
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
396
+ _assetCheckEnabled: boolean;
397
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
398
+ getRelayToParaOverrides(): TRelayToParaOverrides;
130
399
  }
131
400
 
132
- declare class ComposableFinance<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
401
+ declare class BridgeHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
133
402
  constructor();
134
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
403
+ _assetCheckEnabled: boolean;
404
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
405
+ getRelayToParaOverrides(): TRelayToParaOverrides;
135
406
  }
136
407
 
137
- declare class Hydration<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer, IPolkadotXCMTransfer {
138
- private static NATIVE_ASSET_ID;
408
+ declare class Calamari<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
139
409
  constructor();
140
- transferToAssetHub<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
141
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
142
410
  transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
143
- protected canUseXTokens({ destination, asset }: TSendInternalOptions<TApi, TRes>): boolean;
144
411
  }
145
412
 
146
- declare class Interlay<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
413
+ declare class Centrifuge<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
147
414
  constructor();
415
+ private getCurrencySelection;
148
416
  transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
149
417
  }
150
418
 
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 {
419
+ declare class Collectives<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
157
420
  constructor();
158
- private getJunctions;
159
421
  transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
160
422
  getRelayToParaOverrides(): TRelayToParaOverrides;
423
+ createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): TXcmVersioned<TMultiAsset[]>;
161
424
  }
162
425
 
163
- declare class Parallel<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
426
+ declare class ComposableFinance<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
164
427
  constructor();
165
428
  transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
166
429
  }
167
430
 
168
- declare class Altair<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
431
+ declare class CoretimeKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
169
432
  constructor();
170
- private getCurrencySelection;
171
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
433
+ _assetCheckEnabled: boolean;
434
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
435
+ getRelayToParaOverrides(): TRelayToParaOverrides;
172
436
  }
173
437
 
174
- declare class Amplitude<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
438
+ declare class CoretimePolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
175
439
  constructor();
176
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
440
+ _assetCheckEnabled: boolean;
441
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
442
+ getRelayToParaOverrides(): TRelayToParaOverrides;
177
443
  }
178
444
 
179
- declare class Bajun<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
445
+ declare class Crab<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
180
446
  constructor();
181
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
447
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
182
448
  transferRelayToPara(): TSerializedApiCall;
449
+ createCurrencySpec(amount: string, scenario: TScenario, version: Version, _asset?: TAsset): {
450
+ V1: TMultiAsset[];
451
+ V2?: undefined;
452
+ V3?: undefined;
453
+ V4?: undefined;
454
+ } | {
455
+ V2: TMultiAsset[];
456
+ V1?: undefined;
457
+ V3?: undefined;
458
+ V4?: undefined;
459
+ } | {
460
+ V3: TMultiAsset[];
461
+ V1?: undefined;
462
+ V2?: undefined;
463
+ V4?: undefined;
464
+ } | {
465
+ V4: TMultiAsset[];
466
+ V1?: undefined;
467
+ V2?: undefined;
468
+ V3?: undefined;
469
+ };
183
470
  }
184
471
 
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 {
472
+ declare class Crust<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
191
473
  constructor();
474
+ private getCurrencySelection;
192
475
  transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
193
476
  }
194
477
 
195
- declare class Turing<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
478
+ declare class CrustShadow<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
196
479
  constructor();
480
+ private getCurrencySelection;
197
481
  transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
198
482
  }
199
483
 
200
- declare class Picasso<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
484
+ declare class Curio<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
201
485
  constructor();
202
486
  transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
203
487
  }
204
488
 
205
- declare class ParallelHeiko<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
489
+ declare class Darwinia<TApi, TRes> extends ParachainNode<TApi, TRes> {
206
490
  constructor();
207
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
491
+ transferRelayToPara(): TSerializedApiCall;
208
492
  }
209
493
 
210
- declare class Moonriver<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
494
+ declare class Encointer<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
211
495
  constructor();
212
- private getJunctions;
213
496
  transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
214
497
  getRelayToParaOverrides(): TRelayToParaOverrides;
215
498
  }
216
499
 
217
- declare class Kintsugi<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
500
+ declare class Heima<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
218
501
  constructor();
219
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
502
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
220
503
  }
221
504
 
222
- declare class Calamari<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
505
+ declare class Hydration<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer, IPolkadotXCMTransfer {
506
+ private static NATIVE_ASSET_ID;
223
507
  constructor();
508
+ transferToAssetHub<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): TRes;
509
+ transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
224
510
  transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
511
+ protected canUseXTokens({ to: destination, asset }: TSendInternalOptions<TApi, TRes>): boolean;
225
512
  }
226
513
 
227
- declare class CrustShadow<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
514
+ declare class Imbue<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
228
515
  constructor();
229
- private getCurrencySelection;
230
516
  transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
231
517
  }
232
518
 
233
- declare class Imbue<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
519
+ declare class Interlay<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
234
520
  constructor();
235
521
  transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
236
522
  }
@@ -245,187 +531,147 @@ declare class Karura<TApi, TRes> extends ParachainNode<TApi, TRes> implements IX
245
531
  transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
246
532
  }
247
533
 
248
- declare class AssetHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
534
+ declare class KiltSpiritnet<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
249
535
  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
536
  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[]>;
537
+ transferRelayToPara(): TSerializedApiCall;
259
538
  }
260
539
 
261
- declare class AssetHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
540
+ declare class Kintsugi<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
262
541
  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[]>;
542
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
266
543
  }
267
544
 
268
- declare class CoretimeKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
545
+ declare class Manta<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
269
546
  constructor();
270
- _assetCheckEnabled: boolean;
271
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
272
- getRelayToParaOverrides(): TRelayToParaOverrides;
547
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
273
548
  }
274
549
 
275
- declare class CoretimePolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
550
+ declare class Moonbeam<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
276
551
  constructor();
277
- _assetCheckEnabled: boolean;
552
+ private getMultiLocation;
278
553
  transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
279
554
  getRelayToParaOverrides(): TRelayToParaOverrides;
280
555
  }
281
556
 
282
- declare class Encointer<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
557
+ declare class Moonriver<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
283
558
  constructor();
559
+ private getMultiLocation;
284
560
  transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
285
561
  getRelayToParaOverrides(): TRelayToParaOverrides;
286
562
  }
287
563
 
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 {
564
+ declare class Mythos<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
299
565
  constructor();
300
566
  transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
301
- getRelayToParaOverrides(): TRelayToParaOverrides;
567
+ transferRelayToPara(): TSerializedApiCall;
302
568
  }
303
569
 
304
- declare class PeopleKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
570
+ declare class NeuroWeb<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
305
571
  constructor();
306
572
  transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
307
- getRelayToParaOverrides(): TRelayToParaOverrides;
308
573
  }
309
574
 
310
- declare class Astar<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer, IXTokensTransfer {
575
+ declare class Nodle<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
311
576
  constructor();
312
577
  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
578
  transferRelayToPara(): TSerializedApiCall;
320
579
  }
321
580
 
322
- declare class Crab<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
581
+ declare class Parallel<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
323
582
  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[]>;
583
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
327
584
  }
328
585
 
329
- declare class Quartz<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
330
- private static NATIVE_ASSET_ID;
586
+ declare class ParallelHeiko<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
331
587
  constructor();
332
588
  transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
333
589
  }
334
590
 
335
- declare class Shiden<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer, IXTokensTransfer {
591
+ declare class Peaq<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
336
592
  constructor();
337
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
338
593
  transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
339
- protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
594
+ transferRelayToPara(): TSerializedApiCall;
340
595
  }
341
596
 
342
- declare class Manta<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
597
+ declare class Pendulum<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
343
598
  constructor();
344
599
  transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
600
+ transferRelayToPara(): TSerializedApiCall;
345
601
  }
346
602
 
347
- declare class Nodle<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
603
+ declare class PeopleKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
348
604
  constructor();
349
605
  transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
350
- transferRelayToPara(): TSerializedApiCall;
606
+ getRelayToParaOverrides(): TRelayToParaOverrides;
351
607
  }
352
608
 
353
- declare class NeuroWeb<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
609
+ declare class PeoplePolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
354
610
  constructor();
355
611
  transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
612
+ getRelayToParaOverrides(): TRelayToParaOverrides;
356
613
  }
357
614
 
358
- declare class Pendulum<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
615
+ declare class Phala<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTransferTransfer {
359
616
  constructor();
360
- transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
361
- transferRelayToPara(): TSerializedApiCall;
617
+ transferXTransfer<TApi, TRes>(input: TXTransferTransferOptions<TApi, TRes>): TRes;
362
618
  }
363
619
 
364
- declare class Zeitgeist<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
620
+ declare class Picasso<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
365
621
  constructor();
366
- private getCurrencySelection;
367
622
  transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
368
623
  }
369
624
 
370
- declare class Collectives<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
625
+ declare class Polimec<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
371
626
  constructor();
627
+ private getAssetMultiLocation;
372
628
  transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
373
- getRelayToParaOverrides(): TRelayToParaOverrides;
374
- createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): TXcmVersioned<TMultiAsset[]>;
629
+ transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCall;
375
630
  }
376
631
 
377
- declare class Phala<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTransferTransfer {
632
+ declare class Quartz<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
633
+ private static NATIVE_ASSET_ID;
378
634
  constructor();
379
- transferXTransfer<TApi, TRes>(input: TXTransferTransferOptions<TApi, TRes>): TRes;
635
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
380
636
  }
381
637
 
382
- declare class Subsocial<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
638
+ declare class RobonomicsKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
383
639
  constructor();
384
640
  transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
385
641
  }
386
642
 
387
- declare class KiltSpiritnet<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
643
+ declare class RobonomicsPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
388
644
  constructor();
389
645
  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
646
  }
397
647
 
398
- declare class BridgeHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
648
+ declare class Shiden<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer, IXTokensTransfer {
399
649
  constructor();
400
- _assetCheckEnabled: boolean;
401
650
  transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
402
- getRelayToParaOverrides(): TRelayToParaOverrides;
651
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
652
+ protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
403
653
  }
404
654
 
405
- declare class BridgeHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
655
+ declare class Subsocial<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
406
656
  constructor();
407
- _assetCheckEnabled: boolean;
408
657
  transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
409
- getRelayToParaOverrides(): TRelayToParaOverrides;
410
658
  }
411
659
 
412
- declare class Mythos<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
660
+ declare class Turing<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
413
661
  constructor();
414
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
415
- transferRelayToPara(): TSerializedApiCall;
662
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
416
663
  }
417
664
 
418
- declare class Peaq<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
665
+ declare class Unique<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
666
+ private static NATIVE_ASSET_ID;
419
667
  constructor();
420
668
  transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
421
- transferRelayToPara(): TSerializedApiCall;
422
669
  }
423
670
 
424
- declare class Polimec<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
671
+ declare class Zeitgeist<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
425
672
  constructor();
426
- private getAssetMultiLocation;
427
- transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
428
- transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCall;
673
+ private getCurrencySelection;
674
+ transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
429
675
  }
430
676
 
431
677
  declare const nodes: <TApi, TRes>() => {
@@ -493,250 +739,45 @@ type TNodePolkadotKusama = Exclude<TNode, 'Ethereum'>;
493
739
  type TNodeWithRelayChains = (typeof NODES_WITH_RELAY_CHAINS)[number];
494
740
  type TNodeDotKsmWithRelayChains = Exclude<TNodeWithRelayChains, 'Ethereum'>;
495
741
 
496
- type TEcosystemType = 'polkadot' | 'kusama' | 'ethereum';
497
- type TRelayChainSymbol = 'DOT' | 'KSM';
742
+ type TPallet = (typeof SUPPORTED_PALLETS)[number];
743
+ type TPalletDetails = {
744
+ name: TPallet;
745
+ index: number;
746
+ };
747
+ interface TPalletMap {
748
+ defaultPallet: TPallet;
749
+ supportedPallets: TPalletDetails[];
750
+ }
751
+ type TPalletJsonMap = Record<TNodeDotKsmWithRelayChains, TPalletMap>;
498
752
 
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;
753
+ type TPolkadotXCMTransferOptions<TApi, TRes> = {
754
+ api: IPolkadotApi<TApi, TRes>;
755
+ header: TXcmVersioned<TMultiLocation>;
756
+ addressSelection: TXcmVersioned<TMultiLocation>;
757
+ address: TAddress;
758
+ currencySelection: TXcmVersioned<TMultiAsset[]>;
759
+ overriddenAsset?: TMultiLocation | TMultiAssetWithFee[];
760
+ scenario: TScenario;
761
+ asset: WithAmount<TAsset>;
762
+ destination: TDestination;
763
+ paraIdTo?: number;
764
+ version?: Version;
765
+ senderAddress?: string;
766
+ pallet?: string;
767
+ method?: string;
508
768
  };
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;
769
+ type TXTokensTransferOptions<TApi, TRes> = {
770
+ api: IPolkadotApi<TApi, TRes>;
771
+ asset: WithAmount<TAsset>;
772
+ addressSelection: TXcmVersioned<TMultiLocation>;
773
+ fees: number;
774
+ scenario: TScenario;
775
+ origin: TNodePolkadotKusama;
776
+ destination: TDestination;
777
+ paraIdTo?: number;
778
+ overriddenAsset?: TMultiLocation | TMultiAssetWithFee[];
779
+ pallet?: string;
780
+ method?: string;
740
781
  };
741
782
  type TXTransferTransferOptions<TApi, TRes> = {
742
783
  api: IPolkadotApi<TApi, TRes>;
@@ -782,6 +823,10 @@ type TAddress = string | TMultiLocation;
782
823
  type TDestination = TNodeWithRelayChains | TMultiLocation;
783
824
  type TRelayToParaDestination = TNodePolkadotKusama | TMultiLocation;
784
825
  type TSendBaseOptions = {
826
+ /**
827
+ * The origin node
828
+ */
829
+ from: TNodeDotKsmWithRelayChains;
785
830
  /**
786
831
  * The destination address. A SS58 or H160 format.
787
832
  */
@@ -793,7 +838,11 @@ type TSendBaseOptions = {
793
838
  /**
794
839
  * The destination node or multi-location
795
840
  */
796
- destination: TDestination;
841
+ to: TDestination;
842
+ /**
843
+ * The currency to transfer. Either ID, symbol, multi-location, or multi-asset
844
+ */
845
+ currency: TCurrencyInputWithAmount;
797
846
  /**
798
847
  * The optional destination parachain ID
799
848
  */
@@ -814,17 +863,8 @@ type TSendBaseOptions = {
814
863
  /**
815
864
  * Options for transferring from a parachain to another parachain or relay chain
816
865
  */
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 & {
866
+ type TSendOptions<TApi, TRes> = WithApi<TSendBaseOptions, TApi, TRes>;
867
+ type TSendInternalOptions<TApi, TRes> = Omit<TSendBaseOptions, 'from' | 'currency'> & {
828
868
  api: IPolkadotApi<TApi, TRes>;
829
869
  asset: WithAmount<TAsset>;
830
870
  overriddenAsset?: TMultiLocation | TMultiAssetWithFee[];
@@ -885,248 +925,29 @@ type TXTokensSection = 'transfer' | 'transfer_multiasset' | 'transfer_multiasset
885
925
  type TPolkadotXcmSection = 'limited_teleport_assets' | 'limited_reserve_transfer_assets' | 'reserve_transfer_assets' | 'reserve_withdraw_assets' | 'transfer_assets';
886
926
  type TXcmPalletSection = 'limited_teleport_assets' | 'reserve_transfer_assets' | 'limited_reserve_transfer_assets';
887
927
 
888
- type TEdJsonMap = Record<TNodeDotKsmWithRelayChains, string | null>;
928
+ type TMultiAsset = TMultiAssetV3 | TMultiAssetV4;
929
+ interface TMultiAssetV3 {
930
+ id: {
931
+ Concrete: TMultiLocation;
932
+ };
933
+ fun: {
934
+ Fungible: TAmount;
935
+ };
936
+ }
937
+ interface TMultiAssetV4 {
938
+ id: TMultiLocation;
939
+ fun: {
940
+ Fungible: TAmount;
941
+ };
942
+ }
889
943
 
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[];
944
+ type TAssetClaimOptionsBase = {
945
+ node: TNodeWithRelayChains;
946
+ multiAssets: TMultiAsset[];
947
+ address: TAddress;
948
+ version?: TVersionClaimAssets;
1128
949
  };
1129
- type TNodeConfigMap = Record<TNodeDotKsmWithRelayChains, TNodeConfig>;
950
+ type TAssetClaimOptions<TApi, TRes> = WithApi<TAssetClaimOptionsBase, TApi, TRes>;
1130
951
 
1131
952
  type TBalanceResponse = {
1132
953
  free?: string;
@@ -1266,53 +1087,529 @@ type TVerifyEdOnDestinationOptionsBase = {
1266
1087
  };
1267
1088
  type TVerifyEdOnDestinationOptions<TApi, TRes> = WithApi<TVerifyEdOnDestinationOptionsBase, TApi, TRes>;
1268
1089
 
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
-
1090
+ type TEvmNodeFrom = Extract<TNode, 'Ethereum' | 'Moonbeam' | 'Moonriver' | 'Darwinia'>;
1091
+ /**
1092
+ * The options for the Ethereum to Polkadot transfer builder.
1093
+ */
1094
+ type TEvmBuilderOptionsBase = {
1095
+ /**
1096
+ * The source node. Can be either 'Ethereum', 'Moonbeam', 'Moonriver', or 'Darwinia'.
1097
+ */
1098
+ from: TEvmNodeFrom;
1099
+ /**
1100
+ * The destination node on Polkadot network.
1101
+ */
1102
+ to: TNodeWithRelayChains;
1103
+ /**
1104
+ * The currency to transfer. Symbol or ID.
1105
+ */
1106
+ currency: TCurrencyInputWithAmount;
1107
+ /**
1108
+ * The Polkadot destination address.
1109
+ */
1110
+ address: string;
1111
+ /**
1112
+ * The AssetHub address
1113
+ */
1114
+ ahAddress?: string;
1115
+ /**
1116
+ * The Ethereum signer.
1117
+ */
1118
+ signer: Signer | WalletClient;
1119
+ };
1120
+ type TEvmBuilderOptions<TApi, TRes> = WithApi<TEvmBuilderOptionsBase, TApi, TRes> & {
1121
+ provider?: AbstractProvider;
1122
+ };
1123
+ type TSerializeEthTransferOptions = Omit<TEvmBuilderOptionsBase, 'signer'> & {
1124
+ destAddress: string;
1125
+ };
1126
+ type TSerializedEthTransfer = {
1127
+ token: string;
1128
+ destinationParaId: number;
1129
+ destinationFee: bigint;
1130
+ amount: bigint;
1131
+ fee: bigint;
1132
+ };
1133
+ /**
1134
+ * The options for the batch builder.
1135
+ */
1136
+ declare enum BatchMode {
1137
+ /**
1138
+ * Does not commit if one of the calls in the batch fails.
1139
+ */
1140
+ BATCH_ALL = "BATCH_ALL",
1141
+ /**
1142
+ * Commits each successful call regardless if a call fails.
1143
+ */
1144
+ BATCH = "BATCH"
1145
+ }
1146
+ /**
1147
+ * The options for the batch builder.
1148
+ */
1149
+ type TBatchOptions = {
1150
+ /**
1151
+ * The batch mode. Can be either:
1152
+ * `BATCH_ALL` - does not commit if one of the calls in the batch fails.
1153
+ * `BATCH` - commits each successful call regardless if a call fails.
1154
+ */
1155
+ mode: BatchMode;
1156
+ };
1157
+
1158
+ type TProviderEntry = {
1159
+ name: string;
1160
+ endpoint: string;
1161
+ };
1162
+ type TNodeConfig = {
1163
+ name: string;
1164
+ info: string;
1165
+ paraId: number;
1166
+ providers: TProviderEntry[];
1167
+ };
1168
+ type TNodeConfigMap = Record<TNodeDotKsmWithRelayChains, TNodeConfig>;
1169
+
1170
+ type TDryRunBaseOptions<TRes> = {
1171
+ /**
1172
+ * The transaction to dry-run
1173
+ */
1174
+ tx: TRes;
1175
+ /**
1176
+ * The node to dry-run on
1177
+ */
1178
+ node: TNodeDotKsmWithRelayChains;
1179
+ /**
1180
+ * The address to dry-run with
1181
+ */
1182
+ address: string;
1183
+ };
1184
+ type TDryRunOptions<TApi, TRes> = WithApi<TDryRunBaseOptions<TRes>, TApi, TRes>;
1185
+ type TDryRunResult = {
1186
+ success: true;
1187
+ fee: bigint;
1188
+ } | {
1189
+ success: false;
1190
+ failureReason: string;
1191
+ };
1192
+ declare enum XTokensError {
1193
+ AssetHasNoReserve = "AssetHasNoReserve",
1194
+ NotCrossChainTransfer = "NotCrossChainTransfer",
1195
+ InvalidDest = "InvalidDest",
1196
+ NotCrossChainTransferableCurrency = "NotCrossChainTransferableCurrency",
1197
+ UnweighableMessage = "UnweighableMessage",
1198
+ XcmExecutionFailed = "XcmExecutionFailed",
1199
+ CannotReanchor = "CannotReanchor",
1200
+ InvalidAncestry = "InvalidAncestry",
1201
+ InvalidAsset = "InvalidAsset",
1202
+ DestinationNotInvertible = "DestinationNotInvertible",
1203
+ BadVersion = "BadVersion",
1204
+ DistinctReserveForAssetAndFee = "DistinctReserveForAssetAndFee",
1205
+ ZeroFee = "ZeroFee",
1206
+ ZeroAmount = "ZeroAmount",
1207
+ TooManyAssetsBeingSent = "TooManyAssetsBeingSent",
1208
+ AssetIndexNonExistent = "AssetIndexNonExistent",
1209
+ FeeNotEnough = "FeeNotEnough",
1210
+ NotSupportedLocation = "NotSupportedLocation",
1211
+ MinXcmFeeNotDefined = "MinXcmFeeNotDefined",
1212
+ RateLimited = "RateLimited"
1213
+ }
1214
+ declare enum PolkadotXcmError {
1215
+ Unreachable = "Unreachable",
1216
+ SendFailure = "SendFailure",
1217
+ Filtered = "Filtered",
1218
+ UnweighableMessage = "UnweighableMessage",
1219
+ DestinationNotInvertible = "DestinationNotInvertible",
1220
+ Empty = "Empty",
1221
+ CannotReanchor = "CannotReanchor",
1222
+ TooManyAssets = "TooManyAssets",
1223
+ InvalidOrigin = "InvalidOrigin",
1224
+ BadVersion = "BadVersion",
1225
+ BadLocation = "BadLocation",
1226
+ NoSubscription = "NoSubscription",
1227
+ AlreadySubscribed = "AlreadySubscribed",
1228
+ CannotCheckOutTeleport = "CannotCheckOutTeleport",
1229
+ LowBalance = "LowBalance",
1230
+ TooManyLocks = "TooManyLocks",
1231
+ AccountNotSovereign = "AccountNotSovereign",
1232
+ FeesNotMet = "FeesNotMet",
1233
+ LockNotFound = "LockNotFound",
1234
+ InUse = "InUse",
1235
+ REMOVED = "REMOVED",
1236
+ InvalidAssetUnknownReserve = "InvalidAssetUnknownReserve",
1237
+ InvalidAssetUnsupportedReserve = "InvalidAssetUnsupportedReserve",
1238
+ TooManyReserves = "TooManyReserves",
1239
+ LocalExecutionIncomplete = "LocalExecutionIncomplete"
1240
+ }
1241
+ type TModuleError = {
1242
+ index: string;
1243
+ error: string;
1244
+ };
1245
+
1246
+ type TEdJsonMap = Record<TNodeDotKsmWithRelayChains, string | null>;
1247
+
1248
+ type TEcosystemType = 'polkadot' | 'kusama' | 'ethereum';
1249
+ type TRelayChainSymbol = 'DOT' | 'KSM';
1250
+
1251
+ type TTransferInfo = {
1252
+ chain: {
1253
+ origin: TNodeWithRelayChains;
1254
+ destination: TNodeWithRelayChains;
1255
+ ecosystem: string;
1256
+ };
1257
+ currencyBalanceOrigin: {
1258
+ balance: bigint;
1259
+ currency: string;
1260
+ };
1261
+ originFeeBalance: {
1262
+ balance: bigint;
1263
+ expectedBalanceAfterXCMFee: bigint;
1264
+ xcmFee: {
1265
+ sufficientForXCM: boolean;
1266
+ xcmFee: bigint;
1267
+ };
1268
+ existentialDeposit: bigint;
1269
+ asset: string;
1270
+ minNativeTransferableAmount: bigint;
1271
+ maxNativeTransferableAmount: bigint;
1272
+ };
1273
+ destinationFeeBalance: {
1274
+ balance: bigint;
1275
+ currency: string;
1276
+ existentialDeposit: bigint;
1277
+ };
1278
+ };
1279
+ type TOriginFeeDetails = {
1280
+ sufficientForXCM: boolean;
1281
+ xcmFee: bigint;
1282
+ };
1283
+ type TGetTransferInfoOptionsBase = {
1284
+ origin: TNodeDotKsmWithRelayChains;
1285
+ destination: TNodeDotKsmWithRelayChains;
1286
+ accountOrigin: string;
1287
+ accountDestination: string;
1288
+ currency: WithAmount<TCurrencyCore>;
1289
+ };
1290
+ type TGetTransferInfoOptions<TApi, TRes> = WithApi<TGetTransferInfoOptionsBase, TApi, TRes>;
1291
+
1292
+ interface IPolkadotApi<TApi, TRes> {
1293
+ setApi(api?: TApiOrUrl<TApi>): void;
1294
+ getApi(): TApi;
1295
+ getApiOrUrl(): TApiOrUrl<TApi> | undefined;
1296
+ init(node: TNodeWithRelayChains): Promise<void>;
1297
+ createApiInstance: (wsUrl: string | string[]) => Promise<TApi>;
1298
+ accountToHex(address: string, isPrefixed?: boolean): string;
1299
+ callTxMethod(serializedCall: TSerializedApiCall): TRes;
1300
+ callBatchMethod(calls: TRes[], mode: BatchMode): TRes;
1301
+ objectToHex(obj: unknown, typeName: string): Promise<string>;
1302
+ hexToUint8a(hex: string): Uint8Array;
1303
+ stringToUint8a(str: string): Uint8Array;
1304
+ calculateTransactionFee(tx: TRes, address: string): Promise<bigint>;
1305
+ getBalanceNative(address: string): Promise<bigint>;
1306
+ getBalanceNativeAcala(address: string, symbol: string): Promise<bigint>;
1307
+ getBalanceForeignPolkadotXcm(address: string, id?: string): Promise<bigint>;
1308
+ getMythosForeignBalance(address: string): Promise<bigint>;
1309
+ getAssetHubForeignBalance(address: string, multiLocation: TMultiLocation): Promise<bigint>;
1310
+ getForeignAssetsByIdBalance(address: string, assetId: string): Promise<bigint>;
1311
+ getBalanceForeignXTokens(node: TNodePolkadotKusama, address: string, asset: TAsset): Promise<bigint>;
1312
+ getBalanceForeignBifrost(address: string, asset: TAsset): Promise<bigint>;
1313
+ getBalanceForeignAssetsAccount(address: string, assetId: bigint | number): Promise<bigint>;
1314
+ getFromRpc(module: string, method: string, key: string): Promise<string>;
1315
+ blake2AsHex(data: Uint8Array): string;
1316
+ clone(): IPolkadotApi<TApi, TRes>;
1317
+ createApiForNode(node: TNodeWithRelayChains): Promise<IPolkadotApi<TApi, TRes>>;
1318
+ getDryRun(options: TDryRunBaseOptions<TRes>): Promise<TDryRunResult>;
1319
+ setDisconnectAllowed(allowed: boolean): void;
1320
+ getDisconnectAllowed(): boolean;
1321
+ disconnect(force?: boolean): Promise<void>;
1322
+ }
1323
+
1324
+ /**
1325
+ * Builder class for constructing asset claim transactions.
1326
+ */
1327
+ declare class AssetClaimBuilder<TApi, TRes, T extends Partial<TAssetClaimOptionsBase> = object> {
1328
+ readonly api: IPolkadotApi<TApi, TRes>;
1329
+ readonly _options: T;
1330
+ constructor(api: IPolkadotApi<TApi, TRes>, options?: T);
1331
+ /**
1332
+ * Specifies the assets to be claimed.
1333
+ *
1334
+ * @param multiAssets - An array of assets to claim in a multi-asset format.
1335
+ * @returns An instance of Builder
1336
+ */
1337
+ fungible(multiAssets: TMultiAsset[]): AssetClaimBuilder<TApi, TRes, T & {
1338
+ multiAssets: TMultiAsset[];
1339
+ }>;
1340
+ /**
1341
+ * Specifies the account address on which the assets will be claimed.
1342
+ *
1343
+ * @param address - The destination account address.
1344
+ * @returns An instance of Builder
1345
+ */
1346
+ account(address: TAddress): AssetClaimBuilder<TApi, TRes, T & {
1347
+ address: TAddress;
1348
+ }>;
1349
+ /**
1350
+ * Sets the XCM version to be used for the asset claim.
1351
+ *
1352
+ * @param version - The XCM version.
1353
+ * @returns An instance of Builder
1354
+ */
1355
+ xcmVersion(version: TVersionClaimAssets): AssetClaimBuilder<TApi, TRes, T & {
1356
+ version: TVersionClaimAssets;
1357
+ }>;
1358
+ /**
1359
+ * Builds and returns the asset claim extrinsic.
1360
+ *
1361
+ * @returns A Promise that resolves to the asset claim extrinsic.
1362
+ */
1363
+ build(this: AssetClaimBuilder<TApi, TRes, TAssetClaimOptionsBase>): Promise<TRes>;
1364
+ /**
1365
+ * Returns the API instance used by the builder.
1366
+ *
1367
+ * @returns The API instance.
1368
+ */
1369
+ getApi(): TApi;
1370
+ /**
1371
+ * Disconnects the API.
1372
+ *
1373
+ * @returns A Promise that resolves when the API is disconnected.
1374
+ */
1375
+ disconnect(): Promise<void>;
1376
+ }
1377
+
1378
+ declare class BatchTransactionManager<TApi, TRes> {
1379
+ transactionOptions: TSendOptions<TApi, TRes>[];
1380
+ addTransaction(options: TSendOptions<TApi, TRes>): void;
1381
+ isEmpty(): boolean;
1382
+ buildBatch(api: IPolkadotApi<TApi, TRes>, from: TNodeDotKsmWithRelayChains, options?: TBatchOptions): Promise<TRes>;
1383
+ }
1384
+
1385
+ /**
1386
+ * A builder class for constructing Para-to-Para, Para-to-Relay, Relay-to-Para transactions and asset claims.
1387
+ */
1388
+ declare class GeneralBuilder<TApi, TRes, T extends Partial<TSendBaseOptions> = object> {
1389
+ readonly batchManager: BatchTransactionManager<TApi, TRes>;
1390
+ readonly api: IPolkadotApi<TApi, TRes>;
1391
+ readonly _options: T;
1392
+ constructor(api: IPolkadotApi<TApi, TRes>, batchManager: BatchTransactionManager<TApi, TRes>, options?: T);
1393
+ /**
1394
+ * Specifies the origin node for the transaction.
1395
+ *
1396
+ * @param node - The node from which the transaction originates.
1397
+ * @returns An instance of Builder
1398
+ */
1399
+ from(node: TNodeDotKsmWithRelayChains): GeneralBuilder<TApi, TRes, T & {
1400
+ from: TNodeDotKsmWithRelayChains;
1401
+ }>;
1402
+ /**
1403
+ * Specifies the destination node for the transaction.
1404
+ *
1405
+ * @param node - The node to which the transaction is sent.
1406
+ * @param paraIdTo - (Optional) The parachain ID of the destination node.
1407
+ * @returns An instance of Builder
1408
+ */
1409
+ to(node: TDestination, paraIdTo?: number): GeneralBuilder<TApi, TRes, T & {
1410
+ to: TDestination;
1411
+ }>;
1412
+ /**
1413
+ * Initiates the process to claim assets from a specified node.
1414
+ *
1415
+ * @param node - The node from which to claim assets.
1416
+ * @returns An instance of Builder
1417
+ */
1418
+ claimFrom(node: TNodeWithRelayChains): AssetClaimBuilder<TApi, TRes, {
1419
+ node: TNodeWithRelayChains;
1420
+ }>;
1421
+ /**
1422
+ * Specifies the currency to be used in the transaction. Symbol, ID, multi-location or multi-asset.
1423
+ *
1424
+ * @param currency - The currency to be transferred.
1425
+ * @returns An instance of Builder
1426
+ */
1427
+ currency(currency: TCurrencyInputWithAmount): GeneralBuilder<TApi, TRes, T & {
1428
+ currency: TCurrencyInputWithAmount;
1429
+ }>;
1430
+ /**
1431
+ * Sets the recipient address.
1432
+ *
1433
+ * @param address - The destination address.
1434
+ * @returns An instance of Builder
1435
+ */
1436
+ address(address: TAddress, senderAddress?: string): GeneralBuilder<TApi, TRes, T & {
1437
+ address: TAddress;
1438
+ }>;
1439
+ /**
1440
+ * Sets the XCM version to be used for the transfer.
1441
+ *
1442
+ * @param version - The XCM version.
1443
+ * @returns An instance of Builder
1444
+ */
1445
+ xcmVersion(version: Version): GeneralBuilder<TApi, TRes, T & {
1446
+ version: Version;
1447
+ }>;
1448
+ /**
1449
+ * Sets a custom pallet for the transaction.
1450
+ *
1451
+ * @param palletName - The name of the custom pallet to be used.
1452
+ * @returns An instance of the Builder.
1453
+ */
1454
+ customPallet(pallet: string, method: string): GeneralBuilder<TApi, TRes, T & {
1455
+ pallet: string;
1456
+ method: string;
1457
+ }>;
1458
+ /**
1459
+ * Adds the transfer transaction to the batch.
1460
+ *
1461
+ * @returns An instance of Builder
1462
+ */
1463
+ addToBatch(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>): GeneralBuilder<TApi, TRes, T & {
1464
+ from: TNodeDotKsmWithRelayChains;
1465
+ }>;
1466
+ /**
1467
+ * Builds and returns the batched transaction based on the configured parameters.
1468
+ *
1469
+ * @param options - (Optional) Options to customize the batch transaction.
1470
+ * @returns A Extrinsic representing the batched transactions.
1471
+ */
1472
+ buildBatch(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>, options?: TBatchOptions): Promise<TRes>;
1473
+ /**
1474
+ * Builds and returns the transfer extrinsic.
1475
+ *
1476
+ * @returns A Promise that resolves to the transfer extrinsic.
1477
+ */
1478
+ build(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>): Promise<TRes>;
1479
+ dryRun(this: GeneralBuilder<TApi, TRes, TSendBaseOptions>, senderAddress: string): Promise<TDryRunResult>;
1480
+ /**
1481
+ * Returns the API instance used by the builder.
1482
+ *
1483
+ * @returns The API instance.
1484
+ */
1485
+ getApi(): TApi;
1486
+ /**
1487
+ * Disconnects the API.
1488
+ *
1489
+ * @returns A Promise that resolves when the API is disconnected.
1490
+ */
1491
+ disconnect(): Promise<void>;
1492
+ }
1493
+ /**
1494
+ * Creates a new Builder instance.
1495
+ *
1496
+ * @param api - The API instance to use for building transactions. If not provided, a new instance will be created.
1497
+ * @returns A new Builder instance.
1498
+ */
1499
+ declare const Builder: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>) => GeneralBuilder<TApi, TRes, object>;
1500
+
1501
+ /**
1502
+ * Error thrown when multiple assets with the same symbol are found.
1503
+ */
1504
+ declare class DuplicateAssetError extends Error {
1505
+ /**
1506
+ * Constructs a new DuplicateAssetError.
1507
+ *
1508
+ * @param symbol - The symbol of the asset causing the duplication error.
1509
+ */
1510
+ constructor(msg: string);
1511
+ }
1512
+
1513
+ /**
1514
+ * Error thrown when multiple assets with the same symbol are found.
1515
+ */
1516
+ declare class DuplicateAssetIdError extends Error {
1517
+ /**
1518
+ * Constructs a new DuplicateAssetError.
1519
+ *
1520
+ * @param symbol - The symbol of the asset causing the duplication error.
1521
+ */
1522
+ constructor(id: string);
1523
+ }
1524
+
1525
+ /**
1526
+ * Error thrown when nodes from different relay chains are incompatible.
1527
+ */
1528
+ declare class IncompatibleNodesError extends Error {
1529
+ /**
1530
+ * Constructs a new IncompatibleNodesError.
1531
+ *
1532
+ * @param message - Optional custom error message.
1533
+ */
1534
+ constructor(message?: string);
1535
+ }
1536
+
1537
+ /**
1538
+ * Error thrown when an invalid address is provided.
1539
+ */
1540
+ declare class InvalidAddressError extends Error {
1541
+ /**
1542
+ * Constructs a new InvalidAddressError.
1543
+ *
1544
+ * @param message - The error message.
1545
+ */
1546
+ constructor(message: string);
1547
+ }
1548
+
1549
+ /**
1550
+ * Used to inform user, that currency they wish to use is not registered on either origin or destination Parachain
1551
+ */
1552
+ declare class InvalidCurrencyError extends Error {
1553
+ /**
1554
+ * Constructs a new InvalidCurrencyError.
1555
+ *
1556
+ * @param message - The error message.
1557
+ */
1558
+ constructor(message: string);
1559
+ }
1560
+
1561
+ /**
1562
+ * Used to inform user, that Parachain they wish to use is not supported yet
1563
+ */
1564
+ declare class NodeNotSupportedError extends Error {
1565
+ /**
1566
+ * Constructs a new NodeNotSupportedError.
1567
+ *
1568
+ * @param message - Optional custom error message.
1569
+ */
1570
+ constructor(message?: string);
1571
+ }
1572
+
1573
+ /**
1574
+ * Used to inform user, that Parachain they wish to use has not yet implemented full XCM Support
1575
+ */
1576
+ declare class NoXCMSupportImplementedError extends Error {
1577
+ /**
1578
+ * Constructs a new NoXCMSupportImplementedError.
1579
+ *
1580
+ * @param node - The node for which XCM support is not implemented.
1581
+ */
1582
+ constructor(node: TNode);
1583
+ }
1584
+
1585
+ /**
1586
+ * Used to inform user, that Parachain they wish to use does not support scenario they wish to use yet
1587
+ */
1588
+ declare class ScenarioNotSupportedError extends Error {
1589
+ /**
1590
+ * Constructs a new ScenarioNotSupportedError.
1591
+ *
1592
+ * @param node - The node where the scenario is not supported.
1593
+ * @param scenario - The scenario that is not supported.
1594
+ * @param message - Optional custom error message.
1595
+ */
1596
+ constructor(node: TNode, scenario: TScenario, message?: string);
1597
+ }
1598
+
1599
+ declare const getNodeConfig: (node: TNodeDotKsmWithRelayChains) => TNodeConfig;
1600
+
1601
+ declare const getNodeProviders: (node: TNodeDotKsmWithRelayChains) => string[];
1602
+
1603
+ /**
1604
+ * Retrieves the parachain ID for a specified node.
1605
+ *
1606
+ * @param node - The node for which to get the paraId.
1607
+ * @returns The parachain ID of the node.
1608
+ */
1609
+ declare const getParaId: (node: TNodeWithRelayChains) => number;
1610
+
1611
+ declare const claimAssets: <TApi, TRes>(options: TAssetClaimOptions<TApi, TRes>) => Promise<TRes>;
1612
+
1316
1613
  declare const getAssetMultiLocation: (node: TNodeWithRelayChains, currency: TCurrencyInput) => TMultiLocation | null;
1317
1614
 
1318
1615
  /**
@@ -1338,7 +1635,7 @@ declare const isNodeEvm: (node: TNodeWithRelayChains) => boolean;
1338
1635
  * @param symbol - The symbol of the asset.
1339
1636
  * @returns The asset ID if found; otherwise, null.
1340
1637
  */
1341
- declare const getAssetId: (node: TNode, symbol: string) => string | null;
1638
+ declare const getAssetId: (node: TNodeWithRelayChains, symbol: string) => string | null;
1342
1639
  /**
1343
1640
  * Retrieves the relay chain asset symbol for a specified node.
1344
1641
  *
@@ -1352,7 +1649,7 @@ declare const getRelayChainSymbol: (node: TNodeWithRelayChains) => TRelayChainSy
1352
1649
  * @param node - The node for which to get native assets.
1353
1650
  * @returns An array of native asset details.
1354
1651
  */
1355
- declare const getNativeAssets: (node: TNode) => TNativeAsset[];
1652
+ declare const getNativeAssets: (node: TNodeWithRelayChains) => TNativeAsset[];
1356
1653
  /**
1357
1654
  * Retrieves the list of other (non-native) assets for a specified node.
1358
1655
  *
@@ -1406,35 +1703,32 @@ declare const getAssetDecimals: (node: TNodeWithRelayChains, symbol: string) =>
1406
1703
  declare const getTNode: (paraId: number, ecosystem: TEcosystemType) => TNodeWithRelayChains | null;
1407
1704
  declare const hasDryRunSupport: (node: TNodeWithRelayChains) => boolean;
1408
1705
 
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>;
1706
+ declare const Native: (symbol: string) => TSymbolSpecifier;
1707
+ declare const Foreign: (symbol: string) => TSymbolSpecifier;
1708
+ declare const ForeignAbstract: (symbol: string) => TSymbolSpecifier;
1420
1709
 
1421
- declare const getTransferInfo: <TApi, TRes>({ origin, destination, accountOrigin, accountDestination, currency, api }: TGetTransferInfoOptions<TApi, TRes>) => Promise<TTransferInfo>;
1710
+ declare const findBestMatches: <T extends {
1711
+ symbol: string;
1712
+ alias?: string;
1713
+ }>(assets: T[], value: string, property?: "symbol" | "alias") => T[];
1714
+ declare const findAssetBySymbol: (node: TNodeWithRelayChains, destination: TNodeWithRelayChains | null, otherAssets: TForeignAsset[], nativeAssets: TNativeAsset[], symbol: TCurrencySymbolValue) => TAsset | undefined;
1715
+ declare const findAssetById: (assets: TForeignAsset[], assetId: TCurrency) => TForeignAsset | undefined;
1422
1716
 
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>;
1717
+ declare const getAssetBalanceInternal: <TApi, TRes>({ address, node, currency, api }: TGetAssetBalanceOptions<TApi, TRes>) => Promise<bigint>;
1718
+ declare const getAssetBalance: <TApi, TRes>(options: TGetAssetBalanceOptions<TApi, TRes>) => Promise<bigint>;
1430
1719
 
1431
- declare const claimAssets: <TApi, TRes>(options: TAssetClaimOptions<TApi, TRes>) => Promise<TRes>;
1720
+ declare const getBalanceForeignInternal: <TApi, TRes>({ address, node, currency, api }: TGetBalanceForeignOptions<TApi, TRes>) => Promise<bigint>;
1721
+ declare const getBalanceForeign: <TApi, TRes>(options: TGetBalanceForeignOptions<TApi, TRes>) => Promise<bigint>;
1432
1722
 
1433
- declare const Native: (symbol: string) => TSymbolSpecifier;
1434
- declare const Foreign: (symbol: string) => TSymbolSpecifier;
1435
- declare const ForeignAbstract: (symbol: string) => TSymbolSpecifier;
1723
+ declare const getBalanceNativeInternal: <TApi, TRes>({ address, node, api, currency }: TGetBalanceNativeOptions<TApi, TRes>) => Promise<bigint>;
1724
+ declare const getBalanceNative: <TApi, TRes>(options: TGetBalanceNativeOptions<TApi, TRes>) => Promise<bigint>;
1436
1725
 
1437
- declare const Override: (multiLocation: TMultiLocation) => TOverrideMultiLocationSpecifier;
1726
+ declare const findAssetByMultiLocation: (foreignAssets: TForeignAsset[], multiLocation: string | TMultiLocation) => TForeignAsset | undefined;
1727
+
1728
+ declare const getAssetBySymbolOrId: (node: TNodeWithRelayChains, currency: TCurrencyInput, destination: TNodeWithRelayChains | null) => TAsset | null;
1729
+
1730
+ declare const getOriginFeeDetailsInternal: <TApi, TRes>({ api, account, accountDestination, currency, origin, destination, feeMarginPercentage }: TGetOriginFeeDetailsOptions<TApi, TRes>) => Promise<TOriginFeeDetails>;
1731
+ declare const getOriginFeeDetails: <TApi, TRes>(options: TGetOriginFeeDetailsOptions<TApi, TRes>) => Promise<TOriginFeeDetails>;
1438
1732
 
1439
1733
  /**
1440
1734
  * Normalizes an asset symbol by stripping the 'xc' prefix (if present) and converting it to lowercase.
@@ -1456,16 +1750,9 @@ declare const getMaxNativeTransferableAmount: <TApi, TRes>({ api, address, node,
1456
1750
  declare const getMaxForeignTransferableAmount: <TApi, TRes>({ api, address, node, currency }: TGetMaxForeignTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
1457
1751
  declare const getTransferableAmount: <TApi, TRes>({ api, address, node, currency }: TGetTransferableAmountOptions<TApi, TRes>) => Promise<bigint>;
1458
1752
 
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;
1753
+ declare const Override: (multiLocation: TMultiLocation) => TOverrideMultiLocationSpecifier;
1467
1754
 
1468
- declare const findAssetByMultiLocation: (foreignAssets: TForeignAsset[], multiLocation: string | TMultiLocation) => TForeignAsset | undefined;
1755
+ declare const getTransferInfo: <TApi, TRes>({ origin, destination, accountOrigin, accountDestination, currency, api }: TGetTransferInfoOptions<TApi, TRes>) => Promise<TTransferInfo>;
1469
1756
 
1470
1757
  declare const verifyEdOnDestination: <TApi, TRes>(options: TVerifyEdOnDestinationOptions<TApi, TRes>) => Promise<boolean>;
1471
1758
 
@@ -1485,120 +1772,37 @@ declare const getDefaultPallet: (node: TNodeDotKsmWithRelayChains) => TPallet;
1485
1772
  declare const getSupportedPallets: (node: TNodeDotKsmWithRelayChains) => TPallet[];
1486
1773
  declare const getSupportedPalletsDetails: (node: TNodeDotKsmWithRelayChains) => TPalletDetails[];
1487
1774
 
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
- }
1775
+ declare const getParaEthTransferFees: <TApi, TRes>(ahApi: IPolkadotApi<TApi, TRes>) => Promise<[bigint, bigint]>;
1494
1776
 
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>;
1777
+ declare const transferMoonbeamEvm: <TApi, TRes>({ api, from, to, signer, address, currency }: TEvmBuilderOptions<TApi, TRes>) => Promise<string>;
1778
+
1779
+ declare const transferMoonbeamToEth: <TApi, TRes>({ api, from, to, signer, address, ahAddress, currency }: TEvmBuilderOptions<TApi, TRes>) => Promise<string>;
1780
+
1781
+ declare const isEthersSigner: (signer: Signer | WalletClient) => signer is Signer;
1782
+ declare const isEthersContract: (contract: Contract | GetContractReturnType<Abi | readonly unknown[]>) => contract is Contract;
1783
+
1784
+ declare const getDryRun: <TApi, TRes>(options: TDryRunOptions<TApi, TRes>) => Promise<TDryRunResult>;
1785
+
1786
+ declare const send: <TApi, TRes>(options: TSendOptions<TApi, TRes>) => Promise<TRes>;
1787
+
1788
+ declare const transferRelayToPara: <TApi, TRes>(options: TRelayToParaOptions<TApi, TRes>) => Promise<TRes>;
1789
+
1790
+ declare const isForeignAsset: (asset: TAsset) => asset is TForeignAsset;
1791
+
1792
+ declare const isSymbolSpecifier: (currencySymbolValue: TCurrencySymbolValue) => currencySymbolValue is TSymbolSpecifier;
1793
+
1794
+ declare const createApiInstanceForNode: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>, node: TNodeDotKsmWithRelayChains) => Promise<TApi>;
1597
1795
 
1598
1796
  declare const createX1Payload: (version: Version, junction: TJunction) => TJunctions;
1599
1797
 
1600
1798
  declare const deepEqual: (obj1: unknown, obj2: unknown) => boolean;
1601
1799
 
1800
+ declare const computeFeeFromDryRun: (dryRun: any, node: TNodeDotKsmWithRelayChains, executionFee: bigint) => bigint;
1801
+
1802
+ declare const computeFeeFromDryRunPjs: (dryRun: any, node: TNodeDotKsmWithRelayChains, executionFee: bigint) => bigint;
1803
+
1804
+ declare const resolveModuleError: (node: TNodeDotKsmWithRelayChains, error: TModuleError) => XTokensError | PolkadotXcmError;
1805
+
1602
1806
  declare const generateAddressMultiLocationV4: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>, address: TAddress) => TXcmVersioned<TMultiLocation>;
1603
1807
 
1604
1808
  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 +1817,6 @@ declare const getFees: (scenario: TScenario) => number;
1613
1817
  */
1614
1818
  declare const getNode: <TApi, TRes, T extends keyof ReturnType<typeof nodes>>(node: T) => ReturnType<typeof nodes<TApi, TRes>>[T];
1615
1819
 
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
1820
  declare const isOverrideMultiLocationSpecifier: (multiLocationSpecifier: TMultiLocationValueWithOverride) => multiLocationSpecifier is TOverrideMultiLocationSpecifier;
1629
1821
 
1630
1822
  declare const resolveParaId: (paraId: number | undefined, destination: TDestination) => number | undefined;
@@ -1646,114 +1838,4 @@ declare const determineRelayChain: (node: TNodeWithRelayChains) => TRelaychain;
1646
1838
  */
1647
1839
  declare const isRelayChain: (node: TNodeWithRelayChains) => node is "Polkadot" | "Kusama";
1648
1840
 
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 };
1841
+ 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 };