@paraspell/sdk-core 8.5.3 → 8.6.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/dist/index.cjs +247 -599
- package/dist/index.d.ts +503 -519
- package/dist/index.mjs +247 -600
- package/package.json +11 -11
package/dist/index.d.ts
CHANGED
|
@@ -11,19 +11,19 @@ declare const ETHEREUM_JUNCTION: TJunction;
|
|
|
11
11
|
/**
|
|
12
12
|
* Supported nodes excluding relay chains and Ethereum.
|
|
13
13
|
*/
|
|
14
|
-
declare const NODE_NAMES_DOT_KSM: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "
|
|
14
|
+
declare const NODE_NAMES_DOT_KSM: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Heima", "Moonbeam", "Parallel", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Calamari", "CrustShadow", "Crab", "Imbue", "InvArchTinker", "Karura", "Kintsugi", "Moonriver", "ParallelHeiko", "Picasso", "Quartz", "RobonomicsKusama", "RobonomicsPolkadot", "PeoplePolkadot", "PeopleKusama", "Shiden", "Turing", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Zeitgeist", "Collectives", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec"];
|
|
15
15
|
/**
|
|
16
16
|
* Supported nodes including Ethereum.
|
|
17
17
|
*/
|
|
18
|
-
declare const NODE_NAMES: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "
|
|
18
|
+
declare const NODE_NAMES: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Heima", "Moonbeam", "Parallel", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Calamari", "CrustShadow", "Crab", "Imbue", "InvArchTinker", "Karura", "Kintsugi", "Moonriver", "ParallelHeiko", "Picasso", "Quartz", "RobonomicsKusama", "RobonomicsPolkadot", "PeoplePolkadot", "PeopleKusama", "Shiden", "Turing", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Zeitgeist", "Collectives", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec", "Ethereum"];
|
|
19
19
|
/**
|
|
20
20
|
* Supported nodes including relay chains and Ethereum.
|
|
21
21
|
*/
|
|
22
|
-
declare const NODES_WITH_RELAY_CHAINS: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "
|
|
22
|
+
declare const NODES_WITH_RELAY_CHAINS: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Heima", "Moonbeam", "Parallel", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Calamari", "CrustShadow", "Crab", "Imbue", "InvArchTinker", "Karura", "Kintsugi", "Moonriver", "ParallelHeiko", "Picasso", "Quartz", "RobonomicsKusama", "RobonomicsPolkadot", "PeoplePolkadot", "PeopleKusama", "Shiden", "Turing", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Zeitgeist", "Collectives", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec", "Ethereum", "Polkadot", "Kusama"];
|
|
23
23
|
/**
|
|
24
24
|
* Supported nodes including relay chains and excluding Ethereum.
|
|
25
25
|
*/
|
|
26
|
-
declare const NODES_WITH_RELAY_CHAINS_DOT_KSM: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "
|
|
26
|
+
declare const NODES_WITH_RELAY_CHAINS_DOT_KSM: readonly ["AssetHubPolkadot", "Acala", "Astar", "BifrostPolkadot", "Bitgreen", "BridgeHubPolkadot", "BridgeHubKusama", "Centrifuge", "ComposableFinance", "Darwinia", "Hydration", "Interlay", "Heima", "Moonbeam", "Parallel", "AssetHubKusama", "CoretimeKusama", "CoretimePolkadot", "Encointer", "Altair", "Amplitude", "Bajun", "Basilisk", "BifrostKusama", "Calamari", "CrustShadow", "Crab", "Imbue", "InvArchTinker", "Karura", "Kintsugi", "Moonriver", "ParallelHeiko", "Picasso", "Quartz", "RobonomicsKusama", "RobonomicsPolkadot", "PeoplePolkadot", "PeopleKusama", "Shiden", "Turing", "Unique", "Crust", "Manta", "Nodle", "NeuroWeb", "Pendulum", "Zeitgeist", "Collectives", "Phala", "Subsocial", "KiltSpiritnet", "Curio", "Mythos", "Peaq", "Polimec", "Polkadot", "Kusama"];
|
|
27
27
|
/**
|
|
28
28
|
* Supported XCM pallets.
|
|
29
29
|
*/
|
|
@@ -45,8 +45,8 @@ declare abstract class ParachainNode<TApi, TRes> {
|
|
|
45
45
|
transfer(options: TSendInternalOptions<TApi, TRes>): Promise<TRes>;
|
|
46
46
|
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
47
47
|
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCall;
|
|
48
|
-
createCurrencySpec(amount: TAmount, scenario: TScenario, version: Version, _asset?: TAsset, overridedMultiLocation?: TMultiLocation | TMultiAsset[]):
|
|
49
|
-
createPolkadotXcmHeader(scenario: TScenario, version: Version, destination: TDestination, paraId?: number):
|
|
48
|
+
createCurrencySpec(amount: TAmount, scenario: TScenario, version: Version, _asset?: TAsset, overridedMultiLocation?: TMultiLocation | TMultiAsset[]): TXcmVersioned<TMultiAsset[]>;
|
|
49
|
+
createPolkadotXcmHeader(scenario: TScenario, version: Version, destination: TDestination, paraId?: number): TXcmVersioned<TMultiLocation>;
|
|
50
50
|
getNativeAssetSymbol(): string;
|
|
51
51
|
protected transferToEthereum<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
52
52
|
}
|
|
@@ -148,7 +148,7 @@ declare class Interlay<TApi, TRes> extends ParachainNode<TApi, TRes> implements
|
|
|
148
148
|
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
declare class
|
|
151
|
+
declare class Heima<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
152
152
|
constructor();
|
|
153
153
|
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
154
154
|
}
|
|
@@ -255,14 +255,14 @@ declare class AssetHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> imp
|
|
|
255
255
|
private getSection;
|
|
256
256
|
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
257
257
|
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
258
|
-
createCurrencySpec(amount: TAmount, scenario: TScenario, version: Version, asset?: TAsset, overridedMultiLocation?: TMultiLocation | TMultiAsset[]):
|
|
258
|
+
createCurrencySpec(amount: TAmount, scenario: TScenario, version: Version, asset?: TAsset, overridedMultiLocation?: TMultiLocation | TMultiAsset[]): TXcmVersioned<TMultiAsset[]>;
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
declare class AssetHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
262
262
|
constructor();
|
|
263
263
|
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
264
264
|
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
265
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset, overridedMultiLocation?: TMultiLocation | TMultiAsset[]):
|
|
265
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset, overridedMultiLocation?: TMultiLocation | TMultiAsset[]): TXcmVersioned<TMultiAsset[]>;
|
|
266
266
|
}
|
|
267
267
|
|
|
268
268
|
declare class CoretimeKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
@@ -314,339 +314,216 @@ declare class Astar<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPo
|
|
|
314
314
|
protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
315
315
|
}
|
|
316
316
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
Concrete: TMultiLocation;
|
|
321
|
-
};
|
|
322
|
-
fun: {
|
|
323
|
-
Fungible: TAmount;
|
|
324
|
-
};
|
|
317
|
+
declare class Darwinia<TApi, TRes> extends ParachainNode<TApi, TRes> {
|
|
318
|
+
constructor();
|
|
319
|
+
transferRelayToPara(): TSerializedApiCall;
|
|
325
320
|
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
321
|
+
|
|
322
|
+
declare class Crab<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
323
|
+
constructor();
|
|
324
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
325
|
+
transferRelayToPara(): TSerializedApiCall;
|
|
326
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, _asset?: TAsset, overridedMultiLocation?: TMultiLocation): TXcmVersioned<TMultiAsset[]>;
|
|
331
327
|
}
|
|
332
328
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
};
|
|
338
|
-
type TOverrideMultiLocationSpecifier = {
|
|
339
|
-
type: 'Override';
|
|
340
|
-
value: TMultiLocation;
|
|
341
|
-
};
|
|
342
|
-
type TCurrencySymbolValue = string | TSymbolSpecifier;
|
|
343
|
-
type TCurrencySymbol = {
|
|
344
|
-
symbol: TCurrencySymbolValue;
|
|
345
|
-
};
|
|
346
|
-
type TCurrencyCore = TCurrencySymbol | {
|
|
347
|
-
id: TCurrency;
|
|
348
|
-
} | {
|
|
349
|
-
multilocation: TMultiLocationValue;
|
|
350
|
-
};
|
|
351
|
-
type TCurrencyCoreWithFee = WithAmount<TCurrencyCore> & {
|
|
352
|
-
isFeeAsset?: boolean;
|
|
353
|
-
};
|
|
354
|
-
type TMultiAssetWithFee = TMultiAsset & {
|
|
355
|
-
isFeeAsset?: boolean;
|
|
356
|
-
};
|
|
357
|
-
type TMultiLocationValue = string | TMultiLocation;
|
|
358
|
-
type TMultiLocationValueWithOverride = TMultiLocationValue | TOverrideMultiLocationSpecifier;
|
|
359
|
-
type TCurrencyInputWithAmount = WithAmount<TCurrencySymbol | {
|
|
360
|
-
id: TCurrency;
|
|
361
|
-
} | {
|
|
362
|
-
multilocation: TMultiLocationValueWithOverride;
|
|
363
|
-
}> | {
|
|
364
|
-
multiasset: TMultiAssetWithFee[] | TCurrencyCoreWithFee[];
|
|
365
|
-
};
|
|
366
|
-
type TCurrencyInput = TCurrencySymbol | {
|
|
367
|
-
id: TCurrency;
|
|
368
|
-
} | {
|
|
369
|
-
multilocation: TMultiLocationValueWithOverride;
|
|
370
|
-
} | {
|
|
371
|
-
multiasset: TMultiAssetWithFee[] | TCurrencyCoreWithFee[];
|
|
372
|
-
};
|
|
373
|
-
type WithAmount<TBase> = TBase & {
|
|
374
|
-
amount: TAmount;
|
|
375
|
-
};
|
|
376
|
-
interface TCurrencySelection {
|
|
377
|
-
id: {
|
|
378
|
-
Concrete: TMultiLocation;
|
|
379
|
-
};
|
|
380
|
-
fun: {
|
|
381
|
-
Fungible: string;
|
|
382
|
-
};
|
|
329
|
+
declare class Quartz<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
330
|
+
private static NATIVE_ASSET_ID;
|
|
331
|
+
constructor();
|
|
332
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
383
333
|
}
|
|
384
|
-
type TCurrencySelectionV4 = {
|
|
385
|
-
id: TMultiLocation;
|
|
386
|
-
fun: {
|
|
387
|
-
Fungible: string;
|
|
388
|
-
};
|
|
389
|
-
};
|
|
390
|
-
type TCurrencySelectionHeader = {
|
|
391
|
-
[key in Version]?: TCurrencySelection | TCurrencySelectionV4;
|
|
392
|
-
};
|
|
393
|
-
type TCurrencySelectionHeaderArr = {
|
|
394
|
-
[key in Version]?: [TCurrencySelection | TCurrencySelectionV4];
|
|
395
|
-
};
|
|
396
|
-
type TXcmForeignAsset = {
|
|
397
|
-
ForeignAsset: string | number | bigint | undefined;
|
|
398
|
-
};
|
|
399
|
-
type TForeignAssetId = {
|
|
400
|
-
ForeignAssetId: bigint | undefined;
|
|
401
|
-
};
|
|
402
|
-
type TForeignOrTokenAsset = TXcmForeignAsset | {
|
|
403
|
-
Token: string | undefined;
|
|
404
|
-
};
|
|
405
|
-
type TForeignOrNativeAsset = TXcmForeignAsset | 'Native';
|
|
406
|
-
type TXcmAsset = {
|
|
407
|
-
XCM: number | undefined;
|
|
408
|
-
};
|
|
409
|
-
type TMantaAsset = {
|
|
410
|
-
MantaCurrency: bigint | undefined;
|
|
411
|
-
};
|
|
412
|
-
type TNativeTokenAsset = 'NativeToken';
|
|
413
|
-
type TNodleAsset = 'NodleNative';
|
|
414
|
-
type TZeitgeistAsset = 'Ztg';
|
|
415
|
-
type TOtherReserveAsset = {
|
|
416
|
-
OtherReserve: string | bigint | undefined;
|
|
417
|
-
};
|
|
418
|
-
type TSelfReserveAsset = 'SelfReserve';
|
|
419
|
-
type TReserveAsset = TOtherReserveAsset | TSelfReserveAsset;
|
|
420
|
-
type TBifrostToken = {
|
|
421
|
-
Native: string;
|
|
422
|
-
} | {
|
|
423
|
-
VToken: string;
|
|
424
|
-
} | {
|
|
425
|
-
Token: string;
|
|
426
|
-
} | {
|
|
427
|
-
VSToken2: number;
|
|
428
|
-
} | {
|
|
429
|
-
VToken2: number;
|
|
430
|
-
} | {
|
|
431
|
-
Token2: number;
|
|
432
|
-
};
|
|
433
|
-
type TXTokensCurrencySelection = TCurrencySelectionHeader | TCurrencySelectionHeaderArr | TXcmForeignAsset | TForeignAssetId | TForeignOrTokenAsset | TXcmAsset | TMantaAsset | TOtherReserveAsset | TBifrostToken | string | bigint | number | undefined;
|
|
434
334
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
};
|
|
440
|
-
interface TPalletMap {
|
|
441
|
-
defaultPallet: TPallet;
|
|
442
|
-
supportedPallets: TPalletDetails[];
|
|
335
|
+
declare class Shiden<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer, IXTokensTransfer {
|
|
336
|
+
constructor();
|
|
337
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
338
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
339
|
+
protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
443
340
|
}
|
|
444
|
-
type TPalletJsonMap = Record<TNodeDotKsmWithRelayChains, TPalletMap>;
|
|
445
341
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
symbol: string;
|
|
451
|
-
decimals?: number;
|
|
452
|
-
manuallyAdded?: boolean;
|
|
453
|
-
alias?: string;
|
|
454
|
-
existentialDeposit?: string;
|
|
455
|
-
};
|
|
456
|
-
type TNativeAsset = TBaseAsset & {
|
|
457
|
-
isNative: true;
|
|
458
|
-
multiLocation?: object;
|
|
459
|
-
};
|
|
460
|
-
type TForeignAsset = TBaseAsset & AtLeastOne<{
|
|
461
|
-
assetId?: string;
|
|
462
|
-
multiLocation?: object;
|
|
463
|
-
}>;
|
|
464
|
-
type TAsset = TNativeAsset | TForeignAsset;
|
|
465
|
-
type TNodeAssets = {
|
|
466
|
-
relayChainAssetSymbol: TRelayChainSymbol;
|
|
467
|
-
nativeAssetSymbol: string;
|
|
468
|
-
isEVM: boolean;
|
|
469
|
-
supportsDryRunApi: boolean;
|
|
470
|
-
nativeAssets: TNativeAsset[];
|
|
471
|
-
otherAssets: TForeignAsset[];
|
|
472
|
-
};
|
|
473
|
-
type TAssetJsonMap = Record<TNodeWithRelayChains, TNodeAssets>;
|
|
342
|
+
declare class Manta<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
343
|
+
constructor();
|
|
344
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
345
|
+
}
|
|
474
346
|
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
address: TAddress;
|
|
480
|
-
currencySelection: TCurrencySelectionHeaderArr;
|
|
481
|
-
scenario: TScenario;
|
|
482
|
-
asset: WithAmount<TAsset>;
|
|
483
|
-
destination: TDestination;
|
|
484
|
-
paraIdTo?: number;
|
|
485
|
-
overriddenAsset?: TMultiLocation | TMultiAssetWithFee[];
|
|
486
|
-
version?: Version;
|
|
487
|
-
senderAddress?: string;
|
|
488
|
-
pallet?: string;
|
|
489
|
-
method?: string;
|
|
490
|
-
};
|
|
491
|
-
type TXTokensTransferOptions<TApi, TRes> = {
|
|
492
|
-
api: IPolkadotApi<TApi, TRes>;
|
|
493
|
-
asset: WithAmount<TAsset>;
|
|
494
|
-
addressSelection: TMultiLocationHeader;
|
|
495
|
-
fees: number;
|
|
496
|
-
scenario: TScenario;
|
|
497
|
-
origin: TNodePolkadotKusama;
|
|
498
|
-
destination: TDestination;
|
|
499
|
-
paraIdTo?: number;
|
|
500
|
-
overriddenAsset?: TMultiLocation | TMultiAsset[];
|
|
501
|
-
pallet?: string;
|
|
502
|
-
method?: string;
|
|
503
|
-
};
|
|
504
|
-
type TXTransferTransferOptions<TApi, TRes> = {
|
|
505
|
-
api: IPolkadotApi<TApi, TRes>;
|
|
506
|
-
asset: WithAmount<TAsset>;
|
|
507
|
-
recipientAddress: TAddress;
|
|
508
|
-
origin: TNodePolkadotKusama;
|
|
509
|
-
paraId?: number;
|
|
510
|
-
destination: TDestination;
|
|
511
|
-
overriddenAsset?: TMultiLocation | TMultiAsset[];
|
|
512
|
-
pallet?: string;
|
|
513
|
-
method?: string;
|
|
514
|
-
};
|
|
515
|
-
interface IPolkadotXCMTransfer {
|
|
516
|
-
transferPolkadotXCM: <TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>) => Promise<TRes>;
|
|
347
|
+
declare class Nodle<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
348
|
+
constructor();
|
|
349
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
350
|
+
transferRelayToPara(): TSerializedApiCall;
|
|
517
351
|
}
|
|
518
|
-
|
|
519
|
-
|
|
352
|
+
|
|
353
|
+
declare class NeuroWeb<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
354
|
+
constructor();
|
|
355
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
520
356
|
}
|
|
521
|
-
|
|
522
|
-
|
|
357
|
+
|
|
358
|
+
declare class Pendulum<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
359
|
+
constructor();
|
|
360
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
361
|
+
transferRelayToPara(): TSerializedApiCall;
|
|
523
362
|
}
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
V1 = "V1",
|
|
530
|
-
V2 = "V2",
|
|
531
|
-
V3 = "V3",
|
|
532
|
-
V4 = "V4"
|
|
363
|
+
|
|
364
|
+
declare class Zeitgeist<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
365
|
+
constructor();
|
|
366
|
+
private getCurrencySelection;
|
|
367
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
533
368
|
}
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
ONE = 1,
|
|
541
|
-
TWO = 2
|
|
369
|
+
|
|
370
|
+
declare class Collectives<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
371
|
+
constructor();
|
|
372
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
373
|
+
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
374
|
+
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): TXcmVersioned<TMultiAsset[]>;
|
|
542
375
|
}
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
376
|
+
|
|
377
|
+
declare class Phala<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTransferTransfer {
|
|
378
|
+
constructor();
|
|
379
|
+
transferXTransfer<TApi, TRes>(input: TXTransferTransferOptions<TApi, TRes>): TRes;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
declare class Subsocial<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
383
|
+
constructor();
|
|
384
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
declare class KiltSpiritnet<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
388
|
+
constructor();
|
|
389
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
390
|
+
transferRelayToPara(): TSerializedApiCall;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
declare class Curio<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
394
|
+
constructor();
|
|
395
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
declare class BridgeHubPolkadot<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
399
|
+
constructor();
|
|
400
|
+
_assetCheckEnabled: boolean;
|
|
401
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
402
|
+
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
declare class BridgeHubKusama<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
406
|
+
constructor();
|
|
407
|
+
_assetCheckEnabled: boolean;
|
|
408
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
409
|
+
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
declare class Mythos<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
413
|
+
constructor();
|
|
414
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
415
|
+
transferRelayToPara(): TSerializedApiCall;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
declare class Peaq<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
419
|
+
constructor();
|
|
420
|
+
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
421
|
+
transferRelayToPara(): TSerializedApiCall;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
declare class Polimec<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
425
|
+
constructor();
|
|
426
|
+
private getAssetMultiLocation;
|
|
427
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
428
|
+
transferRelayToPara(options: TRelayToParaOptions<TApi, TRes>): TSerializedApiCall;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
declare const nodes: <TApi, TRes>() => {
|
|
432
|
+
AssetHubPolkadot: AssetHubPolkadot<TApi, TRes>;
|
|
433
|
+
Acala: Acala<TApi, TRes>;
|
|
434
|
+
Astar: Astar<TApi, TRes>;
|
|
435
|
+
Unique: Unique<TApi, TRes>;
|
|
436
|
+
Crust: Crust<TApi, TRes>;
|
|
437
|
+
BifrostPolkadot: BifrostPolkadot<TApi, TRes>;
|
|
438
|
+
BridgeHubPolkadot: BridgeHubPolkadot<TApi, TRes>;
|
|
439
|
+
BridgeHubKusama: BridgeHubKusama<TApi, TRes>;
|
|
440
|
+
Bitgreen: Bitgreen<TApi, TRes>;
|
|
441
|
+
Centrifuge: Centrifuge<TApi, TRes>;
|
|
442
|
+
ComposableFinance: ComposableFinance<TApi, TRes>;
|
|
443
|
+
Darwinia: Darwinia<TApi, TRes>;
|
|
444
|
+
Hydration: Hydration<TApi, TRes>;
|
|
445
|
+
Interlay: Interlay<TApi, TRes>;
|
|
446
|
+
Heima: Heima<TApi, TRes>;
|
|
447
|
+
Moonbeam: Moonbeam<TApi, TRes>;
|
|
448
|
+
Parallel: Parallel<TApi, TRes>;
|
|
449
|
+
AssetHubKusama: AssetHubKusama<TApi, TRes>;
|
|
450
|
+
CoretimeKusama: CoretimeKusama<TApi, TRes>;
|
|
451
|
+
CoretimePolkadot: CoretimePolkadot<TApi, TRes>;
|
|
452
|
+
Encointer: Encointer<TApi, TRes>;
|
|
453
|
+
Altair: Altair<TApi, TRes>;
|
|
454
|
+
Amplitude: Amplitude<TApi, TRes>;
|
|
455
|
+
Bajun: Bajun<TApi, TRes>;
|
|
456
|
+
Basilisk: Basilisk<TApi, TRes>;
|
|
457
|
+
BifrostKusama: BifrostKusama<TApi, TRes>;
|
|
458
|
+
Calamari: Calamari<TApi, TRes>;
|
|
459
|
+
CrustShadow: CrustShadow<TApi, TRes>;
|
|
460
|
+
Crab: Crab<TApi, TRes>;
|
|
461
|
+
Imbue: Imbue<TApi, TRes>;
|
|
462
|
+
InvArchTinker: InvArchTinker<TApi, TRes>;
|
|
463
|
+
Karura: Karura<TApi, TRes>;
|
|
464
|
+
Kintsugi: Kintsugi<TApi, TRes>;
|
|
465
|
+
Moonriver: Moonriver<TApi, TRes>;
|
|
466
|
+
ParallelHeiko: ParallelHeiko<TApi, TRes>;
|
|
467
|
+
Picasso: Picasso<TApi, TRes>;
|
|
468
|
+
Quartz: Quartz<TApi, TRes>;
|
|
469
|
+
RobonomicsKusama: RobonomicsKusama<TApi, TRes>;
|
|
470
|
+
RobonomicsPolkadot: RobonomicsPolkadot<TApi, TRes>;
|
|
471
|
+
PeoplePolkadot: PeoplePolkadot<TApi, TRes>;
|
|
472
|
+
PeopleKusama: PeopleKusama<TApi, TRes>;
|
|
473
|
+
Shiden: Shiden<TApi, TRes>;
|
|
474
|
+
Turing: Turing<TApi, TRes>;
|
|
475
|
+
Manta: Manta<TApi, TRes>;
|
|
476
|
+
Nodle: Nodle<TApi, TRes>;
|
|
477
|
+
NeuroWeb: NeuroWeb<TApi, TRes>;
|
|
478
|
+
Pendulum: Pendulum<TApi, TRes>;
|
|
479
|
+
Zeitgeist: Zeitgeist<TApi, TRes>;
|
|
480
|
+
Collectives: Collectives<TApi, TRes>;
|
|
481
|
+
Phala: Phala<TApi, TRes>;
|
|
482
|
+
Subsocial: Subsocial<TApi, TRes>;
|
|
483
|
+
KiltSpiritnet: KiltSpiritnet<TApi, TRes>;
|
|
484
|
+
Curio: Curio<TApi, TRes>;
|
|
485
|
+
Mythos: Mythos<TApi, TRes>;
|
|
486
|
+
Peaq: Peaq<TApi, TRes>;
|
|
487
|
+
Polimec: Polimec<TApi, TRes>;
|
|
628
488
|
};
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
489
|
+
|
|
490
|
+
type TRelaychain = 'Polkadot' | 'Kusama';
|
|
491
|
+
type TNode = (typeof NODE_NAMES)[number];
|
|
492
|
+
type TNodePolkadotKusama = Exclude<TNode, 'Ethereum'>;
|
|
493
|
+
type TNodeWithRelayChains = (typeof NODES_WITH_RELAY_CHAINS)[number];
|
|
494
|
+
type TNodeDotKsmWithRelayChains = Exclude<TNodeWithRelayChains, 'Ethereum'>;
|
|
495
|
+
|
|
496
|
+
type TEcosystemType = 'polkadot' | 'kusama' | 'ethereum';
|
|
497
|
+
type TRelayChainSymbol = 'DOT' | 'KSM';
|
|
498
|
+
|
|
499
|
+
type AtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
500
|
+
[K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
|
|
501
|
+
}[Keys];
|
|
502
|
+
type TBaseAsset = {
|
|
503
|
+
symbol: string;
|
|
504
|
+
decimals?: number;
|
|
505
|
+
manuallyAdded?: boolean;
|
|
506
|
+
alias?: string;
|
|
507
|
+
existentialDeposit?: string;
|
|
632
508
|
};
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
type TRelayToParaOptions<TApi, TRes> = WithApi<TRelayToParaBaseOptions, TApi, TRes>;
|
|
637
|
-
type TSerializedApiCall = {
|
|
638
|
-
module: TPallet | 'Utility';
|
|
639
|
-
section: string;
|
|
640
|
-
parameters: Record<string, unknown>;
|
|
509
|
+
type TNativeAsset = TBaseAsset & {
|
|
510
|
+
isNative: true;
|
|
511
|
+
multiLocation?: object;
|
|
641
512
|
};
|
|
642
|
-
type
|
|
643
|
-
|
|
644
|
-
|
|
513
|
+
type TForeignAsset = TBaseAsset & AtLeastOne<{
|
|
514
|
+
assetId?: string;
|
|
515
|
+
multiLocation?: object;
|
|
516
|
+
}>;
|
|
517
|
+
type TAsset = TNativeAsset | TForeignAsset;
|
|
518
|
+
type TNodeAssets = {
|
|
519
|
+
relayChainAssetSymbol: TRelayChainSymbol;
|
|
520
|
+
nativeAssetSymbol: string;
|
|
521
|
+
isEVM: boolean;
|
|
522
|
+
supportsDryRunApi: boolean;
|
|
523
|
+
nativeAssets: TNativeAsset[];
|
|
524
|
+
otherAssets: TForeignAsset[];
|
|
645
525
|
};
|
|
646
|
-
type
|
|
647
|
-
type TXTokensSection = 'transfer' | 'transfer_multiasset' | 'transfer_multiassets';
|
|
648
|
-
type TPolkadotXcmSection = 'limited_teleport_assets' | 'limited_reserve_transfer_assets' | 'reserve_transfer_assets' | 'reserve_withdraw_assets' | 'transfer_assets';
|
|
649
|
-
type TXcmPalletSection = 'limited_teleport_assets' | 'reserve_transfer_assets' | 'limited_reserve_transfer_assets';
|
|
526
|
+
type TAssetJsonMap = Record<TNodeWithRelayChains, TNodeAssets>;
|
|
650
527
|
|
|
651
528
|
type TJunctionType = 'Parachain' | 'AccountId32' | 'AccountIndex64' | 'AccountKey20' | 'PalletInstance' | 'GeneralIndex' | 'GeneralKey' | 'OnlyChild' | 'Plurality' | 'GlobalConsensus';
|
|
652
529
|
type TNetworkId = string | null;
|
|
@@ -716,200 +593,297 @@ interface TMultiLocation {
|
|
|
716
593
|
parents: TStringOrNumber;
|
|
717
594
|
interior: TJunctions | 'Here';
|
|
718
595
|
}
|
|
719
|
-
type TMultiLocationHeader = {
|
|
720
|
-
[key in Version]?: TMultiLocation;
|
|
721
|
-
};
|
|
722
|
-
|
|
723
|
-
declare class Darwinia<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
724
|
-
constructor();
|
|
725
|
-
private getCurrencySelection;
|
|
726
|
-
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
727
|
-
transferRelayToPara(): TSerializedApiCall;
|
|
728
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version, _asset?: TAsset, overridedMultiLocation?: TMultiLocation): TCurrencySelectionHeaderArr;
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
declare class Crab<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
732
|
-
constructor();
|
|
733
|
-
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
734
|
-
transferRelayToPara(): TSerializedApiCall;
|
|
735
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): TCurrencySelectionHeaderArr;
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
declare class Quartz<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
739
|
-
private static NATIVE_ASSET_ID;
|
|
740
|
-
constructor();
|
|
741
|
-
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
declare class Shiden<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer, IXTokensTransfer {
|
|
745
|
-
constructor();
|
|
746
|
-
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
747
|
-
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
748
|
-
protected canUseXTokens({ asset }: TSendInternalOptions<TApi, TRes>): boolean;
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
declare class Manta<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
752
|
-
constructor();
|
|
753
|
-
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
declare class Nodle<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
757
|
-
constructor();
|
|
758
|
-
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
759
|
-
transferRelayToPara(): TSerializedApiCall;
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
declare class NeuroWeb<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
763
|
-
constructor();
|
|
764
|
-
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
declare class Pendulum<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
768
|
-
constructor();
|
|
769
|
-
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
770
|
-
transferRelayToPara(): TSerializedApiCall;
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
declare class Zeitgeist<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTokensTransfer {
|
|
774
|
-
constructor();
|
|
775
|
-
private getCurrencySelection;
|
|
776
|
-
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
declare class Collectives<TApi, TRes> extends ParachainNode<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
780
|
-
constructor();
|
|
781
|
-
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
782
|
-
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
783
|
-
createCurrencySpec(amount: string, scenario: TScenario, version: Version, asset?: TAsset): TCurrencySelectionHeaderArr;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
declare class Khala<TApi, TRes> extends ParachainNode<TApi, TRes> implements IXTransferTransfer {
|
|
787
|
-
constructor();
|
|
788
|
-
transferXTransfer<TApi, TRes>(input: TXTransferTransferOptions<TApi, TRes>): TRes;
|
|
789
|
-
}
|
|
790
596
|
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
597
|
+
type TPallet = (typeof SUPPORTED_PALLETS)[number];
|
|
598
|
+
type TPalletDetails = {
|
|
599
|
+
name: TPallet;
|
|
600
|
+
index: number;
|
|
601
|
+
};
|
|
602
|
+
interface TPalletMap {
|
|
603
|
+
defaultPallet: TPallet;
|
|
604
|
+
supportedPallets: TPalletDetails[];
|
|
794
605
|
}
|
|
606
|
+
type TPalletJsonMap = Record<TNodeDotKsmWithRelayChains, TPalletMap>;
|
|
795
607
|
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
608
|
+
type TMultiAsset = TMultiAssetV3 | TMultiAssetV4;
|
|
609
|
+
interface TMultiAssetV3 {
|
|
610
|
+
id: {
|
|
611
|
+
Concrete: TMultiLocation;
|
|
612
|
+
};
|
|
613
|
+
fun: {
|
|
614
|
+
Fungible: TAmount;
|
|
615
|
+
};
|
|
799
616
|
}
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
617
|
+
interface TMultiAssetV4 {
|
|
618
|
+
id: TMultiLocation;
|
|
619
|
+
fun: {
|
|
620
|
+
Fungible: TAmount;
|
|
621
|
+
};
|
|
805
622
|
}
|
|
806
623
|
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
624
|
+
type TCurrency = string | number | bigint;
|
|
625
|
+
type TSymbolSpecifier = {
|
|
626
|
+
type: 'Native' | 'Foreign' | 'ForeignAbstract';
|
|
627
|
+
value: string;
|
|
628
|
+
};
|
|
629
|
+
type TOverrideMultiLocationSpecifier = {
|
|
630
|
+
type: 'Override';
|
|
631
|
+
value: TMultiLocation;
|
|
632
|
+
};
|
|
633
|
+
type TCurrencySymbolValue = string | TSymbolSpecifier;
|
|
634
|
+
type TCurrencySymbol = {
|
|
635
|
+
symbol: TCurrencySymbolValue;
|
|
636
|
+
};
|
|
637
|
+
type TCurrencyCore = TCurrencySymbol | {
|
|
638
|
+
id: TCurrency;
|
|
639
|
+
} | {
|
|
640
|
+
multilocation: TMultiLocationValue;
|
|
641
|
+
};
|
|
642
|
+
type TCurrencyCoreWithFee = WithAmount<TCurrencyCore> & {
|
|
643
|
+
isFeeAsset?: boolean;
|
|
644
|
+
};
|
|
645
|
+
type TMultiAssetWithFee = TMultiAsset & {
|
|
646
|
+
isFeeAsset?: boolean;
|
|
647
|
+
};
|
|
648
|
+
type TMultiLocationValue = string | TMultiLocation;
|
|
649
|
+
type TMultiLocationValueWithOverride = TMultiLocationValue | TOverrideMultiLocationSpecifier;
|
|
650
|
+
type TCurrencyInputWithAmount = WithAmount<TCurrencySymbol | {
|
|
651
|
+
id: TCurrency;
|
|
652
|
+
} | {
|
|
653
|
+
multilocation: TMultiLocationValueWithOverride;
|
|
654
|
+
}> | {
|
|
655
|
+
multiasset: TMultiAssetWithFee[] | TCurrencyCoreWithFee[];
|
|
656
|
+
};
|
|
657
|
+
type TCurrencyInput = TCurrencySymbol | {
|
|
658
|
+
id: TCurrency;
|
|
659
|
+
} | {
|
|
660
|
+
multilocation: TMultiLocationValueWithOverride;
|
|
661
|
+
} | {
|
|
662
|
+
multiasset: TMultiAssetWithFee[] | TCurrencyCoreWithFee[];
|
|
663
|
+
};
|
|
664
|
+
type WithAmount<TBase> = TBase & {
|
|
665
|
+
amount: TAmount;
|
|
666
|
+
};
|
|
667
|
+
type OneKey<K extends string, V = unknown> = {
|
|
668
|
+
[P in K]: Record<P, V> & Partial<Record<Exclude<K, P>, never>> extends infer O ? {
|
|
669
|
+
[Q in keyof O]: O[Q];
|
|
670
|
+
} : never;
|
|
671
|
+
}[K];
|
|
672
|
+
type TXcmVersioned<T> = OneKey<Version, T>;
|
|
673
|
+
type TXcmForeignAsset = {
|
|
674
|
+
ForeignAsset: string | number | bigint | undefined;
|
|
675
|
+
};
|
|
676
|
+
type TForeignAssetId = {
|
|
677
|
+
ForeignAssetId: bigint | undefined;
|
|
678
|
+
};
|
|
679
|
+
type TForeignOrTokenAsset = TXcmForeignAsset | {
|
|
680
|
+
Token: string | undefined;
|
|
681
|
+
};
|
|
682
|
+
type TForeignOrNativeAsset = TXcmForeignAsset | 'Native';
|
|
683
|
+
type TXcmAsset = {
|
|
684
|
+
XCM: number | undefined;
|
|
685
|
+
};
|
|
686
|
+
type TMantaAsset = {
|
|
687
|
+
MantaCurrency: bigint | undefined;
|
|
688
|
+
};
|
|
689
|
+
type TNativeTokenAsset = 'NativeToken';
|
|
690
|
+
type TNodleAsset = 'NodleNative';
|
|
691
|
+
type TZeitgeistAsset = 'Ztg';
|
|
692
|
+
type TOtherReserveAsset = {
|
|
693
|
+
OtherReserve: string | bigint | undefined;
|
|
694
|
+
};
|
|
695
|
+
type TSelfReserveAsset = 'SelfReserve';
|
|
696
|
+
type TReserveAsset = TOtherReserveAsset | TSelfReserveAsset;
|
|
697
|
+
type TBifrostToken = {
|
|
698
|
+
Native: string;
|
|
699
|
+
} | {
|
|
700
|
+
VToken: string;
|
|
701
|
+
} | {
|
|
702
|
+
Token: string;
|
|
703
|
+
} | {
|
|
704
|
+
VSToken2: number;
|
|
705
|
+
} | {
|
|
706
|
+
VToken2: number;
|
|
707
|
+
} | {
|
|
708
|
+
Token2: number;
|
|
709
|
+
};
|
|
710
|
+
type TXTokensCurrencySelection = TXcmVersioned<TMultiLocation | TMultiAsset | TMultiAsset[]> | TXcmForeignAsset | TForeignAssetId | TForeignOrTokenAsset | TXcmAsset | TMantaAsset | TOtherReserveAsset | TBifrostToken | string | bigint | number | undefined;
|
|
811
711
|
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
712
|
+
type TPolkadotXCMTransferOptions<TApi, TRes> = {
|
|
713
|
+
api: IPolkadotApi<TApi, TRes>;
|
|
714
|
+
header: TXcmVersioned<TMultiLocation>;
|
|
715
|
+
addressSelection: TXcmVersioned<TMultiLocation>;
|
|
716
|
+
address: TAddress;
|
|
717
|
+
currencySelection: TXcmVersioned<TMultiAsset[]>;
|
|
718
|
+
scenario: TScenario;
|
|
719
|
+
asset: WithAmount<TAsset>;
|
|
720
|
+
destination: TDestination;
|
|
721
|
+
paraIdTo?: number;
|
|
722
|
+
overriddenAsset?: TMultiLocation | TMultiAssetWithFee[];
|
|
723
|
+
version?: Version;
|
|
724
|
+
senderAddress?: string;
|
|
725
|
+
pallet?: string;
|
|
726
|
+
method?: string;
|
|
727
|
+
};
|
|
728
|
+
type TXTokensTransferOptions<TApi, TRes> = {
|
|
729
|
+
api: IPolkadotApi<TApi, TRes>;
|
|
730
|
+
asset: WithAmount<TAsset>;
|
|
731
|
+
addressSelection: TXcmVersioned<TMultiLocation>;
|
|
732
|
+
fees: number;
|
|
733
|
+
scenario: TScenario;
|
|
734
|
+
origin: TNodePolkadotKusama;
|
|
735
|
+
destination: TDestination;
|
|
736
|
+
paraIdTo?: number;
|
|
737
|
+
overriddenAsset?: TMultiLocation | TMultiAsset[];
|
|
738
|
+
pallet?: string;
|
|
739
|
+
method?: string;
|
|
740
|
+
};
|
|
741
|
+
type TXTransferTransferOptions<TApi, TRes> = {
|
|
742
|
+
api: IPolkadotApi<TApi, TRes>;
|
|
743
|
+
asset: WithAmount<TAsset>;
|
|
744
|
+
recipientAddress: TAddress;
|
|
745
|
+
origin: TNodePolkadotKusama;
|
|
746
|
+
paraId?: number;
|
|
747
|
+
destination: TDestination;
|
|
748
|
+
overriddenAsset?: TMultiLocation | TMultiAsset[];
|
|
749
|
+
pallet?: string;
|
|
750
|
+
method?: string;
|
|
751
|
+
};
|
|
752
|
+
interface IPolkadotXCMTransfer {
|
|
753
|
+
transferPolkadotXCM: <TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>) => Promise<TRes>;
|
|
817
754
|
}
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
constructor();
|
|
821
|
-
_assetCheckEnabled: boolean;
|
|
822
|
-
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
823
|
-
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
755
|
+
interface IXTokensTransfer {
|
|
756
|
+
transferXTokens: <TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>) => TRes;
|
|
824
757
|
}
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
constructor();
|
|
828
|
-
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
829
|
-
transferRelayToPara(): TSerializedApiCall;
|
|
758
|
+
interface IXTransferTransfer {
|
|
759
|
+
transferXTransfer: <TApi, TRes>(input: TXTransferTransferOptions<TApi, TRes>) => TRes;
|
|
830
760
|
}
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
761
|
+
type TScenario = 'ParaToRelay' | 'ParaToPara' | 'RelayToPara';
|
|
762
|
+
/**
|
|
763
|
+
* The XCM version.
|
|
764
|
+
*/
|
|
765
|
+
declare enum Version {
|
|
766
|
+
V1 = "V1",
|
|
767
|
+
V2 = "V2",
|
|
768
|
+
V3 = "V3",
|
|
769
|
+
V4 = "V4"
|
|
836
770
|
}
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
771
|
+
/**
|
|
772
|
+
* The supported XCM versions for asset claims.
|
|
773
|
+
*/
|
|
774
|
+
type TVersionClaimAssets = Version.V3 | Version.V2;
|
|
775
|
+
declare enum Parents {
|
|
776
|
+
ZERO = 0,
|
|
777
|
+
ONE = 1,
|
|
778
|
+
TWO = 2
|
|
843
779
|
}
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
Karura: Karura<TApi, TRes>;
|
|
878
|
-
Kintsugi: Kintsugi<TApi, TRes>;
|
|
879
|
-
Moonriver: Moonriver<TApi, TRes>;
|
|
880
|
-
ParallelHeiko: ParallelHeiko<TApi, TRes>;
|
|
881
|
-
Picasso: Picasso<TApi, TRes>;
|
|
882
|
-
Quartz: Quartz<TApi, TRes>;
|
|
883
|
-
RobonomicsKusama: RobonomicsKusama<TApi, TRes>;
|
|
884
|
-
RobonomicsPolkadot: RobonomicsPolkadot<TApi, TRes>;
|
|
885
|
-
PeoplePolkadot: PeoplePolkadot<TApi, TRes>;
|
|
886
|
-
PeopleKusama: PeopleKusama<TApi, TRes>;
|
|
887
|
-
Shiden: Shiden<TApi, TRes>;
|
|
888
|
-
Turing: Turing<TApi, TRes>;
|
|
889
|
-
Manta: Manta<TApi, TRes>;
|
|
890
|
-
Nodle: Nodle<TApi, TRes>;
|
|
891
|
-
NeuroWeb: NeuroWeb<TApi, TRes>;
|
|
892
|
-
Pendulum: Pendulum<TApi, TRes>;
|
|
893
|
-
Zeitgeist: Zeitgeist<TApi, TRes>;
|
|
894
|
-
Collectives: Collectives<TApi, TRes>;
|
|
895
|
-
Khala: Khala<TApi, TRes>;
|
|
896
|
-
Phala: Phala<TApi, TRes>;
|
|
897
|
-
Subsocial: Subsocial<TApi, TRes>;
|
|
898
|
-
KiltSpiritnet: KiltSpiritnet<TApi, TRes>;
|
|
899
|
-
Curio: Curio<TApi, TRes>;
|
|
900
|
-
Mythos: Mythos<TApi, TRes>;
|
|
901
|
-
Peaq: Peaq<TApi, TRes>;
|
|
902
|
-
Polimec: Polimec<TApi, TRes>;
|
|
780
|
+
type TAmount = string | number | bigint;
|
|
781
|
+
type TAddress = string | TMultiLocation;
|
|
782
|
+
type TDestination = TNodeWithRelayChains | TMultiLocation;
|
|
783
|
+
type TRelayToParaDestination = TNodePolkadotKusama | TMultiLocation;
|
|
784
|
+
type TSendBaseOptions = {
|
|
785
|
+
/**
|
|
786
|
+
* The destination address. A SS58 or H160 format.
|
|
787
|
+
*/
|
|
788
|
+
address: TAddress;
|
|
789
|
+
/**
|
|
790
|
+
* The optional sender address. A SS58
|
|
791
|
+
*/
|
|
792
|
+
senderAddress?: string;
|
|
793
|
+
/**
|
|
794
|
+
* The destination node or multi-location
|
|
795
|
+
*/
|
|
796
|
+
destination: TDestination;
|
|
797
|
+
/**
|
|
798
|
+
* The optional destination parachain ID
|
|
799
|
+
*/
|
|
800
|
+
paraIdTo?: number;
|
|
801
|
+
/**
|
|
802
|
+
* The optional overrided XCM version
|
|
803
|
+
*/
|
|
804
|
+
version?: Version;
|
|
805
|
+
/**
|
|
806
|
+
* The optional pallet override
|
|
807
|
+
*/
|
|
808
|
+
pallet?: string;
|
|
809
|
+
/**
|
|
810
|
+
* The optional pallet method override
|
|
811
|
+
*/
|
|
812
|
+
method?: string;
|
|
903
813
|
};
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
type
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
814
|
+
/**
|
|
815
|
+
* Options for transferring from a parachain to another parachain or relay chain
|
|
816
|
+
*/
|
|
817
|
+
type TSendOptions<TApi, TRes> = WithApi<TSendBaseOptions, TApi, TRes> & {
|
|
818
|
+
/**
|
|
819
|
+
* The origin node
|
|
820
|
+
*/
|
|
821
|
+
origin: TNodeDotKsmWithRelayChains;
|
|
822
|
+
/**
|
|
823
|
+
* The currency to transfer. Either ID, symbol, multi-location, or multi-asset
|
|
824
|
+
*/
|
|
825
|
+
currency: TCurrencyInputWithAmount;
|
|
826
|
+
};
|
|
827
|
+
type TSendInternalOptions<TApi, TRes> = TSendBaseOptions & {
|
|
828
|
+
api: IPolkadotApi<TApi, TRes>;
|
|
829
|
+
asset: WithAmount<TAsset>;
|
|
830
|
+
overriddenAsset?: TMultiLocation | TMultiAssetWithFee[];
|
|
831
|
+
};
|
|
832
|
+
type TRelayToParaBaseOptions = {
|
|
833
|
+
/**
|
|
834
|
+
* The origin node
|
|
835
|
+
*/
|
|
836
|
+
origin: TRelaychain;
|
|
837
|
+
/**
|
|
838
|
+
* The destination node or multi-location
|
|
839
|
+
*/
|
|
840
|
+
destination: TRelayToParaDestination;
|
|
841
|
+
/**
|
|
842
|
+
* The destination address. A SS58 or H160 format.
|
|
843
|
+
*/
|
|
844
|
+
address: TAddress;
|
|
845
|
+
/**
|
|
846
|
+
* The optional destination parachain ID
|
|
847
|
+
*/
|
|
848
|
+
paraIdTo?: number;
|
|
849
|
+
/**
|
|
850
|
+
* The optional overrided XCM version
|
|
851
|
+
*/
|
|
852
|
+
version?: Version;
|
|
853
|
+
/**
|
|
854
|
+
* The DOT or KSM asset to transfer
|
|
855
|
+
*/
|
|
856
|
+
asset: WithAmount<TAsset>;
|
|
857
|
+
/**
|
|
858
|
+
* The optional pallet override
|
|
859
|
+
*/
|
|
860
|
+
pallet?: string;
|
|
861
|
+
/**
|
|
862
|
+
* The optional pallet method override
|
|
863
|
+
*/
|
|
864
|
+
method?: string;
|
|
865
|
+
};
|
|
866
|
+
type TRelayToParaOverrides = {
|
|
867
|
+
section: TXcmPalletSection;
|
|
868
|
+
includeFee: boolean;
|
|
869
|
+
};
|
|
870
|
+
/**
|
|
871
|
+
* Options for transferring from a relay chain to a parachain
|
|
872
|
+
*/
|
|
873
|
+
type TRelayToParaOptions<TApi, TRes> = WithApi<TRelayToParaBaseOptions, TApi, TRes>;
|
|
874
|
+
type TSerializedApiCall = {
|
|
875
|
+
module: TPallet | 'Utility';
|
|
876
|
+
section: string;
|
|
877
|
+
parameters: Record<string, unknown>;
|
|
878
|
+
};
|
|
879
|
+
type TDestWeight = {
|
|
880
|
+
ref_time: bigint;
|
|
881
|
+
proof_size: bigint;
|
|
882
|
+
};
|
|
883
|
+
type TXTransferSection = 'transfer';
|
|
884
|
+
type TXTokensSection = 'transfer' | 'transfer_multiasset' | 'transfer_multiassets';
|
|
885
|
+
type TPolkadotXcmSection = 'limited_teleport_assets' | 'limited_reserve_transfer_assets' | 'reserve_transfer_assets' | 'reserve_withdraw_assets' | 'transfer_assets';
|
|
886
|
+
type TXcmPalletSection = 'limited_teleport_assets' | 'reserve_transfer_assets' | 'limited_reserve_transfer_assets';
|
|
913
887
|
|
|
914
888
|
type TEdJsonMap = Record<TNodeDotKsmWithRelayChains, string | null>;
|
|
915
889
|
|
|
@@ -996,7 +970,7 @@ type TEvmBuilderOptionsBase = {
|
|
|
996
970
|
/**
|
|
997
971
|
* The source node. Can be either 'Ethereum' or 'Moonbeam'.
|
|
998
972
|
*/
|
|
999
|
-
from: 'Ethereum' | 'Moonbeam' | 'Moonriver';
|
|
973
|
+
from: 'Ethereum' | 'Moonbeam' | 'Moonriver' | 'Darwinia';
|
|
1000
974
|
/**
|
|
1001
975
|
* The destination node on Polkadot network.
|
|
1002
976
|
*/
|
|
@@ -1061,8 +1035,9 @@ type TBatchOptions = {
|
|
|
1061
1035
|
};
|
|
1062
1036
|
interface IFromBuilder<TApi, TRes> {
|
|
1063
1037
|
from: (node: TNodeDotKsmWithRelayChains) => IToBuilder<TApi, TRes>;
|
|
1064
|
-
claimFrom: (node: TNodeWithRelayChains) => IFungibleBuilder<TRes>;
|
|
1038
|
+
claimFrom: (node: TNodeWithRelayChains) => IFungibleBuilder<TApi, TRes>;
|
|
1065
1039
|
buildBatch: (options?: TBatchOptions) => Promise<TRes>;
|
|
1040
|
+
getApi: () => TApi;
|
|
1066
1041
|
disconnect: () => Promise<void>;
|
|
1067
1042
|
}
|
|
1068
1043
|
interface IToBuilder<TApi, TRes> {
|
|
@@ -1071,21 +1046,22 @@ interface IToBuilder<TApi, TRes> {
|
|
|
1071
1046
|
interface ICurrencyBuilder<TApi, TRes> {
|
|
1072
1047
|
currency: (currency: TCurrencyInputWithAmount) => IAddressBuilder<TApi, TRes>;
|
|
1073
1048
|
}
|
|
1074
|
-
interface IFinalBuilder<TRes> {
|
|
1049
|
+
interface IFinalBuilder<TApi, TRes> {
|
|
1075
1050
|
disconnect: () => Promise<void>;
|
|
1051
|
+
getApi: () => TApi;
|
|
1076
1052
|
build: () => Promise<TRes>;
|
|
1077
1053
|
}
|
|
1078
1054
|
interface IAddressBuilder<TApi, TRes> {
|
|
1079
1055
|
address: (address: TAddress, senderAddress?: string) => IFinalBuilderWithOptions<TApi, TRes>;
|
|
1080
1056
|
}
|
|
1081
|
-
interface IFungibleBuilder<TRes> {
|
|
1082
|
-
fungible: (multiAssets: TMultiAsset[]) => IAccountBuilder<TRes>;
|
|
1057
|
+
interface IFungibleBuilder<TApi, TRes> {
|
|
1058
|
+
fungible: (multiAssets: TMultiAsset[]) => IAccountBuilder<TApi, TRes>;
|
|
1083
1059
|
}
|
|
1084
|
-
interface IAccountBuilder<TRes> {
|
|
1085
|
-
account: (address: TAddress) => IVersionBuilder<TRes>;
|
|
1060
|
+
interface IAccountBuilder<TApi, TRes> {
|
|
1061
|
+
account: (address: TAddress) => IVersionBuilder<TApi, TRes>;
|
|
1086
1062
|
}
|
|
1087
|
-
interface IVersionBuilder<TRes> extends IFinalBuilder<TRes> {
|
|
1088
|
-
xcmVersion: (version: TVersionClaimAssets) => IFinalBuilder<TRes>;
|
|
1063
|
+
interface IVersionBuilder<TApi, TRes> extends IFinalBuilder<TApi, TRes> {
|
|
1064
|
+
xcmVersion: (version: TVersionClaimAssets) => IFinalBuilder<TApi, TRes>;
|
|
1089
1065
|
}
|
|
1090
1066
|
interface IAddToBatchBuilder<TApi, TRes> {
|
|
1091
1067
|
addToBatch(): IFromBuilder<TApi, TRes>;
|
|
@@ -1094,6 +1070,7 @@ interface IFinalBuilderWithOptions<TApi, TRes> extends IAddToBatchBuilder<TApi,
|
|
|
1094
1070
|
xcmVersion: (version: Version) => this;
|
|
1095
1071
|
customPallet: (pallet: string, method: string) => this;
|
|
1096
1072
|
disconnect: () => Promise<void>;
|
|
1073
|
+
getApi: () => TApi;
|
|
1097
1074
|
build: () => Promise<TRes>;
|
|
1098
1075
|
dryRun: (senderAddress: string) => Promise<TDryRunResult>;
|
|
1099
1076
|
}
|
|
@@ -1427,6 +1404,7 @@ declare const getAssetDecimals: (node: TNodeWithRelayChains, symbol: string) =>
|
|
|
1427
1404
|
* @returns The node name if found; otherwise, null.
|
|
1428
1405
|
*/
|
|
1429
1406
|
declare const getTNode: (paraId: number, ecosystem: TEcosystemType) => TNodeWithRelayChains | null;
|
|
1407
|
+
declare const hasDryRunSupport: (node: TNodeWithRelayChains) => boolean;
|
|
1430
1408
|
|
|
1431
1409
|
declare const getAssetBalanceInternal: <TApi, TRes>({ address, node, currency, api }: TGetAssetBalanceOptions<TApi, TRes>) => Promise<bigint>;
|
|
1432
1410
|
declare const getAssetBalance: <TApi, TRes>(options: TGetAssetBalanceOptions<TApi, TRes>) => Promise<bigint>;
|
|
@@ -1551,7 +1529,7 @@ declare class GeneralBuilder<TApi, TRes> implements IToBuilder<TApi, TRes>, ICur
|
|
|
1551
1529
|
* @param node - The node from which to claim assets.
|
|
1552
1530
|
* @returns An instance of Builder
|
|
1553
1531
|
*/
|
|
1554
|
-
claimFrom(node: TNodeWithRelayChains): IFungibleBuilder<TRes>;
|
|
1532
|
+
claimFrom(node: TNodeWithRelayChains): IFungibleBuilder<TApi, TRes>;
|
|
1555
1533
|
/**
|
|
1556
1534
|
* Specifies the currency to be used in the transaction. Symbol, ID, multi-location or multi-asset.
|
|
1557
1535
|
*
|
|
@@ -1601,6 +1579,12 @@ declare class GeneralBuilder<TApi, TRes> implements IToBuilder<TApi, TRes>, ICur
|
|
|
1601
1579
|
*/
|
|
1602
1580
|
build(): Promise<TRes>;
|
|
1603
1581
|
dryRun(senderAddress: string): Promise<TDryRunResult>;
|
|
1582
|
+
/**
|
|
1583
|
+
* Returns the API instance used by the builder.
|
|
1584
|
+
*
|
|
1585
|
+
* @returns The API instance.
|
|
1586
|
+
*/
|
|
1587
|
+
getApi(): TApi;
|
|
1604
1588
|
disconnect(): Promise<void>;
|
|
1605
1589
|
}
|
|
1606
1590
|
/**
|
|
@@ -1615,9 +1599,9 @@ declare const createX1Payload: (version: Version, junction: TJunction) => TJunct
|
|
|
1615
1599
|
|
|
1616
1600
|
declare const deepEqual: (obj1: unknown, obj2: unknown) => boolean;
|
|
1617
1601
|
|
|
1618
|
-
declare const generateAddressMultiLocationV4: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>, address: TAddress) =>
|
|
1602
|
+
declare const generateAddressMultiLocationV4: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>, address: TAddress) => TXcmVersioned<TMultiLocation>;
|
|
1619
1603
|
|
|
1620
|
-
declare const generateAddressPayload: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>, scenario: TScenario, pallet: TPallet | null, recipientAddress: TAddress, version: Version, nodeId: number | undefined) =>
|
|
1604
|
+
declare const generateAddressPayload: <TApi, TRes>(api: IPolkadotApi<TApi, TRes>, scenario: TScenario, pallet: TPallet | null, recipientAddress: TAddress, version: Version, nodeId: number | undefined) => TXcmVersioned<TMultiLocation>;
|
|
1621
1605
|
|
|
1622
1606
|
declare const getFees: (scenario: TScenario) => number;
|
|
1623
1607
|
|
|
@@ -1772,4 +1756,4 @@ declare const getNodeProviders: (node: TNodeDotKsmWithRelayChains) => string[];
|
|
|
1772
1756
|
*/
|
|
1773
1757
|
declare const getParaId: (node: TNodeWithRelayChains) => number;
|
|
1774
1758
|
|
|
1775
|
-
export { BatchMode, Builder, DuplicateAssetError, DuplicateAssetIdError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, Foreign, ForeignAbstract, GeneralBuilder, type IAccountBuilder, type IAddToBatchBuilder, type IAddressBuilder, type ICurrencyBuilder, type IFinalBuilder, type IFinalBuilderWithOptions, type IFromBuilder, type IFungibleBuilder, type IPolkadotApi, type IPolkadotXCMTransfer, type IToBuilder, type IVersionBuilder, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidAddressError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Native, NoXCMSupportImplementedError, NodeNotSupportedError, Override, Parents, PolkadotXcmError, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TApiOrUrl, type TAsset, type TAssetJsonMap, type TBalanceResponse, type TBatchOptions, type TBifrostToken, type TCurrency, type TCurrencyCore, type TCurrencyCoreWithFee, type TCurrencyInput, type TCurrencyInputWithAmount, type
|
|
1759
|
+
export { BatchMode, Builder, DuplicateAssetError, DuplicateAssetIdError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, Foreign, ForeignAbstract, GeneralBuilder, type IAccountBuilder, type IAddToBatchBuilder, type IAddressBuilder, type ICurrencyBuilder, type IFinalBuilder, type IFinalBuilderWithOptions, type IFromBuilder, type IFungibleBuilder, type IPolkadotApi, type IPolkadotXCMTransfer, type IToBuilder, type IVersionBuilder, type IXTokensTransfer, type IXTransferTransfer, IncompatibleNodesError, InvalidAddressError, InvalidCurrencyError, NODES_WITH_RELAY_CHAINS, NODES_WITH_RELAY_CHAINS_DOT_KSM, NODE_NAMES, NODE_NAMES_DOT_KSM, Native, NoXCMSupportImplementedError, NodeNotSupportedError, type OneKey, Override, Parents, PolkadotXcmError, SUPPORTED_PALLETS, ScenarioNotSupportedError, type TAddress, type TAmount, type TApiOrUrl, type TAsset, type TAssetJsonMap, type TBalanceResponse, type TBatchOptions, type TBifrostToken, type TCurrency, type TCurrencyCore, type TCurrencyCoreWithFee, type TCurrencyInput, type TCurrencyInputWithAmount, type TCurrencySymbol, type TCurrencySymbolValue, type TDestWeight, type TDestination, type TDryRunBaseOptions, type TDryRunOptions, type TDryRunResult, type TEcosystemType, type TEdJsonMap, type TEvmBuilderOptions, type TEvmBuilderOptionsBase, type TForeignAsset, type TForeignAssetId, type TForeignOrNativeAsset, type TForeignOrTokenAsset, type TGetAssetBalanceOptions, type TGetAssetBalanceOptionsBase, type TGetBalanceForeignOptions, type TGetBalanceForeignOptionsBase, type TGetBalanceNativeOptions, type TGetBalanceNativeOptionsBase, type TGetMaxForeignTransferableAmountOptions, type TGetMaxForeignTransferableAmountOptionsBase, type TGetMaxNativeTransferableAmountOptions, type TGetMaxNativeTransferableAmountOptionsBase, type TGetOriginFeeDetailsOptions, type TGetOriginFeeDetailsOptionsBase, type TGetTransferInfoOptions, type TGetTransferInfoOptionsBase, type TGetTransferableAmountOptions, type TGetTransferableAmountOptionsBase, type TJunction, type TJunctionGeneralIndex, type TJunctionParachain, type TJunctionType, type TJunctions, type TMantaAsset, type TModuleError, type TMultiAsset, type TMultiAssetV3, type TMultiAssetV4, type TMultiAssetWithFee, type TMultiLocation, type TMultiLocationValue, type TMultiLocationValueWithOverride, type TNativeAsset, type TNativeTokenAsset, type TNode, type TNodeAssets, type TNodeConfig, type TNodeConfigMap, type TNodeDotKsmWithRelayChains, type TNodePolkadotKusama, type TNodeWithRelayChains, type TNodleAsset, type TOptionalEvmBuilderOptions, type TOriginFeeDetails, type TOtherReserveAsset, type TOverrideMultiLocationSpecifier, type TPallet, type TPalletDetails, type TPalletJsonMap, type TPalletMap, type TPolkadotXCMTransferOptions, type TPolkadotXcmSection, type TProviderEntry, type TRelayChainSymbol, type TRelayToParaDestination, type TRelayToParaOptions, type TRelayToParaOverrides, type TRelaychain, type TReserveAsset, type TScenario, type TSelfReserveAsset, type TSendBaseOptions, type TSendInternalOptions, type TSendOptions, type TSerializeEthTransferOptions, type TSerializedApiCall, type TSerializedEthTransfer, type TSymbolSpecifier, type TTransferInfo, type TVerifyEdOnDestinationOptions, type TVerifyEdOnDestinationOptionsBase, type TVersionClaimAssets, type TXTokensCurrencySelection, type TXTokensSection, type TXTokensTransferOptions, type TXTransferSection, type TXTransferTransferOptions, type TXcmAsset, type TXcmForeignAsset, type TXcmPalletSection, type TXcmVersioned, type TZeitgeistAsset, Version, type WithAmount, type WithApi, XTokensError, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, createApiInstanceForNode, createX1Payload, deepEqual, determineRelayChain, findAssetById, findAssetByMultiLocation, findAssetBySymbol, findBestMatches, generateAddressMultiLocationV4, generateAddressPayload, getAllAssetsSymbols, getAssetBalance, getAssetBalanceInternal, getAssetBySymbolOrId, getAssetDecimals, getAssetId, getAssetMultiLocation, getAssets, getAssetsObject, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getDefaultPallet, getDryRun, getExistentialDeposit, getFees, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getNativeAssetSymbol, getNativeAssets, getNode, getNodeConfig, getNodeProviders, getOriginFeeDetails, getOriginFeeDetailsInternal, getOtherAssets, getParaEthTransferFees, getParaId, getRelayChainSymbol, getSupportedAssets, getSupportedPallets, getSupportedPalletsDetails, getTNode, getTransferInfo, getTransferableAmount, hasDryRunSupport, hasSupportForAsset, isEthersContract, isEthersSigner, isForeignAsset, isNodeEvm, isOverrideMultiLocationSpecifier, isRelayChain, isSymbolSpecifier, normalizeSymbol, resolveModuleError, resolveParaId, send, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, validateAddress, verifyEdOnDestination };
|