@paraspell/sdk-core 12.7.1 → 12.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +9 -36
- package/dist/index.mjs +160 -365
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -373,18 +373,6 @@ declare class Karura<TApi, TRes, TSigner> extends Acala<TApi, TRes, TSigner> {
|
|
|
373
373
|
constructor();
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
-
declare class KiltSpiritnet<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
377
|
-
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
378
|
-
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
379
|
-
isRelayToParaEnabled(): boolean;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
declare class KiltPaseo<TApi, TRes, TSigner> extends KiltSpiritnet<TApi, TRes, TSigner> {
|
|
383
|
-
constructor();
|
|
384
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes, TSigner>): boolean;
|
|
385
|
-
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
376
|
declare class Kintsugi<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IXTokensTransfer<TApi, TRes, TSigner> {
|
|
389
377
|
constructor();
|
|
390
378
|
getCustomCurrencyId(asset: TAssetInfo): TForeignOrTokenAsset;
|
|
@@ -461,17 +449,6 @@ declare class Paseo<TApi, TRes, TSigner> extends Polkadot<TApi, TRes, TSigner> {
|
|
|
461
449
|
constructor();
|
|
462
450
|
}
|
|
463
451
|
|
|
464
|
-
declare class PeoplePolkadot<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
465
|
-
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
466
|
-
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
declare class PAssetHub<TApi, TRes, TSigner> extends PeoplePolkadot<TApi, TRes, TSigner> {
|
|
470
|
-
constructor();
|
|
471
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes, TSigner>): boolean;
|
|
472
|
-
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
452
|
declare class Peaq<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IXTokensTransfer<TApi, TRes, TSigner> {
|
|
476
453
|
constructor();
|
|
477
454
|
transferXTokens(input: TXTokensTransferOptions<TApi, TRes, TSigner>): TRes;
|
|
@@ -495,6 +472,11 @@ declare class PeopleKusama<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigne
|
|
|
495
472
|
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
496
473
|
}
|
|
497
474
|
|
|
475
|
+
declare class PeoplePolkadot<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
476
|
+
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
477
|
+
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
478
|
+
}
|
|
479
|
+
|
|
498
480
|
declare class PeoplePaseo<TApi, TRes, TSigner> extends PeoplePolkadot<TApi, TRes, TSigner> {
|
|
499
481
|
constructor();
|
|
500
482
|
}
|
|
@@ -509,13 +491,6 @@ declare class Quartz<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> imp
|
|
|
509
491
|
isSendingTempDisabled(): boolean;
|
|
510
492
|
}
|
|
511
493
|
|
|
512
|
-
declare class RobonomicsPolkadot<TApi, TRes, TSigner> extends Chain<TApi, TRes, TSigner> implements IPolkadotXCMTransfer<TApi, TRes, TSigner> {
|
|
513
|
-
constructor();
|
|
514
|
-
transferPolkadotXCM(input: TPolkadotXCMTransferOptions<TApi, TRes, TSigner>): Promise<TRes>;
|
|
515
|
-
isReceivingTempDisabled(scenario: TScenario): boolean;
|
|
516
|
-
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes, TSigner>): TRes;
|
|
517
|
-
}
|
|
518
|
-
|
|
519
494
|
declare class Shiden<TApi, TRes, TSigner> extends Astar<TApi, TRes, TSigner> {
|
|
520
495
|
constructor();
|
|
521
496
|
}
|
|
@@ -568,14 +543,12 @@ declare const chains: <TApi, TRes, TSigner>() => {
|
|
|
568
543
|
Jamton: Jamton<TApi, TRes, TSigner>;
|
|
569
544
|
Moonbeam: Moonbeam<TApi, TRes, TSigner>;
|
|
570
545
|
CoretimePolkadot: CoretimePolkadot<TApi, TRes, TSigner>;
|
|
571
|
-
RobonomicsPolkadot: RobonomicsPolkadot<TApi, TRes, TSigner>;
|
|
572
546
|
PeoplePolkadot: PeoplePolkadot<TApi, TRes, TSigner>;
|
|
573
547
|
Manta: Manta<TApi, TRes, TSigner>;
|
|
574
548
|
Nodle: Nodle<TApi, TRes, TSigner>;
|
|
575
549
|
NeuroWeb: NeuroWeb<TApi, TRes, TSigner>;
|
|
576
550
|
Pendulum: Pendulum<TApi, TRes, TSigner>;
|
|
577
551
|
Collectives: Collectives<TApi, TRes, TSigner>;
|
|
578
|
-
KiltSpiritnet: KiltSpiritnet<TApi, TRes, TSigner>;
|
|
579
552
|
Mythos: Mythos<TApi, TRes, TSigner>;
|
|
580
553
|
Peaq: Peaq<TApi, TRes, TSigner>;
|
|
581
554
|
Xode: Xode<TApi, TRes, TSigner>;
|
|
@@ -609,8 +582,6 @@ declare const chains: <TApi, TRes, TSigner>() => {
|
|
|
609
582
|
BridgeHubPaseo: BridgeHubPaseo<TApi, TRes, TSigner>;
|
|
610
583
|
CoretimePaseo: CoretimePaseo<TApi, TRes, TSigner>;
|
|
611
584
|
EnergyWebXPaseo: EnergyWebXPaseo<TApi, TRes, TSigner>;
|
|
612
|
-
KiltPaseo: KiltPaseo<TApi, TRes, TSigner>;
|
|
613
|
-
PAssetHub: PAssetHub<TApi, TRes, TSigner>;
|
|
614
585
|
PeoplePaseo: PeoplePaseo<TApi, TRes, TSigner>;
|
|
615
586
|
AjunaPaseo: AjunaPaseo<TApi, TRes, TSigner>;
|
|
616
587
|
BifrostPaseo: BifrostPaseo<TApi, TRes, TSigner>;
|
|
@@ -825,12 +796,14 @@ type TCreateBaseSwapXcmOptions = {
|
|
|
825
796
|
assetInfoFrom: WithAmount<TAssetInfo>;
|
|
826
797
|
assetInfoTo: WithAmount<TAssetInfo>;
|
|
827
798
|
currencyTo: TCurrencyInput;
|
|
799
|
+
feeAssetInfo?: TAssetInfo;
|
|
828
800
|
senderAddress: string;
|
|
829
801
|
recipientAddress: string;
|
|
830
802
|
calculateMinAmountOut: (amountIn: bigint, assetTo?: TAssetInfo) => Promise<bigint>;
|
|
831
803
|
};
|
|
832
804
|
type TCreateSwapXcmOptions<TApi, TRes, TSigner> = WithApi<TCreateBaseSwapXcmOptions, TApi, TRes, TSigner>;
|
|
833
805
|
type TSwapFeeEstimates = {
|
|
806
|
+
originFee: bigint;
|
|
834
807
|
originReserveFee: bigint;
|
|
835
808
|
exchangeFee: bigint;
|
|
836
809
|
destReserveFee: bigint;
|
|
@@ -2150,7 +2123,7 @@ declare const wrapTxBypass: <TApi, TRes, TSigner>(dryRunOptions: TDryRunBypassOp
|
|
|
2150
2123
|
|
|
2151
2124
|
declare const getParaEthTransferFees: <TApi, TRes, TSigner>(ahApi: IPolkadotApi<TApi, TRes, TSigner>, shouldDisconnect?: boolean) => Promise<[bigint, bigint]>;
|
|
2152
2125
|
|
|
2153
|
-
declare const transferMoonbeamEvm: <TApi, TRes, TSigner>(
|
|
2126
|
+
declare const transferMoonbeamEvm: <TApi, TRes, TSigner>(options: TEvmBuilderOptions<TApi, TRes, TSigner>) => Promise<string>;
|
|
2154
2127
|
|
|
2155
2128
|
declare const transferMoonbeamToEth: <TApi, TRes, TSigner>(from: TSubstrateChain, { api, to, signer, address, ahAddress, currency }: TEvmBuilderOptions<TApi, TRes, TSigner>) => Promise<`0x${string}`>;
|
|
2156
2129
|
|
|
@@ -2325,7 +2298,7 @@ declare const reverseTransformLocation: (location: TLocation) => TLocation;
|
|
|
2325
2298
|
|
|
2326
2299
|
declare const normalizeAmount: (amount: bigint) => bigint;
|
|
2327
2300
|
|
|
2328
|
-
declare const resolveDestChain: (originChain: TSubstrateChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "Darwinia" | "EnergyWebX" | "Hydration" | "Interlay" | "Heima" | "Jamton" | "Moonbeam" | "CoretimePolkadot" | "Collectives" | "Crust" | "Manta" | "Nodle" | "NeuroWeb" | "Pendulum" | "
|
|
2301
|
+
declare const resolveDestChain: (originChain: TSubstrateChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "Darwinia" | "EnergyWebX" | "Hydration" | "Interlay" | "Heima" | "Jamton" | "Moonbeam" | "CoretimePolkadot" | "Collectives" | "Crust" | "Manta" | "Nodle" | "NeuroWeb" | "Pendulum" | "Mythos" | "Peaq" | "PeoplePolkadot" | "Unique" | "Xode" | "AssetHubKusama" | "BridgeHubKusama" | "Karura" | "Kintsugi" | "Moonriver" | "CoretimeKusama" | "Encointer" | "Altair" | "Basilisk" | "BifrostKusama" | "CrustShadow" | "Crab" | "Laos" | "Quartz" | "PeopleKusama" | "Shiden" | "Zeitgeist" | "AssetHubWestend" | "BridgeHubWestend" | "CollectivesWestend" | "CoretimeWestend" | "Penpal" | "PeopleWestend" | "AjunaPaseo" | "AssetHubPaseo" | "BifrostPaseo" | "BridgeHubPaseo" | "CoretimePaseo" | "EnergyWebXPaseo" | "HeimaPaseo" | "HydrationPaseo" | "LaosPaseo" | "NeuroWebPaseo" | "PeoplePaseo" | "ZeitgeistPaseo" | undefined;
|
|
2329
2302
|
|
|
2330
2303
|
declare const resolveParaId: (paraId: number | undefined, destination: TDestination) => number | undefined;
|
|
2331
2304
|
|
package/dist/index.mjs
CHANGED
|
@@ -1138,26 +1138,19 @@ var getAssetReserveChain = function getAssetReserveChain(chain, assetLocation) {
|
|
|
1138
1138
|
return chain;
|
|
1139
1139
|
};
|
|
1140
1140
|
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
BuyExecution: {
|
|
1145
|
-
fees: asset,
|
|
1146
|
-
weight_limit: weight ? {
|
|
1147
|
-
Limited: {
|
|
1148
|
-
ref_time: weight.refTime,
|
|
1149
|
-
proof_size: weight.proofSize
|
|
1150
|
-
}
|
|
1151
|
-
} : 'Unlimited'
|
|
1152
|
-
}
|
|
1153
|
-
}];
|
|
1154
|
-
}
|
|
1141
|
+
// PayFees instruction is removed temporarily in favor of BuyExecution everywhere,
|
|
1142
|
+
// but we keep this function for now in case we need to add it back in the future
|
|
1143
|
+
var createPayFees = function createPayFees(_version, asset, weight) {
|
|
1155
1144
|
return [{
|
|
1156
|
-
|
|
1157
|
-
|
|
1145
|
+
BuyExecution: {
|
|
1146
|
+
fees: asset,
|
|
1147
|
+
weight_limit: weight ? {
|
|
1148
|
+
Limited: {
|
|
1149
|
+
ref_time: weight.refTime,
|
|
1150
|
+
proof_size: weight.proofSize
|
|
1151
|
+
}
|
|
1152
|
+
} : 'Unlimited'
|
|
1158
1153
|
}
|
|
1159
|
-
}, {
|
|
1160
|
-
RefundSurplus: undefined
|
|
1161
1154
|
}];
|
|
1162
1155
|
};
|
|
1163
1156
|
|
|
@@ -1490,7 +1483,7 @@ var AssetHubPolkadot$1 = {
|
|
|
1490
1483
|
},
|
|
1491
1484
|
{
|
|
1492
1485
|
name: "IBP1",
|
|
1493
|
-
endpoint: "wss://
|
|
1486
|
+
endpoint: "wss://asset-hub-polkadot.ibp.network"
|
|
1494
1487
|
},
|
|
1495
1488
|
{
|
|
1496
1489
|
name: "IBP2",
|
|
@@ -1515,10 +1508,6 @@ var AssetHubPolkadot$1 = {
|
|
|
1515
1508
|
{
|
|
1516
1509
|
name: "RadiumBlock",
|
|
1517
1510
|
endpoint: "wss://statemint.public.curie.radiumblock.co/ws"
|
|
1518
|
-
},
|
|
1519
|
-
{
|
|
1520
|
-
name: "Stakeworld",
|
|
1521
|
-
endpoint: "wss://dot-rpc.stakeworld.io/assethub"
|
|
1522
1511
|
}
|
|
1523
1512
|
]
|
|
1524
1513
|
};
|
|
@@ -1633,7 +1622,7 @@ var BridgeHubPolkadot$1 = {
|
|
|
1633
1622
|
},
|
|
1634
1623
|
{
|
|
1635
1624
|
name: "IBP1",
|
|
1636
|
-
endpoint: "wss://
|
|
1625
|
+
endpoint: "wss://bridge-hub-polkadot.ibp.network"
|
|
1637
1626
|
},
|
|
1638
1627
|
{
|
|
1639
1628
|
name: "IBP2",
|
|
@@ -1654,10 +1643,6 @@ var BridgeHubPolkadot$1 = {
|
|
|
1654
1643
|
{
|
|
1655
1644
|
name: "RadiumBlock",
|
|
1656
1645
|
endpoint: "wss://bridgehub-polkadot.public.curie.radiumblock.co/ws"
|
|
1657
|
-
},
|
|
1658
|
-
{
|
|
1659
|
-
name: "Stakeworld",
|
|
1660
|
-
endpoint: "wss://dot-rpc.stakeworld.io/bridgehub"
|
|
1661
1646
|
}
|
|
1662
1647
|
]
|
|
1663
1648
|
};
|
|
@@ -1808,7 +1793,7 @@ var CoretimePolkadot$1 = {
|
|
|
1808
1793
|
},
|
|
1809
1794
|
{
|
|
1810
1795
|
name: "IBP1",
|
|
1811
|
-
endpoint: "wss://
|
|
1796
|
+
endpoint: "wss://coretime-polkadot.ibp.network"
|
|
1812
1797
|
},
|
|
1813
1798
|
{
|
|
1814
1799
|
name: "IBP2",
|
|
@@ -1825,10 +1810,6 @@ var CoretimePolkadot$1 = {
|
|
|
1825
1810
|
{
|
|
1826
1811
|
name: "Parity",
|
|
1827
1812
|
endpoint: "wss://polkadot-coretime-rpc.polkadot.io"
|
|
1828
|
-
},
|
|
1829
|
-
{
|
|
1830
|
-
name: "Stakeworld",
|
|
1831
|
-
endpoint: "wss://dot-rpc.stakeworld.io/coretime"
|
|
1832
1813
|
}
|
|
1833
1814
|
]
|
|
1834
1815
|
};
|
|
@@ -1847,7 +1828,7 @@ var Collectives$1 = {
|
|
|
1847
1828
|
},
|
|
1848
1829
|
{
|
|
1849
1830
|
name: "IBP1",
|
|
1850
|
-
endpoint: "wss://
|
|
1831
|
+
endpoint: "wss://collectives-polkadot.ibp.network"
|
|
1851
1832
|
},
|
|
1852
1833
|
{
|
|
1853
1834
|
name: "IBP2",
|
|
@@ -1868,10 +1849,6 @@ var Collectives$1 = {
|
|
|
1868
1849
|
{
|
|
1869
1850
|
name: "RadiumBlock",
|
|
1870
1851
|
endpoint: "wss://collectives.public.curie.radiumblock.co/ws"
|
|
1871
|
-
},
|
|
1872
|
-
{
|
|
1873
|
-
name: "Stakeworld",
|
|
1874
|
-
endpoint: "wss://dot-rpc.stakeworld.io/collectives"
|
|
1875
1852
|
}
|
|
1876
1853
|
]
|
|
1877
1854
|
};
|
|
@@ -1942,21 +1919,6 @@ var Pendulum$1 = {
|
|
|
1942
1919
|
}
|
|
1943
1920
|
]
|
|
1944
1921
|
};
|
|
1945
|
-
var KiltSpiritnet$1 = {
|
|
1946
|
-
name: "KILT Spiritnet",
|
|
1947
|
-
info: "kilt",
|
|
1948
|
-
paraId: 2086,
|
|
1949
|
-
providers: [
|
|
1950
|
-
{
|
|
1951
|
-
name: "IBP1",
|
|
1952
|
-
endpoint: "wss://kilt.ibp.network"
|
|
1953
|
-
},
|
|
1954
|
-
{
|
|
1955
|
-
name: "IBP2",
|
|
1956
|
-
endpoint: "wss://kilt.dotters.network"
|
|
1957
|
-
}
|
|
1958
|
-
]
|
|
1959
|
-
};
|
|
1960
1922
|
var Mythos$1 = {
|
|
1961
1923
|
name: "Mythos",
|
|
1962
1924
|
info: "mythos",
|
|
@@ -1979,17 +1941,6 @@ var Peaq$1 = {
|
|
|
1979
1941
|
}
|
|
1980
1942
|
]
|
|
1981
1943
|
};
|
|
1982
|
-
var RobonomicsPolkadot$1 = {
|
|
1983
|
-
name: "Robonomics",
|
|
1984
|
-
info: "robonomics",
|
|
1985
|
-
paraId: 3388,
|
|
1986
|
-
providers: [
|
|
1987
|
-
{
|
|
1988
|
-
name: "Airalab",
|
|
1989
|
-
endpoint: "wss://polkadot.rpc.robonomics.network/"
|
|
1990
|
-
}
|
|
1991
|
-
]
|
|
1992
|
-
};
|
|
1993
1944
|
var PeoplePolkadot$1 = {
|
|
1994
1945
|
name: "People",
|
|
1995
1946
|
info: "polkadotPeople",
|
|
@@ -2001,7 +1952,7 @@ var PeoplePolkadot$1 = {
|
|
|
2001
1952
|
},
|
|
2002
1953
|
{
|
|
2003
1954
|
name: "IBP1",
|
|
2004
|
-
endpoint: "wss://
|
|
1955
|
+
endpoint: "wss://people-polkadot.ibp.network"
|
|
2005
1956
|
},
|
|
2006
1957
|
{
|
|
2007
1958
|
name: "IBP2",
|
|
@@ -2018,10 +1969,6 @@ var PeoplePolkadot$1 = {
|
|
|
2018
1969
|
{
|
|
2019
1970
|
name: "Parity",
|
|
2020
1971
|
endpoint: "wss://polkadot-people-rpc.polkadot.io"
|
|
2021
|
-
},
|
|
2022
|
-
{
|
|
2023
|
-
name: "Stakeworld",
|
|
2024
|
-
endpoint: "wss://dot-rpc.stakeworld.io/people"
|
|
2025
1972
|
}
|
|
2026
1973
|
]
|
|
2027
1974
|
};
|
|
@@ -2074,7 +2021,7 @@ var AssetHubKusama$1 = {
|
|
|
2074
2021
|
},
|
|
2075
2022
|
{
|
|
2076
2023
|
name: "IBP1",
|
|
2077
|
-
endpoint: "wss://
|
|
2024
|
+
endpoint: "wss://asset-hub-kusama.ibp.network"
|
|
2078
2025
|
},
|
|
2079
2026
|
{
|
|
2080
2027
|
name: "IBP2",
|
|
@@ -2095,10 +2042,6 @@ var AssetHubKusama$1 = {
|
|
|
2095
2042
|
{
|
|
2096
2043
|
name: "RadiumBlock",
|
|
2097
2044
|
endpoint: "wss://statemine.public.curie.radiumblock.co/ws"
|
|
2098
|
-
},
|
|
2099
|
-
{
|
|
2100
|
-
name: "Stakeworld",
|
|
2101
|
-
endpoint: "wss://ksm-rpc.stakeworld.io/assethub"
|
|
2102
2045
|
}
|
|
2103
2046
|
]
|
|
2104
2047
|
};
|
|
@@ -2117,7 +2060,7 @@ var BridgeHubKusama$1 = {
|
|
|
2117
2060
|
},
|
|
2118
2061
|
{
|
|
2119
2062
|
name: "IBP1",
|
|
2120
|
-
endpoint: "wss://
|
|
2063
|
+
endpoint: "wss://bridge-hub-kusama.ibp.network"
|
|
2121
2064
|
},
|
|
2122
2065
|
{
|
|
2123
2066
|
name: "IBP2",
|
|
@@ -2138,10 +2081,6 @@ var BridgeHubKusama$1 = {
|
|
|
2138
2081
|
{
|
|
2139
2082
|
name: "RadiumBlock",
|
|
2140
2083
|
endpoint: "wss://bridgehub-kusama.public.curie.radiumblock.co/ws"
|
|
2141
|
-
},
|
|
2142
|
-
{
|
|
2143
|
-
name: "Stakeworld",
|
|
2144
|
-
endpoint: "wss://ksm-rpc.stakeworld.io/bridgehub"
|
|
2145
2084
|
}
|
|
2146
2085
|
]
|
|
2147
2086
|
};
|
|
@@ -2225,7 +2164,7 @@ var CoretimeKusama$1 = {
|
|
|
2225
2164
|
},
|
|
2226
2165
|
{
|
|
2227
2166
|
name: "IBP1",
|
|
2228
|
-
endpoint: "wss://
|
|
2167
|
+
endpoint: "wss://coretime-kusama.ibp.network"
|
|
2229
2168
|
},
|
|
2230
2169
|
{
|
|
2231
2170
|
name: "IBP2",
|
|
@@ -2242,10 +2181,6 @@ var CoretimeKusama$1 = {
|
|
|
2242
2181
|
{
|
|
2243
2182
|
name: "Parity",
|
|
2244
2183
|
endpoint: "wss://kusama-coretime-rpc.polkadot.io"
|
|
2245
|
-
},
|
|
2246
|
-
{
|
|
2247
|
-
name: "Stakeworld",
|
|
2248
|
-
endpoint: "wss://ksm-rpc.stakeworld.io/coretime"
|
|
2249
2184
|
}
|
|
2250
2185
|
]
|
|
2251
2186
|
};
|
|
@@ -2264,7 +2199,7 @@ var Encointer$1 = {
|
|
|
2264
2199
|
},
|
|
2265
2200
|
{
|
|
2266
2201
|
name: "IBP1",
|
|
2267
|
-
endpoint: "wss://
|
|
2202
|
+
endpoint: "wss://encointer-kusama.ibp.network"
|
|
2268
2203
|
},
|
|
2269
2204
|
{
|
|
2270
2205
|
name: "IBP2",
|
|
@@ -2388,7 +2323,7 @@ var PeopleKusama$1 = {
|
|
|
2388
2323
|
},
|
|
2389
2324
|
{
|
|
2390
2325
|
name: "IBP1",
|
|
2391
|
-
endpoint: "wss://
|
|
2326
|
+
endpoint: "wss://people-kusama.ibp.network"
|
|
2392
2327
|
},
|
|
2393
2328
|
{
|
|
2394
2329
|
name: "IBP2",
|
|
@@ -2405,10 +2340,6 @@ var PeopleKusama$1 = {
|
|
|
2405
2340
|
{
|
|
2406
2341
|
name: "Parity",
|
|
2407
2342
|
endpoint: "wss://kusama-people-rpc.polkadot.io"
|
|
2408
|
-
},
|
|
2409
|
-
{
|
|
2410
|
-
name: "Stakeworld",
|
|
2411
|
-
endpoint: "wss://ksm-rpc.stakeworld.io/people"
|
|
2412
2343
|
}
|
|
2413
2344
|
]
|
|
2414
2345
|
};
|
|
@@ -2566,16 +2497,12 @@ var AssetHubPaseo$1 = {
|
|
|
2566
2497
|
},
|
|
2567
2498
|
{
|
|
2568
2499
|
name: "IBP1",
|
|
2569
|
-
endpoint: "wss://
|
|
2500
|
+
endpoint: "wss://asset-hub-paseo.ibp.network"
|
|
2570
2501
|
},
|
|
2571
2502
|
{
|
|
2572
2503
|
name: "IBP2",
|
|
2573
2504
|
endpoint: "wss://asset-hub-paseo.dotters.network"
|
|
2574
2505
|
},
|
|
2575
|
-
{
|
|
2576
|
-
name: "StakeWorld",
|
|
2577
|
-
endpoint: "wss://pas-rpc.stakeworld.io/assethub"
|
|
2578
|
-
},
|
|
2579
2506
|
{
|
|
2580
2507
|
name: "TurboFlakes",
|
|
2581
2508
|
endpoint: "wss://sys.turboflakes.io/asset-hub-paseo"
|
|
@@ -2604,7 +2531,7 @@ var BridgeHubPaseo$1 = {
|
|
|
2604
2531
|
providers: [
|
|
2605
2532
|
{
|
|
2606
2533
|
name: "IBP1",
|
|
2607
|
-
endpoint: "wss://
|
|
2534
|
+
endpoint: "wss://bridge-hub-paseo.ibp.network"
|
|
2608
2535
|
},
|
|
2609
2536
|
{
|
|
2610
2537
|
name: "IBP2",
|
|
@@ -2619,7 +2546,7 @@ var CoretimePaseo$1 = {
|
|
|
2619
2546
|
providers: [
|
|
2620
2547
|
{
|
|
2621
2548
|
name: "IBP1",
|
|
2622
|
-
endpoint: "wss://
|
|
2549
|
+
endpoint: "wss://coretime-paseo.ibp.network"
|
|
2623
2550
|
},
|
|
2624
2551
|
{
|
|
2625
2552
|
name: "IBP2",
|
|
@@ -2660,17 +2587,6 @@ var HydrationPaseo$1 = {
|
|
|
2660
2587
|
}
|
|
2661
2588
|
]
|
|
2662
2589
|
};
|
|
2663
|
-
var KiltPaseo$1 = {
|
|
2664
|
-
name: "KILT Peregrine",
|
|
2665
|
-
info: "kilt",
|
|
2666
|
-
paraId: 2086,
|
|
2667
|
-
providers: [
|
|
2668
|
-
{
|
|
2669
|
-
name: "KILT Foundation",
|
|
2670
|
-
endpoint: "wss://peregrine.kilt.io/"
|
|
2671
|
-
}
|
|
2672
|
-
]
|
|
2673
|
-
};
|
|
2674
2590
|
var LaosPaseo$1 = {
|
|
2675
2591
|
name: "Laos Sigma",
|
|
2676
2592
|
info: "laos-sigma",
|
|
@@ -2693,25 +2609,6 @@ var NeuroWebPaseo$1 = {
|
|
|
2693
2609
|
}
|
|
2694
2610
|
]
|
|
2695
2611
|
};
|
|
2696
|
-
var PAssetHub$1 = {
|
|
2697
|
-
name: "PAssetHub - Contracts",
|
|
2698
|
-
info: "PAssetHub - Contracts",
|
|
2699
|
-
paraId: 1111,
|
|
2700
|
-
providers: [
|
|
2701
|
-
{
|
|
2702
|
-
name: "IBP1",
|
|
2703
|
-
endpoint: "wss://passet-hub-paseo.ibp.network"
|
|
2704
|
-
},
|
|
2705
|
-
{
|
|
2706
|
-
name: "IBP2",
|
|
2707
|
-
endpoint: "wss://passet-hub-paseo.dotters.network"
|
|
2708
|
-
},
|
|
2709
|
-
{
|
|
2710
|
-
name: "Parity",
|
|
2711
|
-
endpoint: "wss://testnet-passet-hub.polkadot.io"
|
|
2712
|
-
}
|
|
2713
|
-
]
|
|
2714
|
-
};
|
|
2715
2612
|
var PeoplePaseo$1 = {
|
|
2716
2613
|
name: "People",
|
|
2717
2614
|
info: "PaseoPeopleChain",
|
|
@@ -2723,7 +2620,7 @@ var PeoplePaseo$1 = {
|
|
|
2723
2620
|
},
|
|
2724
2621
|
{
|
|
2725
2622
|
name: "IBP1",
|
|
2726
|
-
endpoint: "wss://
|
|
2623
|
+
endpoint: "wss://people-paseo.ibp.network"
|
|
2727
2624
|
},
|
|
2728
2625
|
{
|
|
2729
2626
|
name: "IBP2",
|
|
@@ -2751,10 +2648,6 @@ var Polkadot$1 = {
|
|
|
2751
2648
|
name: "Allnodes",
|
|
2752
2649
|
endpoint: "wss://polkadot-rpc.publicnode.com"
|
|
2753
2650
|
},
|
|
2754
|
-
{
|
|
2755
|
-
name: "Blockops",
|
|
2756
|
-
endpoint: "wss://polkadot-public-rpc.blockops.network/ws"
|
|
2757
|
-
},
|
|
2758
2651
|
{
|
|
2759
2652
|
name: "Dwellir",
|
|
2760
2653
|
endpoint: "wss://polkadot-rpc.n.dwellir.com"
|
|
@@ -2769,7 +2662,7 @@ var Polkadot$1 = {
|
|
|
2769
2662
|
},
|
|
2770
2663
|
{
|
|
2771
2664
|
name: "IBP1",
|
|
2772
|
-
endpoint: "wss://
|
|
2665
|
+
endpoint: "wss://polkadot.ibp.network"
|
|
2773
2666
|
},
|
|
2774
2667
|
{
|
|
2775
2668
|
name: "IBP2",
|
|
@@ -2793,7 +2686,7 @@ var Polkadot$1 = {
|
|
|
2793
2686
|
},
|
|
2794
2687
|
{
|
|
2795
2688
|
name: "Stakeworld",
|
|
2796
|
-
endpoint: "wss://
|
|
2689
|
+
endpoint: "wss://rpc-polkadot.stakeworld.io"
|
|
2797
2690
|
},
|
|
2798
2691
|
{
|
|
2799
2692
|
name: "SubQuery",
|
|
@@ -2810,10 +2703,6 @@ var Kusama$1 = {
|
|
|
2810
2703
|
name: "Allnodes",
|
|
2811
2704
|
endpoint: "wss://kusama-rpc.publicnode.com"
|
|
2812
2705
|
},
|
|
2813
|
-
{
|
|
2814
|
-
name: "Blockops",
|
|
2815
|
-
endpoint: "wss://kusama-public-rpc.blockops.network/ws"
|
|
2816
|
-
},
|
|
2817
2706
|
{
|
|
2818
2707
|
name: "Dwellir",
|
|
2819
2708
|
endpoint: "wss://kusama-rpc.n.dwellir.com"
|
|
@@ -2828,7 +2717,7 @@ var Kusama$1 = {
|
|
|
2828
2717
|
},
|
|
2829
2718
|
{
|
|
2830
2719
|
name: "IBP1",
|
|
2831
|
-
endpoint: "wss://
|
|
2720
|
+
endpoint: "wss://kusama.ibp.network"
|
|
2832
2721
|
},
|
|
2833
2722
|
{
|
|
2834
2723
|
name: "IBP2",
|
|
@@ -2848,7 +2737,7 @@ var Kusama$1 = {
|
|
|
2848
2737
|
},
|
|
2849
2738
|
{
|
|
2850
2739
|
name: "Stakeworld",
|
|
2851
|
-
endpoint: "wss://
|
|
2740
|
+
endpoint: "wss://rpc-kusama.stakeworld.io"
|
|
2852
2741
|
}
|
|
2853
2742
|
]
|
|
2854
2743
|
};
|
|
@@ -2894,15 +2783,11 @@ var Paseo$1 = {
|
|
|
2894
2783
|
},
|
|
2895
2784
|
{
|
|
2896
2785
|
name: "IBP1",
|
|
2897
|
-
endpoint: "wss://
|
|
2786
|
+
endpoint: "wss://paseo.ibp.network"
|
|
2898
2787
|
},
|
|
2899
2788
|
{
|
|
2900
2789
|
name: "IBP2",
|
|
2901
2790
|
endpoint: "wss://paseo.dotters.network"
|
|
2902
|
-
},
|
|
2903
|
-
{
|
|
2904
|
-
name: "StakeWorld",
|
|
2905
|
-
endpoint: "wss://pas-rpc.stakeworld.io"
|
|
2906
2791
|
}
|
|
2907
2792
|
]
|
|
2908
2793
|
};
|
|
@@ -2928,10 +2813,8 @@ var configs = {
|
|
|
2928
2813
|
Nodle: Nodle$1,
|
|
2929
2814
|
NeuroWeb: NeuroWeb$1,
|
|
2930
2815
|
Pendulum: Pendulum$1,
|
|
2931
|
-
KiltSpiritnet: KiltSpiritnet$1,
|
|
2932
2816
|
Mythos: Mythos$1,
|
|
2933
2817
|
Peaq: Peaq$1,
|
|
2934
|
-
RobonomicsPolkadot: RobonomicsPolkadot$1,
|
|
2935
2818
|
PeoplePolkadot: PeoplePolkadot$1,
|
|
2936
2819
|
Unique: Unique$1,
|
|
2937
2820
|
Xode: Xode$1,
|
|
@@ -2966,10 +2849,8 @@ var configs = {
|
|
|
2966
2849
|
EnergyWebXPaseo: EnergyWebXPaseo$1,
|
|
2967
2850
|
HeimaPaseo: HeimaPaseo$1,
|
|
2968
2851
|
HydrationPaseo: HydrationPaseo$1,
|
|
2969
|
-
KiltPaseo: KiltPaseo$1,
|
|
2970
2852
|
LaosPaseo: LaosPaseo$1,
|
|
2971
2853
|
NeuroWebPaseo: NeuroWebPaseo$1,
|
|
2972
|
-
PAssetHub: PAssetHub$1,
|
|
2973
2854
|
PeoplePaseo: PeoplePaseo$1,
|
|
2974
2855
|
ZeitgeistPaseo: ZeitgeistPaseo$1,
|
|
2975
2856
|
Polkadot: Polkadot$1,
|
|
@@ -5018,7 +4899,7 @@ var getParaEthTransferFees = /*#__PURE__*/function () {
|
|
|
5018
4899
|
};
|
|
5019
4900
|
}();
|
|
5020
4901
|
|
|
5021
|
-
var abi$
|
|
4902
|
+
var abi$2 = [
|
|
5022
4903
|
{
|
|
5023
4904
|
inputs: [
|
|
5024
4905
|
{
|
|
@@ -5128,18 +5009,62 @@ var getDestinationLocation = function getDestinationLocation(api, address, desti
|
|
|
5128
5009
|
return [1, paraId ? ["0x0000000".concat(paraId.toString(16)), acc] : [acc]];
|
|
5129
5010
|
};
|
|
5130
5011
|
|
|
5012
|
+
var abi$1 = [{
|
|
5013
|
+
inputs: [{
|
|
5014
|
+
internalType: 'address',
|
|
5015
|
+
name: 'recipient_',
|
|
5016
|
+
type: 'address'
|
|
5017
|
+
}, {
|
|
5018
|
+
internalType: 'uint256',
|
|
5019
|
+
name: 'amount_',
|
|
5020
|
+
type: 'uint256'
|
|
5021
|
+
}],
|
|
5022
|
+
name: 'transfer',
|
|
5023
|
+
outputs: [{
|
|
5024
|
+
internalType: 'bool',
|
|
5025
|
+
name: '',
|
|
5026
|
+
type: 'bool'
|
|
5027
|
+
}],
|
|
5028
|
+
stateMutability: 'nonpayable',
|
|
5029
|
+
type: 'function'
|
|
5030
|
+
}];
|
|
5031
|
+
var transferMoonbeamLocal = /*#__PURE__*/function () {
|
|
5032
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(client, assetInfo, _ref) {
|
|
5033
|
+
var signer, address, contract;
|
|
5034
|
+
return _regenerator().w(function (_context) {
|
|
5035
|
+
while (1) switch (_context.n) {
|
|
5036
|
+
case 0:
|
|
5037
|
+
signer = _ref.signer, address = _ref.address;
|
|
5038
|
+
assertHasId(assetInfo);
|
|
5039
|
+
contract = getContract({
|
|
5040
|
+
abi: abi$1,
|
|
5041
|
+
address: assetInfo.assetId,
|
|
5042
|
+
client: {
|
|
5043
|
+
"public": client,
|
|
5044
|
+
wallet: signer
|
|
5045
|
+
}
|
|
5046
|
+
});
|
|
5047
|
+
return _context.a(2, contract.write.transfer([address, assetInfo.amount]));
|
|
5048
|
+
}
|
|
5049
|
+
}, _callee);
|
|
5050
|
+
}));
|
|
5051
|
+
return function transferMoonbeamLocal(_x, _x2, _x3) {
|
|
5052
|
+
return _ref2.apply(this, arguments);
|
|
5053
|
+
};
|
|
5054
|
+
}();
|
|
5055
|
+
|
|
5131
5056
|
var U_64_MAX = 18446744073709551615n;
|
|
5132
5057
|
var CONTRACT_ADDRESS = '0x0000000000000000000000000000000000000804';
|
|
5133
5058
|
var NATIVE_ASSET_ID = '0x0000000000000000000000000000000000000802';
|
|
5134
5059
|
// Partially inspired by Moonbeam XCM-SDK
|
|
5135
5060
|
var transferMoonbeamEvm = /*#__PURE__*/function () {
|
|
5136
|
-
var
|
|
5061
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(options) {
|
|
5137
5062
|
var _usdtAsset$assetId;
|
|
5138
|
-
var api, from, to, signer, address, currency,
|
|
5063
|
+
var api, from, to, signer, address, currency, foundAsset, amount, client, contract, asset, destLocation, weight, createTx, multiCurrencySymbols, useMultiAssets, usdtAsset, tx, _t;
|
|
5139
5064
|
return _regenerator().w(function (_context) {
|
|
5140
5065
|
while (1) switch (_context.n) {
|
|
5141
5066
|
case 0:
|
|
5142
|
-
api =
|
|
5067
|
+
api = options.api, from = options.from, to = options.to, signer = options.signer, address = options.address, currency = options.currency;
|
|
5143
5068
|
if (!Array.isArray(currency)) {
|
|
5144
5069
|
_context.n = 1;
|
|
5145
5070
|
break;
|
|
@@ -5152,35 +5077,44 @@ var transferMoonbeamEvm = /*#__PURE__*/function () {
|
|
|
5152
5077
|
}
|
|
5153
5078
|
throw new UnsupportedOperationError('Override location is not supported for EVM transfers');
|
|
5154
5079
|
case 2:
|
|
5080
|
+
foundAsset = findAssetInfoOrThrow(from, currency, to);
|
|
5081
|
+
amount = abstractDecimals(currency.amount, foundAsset.decimals, api);
|
|
5082
|
+
client = createPublicClient({
|
|
5083
|
+
chain: signer.chain,
|
|
5084
|
+
transport: http()
|
|
5085
|
+
});
|
|
5086
|
+
if (!(from === to)) {
|
|
5087
|
+
_context.n = 3;
|
|
5088
|
+
break;
|
|
5089
|
+
}
|
|
5090
|
+
return _context.a(2, transferMoonbeamLocal(client, _objectSpread2(_objectSpread2({}, foundAsset), {}, {
|
|
5091
|
+
amount: amount
|
|
5092
|
+
}), options));
|
|
5093
|
+
case 3:
|
|
5155
5094
|
contract = getContract({
|
|
5156
|
-
abi: abi$
|
|
5095
|
+
abi: abi$2,
|
|
5157
5096
|
address: CONTRACT_ADDRESS,
|
|
5158
5097
|
client: {
|
|
5159
|
-
"public":
|
|
5160
|
-
chain: signer.chain,
|
|
5161
|
-
transport: http()
|
|
5162
|
-
}),
|
|
5098
|
+
"public": client,
|
|
5163
5099
|
wallet: signer
|
|
5164
5100
|
}
|
|
5165
5101
|
});
|
|
5166
|
-
foundAsset = findAssetInfoOrThrow(from, currency, to);
|
|
5167
|
-
amount = abstractDecimals(currency.amount, foundAsset.decimals, api);
|
|
5168
5102
|
if (!(foundAsset.symbol === getNativeAssetSymbol(from))) {
|
|
5169
|
-
_context.n =
|
|
5103
|
+
_context.n = 4;
|
|
5170
5104
|
break;
|
|
5171
5105
|
}
|
|
5172
5106
|
asset = NATIVE_ASSET_ID;
|
|
5173
|
-
_context.n =
|
|
5107
|
+
_context.n = 6;
|
|
5174
5108
|
break;
|
|
5175
|
-
case
|
|
5109
|
+
case 4:
|
|
5176
5110
|
if (!(foundAsset.assetId === undefined)) {
|
|
5177
|
-
_context.n =
|
|
5111
|
+
_context.n = 5;
|
|
5178
5112
|
break;
|
|
5179
5113
|
}
|
|
5180
5114
|
throw new InvalidCurrencyError('Currency must be a foreign asset with valid assetId');
|
|
5181
|
-
case 4:
|
|
5182
|
-
asset = formatAssetIdToERC20(foundAsset.assetId);
|
|
5183
5115
|
case 5:
|
|
5116
|
+
asset = formatAssetIdToERC20(foundAsset.assetId);
|
|
5117
|
+
case 6:
|
|
5184
5118
|
destLocation = getDestinationLocation(api, address, to);
|
|
5185
5119
|
weight = U_64_MAX; // Partially inspired by Moonbeam XCM-SDK
|
|
5186
5120
|
// https://github.com/moonbeam-foundation/xcm-sdk/blob/ab835c15bf41612604b1c858d956a9f07705ed65/packages/sdk/src/contract/contracts/Xtokens/Xtokens.ts#L53
|
|
@@ -5195,30 +5129,30 @@ var transferMoonbeamEvm = /*#__PURE__*/function () {
|
|
|
5195
5129
|
}, to);
|
|
5196
5130
|
assertHasId(usdtAsset);
|
|
5197
5131
|
if (!useMultiAssets) {
|
|
5198
|
-
_context.n =
|
|
5132
|
+
_context.n = 8;
|
|
5199
5133
|
break;
|
|
5200
5134
|
}
|
|
5201
|
-
_context.n =
|
|
5135
|
+
_context.n = 7;
|
|
5202
5136
|
return createTx('transferMultiCurrencies', [[[asset, amount.toString()], [formatAssetIdToERC20((_usdtAsset$assetId = usdtAsset.assetId) !== null && _usdtAsset$assetId !== void 0 ? _usdtAsset$assetId : ''), '200000']], 1,
|
|
5203
5137
|
// index of the fee asset
|
|
5204
5138
|
destLocation, weight]);
|
|
5205
|
-
case
|
|
5139
|
+
case 7:
|
|
5206
5140
|
_t = _context.v;
|
|
5207
|
-
_context.n =
|
|
5141
|
+
_context.n = 10;
|
|
5208
5142
|
break;
|
|
5209
|
-
case 7:
|
|
5210
|
-
_context.n = 8;
|
|
5211
|
-
return createTx('transfer', [asset, amount.toString(), destLocation, weight]);
|
|
5212
5143
|
case 8:
|
|
5213
|
-
|
|
5144
|
+
_context.n = 9;
|
|
5145
|
+
return createTx('transfer', [asset, amount.toString(), destLocation, weight]);
|
|
5214
5146
|
case 9:
|
|
5147
|
+
_t = _context.v;
|
|
5148
|
+
case 10:
|
|
5215
5149
|
tx = _t;
|
|
5216
5150
|
return _context.a(2, tx);
|
|
5217
5151
|
}
|
|
5218
5152
|
}, _callee);
|
|
5219
5153
|
}));
|
|
5220
5154
|
return function transferMoonbeamEvm(_x) {
|
|
5221
|
-
return
|
|
5155
|
+
return _ref.apply(this, arguments);
|
|
5222
5156
|
};
|
|
5223
5157
|
}();
|
|
5224
5158
|
|
|
@@ -9061,6 +8995,9 @@ var createBaseExecuteXcm = function createBaseExecuteXcm(options) {
|
|
|
9061
8995
|
reserveChain = _prepareExecuteContex.reserveChain;
|
|
9062
8996
|
var hopFeeAssetToReserve = useFeeAssetOnHops ? feeAssetLocalizedToReserve : undefined;
|
|
9063
8997
|
var hopFeeAssetToDest = useFeeAssetOnHops ? feeAssetLocalizedToDest : undefined;
|
|
8998
|
+
// When fees are paid in a separate asset, originFee is denominated in that asset's
|
|
8999
|
+
// currency and must not be subtracted from the transfer amount.
|
|
9000
|
+
var originFeeDeduction = feeAsset ? 0n : originFee;
|
|
9064
9001
|
var destLocation = createDestination(version, chain, destChain, paraIdTo);
|
|
9065
9002
|
if (chain !== 'AssetHubPolkadot' && reserveChain === undefined) {
|
|
9066
9003
|
throw new UnsupportedOperationError('Sending local reserve assets with custom fee asset is not yet supported for this chain.');
|
|
@@ -9076,7 +9013,7 @@ var createBaseExecuteXcm = function createBaseExecuteXcm(options) {
|
|
|
9076
9013
|
DepositReserveAsset: {
|
|
9077
9014
|
assets: createAssetsFilter(assetLocalizedToReserve, version),
|
|
9078
9015
|
dest: createDestination(version, reserveChain !== null && reserveChain !== void 0 ? reserveChain : chain, destChain, paraIdTo),
|
|
9079
|
-
xcm: [].concat(_toConsumableArray(createPayFees(version, hopFeeAssetToDest !== null && hopFeeAssetToDest !== void 0 ? hopFeeAssetToDest : updateAsset(assetLocalizedToDest, reserveFee === 1000n ? amount / 2n : amount -
|
|
9016
|
+
xcm: [].concat(_toConsumableArray(createPayFees(version, hopFeeAssetToDest !== null && hopFeeAssetToDest !== void 0 ? hopFeeAssetToDest : updateAsset(assetLocalizedToDest, reserveFee === 1000n ? amount / 2n : amount - originFeeDeduction - reserveFee))), _toConsumableArray(suffixXcm))
|
|
9080
9017
|
}
|
|
9081
9018
|
}];
|
|
9082
9019
|
var mainInstructions;
|
|
@@ -9103,7 +9040,7 @@ var createBaseExecuteXcm = function createBaseExecuteXcm(options) {
|
|
|
9103
9040
|
InitiateTeleport: {
|
|
9104
9041
|
assets: routingAssetsFilter,
|
|
9105
9042
|
dest: destLocation,
|
|
9106
|
-
xcm: [].concat(_toConsumableArray(createPayFees(version, hopFeeAssetToDest !== null && hopFeeAssetToDest !== void 0 ? hopFeeAssetToDest : updateAsset(assetLocalizedToDest, amount -
|
|
9043
|
+
xcm: [].concat(_toConsumableArray(createPayFees(version, hopFeeAssetToDest !== null && hopFeeAssetToDest !== void 0 ? hopFeeAssetToDest : updateAsset(assetLocalizedToDest, amount - originFeeDeduction))), _toConsumableArray(suffixXcm))
|
|
9107
9044
|
}
|
|
9108
9045
|
}];
|
|
9109
9046
|
break;
|
|
@@ -9113,7 +9050,7 @@ var createBaseExecuteXcm = function createBaseExecuteXcm(options) {
|
|
|
9113
9050
|
InitiateTeleport: {
|
|
9114
9051
|
assets: routingAssetsFilter,
|
|
9115
9052
|
dest: getChainLocation(chain, reserveChain),
|
|
9116
|
-
xcm: [].concat(_toConsumableArray(createPayFees(version, hopFeeAssetToReserve !== null && hopFeeAssetToReserve !== void 0 ? hopFeeAssetToReserve : updateAsset(assetLocalizedToReserve, amount -
|
|
9053
|
+
xcm: [].concat(_toConsumableArray(createPayFees(version, hopFeeAssetToReserve !== null && hopFeeAssetToReserve !== void 0 ? hopFeeAssetToReserve : updateAsset(assetLocalizedToReserve, amount - originFeeDeduction))), _toConsumableArray(resolvedDepositInstruction))
|
|
9117
9054
|
}
|
|
9118
9055
|
}];
|
|
9119
9056
|
break;
|
|
@@ -9479,11 +9416,11 @@ var createExchangeInstructions = /*#__PURE__*/function () {
|
|
|
9479
9416
|
var createSwapExecuteXcm = /*#__PURE__*/function () {
|
|
9480
9417
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(options) {
|
|
9481
9418
|
var _ref3, _ref4;
|
|
9482
|
-
var api, chain, exchangeChain, destChain, assetInfoFrom, assetInfoTo, _options$fees2, originReserveFee, destReserveFee, senderAddress, recipientAddress, version, paraIdTo, isEthereumDest, resolvedDestChain, assetFrom, amountOut, assetTo, assetToLocalizedToDest, ethFeeAssetInfo, ethBridgeFee, isMainAssetDot, nativeFeeAssetInfo, ahApi, _yield$getParaEthTran, _yield$getParaEthTran2, bridgeFee, executionFee, hasSeparateFeeAsset, _prepareCommonExecute, prefix, depositInstruction, exchangeInstructions, exchangeToDestXcm, ethAsset, messageId, snowbridgeInstructions, finalXcm, fullXcm;
|
|
9419
|
+
var api, chain, exchangeChain, destChain, assetInfoFrom, assetInfoTo, feeAssetInfo, _options$fees2, originFee, originReserveFee, destReserveFee, senderAddress, recipientAddress, version, paraIdTo, isEthereumDest, resolvedDestChain, assetFrom, amountOut, assetTo, assetToLocalizedToDest, ethFeeAssetInfo, ethBridgeFee, isMainAssetDot, nativeFeeAssetInfo, ahApi, _yield$getParaEthTran, _yield$getParaEthTran2, bridgeFee, executionFee, resolvedFeeAssetInfo, hasSeparateFeeAsset, _prepareCommonExecute, prefix, depositInstruction, exchangeInstructions, exchangeToDestXcm, ethAsset, messageId, snowbridgeInstructions, finalXcm, fullXcm;
|
|
9483
9420
|
return _regenerator().w(function (_context2) {
|
|
9484
9421
|
while (1) switch (_context2.n) {
|
|
9485
9422
|
case 0:
|
|
9486
|
-
api = options.api, chain = options.chain, exchangeChain = options.exchangeChain, destChain = options.destChain, assetInfoFrom = options.assetInfoFrom, assetInfoTo = options.assetInfoTo, _options$fees2 = options.fees, originReserveFee = _options$fees2.originReserveFee, destReserveFee = _options$fees2.destReserveFee, senderAddress = options.senderAddress, recipientAddress = options.recipientAddress, version = options.version, paraIdTo = options.paraIdTo;
|
|
9423
|
+
api = options.api, chain = options.chain, exchangeChain = options.exchangeChain, destChain = options.destChain, assetInfoFrom = options.assetInfoFrom, assetInfoTo = options.assetInfoTo, feeAssetInfo = options.feeAssetInfo, _options$fees2 = options.fees, originFee = _options$fees2.originFee, originReserveFee = _options$fees2.originReserveFee, destReserveFee = _options$fees2.destReserveFee, senderAddress = options.senderAddress, recipientAddress = options.recipientAddress, version = options.version, paraIdTo = options.paraIdTo;
|
|
9487
9424
|
isEthereumDest = destChain !== undefined && isExternalChain(destChain); // For Ethereum destination, the actual hop target is AssetHub (bridge hub)
|
|
9488
9425
|
resolvedDestChain = isEthereumDest ? "AssetHub".concat(getRelayChainOf(chain !== null && chain !== void 0 ? chain : exchangeChain)) : undefined;
|
|
9489
9426
|
assetFrom = createAsset(version, assetInfoFrom.amount, localizeLocation(exchangeChain, assetInfoFrom.location));
|
|
@@ -9514,23 +9451,25 @@ var createSwapExecuteXcm = /*#__PURE__*/function () {
|
|
|
9514
9451
|
ethFeeAssetInfo = nativeFeeAssetInfo;
|
|
9515
9452
|
}
|
|
9516
9453
|
case 3:
|
|
9517
|
-
|
|
9454
|
+
// Ethereum fee asset takes precedence over user-provided feeAssetInfo
|
|
9455
|
+
resolvedFeeAssetInfo = ethFeeAssetInfo !== null && ethFeeAssetInfo !== void 0 ? ethFeeAssetInfo : feeAssetInfo;
|
|
9456
|
+
hasSeparateFeeAsset = isEthereumDest && !isMainAssetDot || !!feeAssetInfo;
|
|
9518
9457
|
_prepareCommonExecute = prepareCommonExecuteXcm({
|
|
9519
9458
|
api: api,
|
|
9520
9459
|
chain: chain !== null && chain !== void 0 ? chain : exchangeChain,
|
|
9521
9460
|
destChain: (_ref4 = resolvedDestChain !== null && resolvedDestChain !== void 0 ? resolvedDestChain : destChain) !== null && _ref4 !== void 0 ? _ref4 : exchangeChain,
|
|
9522
9461
|
assetInfo: assetInfoFrom,
|
|
9523
|
-
feeAssetInfo:
|
|
9462
|
+
feeAssetInfo: resolvedFeeAssetInfo,
|
|
9524
9463
|
useJitWithdraw: isEthereumDest,
|
|
9525
9464
|
recipientAddress: recipientAddress,
|
|
9526
9465
|
fees: {
|
|
9527
|
-
originFee: hasSeparateFeeAsset ? ethBridgeFee :
|
|
9466
|
+
originFee: hasSeparateFeeAsset ? ethBridgeFee || originFee : originFee,
|
|
9528
9467
|
reserveFee: originReserveFee
|
|
9529
9468
|
},
|
|
9530
9469
|
version: version
|
|
9531
9470
|
}, assetToLocalizedToDest), prefix = _prepareCommonExecute.prefix, depositInstruction = _prepareCommonExecute.depositInstruction;
|
|
9532
9471
|
_context2.n = 4;
|
|
9533
|
-
return createExchangeInstructions(options, assetFrom, assetTo, hasSeparateFeeAsset);
|
|
9472
|
+
return createExchangeInstructions(options, assetFrom, assetTo, isEthereumDest && hasSeparateFeeAsset);
|
|
9534
9473
|
case 4:
|
|
9535
9474
|
exchangeInstructions = _context2.v;
|
|
9536
9475
|
if (!isEthereumDest) {
|
|
@@ -9663,6 +9602,7 @@ var findExchangeHopIndex = function findExchangeHopIndex(chain, dryRunResult, ex
|
|
|
9663
9602
|
var extractFeesFromDryRun = function extractFeesFromDryRun(chain, dryRunResult, exchangeHopIndex, destChain) {
|
|
9664
9603
|
var requireHopsSuccess = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
9665
9604
|
var fees = {
|
|
9605
|
+
originFee: 0n,
|
|
9666
9606
|
originReserveFee: 0n,
|
|
9667
9607
|
exchangeFee: 0n,
|
|
9668
9608
|
destReserveFee: 0n
|
|
@@ -9770,11 +9710,11 @@ var createXcmAndCall = /*#__PURE__*/function () {
|
|
|
9770
9710
|
}();
|
|
9771
9711
|
var handleSwapExecuteTransfer = /*#__PURE__*/function () {
|
|
9772
9712
|
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(options) {
|
|
9773
|
-
var api, chain, exchangeChain, destChain, assetFrom, assetTo, currencyTo, senderAddress, recipientAddress, calculateMinAmountOut, version, isEthereumDest, hasSeparateFeeAsset, internalOptions, dryRunParams, fees, totalFeesPre, _yield$createXcmAndCa, initialCall, firstDryRunResult, exchangeHopIndex, extractedFees, totalFees, updatedAssetTo, amountAvailableForSwap, recalculatedMinAmountOut, _yield$createXcmAndCa2, finalCall;
|
|
9713
|
+
var api, chain, exchangeChain, destChain, assetFrom, assetTo, currencyTo, feeAssetInfo, senderAddress, recipientAddress, calculateMinAmountOut, version, isEthereumDest, hasSeparateFeeAsset, internalOptions, dryRunParams, FEE_ASSET_AMOUNT, dummyOriginFee, fees, totalFeesPre, _yield$createXcmAndCa, initialCall, firstDryRunResult, exchangeHopIndex, extractedFees, totalFees, updatedAssetTo, amountAvailableForSwap, recalculatedMinAmountOut, _yield$createXcmAndCa2, finalCall;
|
|
9774
9714
|
return _regenerator().w(function (_context3) {
|
|
9775
9715
|
while (1) switch (_context3.n) {
|
|
9776
9716
|
case 0:
|
|
9777
|
-
api = options.api, chain = options.chain, exchangeChain = options.exchangeChain, destChain = options.destChain, assetFrom = options.assetInfoFrom, assetTo = options.assetInfoTo, currencyTo = options.currencyTo, senderAddress = options.senderAddress, recipientAddress = options.recipientAddress, calculateMinAmountOut = options.calculateMinAmountOut;
|
|
9717
|
+
api = options.api, chain = options.chain, exchangeChain = options.exchangeChain, destChain = options.destChain, assetFrom = options.assetInfoFrom, assetTo = options.assetInfoTo, currencyTo = options.currencyTo, feeAssetInfo = options.feeAssetInfo, senderAddress = options.senderAddress, recipientAddress = options.recipientAddress, calculateMinAmountOut = options.calculateMinAmountOut;
|
|
9778
9718
|
_context3.n = 1;
|
|
9779
9719
|
return api.init(chain !== null && chain !== void 0 ? chain : exchangeChain);
|
|
9780
9720
|
case 1:
|
|
@@ -9798,6 +9738,9 @@ var handleSwapExecuteTransfer = /*#__PURE__*/function () {
|
|
|
9798
9738
|
location: assetFrom.location,
|
|
9799
9739
|
amount: assetFrom.amount
|
|
9800
9740
|
},
|
|
9741
|
+
feeAsset: feeAssetInfo ? {
|
|
9742
|
+
location: feeAssetInfo.location
|
|
9743
|
+
} : undefined,
|
|
9801
9744
|
swapConfig: {
|
|
9802
9745
|
currencyTo: currencyTo,
|
|
9803
9746
|
exchangeChain: exchangeChain,
|
|
@@ -9805,7 +9748,10 @@ var handleSwapExecuteTransfer = /*#__PURE__*/function () {
|
|
|
9805
9748
|
},
|
|
9806
9749
|
useRootOrigin: true
|
|
9807
9750
|
};
|
|
9751
|
+
FEE_ASSET_AMOUNT = 100;
|
|
9752
|
+
dummyOriginFee = feeAssetInfo ? parseUnits(FEE_ASSET_AMOUNT.toString(), feeAssetInfo.decimals) : 0n;
|
|
9808
9753
|
fees = {
|
|
9754
|
+
originFee: dummyOriginFee,
|
|
9809
9755
|
originReserveFee: MIN_FEE,
|
|
9810
9756
|
exchangeFee: 0n,
|
|
9811
9757
|
destReserveFee: MIN_FEE
|
|
@@ -9839,7 +9785,8 @@ var handleSwapExecuteTransfer = /*#__PURE__*/function () {
|
|
|
9839
9785
|
throw new AmountTooLowError("Asset amount is too low to cover the fees, please increase the amount.");
|
|
9840
9786
|
case 4:
|
|
9841
9787
|
exchangeHopIndex = findExchangeHopIndex(chain, firstDryRunResult, exchangeChain, destChain);
|
|
9842
|
-
extractedFees = extractFeesFromDryRun(chain, firstDryRunResult, exchangeHopIndex, destChain, false);
|
|
9788
|
+
extractedFees = extractFeesFromDryRun(chain, firstDryRunResult, exchangeHopIndex, destChain, false); // Set originFee from dry run origin fee (padded), same as handleExecuteTransfer
|
|
9789
|
+
extractedFees.originFee = feeAssetInfo && firstDryRunResult.origin.success ? padValueBy(firstDryRunResult.origin.fee, FEE_PADDING_PERCENTAGE) : 0n;
|
|
9843
9790
|
if (extractedFees.exchangeFee === 0n) {
|
|
9844
9791
|
// We set the exchange fee to non-zero value to prevent creating dummy tx
|
|
9845
9792
|
extractedFees.exchangeFee = MIN_FEE;
|
|
@@ -11250,11 +11197,11 @@ var Hydration = /*#__PURE__*/function (_Chain) {
|
|
|
11250
11197
|
key: "transferPolkadotXCM",
|
|
11251
11198
|
value: function () {
|
|
11252
11199
|
var _transferPolkadotXCM = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(input) {
|
|
11253
|
-
var
|
|
11200
|
+
var destination, asset, isMoonbeamWhAsset;
|
|
11254
11201
|
return _regenerator().w(function (_context) {
|
|
11255
11202
|
while (1) switch (_context.n) {
|
|
11256
11203
|
case 0:
|
|
11257
|
-
|
|
11204
|
+
destination = input.destination, asset = input.assetInfo;
|
|
11258
11205
|
if (!(destination === 'Ethereum')) {
|
|
11259
11206
|
_context.n = 1;
|
|
11260
11207
|
break;
|
|
@@ -11268,28 +11215,6 @@ var Hydration = /*#__PURE__*/function (_Chain) {
|
|
|
11268
11215
|
}
|
|
11269
11216
|
return _context.a(2, this.transferMoonbeamWhAsset(input));
|
|
11270
11217
|
case 2:
|
|
11271
|
-
if (!feeAsset) {
|
|
11272
|
-
_context.n = 5;
|
|
11273
|
-
break;
|
|
11274
|
-
}
|
|
11275
|
-
if (!overriddenAsset) {
|
|
11276
|
-
_context.n = 3;
|
|
11277
|
-
break;
|
|
11278
|
-
}
|
|
11279
|
-
throw new InvalidCurrencyError('Cannot use overridden assets with XCM execute');
|
|
11280
|
-
case 3:
|
|
11281
|
-
isNativeAsset = isSymbolMatch(asset.symbol, this.getNativeAssetSymbol());
|
|
11282
|
-
isNativeFeeAsset = isSymbolMatch(feeAsset.symbol, this.getNativeAssetSymbol());
|
|
11283
|
-
if (!(!isNativeAsset || !isNativeFeeAsset)) {
|
|
11284
|
-
_context.n = 5;
|
|
11285
|
-
break;
|
|
11286
|
-
}
|
|
11287
|
-
_t = api;
|
|
11288
|
-
_context.n = 4;
|
|
11289
|
-
return handleExecuteTransfer(input);
|
|
11290
|
-
case 4:
|
|
11291
|
-
return _context.a(2, _t.deserializeExtrinsics.call(_t, _context.v));
|
|
11292
|
-
case 5:
|
|
11293
11218
|
return _context.a(2, transferPolkadotXcm(input));
|
|
11294
11219
|
}
|
|
11295
11220
|
}, _callee, this);
|
|
@@ -12132,53 +12057,6 @@ var Karura = /*#__PURE__*/function (_Acala) {
|
|
|
12132
12057
|
return _createClass(Karura);
|
|
12133
12058
|
}(Acala);
|
|
12134
12059
|
|
|
12135
|
-
var KiltSpiritnet = /*#__PURE__*/function (_Chain) {
|
|
12136
|
-
function KiltSpiritnet() {
|
|
12137
|
-
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'KiltSpiritnet';
|
|
12138
|
-
var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'kilt';
|
|
12139
|
-
var ecosystem = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Polkadot';
|
|
12140
|
-
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Version.V4;
|
|
12141
|
-
_classCallCheck(this, KiltSpiritnet);
|
|
12142
|
-
return _callSuper(this, KiltSpiritnet, [chain, info, ecosystem, version]);
|
|
12143
|
-
}
|
|
12144
|
-
_inherits(KiltSpiritnet, _Chain);
|
|
12145
|
-
return _createClass(KiltSpiritnet, [{
|
|
12146
|
-
key: "transferPolkadotXCM",
|
|
12147
|
-
value: function transferPolkadotXCM(input) {
|
|
12148
|
-
var scenario = input.scenario,
|
|
12149
|
-
asset = input.assetInfo;
|
|
12150
|
-
if (scenario === 'ParaToPara' && asset.symbol !== this.getNativeAssetSymbol()) {
|
|
12151
|
-
throw new ScenarioNotSupportedError('KiltSpiritnet only supports native asset ParaToPara transfers');
|
|
12152
|
-
}
|
|
12153
|
-
return transferPolkadotXcm(input);
|
|
12154
|
-
}
|
|
12155
|
-
}, {
|
|
12156
|
-
key: "isRelayToParaEnabled",
|
|
12157
|
-
value: function isRelayToParaEnabled() {
|
|
12158
|
-
return false;
|
|
12159
|
-
}
|
|
12160
|
-
}]);
|
|
12161
|
-
}(Chain);
|
|
12162
|
-
|
|
12163
|
-
var KiltPaseo = /*#__PURE__*/function (_KiltSpiritnet) {
|
|
12164
|
-
function KiltPaseo() {
|
|
12165
|
-
_classCallCheck(this, KiltPaseo);
|
|
12166
|
-
return _callSuper(this, KiltPaseo, ['KiltPaseo', 'kilt', 'Paseo', Version.V4]);
|
|
12167
|
-
}
|
|
12168
|
-
_inherits(KiltPaseo, _KiltSpiritnet);
|
|
12169
|
-
return _createClass(KiltPaseo, [{
|
|
12170
|
-
key: "isSendingTempDisabled",
|
|
12171
|
-
value: function isSendingTempDisabled(_options) {
|
|
12172
|
-
return true;
|
|
12173
|
-
}
|
|
12174
|
-
}, {
|
|
12175
|
-
key: "isReceivingTempDisabled",
|
|
12176
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
12177
|
-
return true;
|
|
12178
|
-
}
|
|
12179
|
-
}]);
|
|
12180
|
-
}(KiltSpiritnet);
|
|
12181
|
-
|
|
12182
12060
|
var Kintsugi = /*#__PURE__*/function (_Chain) {
|
|
12183
12061
|
function Kintsugi() {
|
|
12184
12062
|
_classCallCheck(this, Kintsugi);
|
|
@@ -12405,7 +12283,7 @@ var Moonbeam = /*#__PURE__*/function (_Chain) {
|
|
|
12405
12283
|
}, {
|
|
12406
12284
|
key: "transferLocalNonNativeAsset",
|
|
12407
12285
|
value: function transferLocalNonNativeAsset(_options) {
|
|
12408
|
-
throw new ScenarioNotSupportedError("".concat(this.chain, " local transfers are
|
|
12286
|
+
throw new ScenarioNotSupportedError("".concat(this.chain, " local transfers are supported only from EVM Builder"));
|
|
12409
12287
|
}
|
|
12410
12288
|
}, {
|
|
12411
12289
|
key: "getBalanceForeign",
|
|
@@ -12663,48 +12541,6 @@ var Paseo = /*#__PURE__*/function (_Polkadot) {
|
|
|
12663
12541
|
return _createClass(Paseo);
|
|
12664
12542
|
}(Polkadot);
|
|
12665
12543
|
|
|
12666
|
-
var PeoplePolkadot = /*#__PURE__*/function (_Chain) {
|
|
12667
|
-
function PeoplePolkadot() {
|
|
12668
|
-
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'PeoplePolkadot';
|
|
12669
|
-
var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'polkadotPeople';
|
|
12670
|
-
var ecosystem = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Polkadot';
|
|
12671
|
-
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Version.V5;
|
|
12672
|
-
_classCallCheck(this, PeoplePolkadot);
|
|
12673
|
-
return _callSuper(this, PeoplePolkadot, [chain, info, ecosystem, version]);
|
|
12674
|
-
}
|
|
12675
|
-
_inherits(PeoplePolkadot, _Chain);
|
|
12676
|
-
return _createClass(PeoplePolkadot, [{
|
|
12677
|
-
key: "transferPolkadotXCM",
|
|
12678
|
-
value: function transferPolkadotXCM(input) {
|
|
12679
|
-
var scenario = input.scenario,
|
|
12680
|
-
destChain = input.destChain;
|
|
12681
|
-
if (scenario === 'ParaToPara' && !(destChain !== null && destChain !== void 0 && destChain.startsWith('AssetHub'))) {
|
|
12682
|
-
throw new ScenarioNotSupportedError("Unable to use ".concat(this.chain, " for transfers to other Parachains."));
|
|
12683
|
-
}
|
|
12684
|
-
return transferPolkadotXcm(input);
|
|
12685
|
-
}
|
|
12686
|
-
}]);
|
|
12687
|
-
}(Chain);
|
|
12688
|
-
|
|
12689
|
-
var PAssetHub = /*#__PURE__*/function (_PeoplePolkadot) {
|
|
12690
|
-
function PAssetHub() {
|
|
12691
|
-
_classCallCheck(this, PAssetHub);
|
|
12692
|
-
return _callSuper(this, PAssetHub, ['PAssetHub', 'PAssetHub - Contracts', 'Paseo', Version.V5]);
|
|
12693
|
-
}
|
|
12694
|
-
_inherits(PAssetHub, _PeoplePolkadot);
|
|
12695
|
-
return _createClass(PAssetHub, [{
|
|
12696
|
-
key: "isSendingTempDisabled",
|
|
12697
|
-
value: function isSendingTempDisabled(_options) {
|
|
12698
|
-
return true;
|
|
12699
|
-
}
|
|
12700
|
-
}, {
|
|
12701
|
-
key: "isReceivingTempDisabled",
|
|
12702
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
12703
|
-
return true;
|
|
12704
|
-
}
|
|
12705
|
-
}]);
|
|
12706
|
-
}(PeoplePolkadot);
|
|
12707
|
-
|
|
12708
12544
|
var Peaq = /*#__PURE__*/function (_Chain) {
|
|
12709
12545
|
function Peaq() {
|
|
12710
12546
|
_classCallCheck(this, Peaq);
|
|
@@ -12831,6 +12667,29 @@ var PeopleKusama = /*#__PURE__*/function (_Chain) {
|
|
|
12831
12667
|
}]);
|
|
12832
12668
|
}(Chain);
|
|
12833
12669
|
|
|
12670
|
+
var PeoplePolkadot = /*#__PURE__*/function (_Chain) {
|
|
12671
|
+
function PeoplePolkadot() {
|
|
12672
|
+
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'PeoplePolkadot';
|
|
12673
|
+
var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'polkadotPeople';
|
|
12674
|
+
var ecosystem = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Polkadot';
|
|
12675
|
+
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Version.V5;
|
|
12676
|
+
_classCallCheck(this, PeoplePolkadot);
|
|
12677
|
+
return _callSuper(this, PeoplePolkadot, [chain, info, ecosystem, version]);
|
|
12678
|
+
}
|
|
12679
|
+
_inherits(PeoplePolkadot, _Chain);
|
|
12680
|
+
return _createClass(PeoplePolkadot, [{
|
|
12681
|
+
key: "transferPolkadotXCM",
|
|
12682
|
+
value: function transferPolkadotXCM(input) {
|
|
12683
|
+
var scenario = input.scenario,
|
|
12684
|
+
destChain = input.destChain;
|
|
12685
|
+
if (scenario === 'ParaToPara' && !(destChain !== null && destChain !== void 0 && destChain.startsWith('AssetHub'))) {
|
|
12686
|
+
throw new ScenarioNotSupportedError("Unable to use ".concat(this.chain, " for transfers to other Parachains."));
|
|
12687
|
+
}
|
|
12688
|
+
return transferPolkadotXcm(input);
|
|
12689
|
+
}
|
|
12690
|
+
}]);
|
|
12691
|
+
}(Chain);
|
|
12692
|
+
|
|
12834
12693
|
var PeoplePaseo = /*#__PURE__*/function (_PeoplePolkadot) {
|
|
12835
12694
|
function PeoplePaseo() {
|
|
12836
12695
|
_classCallCheck(this, PeoplePaseo);
|
|
@@ -12868,66 +12727,6 @@ var Quartz = /*#__PURE__*/function (_Chain) {
|
|
|
12868
12727
|
}]);
|
|
12869
12728
|
}(Chain);
|
|
12870
12729
|
|
|
12871
|
-
var RobonomicsPolkadot = /*#__PURE__*/function (_Chain) {
|
|
12872
|
-
function RobonomicsPolkadot() {
|
|
12873
|
-
_classCallCheck(this, RobonomicsPolkadot);
|
|
12874
|
-
return _callSuper(this, RobonomicsPolkadot, ['RobonomicsPolkadot', 'robonomics', 'Polkadot', Version.V3]);
|
|
12875
|
-
}
|
|
12876
|
-
_inherits(RobonomicsPolkadot, _Chain);
|
|
12877
|
-
return _createClass(RobonomicsPolkadot, [{
|
|
12878
|
-
key: "transferPolkadotXCM",
|
|
12879
|
-
value: function transferPolkadotXCM(input) {
|
|
12880
|
-
var scenario = input.scenario;
|
|
12881
|
-
if (scenario === 'ParaToPara') {
|
|
12882
|
-
throw new ScenarioNotSupportedError({
|
|
12883
|
-
chain: this.chain,
|
|
12884
|
-
scenario: scenario
|
|
12885
|
-
});
|
|
12886
|
-
}
|
|
12887
|
-
return transferPolkadotXcm(input, 'limited_reserve_transfer_assets', 'Unlimited');
|
|
12888
|
-
}
|
|
12889
|
-
}, {
|
|
12890
|
-
key: "isReceivingTempDisabled",
|
|
12891
|
-
value: function isReceivingTempDisabled(scenario) {
|
|
12892
|
-
return scenario !== 'RelayToPara';
|
|
12893
|
-
}
|
|
12894
|
-
}, {
|
|
12895
|
-
key: "transferLocalNonNativeAsset",
|
|
12896
|
-
value: function transferLocalNonNativeAsset(options) {
|
|
12897
|
-
var api = options.api,
|
|
12898
|
-
asset = options.assetInfo,
|
|
12899
|
-
address = options.address,
|
|
12900
|
-
isAmountAll = options.isAmountAll,
|
|
12901
|
-
keepAlive = options.keepAlive;
|
|
12902
|
-
assertHasId(asset);
|
|
12903
|
-
var assetId = BigInt(asset.assetId);
|
|
12904
|
-
var dest = {
|
|
12905
|
-
Id: address
|
|
12906
|
-
};
|
|
12907
|
-
if (isAmountAll) {
|
|
12908
|
-
return api.deserializeExtrinsics({
|
|
12909
|
-
module: 'Assets',
|
|
12910
|
-
method: 'transfer_all',
|
|
12911
|
-
params: {
|
|
12912
|
-
id: assetId,
|
|
12913
|
-
dest: dest,
|
|
12914
|
-
keep_alive: keepAlive
|
|
12915
|
-
}
|
|
12916
|
-
});
|
|
12917
|
-
}
|
|
12918
|
-
return api.deserializeExtrinsics({
|
|
12919
|
-
module: 'Assets',
|
|
12920
|
-
method: keepAlive ? 'transfer_keep_alive' : 'transfer',
|
|
12921
|
-
params: {
|
|
12922
|
-
id: assetId,
|
|
12923
|
-
target: dest,
|
|
12924
|
-
amount: asset.amount
|
|
12925
|
-
}
|
|
12926
|
-
});
|
|
12927
|
-
}
|
|
12928
|
-
}]);
|
|
12929
|
-
}(Chain);
|
|
12930
|
-
|
|
12931
12730
|
var Shiden = /*#__PURE__*/function (_Astar) {
|
|
12932
12731
|
function Shiden() {
|
|
12933
12732
|
_classCallCheck(this, Shiden);
|
|
@@ -13108,14 +12907,12 @@ var chains = function chains() {
|
|
|
13108
12907
|
Jamton: new Jamton(),
|
|
13109
12908
|
Moonbeam: new Moonbeam(),
|
|
13110
12909
|
CoretimePolkadot: new CoretimePolkadot(),
|
|
13111
|
-
RobonomicsPolkadot: new RobonomicsPolkadot(),
|
|
13112
12910
|
PeoplePolkadot: new PeoplePolkadot(),
|
|
13113
12911
|
Manta: new Manta(),
|
|
13114
12912
|
Nodle: new Nodle(),
|
|
13115
12913
|
NeuroWeb: new NeuroWeb(),
|
|
13116
12914
|
Pendulum: new Pendulum(),
|
|
13117
12915
|
Collectives: new Collectives(),
|
|
13118
|
-
KiltSpiritnet: new KiltSpiritnet(),
|
|
13119
12916
|
Mythos: new Mythos(),
|
|
13120
12917
|
Peaq: new Peaq(),
|
|
13121
12918
|
Xode: new Xode(),
|
|
@@ -13152,8 +12949,6 @@ var chains = function chains() {
|
|
|
13152
12949
|
BridgeHubPaseo: new BridgeHubPaseo(),
|
|
13153
12950
|
CoretimePaseo: new CoretimePaseo(),
|
|
13154
12951
|
EnergyWebXPaseo: new EnergyWebXPaseo(),
|
|
13155
|
-
KiltPaseo: new KiltPaseo(),
|
|
13156
|
-
PAssetHub: new PAssetHub(),
|
|
13157
12952
|
PeoplePaseo: new PeoplePaseo(),
|
|
13158
12953
|
AjunaPaseo: new AjunaPaseo(),
|
|
13159
12954
|
BifrostPaseo: new BifrostPaseo(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk-core",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.8.1",
|
|
4
4
|
"description": "SDK core for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@noble/hashes": "^2.0.1",
|
|
27
27
|
"@scure/base": "^2.0.0",
|
|
28
|
-
"viem": "2.
|
|
29
|
-
"@paraspell/
|
|
30
|
-
"@paraspell/
|
|
31
|
-
"@paraspell/
|
|
28
|
+
"viem": "2.46.3",
|
|
29
|
+
"@paraspell/assets": "12.8.1",
|
|
30
|
+
"@paraspell/pallets": "12.8.1",
|
|
31
|
+
"@paraspell/sdk-common": "12.8.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/plugin-syntax-import-attributes": "^7.28.6",
|
|
35
|
-
"@babel/preset-env": "^7.
|
|
35
|
+
"@babel/preset-env": "^7.29.0",
|
|
36
36
|
"@codecov/rollup-plugin": "^1.9.1",
|
|
37
37
|
"@polkadot/api": "^16.5.4",
|
|
38
38
|
"@polkadot/types": "^16.5.4",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"@rollup/plugin-json": "^6.1.0",
|
|
41
41
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
42
42
|
"@vitest/coverage-v8": "^4.0.18",
|
|
43
|
-
"axios": "^1.13.
|
|
44
|
-
"dotenv": "^17.
|
|
45
|
-
"rollup": "^4.
|
|
43
|
+
"axios": "^1.13.5",
|
|
44
|
+
"dotenv": "^17.3.1",
|
|
45
|
+
"rollup": "^4.59.0",
|
|
46
46
|
"rollup-plugin-dts": "^6.3.0",
|
|
47
47
|
"ts-morph": "^27.0.2",
|
|
48
48
|
"ts-node": "^10.9.2",
|