@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/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { SubmittableExtrinsic } from '@polkadot/api/types';
|
|
|
2
2
|
import * as _polkadot_api from '@polkadot/api';
|
|
3
3
|
import { ApiPromise } from '@polkadot/api';
|
|
4
4
|
import { Signer, AbstractProvider } from 'ethers';
|
|
5
|
-
import * as _polkadot_apps_config_endpoints_types from '@polkadot/apps-config/endpoints/types';
|
|
6
5
|
|
|
7
6
|
type WithApi<TBase, TApi, TRes> = TBase & {
|
|
8
7
|
api: IPolkadotApi<TApi, TRes>;
|
|
@@ -21,7 +20,9 @@ interface IPolkadotApi<TApi, TRes> {
|
|
|
21
20
|
getBalanceForeignPolkadotXcm(address: string, id?: string): Promise<bigint>;
|
|
22
21
|
getMythosForeignBalance(address: string): Promise<bigint>;
|
|
23
22
|
getAssetHubForeignBalance(address: string, multiLocation: TMultiLocation): Promise<bigint>;
|
|
23
|
+
getForeignAssetsByIdBalance(address: string, assetId: string): Promise<bigint>;
|
|
24
24
|
getBalanceForeignXTokens(address: string, asset: TAsset): Promise<bigint>;
|
|
25
|
+
getBalanceForeignBifrost(address: string, asset: TAsset): Promise<bigint>;
|
|
25
26
|
getBalanceForeignAssetsAccount(address: string, assetId: bigint | number): Promise<bigint>;
|
|
26
27
|
getFromStorage(key: string): Promise<string>;
|
|
27
28
|
clone(): IPolkadotApi<TApi, TRes>;
|
|
@@ -30,14 +31,14 @@ interface IPolkadotApi<TApi, TRes> {
|
|
|
30
31
|
|
|
31
32
|
declare abstract class ParachainNode<TApi, TRes> {
|
|
32
33
|
private readonly _node;
|
|
33
|
-
private readonly
|
|
34
|
+
private readonly _info;
|
|
34
35
|
private readonly _type;
|
|
35
36
|
private readonly _version;
|
|
36
37
|
protected _assetCheckEnabled: boolean;
|
|
37
|
-
constructor(node:
|
|
38
|
-
get
|
|
38
|
+
constructor(node: TNodePolkadotKusama, info: string, type: TRelayChainType, version: Version);
|
|
39
|
+
get info(): string;
|
|
39
40
|
get type(): TRelayChainType;
|
|
40
|
-
get node():
|
|
41
|
+
get node(): TNodePolkadotKusama;
|
|
41
42
|
get version(): Version;
|
|
42
43
|
get assetCheckEnabled(): boolean;
|
|
43
44
|
protected canUseXTokens(_: TSendInternalOptions<TApi, TRes>): boolean;
|
|
@@ -45,7 +46,7 @@ declare abstract class ParachainNode<TApi, TRes> {
|
|
|
45
46
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
46
47
|
getProvider(): string;
|
|
47
48
|
createApiInstance(api: IPolkadotApi<TApi, TRes>): Promise<TApi>;
|
|
48
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version,
|
|
49
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, _asset?: TAsset, overridedMultiLocation?: TMultiLocation | TMultiAsset[]): TCurrencySelectionHeaderArr;
|
|
49
50
|
createPolkadotXcmHeader(scenario: TScenario, version: Version, destination?: TDestination, paraId?: number): TMultiLocationHeader;
|
|
50
51
|
getNativeAssetSymbol(): string;
|
|
51
52
|
}
|
|
@@ -63,16 +64,59 @@ declare class Unique<TApi, TRes> extends ParachainNode<TApi, TRes> implements IX
|
|
|
63
64
|
|
|
64
65
|
declare class Crust<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
65
66
|
constructor();
|
|
66
|
-
getCurrencySelection
|
|
67
|
+
private getCurrencySelection;
|
|
67
68
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
declare class BifrostPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer, IPolkadotXCMTransfer {
|
|
71
72
|
constructor();
|
|
72
|
-
|
|
73
|
+
getCurrencySelection(asset: TAsset): {
|
|
74
|
+
Native: string;
|
|
75
|
+
VToken?: undefined;
|
|
76
|
+
Token?: undefined;
|
|
77
|
+
VSToken2?: undefined;
|
|
78
|
+
VToken2?: undefined;
|
|
79
|
+
Token2?: undefined;
|
|
80
|
+
} | {
|
|
81
|
+
VToken: string;
|
|
82
|
+
Native?: undefined;
|
|
83
|
+
Token?: undefined;
|
|
84
|
+
VSToken2?: undefined;
|
|
85
|
+
VToken2?: undefined;
|
|
86
|
+
Token2?: undefined;
|
|
87
|
+
} | {
|
|
88
|
+
Token: string;
|
|
89
|
+
Native?: undefined;
|
|
90
|
+
VToken?: undefined;
|
|
91
|
+
VSToken2?: undefined;
|
|
92
|
+
VToken2?: undefined;
|
|
93
|
+
Token2?: undefined;
|
|
94
|
+
} | {
|
|
95
|
+
VSToken2: number;
|
|
96
|
+
Native?: undefined;
|
|
97
|
+
VToken?: undefined;
|
|
98
|
+
Token?: undefined;
|
|
99
|
+
VToken2?: undefined;
|
|
100
|
+
Token2?: undefined;
|
|
101
|
+
} | {
|
|
102
|
+
VToken2: number;
|
|
103
|
+
Native?: undefined;
|
|
104
|
+
VToken?: undefined;
|
|
105
|
+
Token?: undefined;
|
|
106
|
+
VSToken2?: undefined;
|
|
107
|
+
Token2?: undefined;
|
|
108
|
+
} | {
|
|
109
|
+
Token2: number;
|
|
110
|
+
Native?: undefined;
|
|
111
|
+
VToken?: undefined;
|
|
112
|
+
Token?: undefined;
|
|
113
|
+
VSToken2?: undefined;
|
|
114
|
+
VToken2?: undefined;
|
|
115
|
+
};
|
|
73
116
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
74
117
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
75
|
-
protected canUseXTokens({
|
|
118
|
+
protected canUseXTokens({ asset, destination }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
119
|
+
getProvider(): string;
|
|
76
120
|
}
|
|
77
121
|
|
|
78
122
|
declare class Bitgreen<TApi, TRes> extends ParachainNode<TApi, TRes> {
|
|
@@ -81,6 +125,7 @@ declare class Bitgreen<TApi, TRes> extends ParachainNode<TApi, TRes> {
|
|
|
81
125
|
|
|
82
126
|
declare class Centrifuge<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
83
127
|
constructor();
|
|
128
|
+
private getCurrencySelection;
|
|
84
129
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
85
130
|
}
|
|
86
131
|
|
|
@@ -90,12 +135,14 @@ declare class ComposableFinance<TApi, TRes> extends ParachainNode<TApi, TRes> im
|
|
|
90
135
|
}
|
|
91
136
|
|
|
92
137
|
declare class Hydration<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer, IPolkadotXCMTransfer {
|
|
138
|
+
private static NATIVE_ASSET_ID;
|
|
93
139
|
constructor();
|
|
94
140
|
transferToEthereum<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
95
141
|
transferToAssetHub<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
96
142
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
97
143
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
98
|
-
protected canUseXTokens({ destination,
|
|
144
|
+
protected canUseXTokens({ destination, asset }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
145
|
+
getProvider(): string;
|
|
99
146
|
}
|
|
100
147
|
|
|
101
148
|
declare class Interlay<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
@@ -110,6 +157,7 @@ declare class Litentry<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
|
110
157
|
|
|
111
158
|
declare class Moonbeam<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
112
159
|
constructor();
|
|
160
|
+
private getCurrencySelection;
|
|
113
161
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
114
162
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
115
163
|
getProvider(): string;
|
|
@@ -122,6 +170,7 @@ declare class Parallel<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
|
122
170
|
|
|
123
171
|
declare class Altair<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
124
172
|
constructor();
|
|
173
|
+
private getCurrencySelection;
|
|
125
174
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
126
175
|
}
|
|
127
176
|
|
|
@@ -145,6 +194,7 @@ declare class Basilisk<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
|
145
194
|
declare class BifrostKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
146
195
|
constructor();
|
|
147
196
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
197
|
+
getProvider(): string;
|
|
148
198
|
}
|
|
149
199
|
|
|
150
200
|
declare class Pioneer<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
@@ -169,6 +219,7 @@ declare class ParallelHeiko<TApi, TRes> extends ParachainNode<TApi, TRes> implem
|
|
|
169
219
|
|
|
170
220
|
declare class Moonriver<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
171
221
|
constructor();
|
|
222
|
+
private getCurrencySelection;
|
|
172
223
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
173
224
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
174
225
|
getProvider(): string;
|
|
@@ -186,7 +237,7 @@ declare class Calamari<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
|
186
237
|
|
|
187
238
|
declare class CrustShadow<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
188
239
|
constructor();
|
|
189
|
-
getCurrencySelection
|
|
240
|
+
private getCurrencySelection;
|
|
190
241
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
191
242
|
}
|
|
192
243
|
|
|
@@ -219,16 +270,17 @@ declare class AssetHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> imp
|
|
|
219
270
|
handleMythosTransfer<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
220
271
|
handleBifrostEthTransfer: <TApi_1, TRes_1>(input: PolkadotXCMTransferInput<TApi_1, TRes_1>) => TTransferReturn<TRes_1>;
|
|
221
272
|
patchInput<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): PolkadotXCMTransferInput<TApi, TRes>;
|
|
273
|
+
private getSection;
|
|
222
274
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
223
275
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
224
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version,
|
|
276
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset, overridedMultiLocation?: TMultiLocation | TMultiAsset[]): TCurrencySelectionHeaderArr;
|
|
225
277
|
}
|
|
226
278
|
|
|
227
279
|
declare class AssetHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
228
280
|
constructor();
|
|
229
281
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
230
282
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
231
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version,
|
|
283
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset, overridedMultiLocation?: TMultiLocation | TMultiAsset[]): TCurrencySelectionHeaderArr;
|
|
232
284
|
}
|
|
233
285
|
|
|
234
286
|
declare class CoretimeKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
@@ -277,7 +329,7 @@ declare class Astar<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPo
|
|
|
277
329
|
constructor();
|
|
278
330
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
279
331
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
280
|
-
protected canUseXTokens({
|
|
332
|
+
protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
281
333
|
}
|
|
282
334
|
|
|
283
335
|
type TMultiAsset = TMultiAssetV3 | TMultiAssetV4;
|
|
@@ -297,14 +349,34 @@ interface TMultiAssetV4 {
|
|
|
297
349
|
}
|
|
298
350
|
|
|
299
351
|
type TCurrency = string | number | bigint;
|
|
352
|
+
type TSymbolSpecifier = {
|
|
353
|
+
type: 'Native' | 'Foreign' | 'ForeignAbstract';
|
|
354
|
+
value: string;
|
|
355
|
+
};
|
|
356
|
+
type TOverrideMultiLocationSpecifier = {
|
|
357
|
+
type: 'Override';
|
|
358
|
+
value: TMultiLocation;
|
|
359
|
+
};
|
|
360
|
+
type TCurrencySymbolValue = string | TSymbolSpecifier;
|
|
300
361
|
type TCurrencySymbol = {
|
|
301
|
-
symbol:
|
|
362
|
+
symbol: TCurrencySymbolValue;
|
|
302
363
|
};
|
|
303
364
|
type TCurrencyCore = TCurrencySymbol | {
|
|
304
365
|
id: TCurrency;
|
|
366
|
+
} | {
|
|
367
|
+
multilocation: TMultiLocationValue;
|
|
368
|
+
};
|
|
369
|
+
type TCurrencyCoreV1 = {
|
|
370
|
+
symbol: string;
|
|
371
|
+
} | {
|
|
372
|
+
id: TCurrency;
|
|
305
373
|
};
|
|
306
|
-
type
|
|
307
|
-
|
|
374
|
+
type TMultiLocationValue = string | TMultiLocation | TJunction[];
|
|
375
|
+
type TMultiLocationValueWithOverride = TMultiLocationValue | TOverrideMultiLocationSpecifier;
|
|
376
|
+
type TCurrencyInput = TCurrencySymbol | {
|
|
377
|
+
id: TCurrency;
|
|
378
|
+
} | {
|
|
379
|
+
multilocation: TMultiLocationValueWithOverride;
|
|
308
380
|
} | {
|
|
309
381
|
multiasset: TMultiAsset[];
|
|
310
382
|
};
|
|
@@ -328,18 +400,18 @@ type TCurrencySelectionHeader = {
|
|
|
328
400
|
type TCurrencySelectionHeaderArr = {
|
|
329
401
|
[key in Version]?: [TCurrencySelection | TCurrencySelectionV4];
|
|
330
402
|
};
|
|
331
|
-
type
|
|
403
|
+
type TXcmForeignAsset = {
|
|
332
404
|
ForeignAsset: string | number | bigint | undefined;
|
|
333
405
|
};
|
|
334
406
|
type TForeignAssetId = {
|
|
335
|
-
ForeignAssetId:
|
|
407
|
+
ForeignAssetId: bigint | undefined;
|
|
336
408
|
};
|
|
337
|
-
type TForeignOrTokenAsset =
|
|
409
|
+
type TForeignOrTokenAsset = TXcmForeignAsset | {
|
|
338
410
|
Token: string | undefined;
|
|
339
411
|
};
|
|
340
|
-
type TForeignOrNativeAsset =
|
|
412
|
+
type TForeignOrNativeAsset = TXcmForeignAsset | 'Native';
|
|
341
413
|
type TXcmAsset = {
|
|
342
|
-
XCM:
|
|
414
|
+
XCM: number | undefined;
|
|
343
415
|
};
|
|
344
416
|
type TMantaAsset = {
|
|
345
417
|
MantaCurrency: bigint | undefined;
|
|
@@ -348,7 +420,7 @@ type TNativeTokenAsset = 'NativeToken';
|
|
|
348
420
|
type TNodleAsset = 'NodleNative';
|
|
349
421
|
type TZeitgeistAsset = 'Ztg';
|
|
350
422
|
type TOtherReserveAsset = {
|
|
351
|
-
OtherReserve: string | undefined;
|
|
423
|
+
OtherReserve: string | bigint | undefined;
|
|
352
424
|
};
|
|
353
425
|
type TSelfReserveAsset = 'SelfReserve';
|
|
354
426
|
type TReserveAsset = TOtherReserveAsset | TSelfReserveAsset;
|
|
@@ -365,7 +437,7 @@ type TBifrostToken = {
|
|
|
365
437
|
} | {
|
|
366
438
|
Token2: number;
|
|
367
439
|
};
|
|
368
|
-
type TXTokensCurrencySelection = TCurrencySelectionHeader | TCurrencySelectionHeaderArr |
|
|
440
|
+
type TXTokensCurrencySelection = TCurrencySelectionHeader | TCurrencySelectionHeaderArr | TXcmForeignAsset | TForeignAssetId | TForeignOrTokenAsset | TXcmAsset | TMantaAsset | TOtherReserveAsset | TBifrostToken | string | bigint | number | undefined;
|
|
369
441
|
|
|
370
442
|
type TPallet = (typeof SUPPORTED_PALLETS)[number];
|
|
371
443
|
interface TPalletMap {
|
|
@@ -374,6 +446,32 @@ interface TPalletMap {
|
|
|
374
446
|
}
|
|
375
447
|
type TPalletJsonMap = Record<TNodePolkadotKusama, TPalletMap>;
|
|
376
448
|
|
|
449
|
+
type AtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
450
|
+
[K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
|
|
451
|
+
}[Keys];
|
|
452
|
+
type TBaseAsset = {
|
|
453
|
+
symbol?: string;
|
|
454
|
+
decimals?: number;
|
|
455
|
+
manuallyAdded?: boolean;
|
|
456
|
+
alias?: string;
|
|
457
|
+
};
|
|
458
|
+
type TNativeAsset = TBaseAsset & {
|
|
459
|
+
symbol: string;
|
|
460
|
+
};
|
|
461
|
+
type TForeignAsset = TBaseAsset & AtLeastOne<{
|
|
462
|
+
assetId?: string;
|
|
463
|
+
multiLocation?: object;
|
|
464
|
+
xcmInterior?: object[];
|
|
465
|
+
}>;
|
|
466
|
+
type TAsset = TNativeAsset | TForeignAsset;
|
|
467
|
+
type TNodeAssets = {
|
|
468
|
+
relayChainAssetSymbol: TRelayChainSymbol;
|
|
469
|
+
nativeAssetSymbol: string;
|
|
470
|
+
nativeAssets: TNativeAsset[];
|
|
471
|
+
otherAssets: TForeignAsset[];
|
|
472
|
+
};
|
|
473
|
+
type TAssetJsonMap = Record<TNodeWithRelayChains, TNodeAssets>;
|
|
474
|
+
|
|
377
475
|
type HexString$1 = `0x${string}`;
|
|
378
476
|
type PolkadotXCMTransferInput<TApi, TRes> = {
|
|
379
477
|
api: IPolkadotApi<TApi, TRes>;
|
|
@@ -383,8 +481,7 @@ type PolkadotXCMTransferInput<TApi, TRes> = {
|
|
|
383
481
|
address: TAddress;
|
|
384
482
|
currencySelection: TCurrencySelectionHeaderArr;
|
|
385
483
|
scenario: TScenario;
|
|
386
|
-
|
|
387
|
-
currencyId: string | undefined;
|
|
484
|
+
asset: TAsset;
|
|
388
485
|
destination?: TDestination;
|
|
389
486
|
paraIdTo?: number;
|
|
390
487
|
feeAsset?: TCurrency;
|
|
@@ -395,13 +492,12 @@ type PolkadotXCMTransferInput<TApi, TRes> = {
|
|
|
395
492
|
};
|
|
396
493
|
type XTokensTransferInput<TApi, TRes> = {
|
|
397
494
|
api: IPolkadotApi<TApi, TRes>;
|
|
398
|
-
|
|
399
|
-
currencyID: string | undefined;
|
|
495
|
+
asset: TAsset;
|
|
400
496
|
amount: string;
|
|
401
497
|
addressSelection: TMultiLocationHeader;
|
|
402
498
|
fees: number;
|
|
403
499
|
scenario: TScenario;
|
|
404
|
-
origin:
|
|
500
|
+
origin: TNodePolkadotKusama;
|
|
405
501
|
destination?: TDestination;
|
|
406
502
|
paraIdTo?: number;
|
|
407
503
|
overridedCurrencyMultiLocation?: TMultiLocation | TMultiAsset[];
|
|
@@ -410,11 +506,10 @@ type XTokensTransferInput<TApi, TRes> = {
|
|
|
410
506
|
};
|
|
411
507
|
type XTransferTransferInput<TApi, TRes> = {
|
|
412
508
|
api: IPolkadotApi<TApi, TRes>;
|
|
413
|
-
|
|
414
|
-
currencyID: string | undefined;
|
|
509
|
+
asset: TAsset;
|
|
415
510
|
amount: string;
|
|
416
511
|
recipientAddress: TAddress;
|
|
417
|
-
origin:
|
|
512
|
+
origin: TNodePolkadotKusama;
|
|
418
513
|
paraId?: number;
|
|
419
514
|
destination?: TDestination;
|
|
420
515
|
overridedCurrencyMultiLocation?: TMultiLocation | TMultiAsset[];
|
|
@@ -451,6 +546,7 @@ declare enum Parents {
|
|
|
451
546
|
type TAmount = string | number | bigint;
|
|
452
547
|
type TAddress = string | TMultiLocation;
|
|
453
548
|
type TDestination = TNode | TMultiLocation;
|
|
549
|
+
type TRelayToParaDestination = TNodePolkadotKusama | TMultiLocation;
|
|
454
550
|
type TSendBaseOptions<TApi, TRes> = {
|
|
455
551
|
/**
|
|
456
552
|
* The destination address. A SS58 or H160 format.
|
|
@@ -488,7 +584,7 @@ type TSendOptions<TApi, TRes> = WithApi<TSendBaseOptions<TApi, TRes>, TApi, TRes
|
|
|
488
584
|
/**
|
|
489
585
|
* The origin node
|
|
490
586
|
*/
|
|
491
|
-
origin:
|
|
587
|
+
origin: TNodePolkadotKusama;
|
|
492
588
|
/**
|
|
493
589
|
* The currency to transfer. Either ID, symbol, multi-location, or multi-asset
|
|
494
590
|
*/
|
|
@@ -500,8 +596,7 @@ type TSendOptions<TApi, TRes> = WithApi<TSendBaseOptions<TApi, TRes>, TApi, TRes
|
|
|
500
596
|
};
|
|
501
597
|
type TSendInternalOptions<TApi, TRes> = TSendBaseOptions<TApi, TRes> & {
|
|
502
598
|
api: IPolkadotApi<TApi, TRes>;
|
|
503
|
-
|
|
504
|
-
currencyId: string | undefined;
|
|
599
|
+
asset: TAsset;
|
|
505
600
|
amount: string;
|
|
506
601
|
overridedCurrencyMultiLocation?: TMultiLocation | TMultiAsset[];
|
|
507
602
|
serializedApiCallEnabled?: boolean;
|
|
@@ -510,7 +605,7 @@ type TRelayToParaBaseOptions<TApi, TRes> = {
|
|
|
510
605
|
/**
|
|
511
606
|
* The destination node or multi-location
|
|
512
607
|
*/
|
|
513
|
-
destination:
|
|
608
|
+
destination: TRelayToParaDestination;
|
|
514
609
|
/**
|
|
515
610
|
* The destination address. A SS58 or H160 format.
|
|
516
611
|
*/
|
|
@@ -553,7 +648,7 @@ type CheckKeepAliveOptions<TApi, TRes> = {
|
|
|
553
648
|
amount: string;
|
|
554
649
|
originNode?: TNodePolkadotKusama;
|
|
555
650
|
destApi: IPolkadotApi<TApi, TRes>;
|
|
556
|
-
|
|
651
|
+
asset: TAsset;
|
|
557
652
|
destNode?: TNodePolkadotKusama;
|
|
558
653
|
};
|
|
559
654
|
type TDestWeight = {
|
|
@@ -627,29 +722,6 @@ interface Junctions {
|
|
|
627
722
|
X6?: [TJunction, TJunction, TJunction, TJunction, TJunction, TJunction];
|
|
628
723
|
X7?: [TJunction, TJunction, TJunction, TJunction, TJunction, TJunction, TJunction];
|
|
629
724
|
X8?: [TJunction, TJunction, TJunction, TJunction, TJunction, TJunction, TJunction, TJunction];
|
|
630
|
-
X9?: [
|
|
631
|
-
TJunction,
|
|
632
|
-
TJunction,
|
|
633
|
-
TJunction,
|
|
634
|
-
TJunction,
|
|
635
|
-
TJunction,
|
|
636
|
-
TJunction,
|
|
637
|
-
TJunction,
|
|
638
|
-
TJunction,
|
|
639
|
-
TJunction
|
|
640
|
-
];
|
|
641
|
-
X10?: [
|
|
642
|
-
TJunction,
|
|
643
|
-
TJunction,
|
|
644
|
-
TJunction,
|
|
645
|
-
TJunction,
|
|
646
|
-
TJunction,
|
|
647
|
-
TJunction,
|
|
648
|
-
TJunction,
|
|
649
|
-
TJunction,
|
|
650
|
-
TJunction,
|
|
651
|
-
TJunction
|
|
652
|
-
];
|
|
653
725
|
}
|
|
654
726
|
interface TMultiLocation {
|
|
655
727
|
parents: StringOrNumber;
|
|
@@ -661,9 +733,10 @@ type TMultiLocationHeader = {
|
|
|
661
733
|
|
|
662
734
|
declare class Darwinia<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
663
735
|
constructor();
|
|
736
|
+
private getCurrencySelection;
|
|
664
737
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
665
738
|
transferRelayToPara(): TSerializedApiCallV2;
|
|
666
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version,
|
|
739
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, _asset?: TAsset, overridedMultiLocation?: TMultiLocation): TCurrencySelectionHeaderArr;
|
|
667
740
|
getProvider(): string;
|
|
668
741
|
}
|
|
669
742
|
|
|
@@ -671,7 +744,7 @@ declare class Crab<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPol
|
|
|
671
744
|
constructor();
|
|
672
745
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
673
746
|
transferRelayToPara(): TSerializedApiCallV2;
|
|
674
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version,
|
|
747
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): TCurrencySelectionHeaderArr;
|
|
675
748
|
}
|
|
676
749
|
|
|
677
750
|
declare class Quartz<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
@@ -684,7 +757,7 @@ declare class Shiden<TApi, TRes> extends ParachainNode<TApi, TRes> implements IP
|
|
|
684
757
|
constructor();
|
|
685
758
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
686
759
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
687
|
-
protected canUseXTokens({
|
|
760
|
+
protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
688
761
|
}
|
|
689
762
|
|
|
690
763
|
declare class Manta<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
@@ -692,9 +765,9 @@ declare class Manta<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXT
|
|
|
692
765
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
693
766
|
}
|
|
694
767
|
|
|
695
|
-
declare class Nodle<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
768
|
+
declare class Nodle<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
696
769
|
constructor();
|
|
697
|
-
|
|
770
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
698
771
|
transferRelayToPara(): TSerializedApiCallV2;
|
|
699
772
|
}
|
|
700
773
|
|
|
@@ -712,10 +785,12 @@ declare class Pendulum<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
|
712
785
|
declare class Polkadex<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
713
786
|
constructor();
|
|
714
787
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
788
|
+
getProvider(): string;
|
|
715
789
|
}
|
|
716
790
|
|
|
717
791
|
declare class Zeitgeist<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
718
792
|
constructor();
|
|
793
|
+
private getCurrencySelection;
|
|
719
794
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
720
795
|
}
|
|
721
796
|
|
|
@@ -723,7 +798,7 @@ declare class Collectives<TApi, TRes> extends ParachainNode<TApi, TRes> implemen
|
|
|
723
798
|
constructor();
|
|
724
799
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
725
800
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
726
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version,
|
|
801
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): TCurrencySelectionHeaderArr;
|
|
727
802
|
}
|
|
728
803
|
|
|
729
804
|
declare class Khala<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTransferTransfer {
|
|
@@ -767,10 +842,6 @@ declare class BridgeHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> impl
|
|
|
767
842
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
768
843
|
}
|
|
769
844
|
|
|
770
|
-
declare class Ethereum<TApi, TRes> extends ParachainNode<TApi, TRes> {
|
|
771
|
-
constructor();
|
|
772
|
-
}
|
|
773
|
-
|
|
774
845
|
declare class Mythos<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
775
846
|
constructor();
|
|
776
847
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
@@ -784,8 +855,12 @@ declare class Peaq<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTo
|
|
|
784
855
|
getProvider(): string;
|
|
785
856
|
}
|
|
786
857
|
|
|
787
|
-
declare class Polimec<TApi, TRes> extends ParachainNode<TApi, TRes> {
|
|
858
|
+
declare class Polimec<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
788
859
|
constructor();
|
|
860
|
+
private getAssetMultiLocation;
|
|
861
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
862
|
+
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
863
|
+
getProvider(): string;
|
|
789
864
|
}
|
|
790
865
|
|
|
791
866
|
/**
|
|
@@ -862,7 +937,6 @@ declare const nodes: <TApi, TRes>() => {
|
|
|
862
937
|
Subsocial: Subsocial<TApi, TRes>;
|
|
863
938
|
KiltSpiritnet: KiltSpiritnet<TApi, TRes>;
|
|
864
939
|
Curio: Curio<TApi, TRes>;
|
|
865
|
-
Ethereum: Ethereum<TApi, TRes>;
|
|
866
940
|
Mythos: Mythos<TApi, TRes>;
|
|
867
941
|
Peaq: Peaq<TApi, TRes>;
|
|
868
942
|
Polimec: Polimec<TApi, TRes>;
|
|
@@ -880,29 +954,6 @@ type TNodeDotKsmWithRelayChains = Exclude<TNodeWithRelayChains, 'Ethereum'>;
|
|
|
880
954
|
type TRelayChainType = 'polkadot' | 'kusama';
|
|
881
955
|
type TRelayChainSymbol = 'DOT' | 'KSM';
|
|
882
956
|
|
|
883
|
-
type TAsset = TNativeAssetDetails | TAssetDetails;
|
|
884
|
-
type TAssetDetails = {
|
|
885
|
-
assetId: string;
|
|
886
|
-
symbol?: string;
|
|
887
|
-
decimals?: number;
|
|
888
|
-
manuallyAdded?: boolean;
|
|
889
|
-
};
|
|
890
|
-
type TNativeAssetDetails = {
|
|
891
|
-
assetId?: string;
|
|
892
|
-
symbol: string;
|
|
893
|
-
decimals: number;
|
|
894
|
-
manuallyAdded?: boolean;
|
|
895
|
-
};
|
|
896
|
-
type TNodeAssets = {
|
|
897
|
-
paraId?: number;
|
|
898
|
-
relayChainAssetSymbol: TRelayChainSymbol;
|
|
899
|
-
nativeAssetSymbol: string;
|
|
900
|
-
nativeAssets: TNativeAssetDetails[];
|
|
901
|
-
otherAssets: TAssetDetails[];
|
|
902
|
-
multiLocations?: TMultiLocation[];
|
|
903
|
-
};
|
|
904
|
-
type TAssetJsonMap = Record<TNodeWithRelayChains, TNodeAssets>;
|
|
905
|
-
|
|
906
957
|
type TEdJsonMap = Record<TNodeDotKsmWithRelayChains, string | null>;
|
|
907
958
|
|
|
908
959
|
/**
|
|
@@ -920,7 +971,7 @@ type TEvmBuilderOptions = {
|
|
|
920
971
|
/**
|
|
921
972
|
* The currency to transfer. Symbol or ID.
|
|
922
973
|
*/
|
|
923
|
-
currency:
|
|
974
|
+
currency: TCurrencyCoreV1;
|
|
924
975
|
/**
|
|
925
976
|
* The Polkadot destination address.
|
|
926
977
|
*/
|
|
@@ -1011,6 +1062,18 @@ type TGetTransferInfoOptionsBase = {
|
|
|
1011
1062
|
};
|
|
1012
1063
|
type TGetTransferInfoOptions<TApi, TRes> = WithApi<TGetTransferInfoOptionsBase, TApi, TRes>;
|
|
1013
1064
|
|
|
1065
|
+
type TProviderEntry = {
|
|
1066
|
+
name: string;
|
|
1067
|
+
endpoint: string;
|
|
1068
|
+
};
|
|
1069
|
+
type TNodeConfig = {
|
|
1070
|
+
name: string;
|
|
1071
|
+
info: string;
|
|
1072
|
+
paraId: number;
|
|
1073
|
+
providers: TProviderEntry[];
|
|
1074
|
+
};
|
|
1075
|
+
type TNodeConfigMap = Record<TNodeDotKsmWithRelayChains, TNodeConfig>;
|
|
1076
|
+
|
|
1014
1077
|
type TPjsApi = ApiPromise;
|
|
1015
1078
|
type TPjsApiOrUrl = TApiOrUrl<TPjsApi>;
|
|
1016
1079
|
type Extrinsic = SubmittableExtrinsic<'promise'>;
|
|
@@ -1166,14 +1229,14 @@ declare const getRelayChainSymbol: (node: TNodeWithRelayChains) => TRelayChainSy
|
|
|
1166
1229
|
* @param node - The node for which to get native assets.
|
|
1167
1230
|
* @returns An array of native asset details.
|
|
1168
1231
|
*/
|
|
1169
|
-
declare const getNativeAssets: (node: TNode) =>
|
|
1232
|
+
declare const getNativeAssets: (node: TNode) => TNativeAsset[];
|
|
1170
1233
|
/**
|
|
1171
1234
|
* Retrieves the list of other (non-native) assets for a specified node.
|
|
1172
1235
|
*
|
|
1173
1236
|
* @param node - The node for which to get other assets.
|
|
1174
1237
|
* @returns An array of other asset details.
|
|
1175
1238
|
*/
|
|
1176
|
-
declare const getOtherAssets: (node: TNode) =>
|
|
1239
|
+
declare const getOtherAssets: (node: TNode) => TForeignAsset[];
|
|
1177
1240
|
/**
|
|
1178
1241
|
* Retrieves the complete list of assets for a specified node, including relay chain asset, native, and other assets.
|
|
1179
1242
|
*
|
|
@@ -1211,13 +1274,6 @@ declare const hasSupportForAsset: (node: TNode, symbol: string) => boolean;
|
|
|
1211
1274
|
* @returns The number of decimals if the asset is found; otherwise, null.
|
|
1212
1275
|
*/
|
|
1213
1276
|
declare const getAssetDecimals: (node: TNodeWithRelayChains, symbol: string) => number | null;
|
|
1214
|
-
/**
|
|
1215
|
-
* Retrieves the parachain ID for a specified node.
|
|
1216
|
-
*
|
|
1217
|
-
* @param node - The node for which to get the paraId.
|
|
1218
|
-
* @returns The parachain ID of the node.
|
|
1219
|
-
*/
|
|
1220
|
-
declare const getParaId: (node: TNodeDotKsmWithRelayChains) => number;
|
|
1221
1277
|
/**
|
|
1222
1278
|
* Retrieves the node name corresponding to a specified parachain ID.
|
|
1223
1279
|
*
|
|
@@ -1234,6 +1290,12 @@ declare const getTNode: (paraId: number, ecosystem: TRelayChainType) => TNodeDot
|
|
|
1234
1290
|
*/
|
|
1235
1291
|
declare const getExistentialDeposit: (node: TNodeDotKsmWithRelayChains) => string | null;
|
|
1236
1292
|
|
|
1293
|
+
declare const Native: (symbol: string) => TSymbolSpecifier;
|
|
1294
|
+
declare const Foreign: (symbol: string) => TSymbolSpecifier;
|
|
1295
|
+
declare const ForeignAbstract: (symbol: string) => TSymbolSpecifier;
|
|
1296
|
+
|
|
1297
|
+
declare const Override: (multiLocation: TMultiLocation) => TOverrideMultiLocationSpecifier;
|
|
1298
|
+
|
|
1237
1299
|
/**
|
|
1238
1300
|
* Retrieves the list of assets that are supported for transfers between two specified nodes.
|
|
1239
1301
|
*
|
|
@@ -1287,6 +1349,10 @@ declare const getOriginFeeDetails: (options: TGetOriginFeeDetailsOptionsBase & {
|
|
|
1287
1349
|
api?: TPjsApiOrUrl;
|
|
1288
1350
|
}) => Promise<TOriginFeeDetails>;
|
|
1289
1351
|
|
|
1352
|
+
declare const assets_Foreign: typeof Foreign;
|
|
1353
|
+
declare const assets_ForeignAbstract: typeof ForeignAbstract;
|
|
1354
|
+
declare const assets_Native: typeof Native;
|
|
1355
|
+
declare const assets_Override: typeof Override;
|
|
1290
1356
|
declare const assets_claimAssets: typeof claimAssets;
|
|
1291
1357
|
declare const assets_getAllAssetsSymbols: typeof getAllAssetsSymbols;
|
|
1292
1358
|
declare const assets_getAssetBalance: typeof getAssetBalance;
|
|
@@ -1301,14 +1367,13 @@ declare const assets_getNativeAssetSymbol: typeof getNativeAssetSymbol;
|
|
|
1301
1367
|
declare const assets_getNativeAssets: typeof getNativeAssets;
|
|
1302
1368
|
declare const assets_getOriginFeeDetails: typeof getOriginFeeDetails;
|
|
1303
1369
|
declare const assets_getOtherAssets: typeof getOtherAssets;
|
|
1304
|
-
declare const assets_getParaId: typeof getParaId;
|
|
1305
1370
|
declare const assets_getRelayChainSymbol: typeof getRelayChainSymbol;
|
|
1306
1371
|
declare const assets_getSupportedAssets: typeof getSupportedAssets;
|
|
1307
1372
|
declare const assets_getTNode: typeof getTNode;
|
|
1308
1373
|
declare const assets_getTransferInfo: typeof getTransferInfo;
|
|
1309
1374
|
declare const assets_hasSupportForAsset: typeof hasSupportForAsset;
|
|
1310
1375
|
declare namespace assets {
|
|
1311
|
-
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,
|
|
1376
|
+
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 };
|
|
1312
1377
|
}
|
|
1313
1378
|
|
|
1314
1379
|
/**
|
|
@@ -1351,7 +1416,7 @@ declare class ToGeneralBuilder<TApi, TRes> {
|
|
|
1351
1416
|
private readonly from;
|
|
1352
1417
|
private readonly to;
|
|
1353
1418
|
private readonly paraIdTo?;
|
|
1354
|
-
constructor(api: IPolkadotApi<TApi, TRes>, from:
|
|
1419
|
+
constructor(api: IPolkadotApi<TApi, TRes>, from: TNodePolkadotKusama, to: TDestination, batchManager: BatchTransactionManager<TApi, TRes>, paraIdTo?: number);
|
|
1355
1420
|
/**
|
|
1356
1421
|
* Specifies the currency to be used in the transaction. Symbol, ID, multi-location or multi-asset.
|
|
1357
1422
|
*
|
|
@@ -1368,7 +1433,7 @@ declare class FromGeneralBuilder<TApi, TRes> {
|
|
|
1368
1433
|
private readonly api;
|
|
1369
1434
|
private readonly from;
|
|
1370
1435
|
private _feeAsset?;
|
|
1371
|
-
constructor(api: IPolkadotApi<TApi, TRes>, from:
|
|
1436
|
+
constructor(api: IPolkadotApi<TApi, TRes>, from: TNodePolkadotKusama, batchManager: BatchTransactionManager<TApi, TRes>);
|
|
1372
1437
|
/**
|
|
1373
1438
|
* Specifies the destination node for the transaction.
|
|
1374
1439
|
*
|
|
@@ -1488,7 +1553,7 @@ declare class EvmBuilderClass {
|
|
|
1488
1553
|
* @param currency - The currency to be transferred.
|
|
1489
1554
|
* @returns An instance of EvmBuilder
|
|
1490
1555
|
*/
|
|
1491
|
-
currency(currency:
|
|
1556
|
+
currency(currency: TCurrencyCoreV1): this;
|
|
1492
1557
|
/**
|
|
1493
1558
|
* Specifies the recipient address on Polkadot.
|
|
1494
1559
|
*
|
|
@@ -1530,30 +1595,15 @@ declare const GeneralBuilder: {
|
|
|
1530
1595
|
new (batchManager: BatchTransactionManager<_polkadot_api.ApiPromise, Extrinsic>, api: IPolkadotApi<_polkadot_api.ApiPromise, Extrinsic>, _from?: TNode | undefined, _to?: TDestination | undefined): GeneralBuilder$1<_polkadot_api.ApiPromise, Extrinsic>;
|
|
1531
1596
|
};
|
|
1532
1597
|
|
|
1533
|
-
declare const
|
|
1598
|
+
declare const isForeignAsset: (asset: TAsset) => asset is TForeignAsset;
|
|
1599
|
+
|
|
1600
|
+
declare const createApiInstanceForNode: (node: TNodeDotKsmWithRelayChains) => Promise<_polkadot_api.ApiPromise>;
|
|
1534
1601
|
declare const createPolkadotJsApiCall: <TArgs extends Record<string, unknown>, TResult>(apiCall: (options: TArgs & {
|
|
1535
1602
|
api: IPolkadotApi<TPjsApi, Extrinsic>;
|
|
1536
1603
|
}) => Promise<TResult>) => (options: TArgs & {
|
|
1537
1604
|
api?: TPjsApiOrUrl;
|
|
1538
1605
|
}) => Promise<TResult>;
|
|
1539
1606
|
|
|
1540
|
-
/**
|
|
1541
|
-
* Retrieves the WS provider URL for a specified node.
|
|
1542
|
-
*
|
|
1543
|
-
* @param node - The node for which to get the WS provider URL.
|
|
1544
|
-
* @returns The WS provider URL as a string.
|
|
1545
|
-
*/
|
|
1546
|
-
declare const getNodeProvider: (node: TNodeWithRelayChains) => string;
|
|
1547
|
-
|
|
1548
|
-
/**
|
|
1549
|
-
* Retrieves all WS provider URLs for a specified Polkadot or Kusama node.
|
|
1550
|
-
*
|
|
1551
|
-
* @param node - The Polkadot or Kusama node.
|
|
1552
|
-
* @returns An array of WS provider URLs.
|
|
1553
|
-
* @throws Error if the node does not have any providers.
|
|
1554
|
-
*/
|
|
1555
|
-
declare const getAllNodeProviders: (node: TNodePolkadotKusama) => string[];
|
|
1556
|
-
|
|
1557
1607
|
/**
|
|
1558
1608
|
* Retrieves the node instance for a given node.
|
|
1559
1609
|
*
|
|
@@ -1562,14 +1612,6 @@ declare const getAllNodeProviders: (node: TNodePolkadotKusama) => string[];
|
|
|
1562
1612
|
*/
|
|
1563
1613
|
declare const getNode: <TApi, TRes, T extends keyof ReturnType<typeof nodes>>(node: T) => ReturnType<typeof nodes<TApi, TRes>>[T];
|
|
1564
1614
|
|
|
1565
|
-
/**
|
|
1566
|
-
* Retrieves the endpoint option for a given Polkadot or Kusama node.
|
|
1567
|
-
*
|
|
1568
|
-
* @param node - The Polkadot or Kusama node for which to get the endpoint option.
|
|
1569
|
-
* @returns The endpoint option object if found; otherwise, undefined.
|
|
1570
|
-
*/
|
|
1571
|
-
declare const getNodeEndpointOption: (node: TNodePolkadotKusama) => _polkadot_apps_config_endpoints_types.EndpointOption | undefined;
|
|
1572
|
-
|
|
1573
1615
|
/**
|
|
1574
1616
|
* Determines the relay chain for a given node.
|
|
1575
1617
|
*
|
|
@@ -1583,7 +1625,7 @@ declare const determineRelayChain: (node: TNodeWithRelayChains) => TNodeDotKsmWi
|
|
|
1583
1625
|
* @param node - The node to check.
|
|
1584
1626
|
* @returns True if the node is 'Polkadot' or 'Kusama'; otherwise, false.
|
|
1585
1627
|
*/
|
|
1586
|
-
declare const isRelayChain: (node: TNodeWithRelayChains) =>
|
|
1628
|
+
declare const isRelayChain: (node: TNodeWithRelayChains) => node is "Polkadot" | "Kusama";
|
|
1587
1629
|
|
|
1588
1630
|
/**
|
|
1589
1631
|
* Used to inform user, that currency they wish to use is not registered on either origin or destination Parachain
|
|
@@ -1656,7 +1698,7 @@ declare class DuplicateAssetError extends Error {
|
|
|
1656
1698
|
*
|
|
1657
1699
|
* @param symbol - The symbol of the asset causing the duplication error.
|
|
1658
1700
|
*/
|
|
1659
|
-
constructor(
|
|
1701
|
+
constructor(msg: string);
|
|
1660
1702
|
}
|
|
1661
1703
|
|
|
1662
1704
|
/**
|
|
@@ -1671,4 +1713,18 @@ declare class DuplicateAssetIdError extends Error {
|
|
|
1671
1713
|
constructor(id: string);
|
|
1672
1714
|
}
|
|
1673
1715
|
|
|
1674
|
-
|
|
1716
|
+
declare const getNodeConfig: (node: TNodeDotKsmWithRelayChains) => TNodeConfig;
|
|
1717
|
+
|
|
1718
|
+
declare const getNodeProviders: (node: TNodeDotKsmWithRelayChains) => string[];
|
|
1719
|
+
|
|
1720
|
+
declare const getNodeProvider: (node: TNodeDotKsmWithRelayChains) => string;
|
|
1721
|
+
|
|
1722
|
+
/**
|
|
1723
|
+
* Retrieves the parachain ID for a specified node.
|
|
1724
|
+
*
|
|
1725
|
+
* @param node - The node for which to get the paraId.
|
|
1726
|
+
* @returns The parachain ID of the node.
|
|
1727
|
+
*/
|
|
1728
|
+
declare const getParaId: (node: TNodeDotKsmWithRelayChains) => number;
|
|
1729
|
+
|
|
1730
|
+
export { BatchMode, Builder, type CheckKeepAliveOptions, DuplicateAssetError, DuplicateAssetIdError, EvmBuilder, type Extrinsic, 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 TPjsApi, type TPjsApiOrUrl, 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, createPolkadotJsApiCall, 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, transferRelayToParaSerializedApiCall, transfer as xcmPallet };
|