@paraspell/sdk 7.1.2 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -13
- package/dist/index.cjs +10694 -7020
- package/dist/index.d.ts +151 -138
- package/dist/index.mjs +10688 -7019
- package/dist/papi/index.cjs +10694 -7030
- package/dist/papi/index.d.ts +151 -138
- package/dist/papi/index.mjs +10688 -7029
- 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,6 +20,7 @@ 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
25
|
getBalanceForeignAssetsAccount(address: string, assetId: bigint | number): Promise<bigint>;
|
|
26
26
|
getFromStorage(key: string): Promise<string>;
|
|
@@ -30,14 +30,14 @@ interface IPolkadotApi<TApi, TRes> {
|
|
|
30
30
|
|
|
31
31
|
declare abstract class ParachainNode<TApi, TRes> {
|
|
32
32
|
private readonly _node;
|
|
33
|
-
private readonly
|
|
33
|
+
private readonly _info;
|
|
34
34
|
private readonly _type;
|
|
35
35
|
private readonly _version;
|
|
36
36
|
protected _assetCheckEnabled: boolean;
|
|
37
|
-
constructor(node:
|
|
38
|
-
get
|
|
37
|
+
constructor(node: TNodePolkadotKusama, info: string, type: TRelayChainType, version: Version);
|
|
38
|
+
get info(): string;
|
|
39
39
|
get type(): TRelayChainType;
|
|
40
|
-
get node():
|
|
40
|
+
get node(): TNodePolkadotKusama;
|
|
41
41
|
get version(): Version;
|
|
42
42
|
get assetCheckEnabled(): boolean;
|
|
43
43
|
protected canUseXTokens(_: TSendInternalOptions<TApi, TRes>): boolean;
|
|
@@ -45,7 +45,7 @@ declare abstract class ParachainNode<TApi, TRes> {
|
|
|
45
45
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
46
46
|
getProvider(): string;
|
|
47
47
|
createApiInstance(api: IPolkadotApi<TApi, TRes>): Promise<TApi>;
|
|
48
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version,
|
|
48
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, _asset?: TAsset, overridedMultiLocation?: TMultiLocation | TMultiAsset[]): TCurrencySelectionHeaderArr;
|
|
49
49
|
createPolkadotXcmHeader(scenario: TScenario, version: Version, destination?: TDestination, paraId?: number): TMultiLocationHeader;
|
|
50
50
|
getNativeAssetSymbol(): string;
|
|
51
51
|
}
|
|
@@ -63,7 +63,7 @@ declare class Unique<TApi, TRes> extends ParachainNode<TApi, TRes> implements IX
|
|
|
63
63
|
|
|
64
64
|
declare class Crust<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
65
65
|
constructor();
|
|
66
|
-
getCurrencySelection
|
|
66
|
+
private getCurrencySelection;
|
|
67
67
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -72,7 +72,8 @@ declare class BifrostPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> impl
|
|
|
72
72
|
private getCurrencySelection;
|
|
73
73
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
74
74
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
75
|
-
protected canUseXTokens({
|
|
75
|
+
protected canUseXTokens({ asset, destination }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
76
|
+
getProvider(): string;
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
declare class Bitgreen<TApi, TRes> extends ParachainNode<TApi, TRes> {
|
|
@@ -81,6 +82,7 @@ declare class Bitgreen<TApi, TRes> extends ParachainNode<TApi, TRes> {
|
|
|
81
82
|
|
|
82
83
|
declare class Centrifuge<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
83
84
|
constructor();
|
|
85
|
+
private getCurrencySelection;
|
|
84
86
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
85
87
|
}
|
|
86
88
|
|
|
@@ -90,12 +92,14 @@ declare class ComposableFinance<TApi, TRes> extends ParachainNode<TApi, TRes> im
|
|
|
90
92
|
}
|
|
91
93
|
|
|
92
94
|
declare class Hydration<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer, IPolkadotXCMTransfer {
|
|
95
|
+
private static NATIVE_ASSET_ID;
|
|
93
96
|
constructor();
|
|
94
97
|
transferToEthereum<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
95
98
|
transferToAssetHub<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
96
99
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
97
100
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
98
|
-
protected canUseXTokens({ destination,
|
|
101
|
+
protected canUseXTokens({ destination, asset }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
102
|
+
getProvider(): string;
|
|
99
103
|
}
|
|
100
104
|
|
|
101
105
|
declare class Interlay<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
@@ -110,6 +114,7 @@ declare class Litentry<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
|
110
114
|
|
|
111
115
|
declare class Moonbeam<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
112
116
|
constructor();
|
|
117
|
+
private getCurrencySelection;
|
|
113
118
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
114
119
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
115
120
|
getProvider(): string;
|
|
@@ -122,6 +127,7 @@ declare class Parallel<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
|
122
127
|
|
|
123
128
|
declare class Altair<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
124
129
|
constructor();
|
|
130
|
+
private getCurrencySelection;
|
|
125
131
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
126
132
|
}
|
|
127
133
|
|
|
@@ -145,6 +151,7 @@ declare class Basilisk<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
|
145
151
|
declare class BifrostKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
146
152
|
constructor();
|
|
147
153
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
154
|
+
getProvider(): string;
|
|
148
155
|
}
|
|
149
156
|
|
|
150
157
|
declare class Pioneer<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
@@ -169,6 +176,7 @@ declare class ParallelHeiko<TApi, TRes> extends ParachainNode<TApi, TRes> implem
|
|
|
169
176
|
|
|
170
177
|
declare class Moonriver<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
171
178
|
constructor();
|
|
179
|
+
private getCurrencySelection;
|
|
172
180
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
173
181
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
174
182
|
getProvider(): string;
|
|
@@ -186,7 +194,7 @@ declare class Calamari<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
|
186
194
|
|
|
187
195
|
declare class CrustShadow<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
188
196
|
constructor();
|
|
189
|
-
getCurrencySelection
|
|
197
|
+
private getCurrencySelection;
|
|
190
198
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
191
199
|
}
|
|
192
200
|
|
|
@@ -219,16 +227,17 @@ declare class AssetHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> imp
|
|
|
219
227
|
handleMythosTransfer<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
220
228
|
handleBifrostEthTransfer: <TApi_1, TRes_1>(input: PolkadotXCMTransferInput<TApi_1, TRes_1>) => TTransferReturn<TRes_1>;
|
|
221
229
|
patchInput<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): PolkadotXCMTransferInput<TApi, TRes>;
|
|
230
|
+
private getSection;
|
|
222
231
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
223
232
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
224
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version,
|
|
233
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset, overridedMultiLocation?: TMultiLocation | TMultiAsset[]): TCurrencySelectionHeaderArr;
|
|
225
234
|
}
|
|
226
235
|
|
|
227
236
|
declare class AssetHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
228
237
|
constructor();
|
|
229
238
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
230
239
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
231
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version,
|
|
240
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset, overridedMultiLocation?: TMultiLocation | TMultiAsset[]): TCurrencySelectionHeaderArr;
|
|
232
241
|
}
|
|
233
242
|
|
|
234
243
|
declare class CoretimeKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
@@ -277,7 +286,7 @@ declare class Astar<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPo
|
|
|
277
286
|
constructor();
|
|
278
287
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
279
288
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
280
|
-
protected canUseXTokens({
|
|
289
|
+
protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
281
290
|
}
|
|
282
291
|
|
|
283
292
|
type TMultiAsset = TMultiAssetV3 | TMultiAssetV4;
|
|
@@ -297,14 +306,34 @@ interface TMultiAssetV4 {
|
|
|
297
306
|
}
|
|
298
307
|
|
|
299
308
|
type TCurrency = string | number | bigint;
|
|
309
|
+
type TSymbolSpecifier = {
|
|
310
|
+
type: 'Native' | 'Foreign' | 'ForeignAbstract';
|
|
311
|
+
value: string;
|
|
312
|
+
};
|
|
313
|
+
type TOverrideMultiLocationSpecifier = {
|
|
314
|
+
type: 'Override';
|
|
315
|
+
value: TMultiLocation;
|
|
316
|
+
};
|
|
317
|
+
type TCurrencySymbolValue = string | TSymbolSpecifier;
|
|
300
318
|
type TCurrencySymbol = {
|
|
301
|
-
symbol:
|
|
319
|
+
symbol: TCurrencySymbolValue;
|
|
302
320
|
};
|
|
303
321
|
type TCurrencyCore = TCurrencySymbol | {
|
|
304
322
|
id: TCurrency;
|
|
323
|
+
} | {
|
|
324
|
+
multilocation: TMultiLocationValue;
|
|
325
|
+
};
|
|
326
|
+
type TCurrencyCoreV1 = {
|
|
327
|
+
symbol: string;
|
|
328
|
+
} | {
|
|
329
|
+
id: TCurrency;
|
|
305
330
|
};
|
|
306
|
-
type
|
|
307
|
-
|
|
331
|
+
type TMultiLocationValue = string | TMultiLocation | TJunction[];
|
|
332
|
+
type TMultiLocationValueWithOverride = TMultiLocationValue | TOverrideMultiLocationSpecifier;
|
|
333
|
+
type TCurrencyInput = TCurrencySymbol | {
|
|
334
|
+
id: TCurrency;
|
|
335
|
+
} | {
|
|
336
|
+
multilocation: TMultiLocationValueWithOverride;
|
|
308
337
|
} | {
|
|
309
338
|
multiasset: TMultiAsset[];
|
|
310
339
|
};
|
|
@@ -328,18 +357,18 @@ type TCurrencySelectionHeader = {
|
|
|
328
357
|
type TCurrencySelectionHeaderArr = {
|
|
329
358
|
[key in Version]?: [TCurrencySelection | TCurrencySelectionV4];
|
|
330
359
|
};
|
|
331
|
-
type
|
|
360
|
+
type TXcmForeignAsset = {
|
|
332
361
|
ForeignAsset: string | number | bigint | undefined;
|
|
333
362
|
};
|
|
334
363
|
type TForeignAssetId = {
|
|
335
|
-
ForeignAssetId:
|
|
364
|
+
ForeignAssetId: bigint | undefined;
|
|
336
365
|
};
|
|
337
|
-
type TForeignOrTokenAsset =
|
|
366
|
+
type TForeignOrTokenAsset = TXcmForeignAsset | {
|
|
338
367
|
Token: string | undefined;
|
|
339
368
|
};
|
|
340
|
-
type TForeignOrNativeAsset =
|
|
369
|
+
type TForeignOrNativeAsset = TXcmForeignAsset | 'Native';
|
|
341
370
|
type TXcmAsset = {
|
|
342
|
-
XCM:
|
|
371
|
+
XCM: number | undefined;
|
|
343
372
|
};
|
|
344
373
|
type TMantaAsset = {
|
|
345
374
|
MantaCurrency: bigint | undefined;
|
|
@@ -348,7 +377,7 @@ type TNativeTokenAsset = 'NativeToken';
|
|
|
348
377
|
type TNodleAsset = 'NodleNative';
|
|
349
378
|
type TZeitgeistAsset = 'Ztg';
|
|
350
379
|
type TOtherReserveAsset = {
|
|
351
|
-
OtherReserve: string | undefined;
|
|
380
|
+
OtherReserve: string | bigint | undefined;
|
|
352
381
|
};
|
|
353
382
|
type TSelfReserveAsset = 'SelfReserve';
|
|
354
383
|
type TReserveAsset = TOtherReserveAsset | TSelfReserveAsset;
|
|
@@ -365,7 +394,7 @@ type TBifrostToken = {
|
|
|
365
394
|
} | {
|
|
366
395
|
Token2: number;
|
|
367
396
|
};
|
|
368
|
-
type TXTokensCurrencySelection = TCurrencySelectionHeader | TCurrencySelectionHeaderArr |
|
|
397
|
+
type TXTokensCurrencySelection = TCurrencySelectionHeader | TCurrencySelectionHeaderArr | TXcmForeignAsset | TForeignAssetId | TForeignOrTokenAsset | TXcmAsset | TMantaAsset | TOtherReserveAsset | TBifrostToken | string | bigint | number | undefined;
|
|
369
398
|
|
|
370
399
|
type TPallet = (typeof SUPPORTED_PALLETS)[number];
|
|
371
400
|
interface TPalletMap {
|
|
@@ -374,6 +403,32 @@ interface TPalletMap {
|
|
|
374
403
|
}
|
|
375
404
|
type TPalletJsonMap = Record<TNodePolkadotKusama, TPalletMap>;
|
|
376
405
|
|
|
406
|
+
type AtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
407
|
+
[K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
|
|
408
|
+
}[Keys];
|
|
409
|
+
type TBaseAsset = {
|
|
410
|
+
symbol?: string;
|
|
411
|
+
decimals?: number;
|
|
412
|
+
manuallyAdded?: boolean;
|
|
413
|
+
alias?: string;
|
|
414
|
+
};
|
|
415
|
+
type TNativeAsset = TBaseAsset & {
|
|
416
|
+
symbol: string;
|
|
417
|
+
};
|
|
418
|
+
type TForeignAsset = TBaseAsset & AtLeastOne<{
|
|
419
|
+
assetId?: string;
|
|
420
|
+
multiLocation?: object;
|
|
421
|
+
xcmInterior?: object[];
|
|
422
|
+
}>;
|
|
423
|
+
type TAsset = TNativeAsset | TForeignAsset;
|
|
424
|
+
type TNodeAssets = {
|
|
425
|
+
relayChainAssetSymbol: TRelayChainSymbol;
|
|
426
|
+
nativeAssetSymbol: string;
|
|
427
|
+
nativeAssets: TNativeAsset[];
|
|
428
|
+
otherAssets: TForeignAsset[];
|
|
429
|
+
};
|
|
430
|
+
type TAssetJsonMap = Record<TNodeWithRelayChains, TNodeAssets>;
|
|
431
|
+
|
|
377
432
|
type HexString$1 = `0x${string}`;
|
|
378
433
|
type PolkadotXCMTransferInput<TApi, TRes> = {
|
|
379
434
|
api: IPolkadotApi<TApi, TRes>;
|
|
@@ -383,8 +438,7 @@ type PolkadotXCMTransferInput<TApi, TRes> = {
|
|
|
383
438
|
address: TAddress;
|
|
384
439
|
currencySelection: TCurrencySelectionHeaderArr;
|
|
385
440
|
scenario: TScenario;
|
|
386
|
-
|
|
387
|
-
currencyId: string | undefined;
|
|
441
|
+
asset: TAsset;
|
|
388
442
|
destination?: TDestination;
|
|
389
443
|
paraIdTo?: number;
|
|
390
444
|
feeAsset?: TCurrency;
|
|
@@ -395,13 +449,12 @@ type PolkadotXCMTransferInput<TApi, TRes> = {
|
|
|
395
449
|
};
|
|
396
450
|
type XTokensTransferInput<TApi, TRes> = {
|
|
397
451
|
api: IPolkadotApi<TApi, TRes>;
|
|
398
|
-
|
|
399
|
-
currencyID: string | undefined;
|
|
452
|
+
asset: TAsset;
|
|
400
453
|
amount: string;
|
|
401
454
|
addressSelection: TMultiLocationHeader;
|
|
402
455
|
fees: number;
|
|
403
456
|
scenario: TScenario;
|
|
404
|
-
origin:
|
|
457
|
+
origin: TNodePolkadotKusama;
|
|
405
458
|
destination?: TDestination;
|
|
406
459
|
paraIdTo?: number;
|
|
407
460
|
overridedCurrencyMultiLocation?: TMultiLocation | TMultiAsset[];
|
|
@@ -410,11 +463,10 @@ type XTokensTransferInput<TApi, TRes> = {
|
|
|
410
463
|
};
|
|
411
464
|
type XTransferTransferInput<TApi, TRes> = {
|
|
412
465
|
api: IPolkadotApi<TApi, TRes>;
|
|
413
|
-
|
|
414
|
-
currencyID: string | undefined;
|
|
466
|
+
asset: TAsset;
|
|
415
467
|
amount: string;
|
|
416
468
|
recipientAddress: TAddress;
|
|
417
|
-
origin:
|
|
469
|
+
origin: TNodePolkadotKusama;
|
|
418
470
|
paraId?: number;
|
|
419
471
|
destination?: TDestination;
|
|
420
472
|
overridedCurrencyMultiLocation?: TMultiLocation | TMultiAsset[];
|
|
@@ -451,6 +503,7 @@ declare enum Parents {
|
|
|
451
503
|
type TAmount = string | number | bigint;
|
|
452
504
|
type TAddress = string | TMultiLocation;
|
|
453
505
|
type TDestination = TNode | TMultiLocation;
|
|
506
|
+
type TRelayToParaDestination = TNodePolkadotKusama | TMultiLocation;
|
|
454
507
|
type TSendBaseOptions<TApi, TRes> = {
|
|
455
508
|
/**
|
|
456
509
|
* The destination address. A SS58 or H160 format.
|
|
@@ -488,7 +541,7 @@ type TSendOptions<TApi, TRes> = WithApi<TSendBaseOptions<TApi, TRes>, TApi, TRes
|
|
|
488
541
|
/**
|
|
489
542
|
* The origin node
|
|
490
543
|
*/
|
|
491
|
-
origin:
|
|
544
|
+
origin: TNodePolkadotKusama;
|
|
492
545
|
/**
|
|
493
546
|
* The currency to transfer. Either ID, symbol, multi-location, or multi-asset
|
|
494
547
|
*/
|
|
@@ -500,8 +553,7 @@ type TSendOptions<TApi, TRes> = WithApi<TSendBaseOptions<TApi, TRes>, TApi, TRes
|
|
|
500
553
|
};
|
|
501
554
|
type TSendInternalOptions<TApi, TRes> = TSendBaseOptions<TApi, TRes> & {
|
|
502
555
|
api: IPolkadotApi<TApi, TRes>;
|
|
503
|
-
|
|
504
|
-
currencyId: string | undefined;
|
|
556
|
+
asset: TAsset;
|
|
505
557
|
amount: string;
|
|
506
558
|
overridedCurrencyMultiLocation?: TMultiLocation | TMultiAsset[];
|
|
507
559
|
serializedApiCallEnabled?: boolean;
|
|
@@ -510,7 +562,7 @@ type TRelayToParaBaseOptions<TApi, TRes> = {
|
|
|
510
562
|
/**
|
|
511
563
|
* The destination node or multi-location
|
|
512
564
|
*/
|
|
513
|
-
destination:
|
|
565
|
+
destination: TRelayToParaDestination;
|
|
514
566
|
/**
|
|
515
567
|
* The destination address. A SS58 or H160 format.
|
|
516
568
|
*/
|
|
@@ -553,7 +605,7 @@ type CheckKeepAliveOptions<TApi, TRes> = {
|
|
|
553
605
|
amount: string;
|
|
554
606
|
originNode?: TNodePolkadotKusama;
|
|
555
607
|
destApi: IPolkadotApi<TApi, TRes>;
|
|
556
|
-
|
|
608
|
+
asset: TAsset;
|
|
557
609
|
destNode?: TNodePolkadotKusama;
|
|
558
610
|
};
|
|
559
611
|
type TDestWeight = {
|
|
@@ -627,29 +679,6 @@ interface Junctions {
|
|
|
627
679
|
X6?: [TJunction, TJunction, TJunction, TJunction, TJunction, TJunction];
|
|
628
680
|
X7?: [TJunction, TJunction, TJunction, TJunction, TJunction, TJunction, TJunction];
|
|
629
681
|
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
682
|
}
|
|
654
683
|
interface TMultiLocation {
|
|
655
684
|
parents: StringOrNumber;
|
|
@@ -661,9 +690,10 @@ type TMultiLocationHeader = {
|
|
|
661
690
|
|
|
662
691
|
declare class Darwinia<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
663
692
|
constructor();
|
|
693
|
+
private getCurrencySelection;
|
|
664
694
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
665
695
|
transferRelayToPara(): TSerializedApiCallV2;
|
|
666
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version,
|
|
696
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, _asset?: TAsset, overridedMultiLocation?: TMultiLocation): TCurrencySelectionHeaderArr;
|
|
667
697
|
getProvider(): string;
|
|
668
698
|
}
|
|
669
699
|
|
|
@@ -671,7 +701,7 @@ declare class Crab<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPol
|
|
|
671
701
|
constructor();
|
|
672
702
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
673
703
|
transferRelayToPara(): TSerializedApiCallV2;
|
|
674
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version,
|
|
704
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): TCurrencySelectionHeaderArr;
|
|
675
705
|
}
|
|
676
706
|
|
|
677
707
|
declare class Quartz<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
@@ -684,7 +714,7 @@ declare class Shiden<TApi, TRes> extends ParachainNode<TApi, TRes> implements IP
|
|
|
684
714
|
constructor();
|
|
685
715
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
686
716
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
687
|
-
protected canUseXTokens({
|
|
717
|
+
protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
688
718
|
}
|
|
689
719
|
|
|
690
720
|
declare class Manta<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
@@ -692,9 +722,9 @@ declare class Manta<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXT
|
|
|
692
722
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
693
723
|
}
|
|
694
724
|
|
|
695
|
-
declare class Nodle<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
725
|
+
declare class Nodle<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
696
726
|
constructor();
|
|
697
|
-
|
|
727
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
698
728
|
transferRelayToPara(): TSerializedApiCallV2;
|
|
699
729
|
}
|
|
700
730
|
|
|
@@ -712,10 +742,12 @@ declare class Pendulum<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
|
712
742
|
declare class Polkadex<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
713
743
|
constructor();
|
|
714
744
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
745
|
+
getProvider(): string;
|
|
715
746
|
}
|
|
716
747
|
|
|
717
748
|
declare class Zeitgeist<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
718
749
|
constructor();
|
|
750
|
+
private getCurrencySelection;
|
|
719
751
|
transferXTokens<TApi, TRes>(input: XTokensTransferInput<TApi, TRes>): TTransferReturn<TRes>;
|
|
720
752
|
}
|
|
721
753
|
|
|
@@ -723,7 +755,7 @@ declare class Collectives<TApi, TRes> extends ParachainNode<TApi, TRes> implemen
|
|
|
723
755
|
constructor();
|
|
724
756
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
725
757
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
726
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version,
|
|
758
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): TCurrencySelectionHeaderArr;
|
|
727
759
|
}
|
|
728
760
|
|
|
729
761
|
declare class Khala<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTransferTransfer {
|
|
@@ -767,10 +799,6 @@ declare class BridgeHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> impl
|
|
|
767
799
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
768
800
|
}
|
|
769
801
|
|
|
770
|
-
declare class Ethereum<TApi, TRes> extends ParachainNode<TApi, TRes> {
|
|
771
|
-
constructor();
|
|
772
|
-
}
|
|
773
|
-
|
|
774
802
|
declare class Mythos<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
775
803
|
constructor();
|
|
776
804
|
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
@@ -784,8 +812,12 @@ declare class Peaq<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTo
|
|
|
784
812
|
getProvider(): string;
|
|
785
813
|
}
|
|
786
814
|
|
|
787
|
-
declare class Polimec<TApi, TRes> extends ParachainNode<TApi, TRes> {
|
|
815
|
+
declare class Polimec<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
788
816
|
constructor();
|
|
817
|
+
private getAssetMultiLocation;
|
|
818
|
+
transferPolkadotXCM<TApi, TRes>(input: PolkadotXCMTransferInput<TApi, TRes>): Promise<TTransferReturn<TRes>>;
|
|
819
|
+
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCallV2;
|
|
820
|
+
getProvider(): string;
|
|
789
821
|
}
|
|
790
822
|
|
|
791
823
|
/**
|
|
@@ -862,7 +894,6 @@ declare const nodes: <TApi, TRes>() => {
|
|
|
862
894
|
Subsocial: Subsocial<TApi, TRes>;
|
|
863
895
|
KiltSpiritnet: KiltSpiritnet<TApi, TRes>;
|
|
864
896
|
Curio: Curio<TApi, TRes>;
|
|
865
|
-
Ethereum: Ethereum<TApi, TRes>;
|
|
866
897
|
Mythos: Mythos<TApi, TRes>;
|
|
867
898
|
Peaq: Peaq<TApi, TRes>;
|
|
868
899
|
Polimec: Polimec<TApi, TRes>;
|
|
@@ -880,29 +911,6 @@ type TNodeDotKsmWithRelayChains = Exclude<TNodeWithRelayChains, 'Ethereum'>;
|
|
|
880
911
|
type TRelayChainType = 'polkadot' | 'kusama';
|
|
881
912
|
type TRelayChainSymbol = 'DOT' | 'KSM';
|
|
882
913
|
|
|
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
914
|
type TEdJsonMap = Record<TNodeDotKsmWithRelayChains, string | null>;
|
|
907
915
|
|
|
908
916
|
/**
|
|
@@ -920,7 +928,7 @@ type TEvmBuilderOptions = {
|
|
|
920
928
|
/**
|
|
921
929
|
* The currency to transfer. Symbol or ID.
|
|
922
930
|
*/
|
|
923
|
-
currency:
|
|
931
|
+
currency: TCurrencyCoreV1;
|
|
924
932
|
/**
|
|
925
933
|
* The Polkadot destination address.
|
|
926
934
|
*/
|
|
@@ -1011,6 +1019,18 @@ type TGetTransferInfoOptionsBase = {
|
|
|
1011
1019
|
};
|
|
1012
1020
|
type TGetTransferInfoOptions<TApi, TRes> = WithApi<TGetTransferInfoOptionsBase, TApi, TRes>;
|
|
1013
1021
|
|
|
1022
|
+
type TProviderEntry = {
|
|
1023
|
+
name: string;
|
|
1024
|
+
endpoint: string;
|
|
1025
|
+
};
|
|
1026
|
+
type TNodeConfig = {
|
|
1027
|
+
name: string;
|
|
1028
|
+
info: string;
|
|
1029
|
+
paraId: number;
|
|
1030
|
+
providers: TProviderEntry[];
|
|
1031
|
+
};
|
|
1032
|
+
type TNodeConfigMap = Record<TNodeDotKsmWithRelayChains, TNodeConfig>;
|
|
1033
|
+
|
|
1014
1034
|
type TPjsApi = ApiPromise;
|
|
1015
1035
|
type TPjsApiOrUrl = TApiOrUrl<TPjsApi>;
|
|
1016
1036
|
type Extrinsic = SubmittableExtrinsic<'promise'>;
|
|
@@ -1166,14 +1186,14 @@ declare const getRelayChainSymbol: (node: TNodeWithRelayChains) => TRelayChainSy
|
|
|
1166
1186
|
* @param node - The node for which to get native assets.
|
|
1167
1187
|
* @returns An array of native asset details.
|
|
1168
1188
|
*/
|
|
1169
|
-
declare const getNativeAssets: (node: TNode) =>
|
|
1189
|
+
declare const getNativeAssets: (node: TNode) => TNativeAsset[];
|
|
1170
1190
|
/**
|
|
1171
1191
|
* Retrieves the list of other (non-native) assets for a specified node.
|
|
1172
1192
|
*
|
|
1173
1193
|
* @param node - The node for which to get other assets.
|
|
1174
1194
|
* @returns An array of other asset details.
|
|
1175
1195
|
*/
|
|
1176
|
-
declare const getOtherAssets: (node: TNode) =>
|
|
1196
|
+
declare const getOtherAssets: (node: TNode) => TForeignAsset[];
|
|
1177
1197
|
/**
|
|
1178
1198
|
* Retrieves the complete list of assets for a specified node, including relay chain asset, native, and other assets.
|
|
1179
1199
|
*
|
|
@@ -1211,13 +1231,6 @@ declare const hasSupportForAsset: (node: TNode, symbol: string) => boolean;
|
|
|
1211
1231
|
* @returns The number of decimals if the asset is found; otherwise, null.
|
|
1212
1232
|
*/
|
|
1213
1233
|
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
1234
|
/**
|
|
1222
1235
|
* Retrieves the node name corresponding to a specified parachain ID.
|
|
1223
1236
|
*
|
|
@@ -1234,6 +1247,12 @@ declare const getTNode: (paraId: number, ecosystem: TRelayChainType) => TNodeDot
|
|
|
1234
1247
|
*/
|
|
1235
1248
|
declare const getExistentialDeposit: (node: TNodeDotKsmWithRelayChains) => string | null;
|
|
1236
1249
|
|
|
1250
|
+
declare const Native: (symbol: string) => TSymbolSpecifier;
|
|
1251
|
+
declare const Foreign: (symbol: string) => TSymbolSpecifier;
|
|
1252
|
+
declare const ForeignAbstract: (symbol: string) => TSymbolSpecifier;
|
|
1253
|
+
|
|
1254
|
+
declare const Override: (multiLocation: TMultiLocation) => TOverrideMultiLocationSpecifier;
|
|
1255
|
+
|
|
1237
1256
|
/**
|
|
1238
1257
|
* Retrieves the list of assets that are supported for transfers between two specified nodes.
|
|
1239
1258
|
*
|
|
@@ -1287,6 +1306,10 @@ declare const getOriginFeeDetails: (options: TGetOriginFeeDetailsOptionsBase & {
|
|
|
1287
1306
|
api?: TPjsApiOrUrl;
|
|
1288
1307
|
}) => Promise<TOriginFeeDetails>;
|
|
1289
1308
|
|
|
1309
|
+
declare const assets_Foreign: typeof Foreign;
|
|
1310
|
+
declare const assets_ForeignAbstract: typeof ForeignAbstract;
|
|
1311
|
+
declare const assets_Native: typeof Native;
|
|
1312
|
+
declare const assets_Override: typeof Override;
|
|
1290
1313
|
declare const assets_claimAssets: typeof claimAssets;
|
|
1291
1314
|
declare const assets_getAllAssetsSymbols: typeof getAllAssetsSymbols;
|
|
1292
1315
|
declare const assets_getAssetBalance: typeof getAssetBalance;
|
|
@@ -1301,14 +1324,13 @@ declare const assets_getNativeAssetSymbol: typeof getNativeAssetSymbol;
|
|
|
1301
1324
|
declare const assets_getNativeAssets: typeof getNativeAssets;
|
|
1302
1325
|
declare const assets_getOriginFeeDetails: typeof getOriginFeeDetails;
|
|
1303
1326
|
declare const assets_getOtherAssets: typeof getOtherAssets;
|
|
1304
|
-
declare const assets_getParaId: typeof getParaId;
|
|
1305
1327
|
declare const assets_getRelayChainSymbol: typeof getRelayChainSymbol;
|
|
1306
1328
|
declare const assets_getSupportedAssets: typeof getSupportedAssets;
|
|
1307
1329
|
declare const assets_getTNode: typeof getTNode;
|
|
1308
1330
|
declare const assets_getTransferInfo: typeof getTransferInfo;
|
|
1309
1331
|
declare const assets_hasSupportForAsset: typeof hasSupportForAsset;
|
|
1310
1332
|
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,
|
|
1333
|
+
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
1334
|
}
|
|
1313
1335
|
|
|
1314
1336
|
/**
|
|
@@ -1351,7 +1373,7 @@ declare class ToGeneralBuilder<TApi, TRes> {
|
|
|
1351
1373
|
private readonly from;
|
|
1352
1374
|
private readonly to;
|
|
1353
1375
|
private readonly paraIdTo?;
|
|
1354
|
-
constructor(api: IPolkadotApi<TApi, TRes>, from:
|
|
1376
|
+
constructor(api: IPolkadotApi<TApi, TRes>, from: TNodePolkadotKusama, to: TDestination, batchManager: BatchTransactionManager<TApi, TRes>, paraIdTo?: number);
|
|
1355
1377
|
/**
|
|
1356
1378
|
* Specifies the currency to be used in the transaction. Symbol, ID, multi-location or multi-asset.
|
|
1357
1379
|
*
|
|
@@ -1368,7 +1390,7 @@ declare class FromGeneralBuilder<TApi, TRes> {
|
|
|
1368
1390
|
private readonly api;
|
|
1369
1391
|
private readonly from;
|
|
1370
1392
|
private _feeAsset?;
|
|
1371
|
-
constructor(api: IPolkadotApi<TApi, TRes>, from:
|
|
1393
|
+
constructor(api: IPolkadotApi<TApi, TRes>, from: TNodePolkadotKusama, batchManager: BatchTransactionManager<TApi, TRes>);
|
|
1372
1394
|
/**
|
|
1373
1395
|
* Specifies the destination node for the transaction.
|
|
1374
1396
|
*
|
|
@@ -1488,7 +1510,7 @@ declare class EvmBuilderClass {
|
|
|
1488
1510
|
* @param currency - The currency to be transferred.
|
|
1489
1511
|
* @returns An instance of EvmBuilder
|
|
1490
1512
|
*/
|
|
1491
|
-
currency(currency:
|
|
1513
|
+
currency(currency: TCurrencyCoreV1): this;
|
|
1492
1514
|
/**
|
|
1493
1515
|
* Specifies the recipient address on Polkadot.
|
|
1494
1516
|
*
|
|
@@ -1530,30 +1552,15 @@ declare const GeneralBuilder: {
|
|
|
1530
1552
|
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
1553
|
};
|
|
1532
1554
|
|
|
1533
|
-
declare const
|
|
1555
|
+
declare const isForeignAsset: (asset: TAsset) => asset is TForeignAsset;
|
|
1556
|
+
|
|
1557
|
+
declare const createApiInstanceForNode: (node: TNodeDotKsmWithRelayChains) => Promise<_polkadot_api.ApiPromise>;
|
|
1534
1558
|
declare const createPolkadotJsApiCall: <TArgs extends Record<string, unknown>, TResult>(apiCall: (options: TArgs & {
|
|
1535
1559
|
api: IPolkadotApi<TPjsApi, Extrinsic>;
|
|
1536
1560
|
}) => Promise<TResult>) => (options: TArgs & {
|
|
1537
1561
|
api?: TPjsApiOrUrl;
|
|
1538
1562
|
}) => Promise<TResult>;
|
|
1539
1563
|
|
|
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
1564
|
/**
|
|
1558
1565
|
* Retrieves the node instance for a given node.
|
|
1559
1566
|
*
|
|
@@ -1562,14 +1569,6 @@ declare const getAllNodeProviders: (node: TNodePolkadotKusama) => string[];
|
|
|
1562
1569
|
*/
|
|
1563
1570
|
declare const getNode: <TApi, TRes, T extends keyof ReturnType<typeof nodes>>(node: T) => ReturnType<typeof nodes<TApi, TRes>>[T];
|
|
1564
1571
|
|
|
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
1572
|
/**
|
|
1574
1573
|
* Determines the relay chain for a given node.
|
|
1575
1574
|
*
|
|
@@ -1583,7 +1582,7 @@ declare const determineRelayChain: (node: TNodeWithRelayChains) => TNodeDotKsmWi
|
|
|
1583
1582
|
* @param node - The node to check.
|
|
1584
1583
|
* @returns True if the node is 'Polkadot' or 'Kusama'; otherwise, false.
|
|
1585
1584
|
*/
|
|
1586
|
-
declare const isRelayChain: (node: TNodeWithRelayChains) =>
|
|
1585
|
+
declare const isRelayChain: (node: TNodeWithRelayChains) => node is "Polkadot" | "Kusama";
|
|
1587
1586
|
|
|
1588
1587
|
/**
|
|
1589
1588
|
* Used to inform user, that currency they wish to use is not registered on either origin or destination Parachain
|
|
@@ -1656,7 +1655,7 @@ declare class DuplicateAssetError extends Error {
|
|
|
1656
1655
|
*
|
|
1657
1656
|
* @param symbol - The symbol of the asset causing the duplication error.
|
|
1658
1657
|
*/
|
|
1659
|
-
constructor(
|
|
1658
|
+
constructor(msg: string);
|
|
1660
1659
|
}
|
|
1661
1660
|
|
|
1662
1661
|
/**
|
|
@@ -1671,4 +1670,18 @@ declare class DuplicateAssetIdError extends Error {
|
|
|
1671
1670
|
constructor(id: string);
|
|
1672
1671
|
}
|
|
1673
1672
|
|
|
1674
|
-
|
|
1673
|
+
declare const getNodeConfig: (node: TNodeDotKsmWithRelayChains) => TNodeConfig;
|
|
1674
|
+
|
|
1675
|
+
declare const getNodeProviders: (node: TNodeDotKsmWithRelayChains) => string[];
|
|
1676
|
+
|
|
1677
|
+
declare const getNodeProvider: (node: TNodeDotKsmWithRelayChains) => string;
|
|
1678
|
+
|
|
1679
|
+
/**
|
|
1680
|
+
* Retrieves the parachain ID for a specified node.
|
|
1681
|
+
*
|
|
1682
|
+
* @param node - The node for which to get the paraId.
|
|
1683
|
+
* @returns The parachain ID of the node.
|
|
1684
|
+
*/
|
|
1685
|
+
declare const getParaId: (node: TNodeDotKsmWithRelayChains) => number;
|
|
1686
|
+
|
|
1687
|
+
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 };
|