@paraspell/sdk 7.1.2 → 7.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -13
- package/dist/index.cjs +10715 -7013
- package/dist/index.d.ts +195 -139
- package/dist/index.mjs +10709 -7012
- package/dist/papi/index.cjs +10642 -6953
- package/dist/papi/index.d.ts +195 -139
- package/dist/papi/index.mjs +10636 -6952
- package/package.json +4 -3
package/dist/papi/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Signer, AbstractProvider } from 'ethers';
|
|
2
2
|
import * as polkadot_api from 'polkadot-api';
|
|
3
3
|
import { PolkadotClient, UnsafeTransaction } from 'polkadot-api';
|
|
4
|
-
import * as _polkadot_apps_config_endpoints_types from '@polkadot/apps-config/endpoints/types';
|
|
5
4
|
|
|
6
5
|
type WithApi<TBase, TApi, TRes> = TBase & {
|
|
7
6
|
api: IPolkadotApi<TApi, TRes>;
|
|
@@ -20,7 +19,9 @@ interface IPolkadotApi<TApi, TRes> {
|
|
|
20
19
|
getBalanceForeignPolkadotXcm(address: string, id?: string): Promise<bigint>;
|
|
21
20
|
getMythosForeignBalance(address: string): Promise<bigint>;
|
|
22
21
|
getAssetHubForeignBalance(address: string, multiLocation: TMultiLocation): Promise<bigint>;
|
|
22
|
+
getForeignAssetsByIdBalance(address: string, assetId: string): Promise<bigint>;
|
|
23
23
|
getBalanceForeignXTokens(address: string, asset: TAsset): Promise<bigint>;
|
|
24
|
+
getBalanceForeignBifrost(address: string, asset: TAsset): Promise<bigint>;
|
|
24
25
|
getBalanceForeignAssetsAccount(address: string, assetId: bigint | number): Promise<bigint>;
|
|
25
26
|
getFromStorage(key: string): Promise<string>;
|
|
26
27
|
clone(): IPolkadotApi<TApi, TRes>;
|
|
@@ -29,14 +30,14 @@ interface IPolkadotApi<TApi, TRes> {
|
|
|
29
30
|
|
|
30
31
|
declare abstract class ParachainNode<TApi, TRes> {
|
|
31
32
|
private readonly _node;
|
|
32
|
-
private readonly
|
|
33
|
+
private readonly _info;
|
|
33
34
|
private readonly _type;
|
|
34
35
|
private readonly _version;
|
|
35
36
|
protected _assetCheckEnabled: boolean;
|
|
36
|
-
constructor(node:
|
|
37
|
-
get
|
|
37
|
+
constructor(node: TNodePolkadotKusama, info: string, type: TRelayChainType, version: Version);
|
|
38
|
+
get info(): string;
|
|
38
39
|
get type(): TRelayChainType;
|
|
39
|
-
get node():
|
|
40
|
+
get node(): TNodePolkadotKusama;
|
|
40
41
|
get version(): Version;
|
|
41
42
|
get assetCheckEnabled(): boolean;
|
|
42
43
|
protected canUseXTokens(_: TSendInternalOptions<TApi, TRes>): boolean;
|
|
@@ -44,7 +45,7 @@ declare abstract class ParachainNode<TApi, TRes> {
|
|
|
44
45
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
45
46
|
getProvider(): string;
|
|
46
47
|
createApiInstance(api: IPolkadotApi<TApi, TRes>): Promise<TApi>;
|
|
47
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version,
|
|
48
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, _asset?: TAsset, overridedMultiLocation?: TMultiLocation | TMultiAsset[]): TCurrencySelectionHeaderArr;
|
|
48
49
|
createPolkadotXcmHeader(scenario: TScenario, version: Version, destination?: TDestination, paraId?: number): TMultiLocationHeader;
|
|
49
50
|
getNativeAssetSymbol(): string;
|
|
50
51
|
}
|
|
@@ -62,16 +63,59 @@ declare class Unique<TApi, TRes> extends ParachainNode<TApi, TRes> implements IX
|
|
|
62
63
|
|
|
63
64
|
declare class Crust<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
64
65
|
constructor();
|
|
65
|
-
getCurrencySelection
|
|
66
|
+
private getCurrencySelection;
|
|
66
67
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
declare class BifrostPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer, IPolkadotXCMTransfer {
|
|
70
71
|
constructor();
|
|
71
|
-
|
|
72
|
+
getCurrencySelection(asset: TAsset): {
|
|
73
|
+
Native: string;
|
|
74
|
+
VToken?: undefined;
|
|
75
|
+
Token?: undefined;
|
|
76
|
+
VSToken2?: undefined;
|
|
77
|
+
VToken2?: undefined;
|
|
78
|
+
Token2?: undefined;
|
|
79
|
+
} | {
|
|
80
|
+
VToken: string;
|
|
81
|
+
Native?: undefined;
|
|
82
|
+
Token?: undefined;
|
|
83
|
+
VSToken2?: undefined;
|
|
84
|
+
VToken2?: undefined;
|
|
85
|
+
Token2?: undefined;
|
|
86
|
+
} | {
|
|
87
|
+
Token: string;
|
|
88
|
+
Native?: undefined;
|
|
89
|
+
VToken?: undefined;
|
|
90
|
+
VSToken2?: undefined;
|
|
91
|
+
VToken2?: undefined;
|
|
92
|
+
Token2?: undefined;
|
|
93
|
+
} | {
|
|
94
|
+
VSToken2: number;
|
|
95
|
+
Native?: undefined;
|
|
96
|
+
VToken?: undefined;
|
|
97
|
+
Token?: undefined;
|
|
98
|
+
VToken2?: undefined;
|
|
99
|
+
Token2?: undefined;
|
|
100
|
+
} | {
|
|
101
|
+
VToken2: number;
|
|
102
|
+
Native?: undefined;
|
|
103
|
+
VToken?: undefined;
|
|
104
|
+
Token?: undefined;
|
|
105
|
+
VSToken2?: undefined;
|
|
106
|
+
Token2?: undefined;
|
|
107
|
+
} | {
|
|
108
|
+
Token2: number;
|
|
109
|
+
Native?: undefined;
|
|
110
|
+
VToken?: undefined;
|
|
111
|
+
Token?: undefined;
|
|
112
|
+
VSToken2?: undefined;
|
|
113
|
+
VToken2?: undefined;
|
|
114
|
+
};
|
|
72
115
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
73
116
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
74
|
-
protected canUseXTokens({
|
|
117
|
+
protected canUseXTokens({ asset, destination }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
118
|
+
getProvider(): string;
|
|
75
119
|
}
|
|
76
120
|
|
|
77
121
|
declare class Bitgreen<TApi, TRes> extends ParachainNode<TApi, TRes> {
|
|
@@ -80,6 +124,7 @@ declare class Bitgreen<TApi, TRes> extends ParachainNode<TApi, TRes> {
|
|
|
80
124
|
|
|
81
125
|
declare class Centrifuge<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
82
126
|
constructor();
|
|
127
|
+
private getCurrencySelection;
|
|
83
128
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
84
129
|
}
|
|
85
130
|
|
|
@@ -89,12 +134,14 @@ declare class ComposableFinance<TApi, TRes> extends ParachainNode<TApi, TRes> im
|
|
|
89
134
|
}
|
|
90
135
|
|
|
91
136
|
declare class Hydration<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer, IPolkadotXCMTransfer {
|
|
137
|
+
private static NATIVE_ASSET_ID;
|
|
92
138
|
constructor();
|
|
93
139
|
transferToEthereum<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
94
140
|
transferToAssetHub<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
95
141
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
96
142
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
97
|
-
protected canUseXTokens({ destination,
|
|
143
|
+
protected canUseXTokens({ destination, asset }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
144
|
+
getProvider(): string;
|
|
98
145
|
}
|
|
99
146
|
|
|
100
147
|
declare class Interlay<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
@@ -109,6 +156,7 @@ declare class Litentry<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
|
109
156
|
|
|
110
157
|
declare class Moonbeam<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
111
158
|
constructor();
|
|
159
|
+
private getCurrencySelection;
|
|
112
160
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
113
161
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
114
162
|
getProvider(): string;
|
|
@@ -121,6 +169,7 @@ declare class Parallel<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
|
121
169
|
|
|
122
170
|
declare class Altair<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
123
171
|
constructor();
|
|
172
|
+
private getCurrencySelection;
|
|
124
173
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
125
174
|
}
|
|
126
175
|
|
|
@@ -144,6 +193,7 @@ declare class Basilisk<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
|
144
193
|
declare class BifrostKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
145
194
|
constructor();
|
|
146
195
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
196
|
+
getProvider(): string;
|
|
147
197
|
}
|
|
148
198
|
|
|
149
199
|
declare class Pioneer<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
@@ -168,6 +218,7 @@ declare class ParallelHeiko<TApi, TRes> extends ParachainNode<TApi, TRes> implem
|
|
|
168
218
|
|
|
169
219
|
declare class Moonriver<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
170
220
|
constructor();
|
|
221
|
+
private getCurrencySelection;
|
|
171
222
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
172
223
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
173
224
|
getProvider(): string;
|
|
@@ -185,7 +236,7 @@ declare class Calamari<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
|
185
236
|
|
|
186
237
|
declare class CrustShadow<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
187
238
|
constructor();
|
|
188
|
-
getCurrencySelection
|
|
239
|
+
private getCurrencySelection;
|
|
189
240
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
190
241
|
}
|
|
191
242
|
|
|
@@ -218,16 +269,17 @@ declare class AssetHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> imp
|
|
|
218
269
|
handleMythosTransfer<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
219
270
|
handleBifrostEthTransfer: <TApi_1, TRes_1>(input: PolkadotXCMTransferInput<TApi_1, TRes_1>) => TTransferReturn<TRes_1>;
|
|
220
271
|
patchInput<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): PolkadotXCMTransferInput<TApi, TRes>;
|
|
272
|
+
private getSection;
|
|
221
273
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
222
274
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
223
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version,
|
|
275
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset, overridedMultiLocation?: TMultiLocation | TMultiAsset[]): TCurrencySelectionHeaderArr;
|
|
224
276
|
}
|
|
225
277
|
|
|
226
278
|
declare class AssetHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
227
279
|
constructor();
|
|
228
280
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
229
281
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
230
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version,
|
|
282
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset, overridedMultiLocation?: TMultiLocation | TMultiAsset[]): TCurrencySelectionHeaderArr;
|
|
231
283
|
}
|
|
232
284
|
|
|
233
285
|
declare class CoretimeKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
@@ -276,7 +328,7 @@ declare class Astar<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPo
|
|
|
276
328
|
constructor();
|
|
277
329
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
278
330
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
279
|
-
protected canUseXTokens({
|
|
331
|
+
protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
280
332
|
}
|
|
281
333
|
|
|
282
334
|
type TMultiAsset = TMultiAssetV3 | TMultiAssetV4;
|
|
@@ -296,14 +348,34 @@ interface TMultiAssetV4 {
|
|
|
296
348
|
}
|
|
297
349
|
|
|
298
350
|
type TCurrency = string | number | bigint;
|
|
351
|
+
type TSymbolSpecifier = {
|
|
352
|
+
type: 'Native' | 'Foreign' | 'ForeignAbstract';
|
|
353
|
+
value: string;
|
|
354
|
+
};
|
|
355
|
+
type TOverrideMultiLocationSpecifier = {
|
|
356
|
+
type: 'Override';
|
|
357
|
+
value: TMultiLocation;
|
|
358
|
+
};
|
|
359
|
+
type TCurrencySymbolValue = string | TSymbolSpecifier;
|
|
299
360
|
type TCurrencySymbol = {
|
|
300
|
-
symbol:
|
|
361
|
+
symbol: TCurrencySymbolValue;
|
|
301
362
|
};
|
|
302
363
|
type TCurrencyCore = TCurrencySymbol | {
|
|
303
364
|
id: TCurrency;
|
|
365
|
+
} | {
|
|
366
|
+
multilocation: TMultiLocationValue;
|
|
367
|
+
};
|
|
368
|
+
type TCurrencyCoreV1 = {
|
|
369
|
+
symbol: string;
|
|
370
|
+
} | {
|
|
371
|
+
id: TCurrency;
|
|
304
372
|
};
|
|
305
|
-
type
|
|
306
|
-
|
|
373
|
+
type TMultiLocationValue = string | TMultiLocation | TJunction[];
|
|
374
|
+
type TMultiLocationValueWithOverride = TMultiLocationValue | TOverrideMultiLocationSpecifier;
|
|
375
|
+
type TCurrencyInput = TCurrencySymbol | {
|
|
376
|
+
id: TCurrency;
|
|
377
|
+
} | {
|
|
378
|
+
multilocation: TMultiLocationValueWithOverride;
|
|
307
379
|
} | {
|
|
308
380
|
multiasset: TMultiAsset[];
|
|
309
381
|
};
|
|
@@ -327,18 +399,18 @@ type TCurrencySelectionHeader = {
|
|
|
327
399
|
type TCurrencySelectionHeaderArr = {
|
|
328
400
|
[key in Version]?: [TCurrencySelection | TCurrencySelectionV4];
|
|
329
401
|
};
|
|
330
|
-
type
|
|
402
|
+
type TXcmForeignAsset = {
|
|
331
403
|
ForeignAsset: string | number | bigint | undefined;
|
|
332
404
|
};
|
|
333
405
|
type TForeignAssetId = {
|
|
334
|
-
ForeignAssetId:
|
|
406
|
+
ForeignAssetId: bigint | undefined;
|
|
335
407
|
};
|
|
336
|
-
type TForeignOrTokenAsset =
|
|
408
|
+
type TForeignOrTokenAsset = TXcmForeignAsset | {
|
|
337
409
|
Token: string | undefined;
|
|
338
410
|
};
|
|
339
|
-
type TForeignOrNativeAsset =
|
|
411
|
+
type TForeignOrNativeAsset = TXcmForeignAsset | 'Native';
|
|
340
412
|
type TXcmAsset = {
|
|
341
|
-
XCM:
|
|
413
|
+
XCM: number | undefined;
|
|
342
414
|
};
|
|
343
415
|
type TMantaAsset = {
|
|
344
416
|
MantaCurrency: bigint | undefined;
|
|
@@ -347,7 +419,7 @@ type TNativeTokenAsset = 'NativeToken';
|
|
|
347
419
|
type TNodleAsset = 'NodleNative';
|
|
348
420
|
type TZeitgeistAsset = 'Ztg';
|
|
349
421
|
type TOtherReserveAsset = {
|
|
350
|
-
OtherReserve: string | undefined;
|
|
422
|
+
OtherReserve: string | bigint | undefined;
|
|
351
423
|
};
|
|
352
424
|
type TSelfReserveAsset = 'SelfReserve';
|
|
353
425
|
type TReserveAsset = TOtherReserveAsset | TSelfReserveAsset;
|
|
@@ -364,7 +436,7 @@ type TBifrostToken = {
|
|
|
364
436
|
} | {
|
|
365
437
|
Token2: number;
|
|
366
438
|
};
|
|
367
|
-
type TXTokensCurrencySelection = TCurrencySelectionHeader | TCurrencySelectionHeaderArr |
|
|
439
|
+
type TXTokensCurrencySelection = TCurrencySelectionHeader | TCurrencySelectionHeaderArr | TXcmForeignAsset | TForeignAssetId | TForeignOrTokenAsset | TXcmAsset | TMantaAsset | TOtherReserveAsset | TBifrostToken | string | bigint | number | undefined;
|
|
368
440
|
|
|
369
441
|
type TPallet = (typeof SUPPORTED_PALLETS)[number];
|
|
370
442
|
interface TPalletMap {
|
|
@@ -373,6 +445,32 @@ interface TPalletMap {
|
|
|
373
445
|
}
|
|
374
446
|
type TPalletJsonMap = Record<TNodePolkadotKusama, TPalletMap>;
|
|
375
447
|
|
|
448
|
+
type AtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
449
|
+
[K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
|
|
450
|
+
}[Keys];
|
|
451
|
+
type TBaseAsset = {
|
|
452
|
+
symbol?: string;
|
|
453
|
+
decimals?: number;
|
|
454
|
+
manuallyAdded?: boolean;
|
|
455
|
+
alias?: string;
|
|
456
|
+
};
|
|
457
|
+
type TNativeAsset = TBaseAsset & {
|
|
458
|
+
symbol: string;
|
|
459
|
+
};
|
|
460
|
+
type TForeignAsset = TBaseAsset & AtLeastOne<{
|
|
461
|
+
assetId?: string;
|
|
462
|
+
multiLocation?: object;
|
|
463
|
+
xcmInterior?: object[];
|
|
464
|
+
}>;
|
|
465
|
+
type TAsset = TNativeAsset | TForeignAsset;
|
|
466
|
+
type TNodeAssets = {
|
|
467
|
+
relayChainAssetSymbol: TRelayChainSymbol;
|
|
468
|
+
nativeAssetSymbol: string;
|
|
469
|
+
nativeAssets: TNativeAsset[];
|
|
470
|
+
otherAssets: TForeignAsset[];
|
|
471
|
+
};
|
|
472
|
+
type TAssetJsonMap = Record<TNodeWithRelayChains, TNodeAssets>;
|
|
473
|
+
|
|
376
474
|
type HexString$1 = `0x${string}`;
|
|
377
475
|
type PolkadotXCMTransferInput<TApi, TRes> = {
|
|
378
476
|
api: IPolkadotApi<TApi, TRes>;
|
|
@@ -382,8 +480,7 @@ type PolkadotXCMTransferInput<TApi, TRes> = {
|
|
|
382
480
|
address: TAddress;
|
|
383
481
|
currencySelection: TCurrencySelectionHeaderArr;
|
|
384
482
|
scenario: TScenario;
|
|
385
|
-
|
|
386
|
-
currencyId: string | undefined;
|
|
483
|
+
asset: TAsset;
|
|
387
484
|
destination?: TDestination;
|
|
388
485
|
paraIdTo?: number;
|
|
389
486
|
feeAsset?: TCurrency;
|
|
@@ -394,13 +491,12 @@ type PolkadotXCMTransferInput<TApi, TRes> = {
|
|
|
394
491
|
};
|
|
395
492
|
type XTokensTransferInput<TApi, TRes> = {
|
|
396
493
|
api: IPolkadotApi<TApi, TRes>;
|
|
397
|
-
|
|
398
|
-
currencyID: string | undefined;
|
|
494
|
+
asset: TAsset;
|
|
399
495
|
amount: string;
|
|
400
496
|
addressSelection: TMultiLocationHeader;
|
|
401
497
|
fees: number;
|
|
402
498
|
scenario: TScenario;
|
|
403
|
-
origin:
|
|
499
|
+
origin: TNodePolkadotKusama;
|
|
404
500
|
destination?: TDestination;
|
|
405
501
|
paraIdTo?: number;
|
|
406
502
|
overridedCurrencyMultiLocation?: TMultiLocation | TMultiAsset[];
|
|
@@ -409,11 +505,10 @@ type XTokensTransferInput<TApi, TRes> = {
|
|
|
409
505
|
};
|
|
410
506
|
type XTransferTransferInput<TApi, TRes> = {
|
|
411
507
|
api: IPolkadotApi<TApi, TRes>;
|
|
412
|
-
|
|
413
|
-
currencyID: string | undefined;
|
|
508
|
+
asset: TAsset;
|
|
414
509
|
amount: string;
|
|
415
510
|
recipientAddress: TAddress;
|
|
416
|
-
origin:
|
|
511
|
+
origin: TNodePolkadotKusama;
|
|
417
512
|
paraId?: number;
|
|
418
513
|
destination?: TDestination;
|
|
419
514
|
overridedCurrencyMultiLocation?: TMultiLocation | TMultiAsset[];
|
|
@@ -450,6 +545,7 @@ declare enum Parents {
|
|
|
450
545
|
type TAmount = string | number | bigint;
|
|
451
546
|
type TAddress = string | TMultiLocation;
|
|
452
547
|
type TDestination = TNode | TMultiLocation;
|
|
548
|
+
type TRelayToParaDestination = TNodePolkadotKusama | TMultiLocation;
|
|
453
549
|
type TSendBaseOptions<TApi, TRes> = {
|
|
454
550
|
/**
|
|
455
551
|
* The destination address. A SS58 or H160 format.
|
|
@@ -487,7 +583,7 @@ type TSendOptions<TApi, TRes> = WithApi<TSendBaseOptions<TApi, TRes>, TApi, TRes
|
|
|
487
583
|
/**
|
|
488
584
|
* The origin node
|
|
489
585
|
*/
|
|
490
|
-
origin:
|
|
586
|
+
origin: TNodePolkadotKusama;
|
|
491
587
|
/**
|
|
492
588
|
* The currency to transfer. Either ID, symbol, multi-location, or multi-asset
|
|
493
589
|
*/
|
|
@@ -499,8 +595,7 @@ type TSendOptions<TApi, TRes> = WithApi<TSendBaseOptions<TApi, TRes>, TApi, TRes
|
|
|
499
595
|
};
|
|
500
596
|
type TSendInternalOptions<TApi, TRes> = TSendBaseOptions<TApi, TRes> & {
|
|
501
597
|
api: IPolkadotApi<TApi, TRes>;
|
|
502
|
-
|
|
503
|
-
currencyId: string | undefined;
|
|
598
|
+
asset: TAsset;
|
|
504
599
|
amount: string;
|
|
505
600
|
overridedCurrencyMultiLocation?: TMultiLocation | TMultiAsset[];
|
|
506
601
|
serializedApiCallEnabled?: boolean;
|
|
@@ -509,7 +604,7 @@ type TRelayToParaBaseOptions<TApi, TRes> = {
|
|
|
509
604
|
/**
|
|
510
605
|
* The destination node or multi-location
|
|
511
606
|
*/
|
|
512
|
-
destination:
|
|
607
|
+
destination: TRelayToParaDestination;
|
|
513
608
|
/**
|
|
514
609
|
* The destination address. A SS58 or H160 format.
|
|
515
610
|
*/
|
|
@@ -552,7 +647,7 @@ type CheckKeepAliveOptions<TApi, TRes> = {
|
|
|
552
647
|
amount: string;
|
|
553
648
|
originNode?: TNodePolkadotKusama;
|
|
554
649
|
destApi: IPolkadotApi<TApi, TRes>;
|
|
555
|
-
|
|
650
|
+
asset: TAsset;
|
|
556
651
|
destNode?: TNodePolkadotKusama;
|
|
557
652
|
};
|
|
558
653
|
type TDestWeight = {
|
|
@@ -626,29 +721,6 @@ interface Junctions {
|
|
|
626
721
|
X6?: [TJunction, TJunction, TJunction, TJunction, TJunction, TJunction];
|
|
627
722
|
X7?: [TJunction, TJunction, TJunction, TJunction, TJunction, TJunction, TJunction];
|
|
628
723
|
X8?: [TJunction, TJunction, TJunction, TJunction, TJunction, TJunction, TJunction, TJunction];
|
|
629
|
-
X9?: [
|
|
630
|
-
TJunction,
|
|
631
|
-
TJunction,
|
|
632
|
-
TJunction,
|
|
633
|
-
TJunction,
|
|
634
|
-
TJunction,
|
|
635
|
-
TJunction,
|
|
636
|
-
TJunction,
|
|
637
|
-
TJunction,
|
|
638
|
-
TJunction
|
|
639
|
-
];
|
|
640
|
-
X10?: [
|
|
641
|
-
TJunction,
|
|
642
|
-
TJunction,
|
|
643
|
-
TJunction,
|
|
644
|
-
TJunction,
|
|
645
|
-
TJunction,
|
|
646
|
-
TJunction,
|
|
647
|
-
TJunction,
|
|
648
|
-
TJunction,
|
|
649
|
-
TJunction,
|
|
650
|
-
TJunction
|
|
651
|
-
];
|
|
652
724
|
}
|
|
653
725
|
interface TMultiLocation {
|
|
654
726
|
parents: StringOrNumber;
|
|
@@ -660,9 +732,10 @@ type TMultiLocationHeader = {
|
|
|
660
732
|
|
|
661
733
|
declare class Darwinia<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
662
734
|
constructor();
|
|
735
|
+
private getCurrencySelection;
|
|
663
736
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
664
737
|
transferRelayToPara(): TSerializedApiCallV2;
|
|
665
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version,
|
|
738
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, _asset?: TAsset, overridedMultiLocation?: TMultiLocation): TCurrencySelectionHeaderArr;
|
|
666
739
|
getProvider(): string;
|
|
667
740
|
}
|
|
668
741
|
|
|
@@ -670,7 +743,7 @@ declare class Crab<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPol
|
|
|
670
743
|
constructor();
|
|
671
744
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
672
745
|
transferRelayToPara(): TSerializedApiCallV2;
|
|
673
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version,
|
|
746
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): TCurrencySelectionHeaderArr;
|
|
674
747
|
}
|
|
675
748
|
|
|
676
749
|
declare class Quartz<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
@@ -683,7 +756,7 @@ declare class Shiden<TApi, TRes> extends ParachainNode<TApi, TRes> implements IP
|
|
|
683
756
|
constructor();
|
|
684
757
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
685
758
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
686
|
-
protected canUseXTokens({
|
|
759
|
+
protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
687
760
|
}
|
|
688
761
|
|
|
689
762
|
declare class Manta<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
@@ -691,9 +764,9 @@ declare class Manta<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXT
|
|
|
691
764
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
692
765
|
}
|
|
693
766
|
|
|
694
|
-
declare class Nodle<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
767
|
+
declare class Nodle<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
695
768
|
constructor();
|
|
696
|
-
|
|
769
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
697
770
|
transferRelayToPara(): TSerializedApiCallV2;
|
|
698
771
|
}
|
|
699
772
|
|
|
@@ -711,10 +784,12 @@ declare class Pendulum<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
|
711
784
|
declare class Polkadex<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
712
785
|
constructor();
|
|
713
786
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
787
|
+
getProvider(): string;
|
|
714
788
|
}
|
|
715
789
|
|
|
716
790
|
declare class Zeitgeist<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
717
791
|
constructor();
|
|
792
|
+
private getCurrencySelection;
|
|
718
793
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
719
794
|
}
|
|
720
795
|
|
|
@@ -722,7 +797,7 @@ declare class Collectives<TApi, TRes> extends ParachainNode<TApi, TRes> implemen
|
|
|
722
797
|
constructor();
|
|
723
798
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
724
799
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
725
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version,
|
|
800
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): TCurrencySelectionHeaderArr;
|
|
726
801
|
}
|
|
727
802
|
|
|
728
803
|
declare class Khala<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTransferTransfer {
|
|
@@ -766,10 +841,6 @@ declare class BridgeHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> impl
|
|
|
766
841
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
767
842
|
}
|
|
768
843
|
|
|
769
|
-
declare class Ethereum<TApi, TRes> extends ParachainNode<TApi, TRes> {
|
|
770
|
-
constructor();
|
|
771
|
-
}
|
|
772
|
-
|
|
773
844
|
declare class Mythos<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
774
845
|
constructor();
|
|
775
846
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
@@ -783,8 +854,12 @@ declare class Peaq<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTo
|
|
|
783
854
|
getProvider(): string;
|
|
784
855
|
}
|
|
785
856
|
|
|
786
|
-
declare class Polimec<TApi, TRes> extends ParachainNode<TApi, TRes> {
|
|
857
|
+
declare class Polimec<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
787
858
|
constructor();
|
|
859
|
+
private getAssetMultiLocation;
|
|
860
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
861
|
+
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
862
|
+
getProvider(): string;
|
|
788
863
|
}
|
|
789
864
|
|
|
790
865
|
/**
|
|
@@ -861,7 +936,6 @@ declare const nodes: <TApi, TRes>() => {
|
|
|
861
936
|
Subsocial: Subsocial<TApi, TRes>;
|
|
862
937
|
KiltSpiritnet: KiltSpiritnet<TApi, TRes>;
|
|
863
938
|
Curio: Curio<TApi, TRes>;
|
|
864
|
-
Ethereum: Ethereum<TApi, TRes>;
|
|
865
939
|
Mythos: Mythos<TApi, TRes>;
|
|
866
940
|
Peaq: Peaq<TApi, TRes>;
|
|
867
941
|
Polimec: Polimec<TApi, TRes>;
|
|
@@ -879,29 +953,6 @@ type TNodeDotKsmWithRelayChains = Exclude<TNodeWithRelayChains, 'Ethereum'>;
|
|
|
879
953
|
type TRelayChainType = 'polkadot' | 'kusama';
|
|
880
954
|
type TRelayChainSymbol = 'DOT' | 'KSM';
|
|
881
955
|
|
|
882
|
-
type TAsset = TNativeAssetDetails | TAssetDetails;
|
|
883
|
-
type TAssetDetails = {
|
|
884
|
-
assetId: string;
|
|
885
|
-
symbol?: string;
|
|
886
|
-
decimals?: number;
|
|
887
|
-
manuallyAdded?: boolean;
|
|
888
|
-
};
|
|
889
|
-
type TNativeAssetDetails = {
|
|
890
|
-
assetId?: string;
|
|
891
|
-
symbol: string;
|
|
892
|
-
decimals: number;
|
|
893
|
-
manuallyAdded?: boolean;
|
|
894
|
-
};
|
|
895
|
-
type TNodeAssets = {
|
|
896
|
-
paraId?: number;
|
|
897
|
-
relayChainAssetSymbol: TRelayChainSymbol;
|
|
898
|
-
nativeAssetSymbol: string;
|
|
899
|
-
nativeAssets: TNativeAssetDetails[];
|
|
900
|
-
otherAssets: TAssetDetails[];
|
|
901
|
-
multiLocations?: TMultiLocation[];
|
|
902
|
-
};
|
|
903
|
-
type TAssetJsonMap = Record<TNodeWithRelayChains, TNodeAssets>;
|
|
904
|
-
|
|
905
956
|
type TEdJsonMap = Record<TNodeDotKsmWithRelayChains, string | null>;
|
|
906
957
|
|
|
907
958
|
/**
|
|
@@ -919,7 +970,7 @@ type TEvmBuilderOptions = {
|
|
|
919
970
|
/**
|
|
920
971
|
* The currency to transfer. Symbol or ID.
|
|
921
972
|
*/
|
|
922
|
-
currency:
|
|
973
|
+
currency: TCurrencyCoreV1;
|
|
923
974
|
/**
|
|
924
975
|
* The Polkadot destination address.
|
|
925
976
|
*/
|
|
@@ -1010,6 +1061,18 @@ type TGetTransferInfoOptionsBase = {
|
|
|
1010
1061
|
};
|
|
1011
1062
|
type TGetTransferInfoOptions<TApi, TRes> = WithApi<TGetTransferInfoOptionsBase, TApi, TRes>;
|
|
1012
1063
|
|
|
1064
|
+
type TProviderEntry = {
|
|
1065
|
+
name: string;
|
|
1066
|
+
endpoint: string;
|
|
1067
|
+
};
|
|
1068
|
+
type TNodeConfig = {
|
|
1069
|
+
name: string;
|
|
1070
|
+
info: string;
|
|
1071
|
+
paraId: number;
|
|
1072
|
+
providers: TProviderEntry[];
|
|
1073
|
+
};
|
|
1074
|
+
type TNodeConfigMap = Record<TNodeDotKsmWithRelayChains, TNodeConfig>;
|
|
1075
|
+
|
|
1013
1076
|
declare const sendSerializedApiCall: <TApi, TRes>(options: TSendOptions<TApi, TRes>) => Promise<TSerializedApiCall>;
|
|
1014
1077
|
declare const send: <TApi, TRes>(options: TSendOptions<TApi, TRes>) => Promise<TRes>;
|
|
1015
1078
|
declare const transferRelayToParaCommon: <TApi, TRes>(options: TRelayToParaOptions<TApi, TRes>, serializedApiCallEnabled?: boolean) => Promise<TTransferReturn<TRes>>;
|
|
@@ -1143,14 +1206,14 @@ declare const getRelayChainSymbol: (node: TNodeWithRelayChains) => TRelayChainSy
|
|
|
1143
1206
|
* @param node - The node for which to get native assets.
|
|
1144
1207
|
* @returns An array of native asset details.
|
|
1145
1208
|
*/
|
|
1146
|
-
declare const getNativeAssets: (node: TNode) =>
|
|
1209
|
+
declare const getNativeAssets: (node: TNode) => TNativeAsset[];
|
|
1147
1210
|
/**
|
|
1148
1211
|
* Retrieves the list of other (non-native) assets for a specified node.
|
|
1149
1212
|
*
|
|
1150
1213
|
* @param node - The node for which to get other assets.
|
|
1151
1214
|
* @returns An array of other asset details.
|
|
1152
1215
|
*/
|
|
1153
|
-
declare const getOtherAssets: (node: TNode) =>
|
|
1216
|
+
declare const getOtherAssets: (node: TNode) => TForeignAsset[];
|
|
1154
1217
|
/**
|
|
1155
1218
|
* Retrieves the complete list of assets for a specified node, including relay chain asset, native, and other assets.
|
|
1156
1219
|
*
|
|
@@ -1188,13 +1251,6 @@ declare const hasSupportForAsset: (node: TNode, symbol: string) => boolean;
|
|
|
1188
1251
|
* @returns The number of decimals if the asset is found; otherwise, null.
|
|
1189
1252
|
*/
|
|
1190
1253
|
declare const getAssetDecimals: (node: TNodeWithRelayChains, symbol: string) => number | null;
|
|
1191
|
-
/**
|
|
1192
|
-
* Retrieves the parachain ID for a specified node.
|
|
1193
|
-
*
|
|
1194
|
-
* @param node - The node for which to get the paraId.
|
|
1195
|
-
* @returns The parachain ID of the node.
|
|
1196
|
-
*/
|
|
1197
|
-
declare const getParaId: (node: TNodeDotKsmWithRelayChains) => number;
|
|
1198
1254
|
/**
|
|
1199
1255
|
* Retrieves the node name corresponding to a specified parachain ID.
|
|
1200
1256
|
*
|
|
@@ -1211,6 +1267,12 @@ declare const getTNode: (paraId: number, ecosystem: TRelayChainType) => TNodeDot
|
|
|
1211
1267
|
*/
|
|
1212
1268
|
declare const getExistentialDeposit: (node: TNodeDotKsmWithRelayChains) => string | null;
|
|
1213
1269
|
|
|
1270
|
+
declare const Native: (symbol: string) => TSymbolSpecifier;
|
|
1271
|
+
declare const Foreign: (symbol: string) => TSymbolSpecifier;
|
|
1272
|
+
declare const ForeignAbstract: (symbol: string) => TSymbolSpecifier;
|
|
1273
|
+
|
|
1274
|
+
declare const Override: (multiLocation: TMultiLocation) => TOverrideMultiLocationSpecifier;
|
|
1275
|
+
|
|
1214
1276
|
/**
|
|
1215
1277
|
* Retrieves the list of assets that are supported for transfers between two specified nodes.
|
|
1216
1278
|
*
|
|
@@ -1264,6 +1326,10 @@ declare const getOriginFeeDetails: (options: TGetOriginFeeDetailsOptionsBase & {
|
|
|
1264
1326
|
api?: TPapiApiOrUrl;
|
|
1265
1327
|
}) => Promise<TOriginFeeDetails>;
|
|
1266
1328
|
|
|
1329
|
+
declare const assets_Foreign: typeof Foreign;
|
|
1330
|
+
declare const assets_ForeignAbstract: typeof ForeignAbstract;
|
|
1331
|
+
declare const assets_Native: typeof Native;
|
|
1332
|
+
declare const assets_Override: typeof Override;
|
|
1267
1333
|
declare const assets_claimAssets: typeof claimAssets;
|
|
1268
1334
|
declare const assets_getAllAssetsSymbols: typeof getAllAssetsSymbols;
|
|
1269
1335
|
declare const assets_getAssetBalance: typeof getAssetBalance;
|
|
@@ -1278,14 +1344,13 @@ declare const assets_getNativeAssetSymbol: typeof getNativeAssetSymbol;
|
|
|
1278
1344
|
declare const assets_getNativeAssets: typeof getNativeAssets;
|
|
1279
1345
|
declare const assets_getOriginFeeDetails: typeof getOriginFeeDetails;
|
|
1280
1346
|
declare const assets_getOtherAssets: typeof getOtherAssets;
|
|
1281
|
-
declare const assets_getParaId: typeof getParaId;
|
|
1282
1347
|
declare const assets_getRelayChainSymbol: typeof getRelayChainSymbol;
|
|
1283
1348
|
declare const assets_getSupportedAssets: typeof getSupportedAssets;
|
|
1284
1349
|
declare const assets_getTNode: typeof getTNode;
|
|
1285
1350
|
declare const assets_getTransferInfo: typeof getTransferInfo;
|
|
1286
1351
|
declare const assets_hasSupportForAsset: typeof hasSupportForAsset;
|
|
1287
1352
|
declare namespace assets {
|
|
1288
|
-
export { assets_claimAssets as claimAssets, assets_getAllAssetsSymbols as getAllAssetsSymbols, assets_getAssetBalance as getAssetBalance, assets_getAssetDecimals as getAssetDecimals, assets_getAssetId as getAssetId, assets_getAssets as getAssets, assets_getAssetsObject as getAssetsObject, assets_getBalanceForeign as getBalanceForeign, assets_getBalanceNative as getBalanceNative, assets_getExistentialDeposit as getExistentialDeposit, assets_getNativeAssetSymbol as getNativeAssetSymbol, assets_getNativeAssets as getNativeAssets, assets_getOriginFeeDetails as getOriginFeeDetails, assets_getOtherAssets as getOtherAssets,
|
|
1353
|
+
export { assets_Foreign as Foreign, assets_ForeignAbstract as ForeignAbstract, assets_Native as Native, assets_Override as Override, assets_claimAssets as claimAssets, assets_getAllAssetsSymbols as getAllAssetsSymbols, assets_getAssetBalance as getAssetBalance, assets_getAssetDecimals as getAssetDecimals, assets_getAssetId as getAssetId, assets_getAssets as getAssets, assets_getAssetsObject as getAssetsObject, assets_getBalanceForeign as getBalanceForeign, assets_getBalanceNative as getBalanceNative, assets_getExistentialDeposit as getExistentialDeposit, assets_getNativeAssetSymbol as getNativeAssetSymbol, assets_getNativeAssets as getNativeAssets, assets_getOriginFeeDetails as getOriginFeeDetails, assets_getOtherAssets as getOtherAssets, assets_getRelayChainSymbol as getRelayChainSymbol, assets_getSupportedAssets as getSupportedAssets, assets_getTNode as getTNode, assets_getTransferInfo as getTransferInfo, assets_hasSupportForAsset as hasSupportForAsset };
|
|
1289
1354
|
}
|
|
1290
1355
|
|
|
1291
1356
|
/**
|
|
@@ -1328,7 +1393,7 @@ declare class ToGeneralBuilder<TApi, TRes> {
|
|
|
1328
1393
|
private readonly from;
|
|
1329
1394
|
private readonly to;
|
|
1330
1395
|
private readonly paraIdTo?;
|
|
1331
|
-
constructor(api: IPolkadotApi<TApi, TRes>, from:
|
|
1396
|
+
constructor(api: IPolkadotApi<TApi, TRes>, from: TNodePolkadotKusama, to: TDestination, batchManager: BatchTransactionManager<TApi, TRes>, paraIdTo?: number);
|
|
1332
1397
|
/**
|
|
1333
1398
|
* Specifies the currency to be used in the transaction. Symbol, ID, multi-location or multi-asset.
|
|
1334
1399
|
*
|
|
@@ -1345,7 +1410,7 @@ declare class FromGeneralBuilder<TApi, TRes> {
|
|
|
1345
1410
|
private readonly api;
|
|
1346
1411
|
private readonly from;
|
|
1347
1412
|
private _feeAsset?;
|
|
1348
|
-
constructor(api: IPolkadotApi<TApi, TRes>, from:
|
|
1413
|
+
constructor(api: IPolkadotApi<TApi, TRes>, from: TNodePolkadotKusama, batchManager: BatchTransactionManager<TApi, TRes>);
|
|
1349
1414
|
/**
|
|
1350
1415
|
* Specifies the destination node for the transaction.
|
|
1351
1416
|
*
|
|
@@ -1465,7 +1530,7 @@ declare class EvmBuilderClass {
|
|
|
1465
1530
|
* @param currency - The currency to be transferred.
|
|
1466
1531
|
* @returns An instance of EvmBuilder
|
|
1467
1532
|
*/
|
|
1468
|
-
currency(currency:
|
|
1533
|
+
currency(currency: TCurrencyCoreV1): this;
|
|
1469
1534
|
/**
|
|
1470
1535
|
* Specifies the recipient address on Polkadot.
|
|
1471
1536
|
*
|
|
@@ -1507,30 +1572,15 @@ declare const GeneralBuilder: {
|
|
|
1507
1572
|
new (batchManager: BatchTransactionManager<polkadot_api.PolkadotClient, TPapiTransaction>, api: IPolkadotApi<polkadot_api.PolkadotClient, TPapiTransaction>, _from?: TNode | undefined, _to?: TDestination | undefined): GeneralBuilder$1<polkadot_api.PolkadotClient, TPapiTransaction>;
|
|
1508
1573
|
};
|
|
1509
1574
|
|
|
1510
|
-
declare const
|
|
1575
|
+
declare const isForeignAsset: (asset: TAsset) => asset is TForeignAsset;
|
|
1576
|
+
|
|
1577
|
+
declare const createApiInstanceForNode: (node: TNodeDotKsmWithRelayChains) => Promise<polkadot_api.PolkadotClient>;
|
|
1511
1578
|
declare const createPapiApiCall: <TArgs extends Record<string, unknown>, TResult>(apiCall: (options: TArgs & {
|
|
1512
1579
|
api: IPolkadotApi<TPapiApi, TPapiTransaction>;
|
|
1513
1580
|
}) => Promise<TResult>) => (options: TArgs & {
|
|
1514
1581
|
api?: TPapiApiOrUrl;
|
|
1515
1582
|
}) => Promise<TResult>;
|
|
1516
1583
|
|
|
1517
|
-
/**
|
|
1518
|
-
* Retrieves the WS provider URL for a specified node.
|
|
1519
|
-
*
|
|
1520
|
-
* @param node - The node for which to get the WS provider URL.
|
|
1521
|
-
* @returns The WS provider URL as a string.
|
|
1522
|
-
*/
|
|
1523
|
-
declare const getNodeProvider: (node: TNodeWithRelayChains) => string;
|
|
1524
|
-
|
|
1525
|
-
/**
|
|
1526
|
-
* Retrieves all WS provider URLs for a specified Polkadot or Kusama node.
|
|
1527
|
-
*
|
|
1528
|
-
* @param node - The Polkadot or Kusama node.
|
|
1529
|
-
* @returns An array of WS provider URLs.
|
|
1530
|
-
* @throws Error if the node does not have any providers.
|
|
1531
|
-
*/
|
|
1532
|
-
declare const getAllNodeProviders: (node: TNodePolkadotKusama) => string[];
|
|
1533
|
-
|
|
1534
1584
|
/**
|
|
1535
1585
|
* Retrieves the node instance for a given node.
|
|
1536
1586
|
*
|
|
@@ -1539,14 +1589,6 @@ declare const getAllNodeProviders: (node: TNodePolkadotKusama) => string[];
|
|
|
1539
1589
|
*/
|
|
1540
1590
|
declare const getNode: <TApi, TRes, T extends keyof ReturnType<typeof nodes>>(node: T) => ReturnType<typeof nodes<TApi, TRes>>[T];
|
|
1541
1591
|
|
|
1542
|
-
/**
|
|
1543
|
-
* Retrieves the endpoint option for a given Polkadot or Kusama node.
|
|
1544
|
-
*
|
|
1545
|
-
* @param node - The Polkadot or Kusama node for which to get the endpoint option.
|
|
1546
|
-
* @returns The endpoint option object if found; otherwise, undefined.
|
|
1547
|
-
*/
|
|
1548
|
-
declare const getNodeEndpointOption: (node: TNodePolkadotKusama) => _polkadot_apps_config_endpoints_types.EndpointOption | undefined;
|
|
1549
|
-
|
|
1550
1592
|
/**
|
|
1551
1593
|
* Determines the relay chain for a given node.
|
|
1552
1594
|
*
|
|
@@ -1560,7 +1602,7 @@ declare const determineRelayChain: (node: TNodeWithRelayChains) => TNodeDotKsmWi
|
|
|
1560
1602
|
* @param node - The node to check.
|
|
1561
1603
|
* @returns True if the node is 'Polkadot' or 'Kusama'; otherwise, false.
|
|
1562
1604
|
*/
|
|
1563
|
-
declare const isRelayChain: (node: TNodeWithRelayChains) =>
|
|
1605
|
+
declare const isRelayChain: (node: TNodeWithRelayChains) => node is "Polkadot" | "Kusama";
|
|
1564
1606
|
|
|
1565
1607
|
/**
|
|
1566
1608
|
* Used to inform user, that currency they wish to use is not registered on either origin or destination Parachain
|
|
@@ -1633,7 +1675,7 @@ declare class DuplicateAssetError extends Error {
|
|
|
1633
1675
|
*
|
|
1634
1676
|
* @param symbol - The symbol of the asset causing the duplication error.
|
|
1635
1677
|
*/
|
|
1636
|
-
constructor(
|
|
1678
|
+
constructor(msg: string);
|
|
1637
1679
|
}
|
|
1638
1680
|
|
|
1639
1681
|
/**
|
|
@@ -1648,4 +1690,18 @@ declare class DuplicateAssetIdError extends Error {
|
|
|
1648
1690
|
constructor(id: string);
|
|
1649
1691
|
}
|
|
1650
1692
|
|
|
1651
|
-
|
|
1693
|
+
declare const getNodeConfig: (node: TNodeDotKsmWithRelayChains) => TNodeConfig;
|
|
1694
|
+
|
|
1695
|
+
declare const getNodeProviders: (node: TNodeDotKsmWithRelayChains) => string[];
|
|
1696
|
+
|
|
1697
|
+
declare const getNodeProvider: (node: TNodeDotKsmWithRelayChains) => string;
|
|
1698
|
+
|
|
1699
|
+
/**
|
|
1700
|
+
* Retrieves the parachain ID for a specified node.
|
|
1701
|
+
*
|
|
1702
|
+
* @param node - The node for which to get the paraId.
|
|
1703
|
+
* @returns The parachain ID of the node.
|
|
1704
|
+
*/
|
|
1705
|
+
declare const getParaId: (node: TNodeDotKsmWithRelayChains) => number;
|
|
1706
|
+
|
|
1707
|
+
export { BatchMode, Builder, type CheckKeepAliveOptions, DuplicateAssetError, DuplicateAssetIdError, EvmBuilder, Foreign, ForeignAbstract, GeneralBuilder, type HexString$1 as HexString, type IPolkadotXCMTransfer, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidCurrencyError, type JunctionParachain, type JunctionType, type Junctions, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Native, NoXCMSupportImplementedError, NodeNotSupportedError, Override, Parents, type PolkadotXCMTransferInput, type PolkadotXcmSection, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TAsset, type TAssetJsonMap, type TBatchOptions, type TBifrostToken, type TCurrency, type TCurrencyCore, type TCurrencyCoreV1, type TCurrencyInput, type TCurrencySelection, type TCurrencySelectionHeader, type TCurrencySelectionHeaderArr, type TCurrencySelectionV4, type TCurrencySymbol, type TCurrencySymbolValue, type TDestWeight, type TDestination, type TEdJsonMap, type TEvmBuilderOptions, type TForeignAsset, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TGetTransferInfoOptions, type TGetTransferInfoOptionsBase, type TJunction, type TMantaAsset, type TMultiAsset, type TMultiAssetV3, type TMultiAssetV4, type TMultiLocation, type TMultiLocationHeader, 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 TPalletJsonMap, type TPalletMap, type TPapiApi, type TPapiApiOrUrl, type TPapiTransaction, type TProviderEntry, type TRelayChainSymbol, type TRelayChainType, type TRelayToParaDestination, type TRelayToParaOptions, type TReserveAsset, type TScenario, type TSelfReserveAsset, type TSendBaseOptions, type TSendInternalOptions, type TSendOptions, type TSerializeEthTransferOptions, type TSerializedApiCall, type TSerializedApiCallV2, type TSerializedEthTransfer, type TSymbolSpecifier, type TTransferInfo, type TTransferReturn, type TVersionClaimAssets, type TXTokensCurrencySelection, type TXcmAsset, type TXcmForeignAsset, type TZeitgeistAsset, type UseKeepAliveFinalBuilder, Version, type XTokensSection, type XTokensTransferInput, type XTransferSection, type XTransferTransferInput, assets, buildEthTransferOptions, claimAssets, createApiInstanceForNode, createPapiApiCall, determineRelayChain, getAllAssetsSymbols, getAssetBalance, getAssetDecimals, getAssetId, getAssets, getAssetsObject, getBalanceForeign, getBalanceNative, getDefaultPallet, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getNode, getNodeConfig, getNodeProvider, getNodeProviders, getOriginFeeDetails, getOtherAssets, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getTNode, getTransferInfo, hasSupportForAsset, isForeignAsset, isRelayChain, send, sendSerializedApiCall, transferRelayToPara, transferRelayToParaCommon, transferRelayToParaSerializedApiCall, index as xcmPallet };
|