@paraspell/sdk-core 11.5.1 → 11.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 +67 -39
- package/dist/index.d.ts +9 -3
- package/dist/index.mjs +67 -39
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1105,17 +1105,6 @@ var EnergyWebX$1 = {
|
|
|
1105
1105
|
}
|
|
1106
1106
|
]
|
|
1107
1107
|
};
|
|
1108
|
-
var EnergyWebXPaseo$1 = {
|
|
1109
|
-
name: "PEX",
|
|
1110
|
-
info: "paseoEwx",
|
|
1111
|
-
paraId: 3345,
|
|
1112
|
-
providers: [
|
|
1113
|
-
{
|
|
1114
|
-
name: "Energy Web",
|
|
1115
|
-
endpoint: "wss://public-rpc.testnet.energywebx.com/"
|
|
1116
|
-
}
|
|
1117
|
-
]
|
|
1118
|
-
};
|
|
1119
1108
|
var Hydration$1 = {
|
|
1120
1109
|
name: "Hydration",
|
|
1121
1110
|
info: "hydradx",
|
|
@@ -1139,6 +1128,17 @@ var Hydration$1 = {
|
|
|
1139
1128
|
}
|
|
1140
1129
|
]
|
|
1141
1130
|
};
|
|
1131
|
+
var IntegriteePolkadot$1 = {
|
|
1132
|
+
name: "Integritee Network",
|
|
1133
|
+
info: "integritee",
|
|
1134
|
+
paraId: 2039,
|
|
1135
|
+
providers: [
|
|
1136
|
+
{
|
|
1137
|
+
name: "Integritee",
|
|
1138
|
+
endpoint: "wss://polkadot.api.integritee.network"
|
|
1139
|
+
}
|
|
1140
|
+
]
|
|
1141
|
+
};
|
|
1142
1142
|
var Interlay$1 = {
|
|
1143
1143
|
name: "Interlay",
|
|
1144
1144
|
info: "interlay",
|
|
@@ -2195,6 +2195,17 @@ var CoretimePaseo$1 = {
|
|
|
2195
2195
|
}
|
|
2196
2196
|
]
|
|
2197
2197
|
};
|
|
2198
|
+
var EnergyWebXPaseo$1 = {
|
|
2199
|
+
name: "PEX",
|
|
2200
|
+
info: "paseoEwx",
|
|
2201
|
+
paraId: 3345,
|
|
2202
|
+
providers: [
|
|
2203
|
+
{
|
|
2204
|
+
name: "Energy Web",
|
|
2205
|
+
endpoint: "wss://public-rpc.testnet.energywebx.com/"
|
|
2206
|
+
}
|
|
2207
|
+
]
|
|
2208
|
+
};
|
|
2198
2209
|
var HeimaPaseo$1 = {
|
|
2199
2210
|
name: "Heima paseo",
|
|
2200
2211
|
info: "heima-paseo",
|
|
@@ -2500,8 +2511,8 @@ var configs = {
|
|
|
2500
2511
|
ComposableFinance: ComposableFinance$1,
|
|
2501
2512
|
Darwinia: Darwinia$1,
|
|
2502
2513
|
EnergyWebX: EnergyWebX$1,
|
|
2503
|
-
EnergyWebXPaseo: EnergyWebXPaseo$1,
|
|
2504
2514
|
Hydration: Hydration$1,
|
|
2515
|
+
IntegriteePolkadot: IntegriteePolkadot$1,
|
|
2505
2516
|
Interlay: Interlay$1,
|
|
2506
2517
|
Heima: Heima$1,
|
|
2507
2518
|
Jamton: Jamton$1,
|
|
@@ -2554,6 +2565,7 @@ var configs = {
|
|
|
2554
2565
|
BifrostPaseo: BifrostPaseo$1,
|
|
2555
2566
|
BridgeHubPaseo: BridgeHubPaseo$1,
|
|
2556
2567
|
CoretimePaseo: CoretimePaseo$1,
|
|
2568
|
+
EnergyWebXPaseo: EnergyWebXPaseo$1,
|
|
2557
2569
|
HeimaPaseo: HeimaPaseo$1,
|
|
2558
2570
|
HydrationPaseo: HydrationPaseo$1,
|
|
2559
2571
|
IntegriteePaseo: IntegriteePaseo$1,
|
|
@@ -3814,12 +3826,12 @@ var getBalanceForeignXTokens = /*#__PURE__*/function () {
|
|
|
3814
3826
|
return _regenerator().w(function (_context) {
|
|
3815
3827
|
while (1) switch (_context.n) {
|
|
3816
3828
|
case 0:
|
|
3817
|
-
if (!(chain === 'Astar' || chain === 'Shiden')) {
|
|
3829
|
+
if (!(chain === 'Astar' || chain === 'Shiden' || chain.startsWith('Integritee'))) {
|
|
3818
3830
|
_context.n = 1;
|
|
3819
3831
|
break;
|
|
3820
3832
|
}
|
|
3821
3833
|
assertHasId(asset);
|
|
3822
|
-
return _context.a(2, api.getBalanceAssetsPallet(address, BigInt(asset.assetId)));
|
|
3834
|
+
return _context.a(2, api.getBalanceAssetsPallet(address, chain.startsWith('Integritee') ? Number(asset.assetId) : BigInt(asset.assetId)));
|
|
3823
3835
|
case 1:
|
|
3824
3836
|
if (!(chain === 'BifrostPolkadot' || chain === 'BifrostKusama')) {
|
|
3825
3837
|
_context.n = 2;
|
|
@@ -6015,7 +6027,7 @@ var Parachain = /*#__PURE__*/function () {
|
|
|
6015
6027
|
key: "transfer",
|
|
6016
6028
|
value: function () {
|
|
6017
6029
|
var _transfer = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(sendOptions) {
|
|
6018
|
-
var api, asset, currency, feeAsset, feeCurrency, address, destination, paraIdTo, overriddenAsset, version, senderAddress, ahAddress, pallet, method, scenario, paraId, destChain, isLocalTransfer, isRelayAsset, supportsTypeThen, useTypeAndThen, isBifrostOrigin, isJamtonOrigin, isAssetHubDest, useMultiAssets, input, options, shouldUseTeleport, isAhToOtherPara, isOtherParaToAh, isAHPOrigin, isAHPDest, isExternalAsset, isEthDest, isExternalAssetViaAh, isExternalAssetToAh, call;
|
|
6030
|
+
var api, asset, currency, feeAsset, feeCurrency, address, destination, paraIdTo, overriddenAsset, version, senderAddress, ahAddress, pallet, method, scenario, paraId, destChain, isLocalTransfer, isRelayAsset, supportsTypeThen, useTypeAndThen, isBifrostOrigin, isJamtonOrigin, isAssetHubDest, useMultiAssets, input, options, shouldUseTeleport, isAhToOtherPara, isOtherParaToAh, isAllowedAhTransfer, isAHPOrigin, isAHPDest, isExternalAsset, isEthDest, isExternalAssetViaAh, isExternalAssetToAh, call;
|
|
6019
6031
|
return _regenerator().w(function (_context) {
|
|
6020
6032
|
while (1) switch (_context.n) {
|
|
6021
6033
|
case 0:
|
|
@@ -6126,7 +6138,10 @@ var Parachain = /*#__PURE__*/function () {
|
|
|
6126
6138
|
shouldUseTeleport = this.shouldUseNativeAssetTeleport(sendOptions);
|
|
6127
6139
|
isAhToOtherPara = this.chain.startsWith('AssetHub') && destChain && !sdkCommon.isTrustedChain(destChain);
|
|
6128
6140
|
isOtherParaToAh = (destChain === null || destChain === void 0 ? void 0 : destChain.startsWith('AssetHub')) && !sdkCommon.isTrustedChain(this.chain);
|
|
6129
|
-
|
|
6141
|
+
isAllowedAhTransfer = function isAllowedAhTransfer(chain) {
|
|
6142
|
+
return chain === null || chain === void 0 ? void 0 : chain.startsWith('Integritee');
|
|
6143
|
+
};
|
|
6144
|
+
if (!((isAhToOtherPara || isOtherParaToAh) && shouldUseTeleport && !isAllowedAhTransfer(destChain) && !isAllowedAhTransfer(this.chain))) {
|
|
6130
6145
|
_context.n = 8;
|
|
6131
6146
|
break;
|
|
6132
6147
|
}
|
|
@@ -6758,9 +6773,16 @@ var AssetHubKusama = /*#__PURE__*/function (_Parachain) {
|
|
|
6758
6773
|
if (scenario === 'ParaToPara' && asset.symbol === 'DOT' && !assets.isForeignAsset(asset)) {
|
|
6759
6774
|
throw new ScenarioNotSupportedError(this.chain, scenario, 'Bridged DOT cannot currently be transfered from AssetHubKusama, if you are sending different DOT asset, please specify {id: <DOTID>}.');
|
|
6760
6775
|
}
|
|
6761
|
-
var method = scenario
|
|
6776
|
+
var method = this.getMethod(scenario, destination);
|
|
6762
6777
|
return transferPolkadotXcm(input, method, 'Unlimited');
|
|
6763
6778
|
}
|
|
6779
|
+
}, {
|
|
6780
|
+
key: "getMethod",
|
|
6781
|
+
value: function getMethod(scenario, destination) {
|
|
6782
|
+
var isTrusted = !sdkCommon.isTLocation(destination) && sdkCommon.isTrustedChain(destination);
|
|
6783
|
+
if (destination === 'IntegriteeKusama') return 'transfer_assets';
|
|
6784
|
+
return scenario === 'ParaToPara' && !isTrusted ? 'limited_reserve_transfer_assets' : 'limited_teleport_assets';
|
|
6785
|
+
}
|
|
6764
6786
|
}, {
|
|
6765
6787
|
key: "getRelayToParaOverrides",
|
|
6766
6788
|
value: function getRelayToParaOverrides() {
|
|
@@ -6988,7 +7010,7 @@ var AssetHubPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
6988
7010
|
key: "getMethod",
|
|
6989
7011
|
value: function getMethod(scenario, destination) {
|
|
6990
7012
|
var isTrusted = !sdkCommon.isTLocation(destination) && sdkCommon.isTrustedChain(destination);
|
|
6991
|
-
if (destination === 'Polimec' || destination === 'Moonbeam') return 'transfer_assets';
|
|
7013
|
+
if (destination === 'Polimec' || destination === 'Moonbeam' || typeof destination === 'string' && destination.startsWith('Integritee')) return 'transfer_assets';
|
|
6992
7014
|
return scenario === 'ParaToPara' && !isTrusted ? 'limited_reserve_transfer_assets' : 'limited_teleport_assets';
|
|
6993
7015
|
}
|
|
6994
7016
|
}, {
|
|
@@ -8319,28 +8341,20 @@ var HydrationPaseo = /*#__PURE__*/function (_Hydration) {
|
|
|
8319
8341
|
return _createClass(HydrationPaseo);
|
|
8320
8342
|
}(Hydration);
|
|
8321
8343
|
|
|
8322
|
-
var
|
|
8323
|
-
function
|
|
8324
|
-
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '
|
|
8344
|
+
var IntegriteePolkadot = /*#__PURE__*/function (_Parachain) {
|
|
8345
|
+
function IntegriteePolkadot() {
|
|
8346
|
+
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'IntegriteePolkadot';
|
|
8325
8347
|
var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'integritee';
|
|
8326
|
-
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '
|
|
8327
|
-
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : sdkCommon.Version.
|
|
8328
|
-
_classCallCheck(this,
|
|
8329
|
-
return _callSuper(this,
|
|
8348
|
+
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Polkadot';
|
|
8349
|
+
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : sdkCommon.Version.V5;
|
|
8350
|
+
_classCallCheck(this, IntegriteePolkadot);
|
|
8351
|
+
return _callSuper(this, IntegriteePolkadot, [chain, info, type, version]);
|
|
8330
8352
|
}
|
|
8331
|
-
_inherits(
|
|
8332
|
-
return _createClass(
|
|
8333
|
-
key: "
|
|
8334
|
-
value: function
|
|
8335
|
-
|
|
8336
|
-
scenario = input.scenario;
|
|
8337
|
-
if (scenario !== 'ParaToPara') {
|
|
8338
|
-
throw new ScenarioNotSupportedError(this.chain, scenario);
|
|
8339
|
-
}
|
|
8340
|
-
if (asset.symbol !== this.getNativeAssetSymbol()) {
|
|
8341
|
-
throw new assets.InvalidCurrencyError("Asset ".concat(asset.symbol, " is not supported by chain ").concat(this.chain, "."));
|
|
8342
|
-
}
|
|
8343
|
-
return transferXTokens(input, asset.symbol);
|
|
8353
|
+
_inherits(IntegriteePolkadot, _Parachain);
|
|
8354
|
+
return _createClass(IntegriteePolkadot, [{
|
|
8355
|
+
key: "transferPolkadotXCM",
|
|
8356
|
+
value: function transferPolkadotXCM(input) {
|
|
8357
|
+
return transferPolkadotXcm(input, 'transfer_assets', 'Unlimited');
|
|
8344
8358
|
}
|
|
8345
8359
|
}, {
|
|
8346
8360
|
key: "transferRelayToPara",
|
|
@@ -8369,6 +8383,19 @@ var IntegriteeKusama = /*#__PURE__*/function (_Parachain) {
|
|
|
8369
8383
|
}]);
|
|
8370
8384
|
}(Parachain);
|
|
8371
8385
|
|
|
8386
|
+
var IntegriteeKusama = /*#__PURE__*/function (_IntegriteePolkadot) {
|
|
8387
|
+
function IntegriteeKusama() {
|
|
8388
|
+
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'IntegriteeKusama';
|
|
8389
|
+
var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'integritee';
|
|
8390
|
+
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Kusama';
|
|
8391
|
+
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : sdkCommon.Version.V5;
|
|
8392
|
+
_classCallCheck(this, IntegriteeKusama);
|
|
8393
|
+
return _callSuper(this, IntegriteeKusama, [chain, info, type, version]);
|
|
8394
|
+
}
|
|
8395
|
+
_inherits(IntegriteeKusama, _IntegriteePolkadot);
|
|
8396
|
+
return _createClass(IntegriteeKusama);
|
|
8397
|
+
}(IntegriteePolkadot);
|
|
8398
|
+
|
|
8372
8399
|
var IntegriteePaseo = /*#__PURE__*/function (_IntegriteeKusama) {
|
|
8373
8400
|
function IntegriteePaseo() {
|
|
8374
8401
|
_classCallCheck(this, IntegriteePaseo);
|
|
@@ -9486,6 +9513,7 @@ var chains = function chains() {
|
|
|
9486
9513
|
EnergyWebX: new EnergyWebX(),
|
|
9487
9514
|
Hydration: new Hydration(),
|
|
9488
9515
|
IntegriteeKusama: new IntegriteeKusama(),
|
|
9516
|
+
IntegriteePolkadot: new IntegriteePolkadot(),
|
|
9489
9517
|
Interlay: new Interlay(),
|
|
9490
9518
|
Heima: new Heima(),
|
|
9491
9519
|
Jamton: new Jamton(),
|
|
@@ -9572,7 +9600,7 @@ var RELAY_LOCATION = {
|
|
|
9572
9600
|
Here: null
|
|
9573
9601
|
}
|
|
9574
9602
|
};
|
|
9575
|
-
var CHAINS_DOT_RESERVE_AH = new Set(['Acala', 'Karura', 'Polimec', 'Moonbeam', 'Hydration', 'HydrationPaseo', 'AssetHubPolkadot', 'AssetHubKusama', 'AssetHubWestend', 'AssetHubPaseo', 'BifrostPolkadot', 'BifrostKusama', 'PeoplePolkadot', 'PeopleKusama', 'Ajuna']);
|
|
9603
|
+
var CHAINS_DOT_RESERVE_AH = new Set(['Acala', 'Karura', 'Polimec', 'Moonbeam', 'Hydration', 'HydrationPaseo', 'AssetHubPolkadot', 'AssetHubKusama', 'AssetHubWestend', 'AssetHubPaseo', 'BifrostPolkadot', 'BifrostKusama', 'PeoplePolkadot', 'PeopleKusama', 'Ajuna', 'IntegriteePolkadot', 'IntegriteeKusama', 'IntegriteePaseo']);
|
|
9576
9604
|
var ASSET_HUB_EXECUTION_FEE = 2200000000n; // 0.22 DOT
|
|
9577
9605
|
var TX_CLIENT_TIMEOUT_MS = 20 * 60 * 1000; // 20 minutes
|
|
9578
9606
|
var DRY_RUN_CLIENT_TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes
|
package/dist/index.d.ts
CHANGED
|
@@ -1525,6 +1525,7 @@ declare class Amplitude<TApi, TRes> extends Parachain<TApi, TRes> implements IXT
|
|
|
1525
1525
|
declare class AssetHubKusama<TApi, TRes> extends Parachain<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
1526
1526
|
constructor();
|
|
1527
1527
|
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1528
|
+
getMethod(scenario: TScenario, destination: TDestination): TPolkadotXcmMethod;
|
|
1528
1529
|
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
1529
1530
|
createCurrencySpec(amount: bigint, scenario: TScenario, version: Version, asset?: TAssetInfo, isOverridenAsset?: boolean): _paraspell_assets.TAsset;
|
|
1530
1531
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
@@ -1767,13 +1768,17 @@ declare class HydrationPaseo<TApi, TRes> extends Hydration<TApi, TRes> {
|
|
|
1767
1768
|
constructor();
|
|
1768
1769
|
}
|
|
1769
1770
|
|
|
1770
|
-
declare class
|
|
1771
|
+
declare class IntegriteePolkadot<TApi, TRes> extends Parachain<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
1771
1772
|
constructor(chain?: TParachain, info?: string, type?: TRelaychain, version?: Version);
|
|
1772
|
-
|
|
1773
|
+
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1773
1774
|
transferRelayToPara(): Promise<TSerializedApiCall>;
|
|
1774
1775
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
1775
1776
|
}
|
|
1776
1777
|
|
|
1778
|
+
declare class IntegriteeKusama<TApi, TRes> extends IntegriteePolkadot<TApi, TRes> {
|
|
1779
|
+
constructor(chain?: TParachain, info?: string, type?: TRelaychain, version?: Version);
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1777
1782
|
declare class IntegriteePaseo<TApi, TRes> extends IntegriteeKusama<TApi, TRes> {
|
|
1778
1783
|
constructor();
|
|
1779
1784
|
}
|
|
@@ -1994,6 +1999,7 @@ declare const chains: <TApi, TRes>() => {
|
|
|
1994
1999
|
EnergyWebX: EnergyWebX<TApi, TRes>;
|
|
1995
2000
|
Hydration: Hydration<TApi, TRes>;
|
|
1996
2001
|
IntegriteeKusama: IntegriteeKusama<TApi, TRes>;
|
|
2002
|
+
IntegriteePolkadot: IntegriteePolkadot<TApi, TRes>;
|
|
1997
2003
|
Interlay: Interlay<TApi, TRes>;
|
|
1998
2004
|
Heima: Heima<TApi, TRes>;
|
|
1999
2005
|
Jamton: Jamton<TApi, TRes>;
|
|
@@ -2211,7 +2217,7 @@ declare const localizeLocation: (chain: TChain, location: TLocation) => TLocatio
|
|
|
2211
2217
|
|
|
2212
2218
|
declare const reverseTransformLocation: (location: TLocation) => TLocation;
|
|
2213
2219
|
|
|
2214
|
-
declare const resolveDestChain: (originChain: TSubstrateChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "ComposableFinance" | "Darwinia" | "EnergyWebX" | "Hydration" | "Interlay" | "Heima" | "Jamton" | "Moonbeam" | "CoretimePolkadot" | "Collectives" | "Crust" | "Manta" | "Nodle" | "NeuroWeb" | "Pendulum" | "Phala" | "Subsocial" | "KiltSpiritnet" | "Curio" | "Mythos" | "Peaq" | "Polimec" | "RobonomicsPolkadot" | "PeoplePolkadot" | "Unique" | "AssetHubKusama" | "BridgeHubKusama" | "IntegriteeKusama" | "Karura" | "Kintsugi" | "Moonriver" | "CoretimeKusama" | "Encointer" | "Altair" | "Amplitude" | "Basilisk" | "BifrostKusama" | "CrustShadow" | "Crab" | "Laos" | "Quartz" | "RobonomicsKusama" | "PeopleKusama" | "Shiden" | "Zeitgeist" | "AssetHubWestend" | "BridgeHubWestend" | "CollectivesWestend" | "CoretimeWestend" | "Penpal" | "PeopleWestend" | "AjunaPaseo" | "AssetHubPaseo" | "BifrostPaseo" | "BridgeHubPaseo" | "CoretimePaseo" | "EnergyWebXPaseo" | "HeimaPaseo" | "HydrationPaseo" | "IntegriteePaseo" | "KiltPaseo" | "LaosPaseo" | "NeuroWebPaseo" | "NodlePaseo" | "PAssetHub" | "PeoplePaseo" | "ZeitgeistPaseo" | undefined;
|
|
2220
|
+
declare const resolveDestChain: (originChain: TSubstrateChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "ComposableFinance" | "Darwinia" | "EnergyWebX" | "Hydration" | "IntegriteePolkadot" | "Interlay" | "Heima" | "Jamton" | "Moonbeam" | "CoretimePolkadot" | "Collectives" | "Crust" | "Manta" | "Nodle" | "NeuroWeb" | "Pendulum" | "Phala" | "Subsocial" | "KiltSpiritnet" | "Curio" | "Mythos" | "Peaq" | "Polimec" | "RobonomicsPolkadot" | "PeoplePolkadot" | "Unique" | "AssetHubKusama" | "BridgeHubKusama" | "IntegriteeKusama" | "Karura" | "Kintsugi" | "Moonriver" | "CoretimeKusama" | "Encointer" | "Altair" | "Amplitude" | "Basilisk" | "BifrostKusama" | "CrustShadow" | "Crab" | "Laos" | "Quartz" | "RobonomicsKusama" | "PeopleKusama" | "Shiden" | "Zeitgeist" | "AssetHubWestend" | "BridgeHubWestend" | "CollectivesWestend" | "CoretimeWestend" | "Penpal" | "PeopleWestend" | "AjunaPaseo" | "AssetHubPaseo" | "BifrostPaseo" | "BridgeHubPaseo" | "CoretimePaseo" | "EnergyWebXPaseo" | "HeimaPaseo" | "HydrationPaseo" | "IntegriteePaseo" | "KiltPaseo" | "LaosPaseo" | "NeuroWebPaseo" | "NodlePaseo" | "PAssetHub" | "PeoplePaseo" | "ZeitgeistPaseo" | undefined;
|
|
2215
2221
|
|
|
2216
2222
|
declare const resolveParaId: (paraId: number | undefined, destination: TDestination) => number | undefined;
|
|
2217
2223
|
|
package/dist/index.mjs
CHANGED
|
@@ -1106,17 +1106,6 @@ var EnergyWebX$1 = {
|
|
|
1106
1106
|
}
|
|
1107
1107
|
]
|
|
1108
1108
|
};
|
|
1109
|
-
var EnergyWebXPaseo$1 = {
|
|
1110
|
-
name: "PEX",
|
|
1111
|
-
info: "paseoEwx",
|
|
1112
|
-
paraId: 3345,
|
|
1113
|
-
providers: [
|
|
1114
|
-
{
|
|
1115
|
-
name: "Energy Web",
|
|
1116
|
-
endpoint: "wss://public-rpc.testnet.energywebx.com/"
|
|
1117
|
-
}
|
|
1118
|
-
]
|
|
1119
|
-
};
|
|
1120
1109
|
var Hydration$1 = {
|
|
1121
1110
|
name: "Hydration",
|
|
1122
1111
|
info: "hydradx",
|
|
@@ -1140,6 +1129,17 @@ var Hydration$1 = {
|
|
|
1140
1129
|
}
|
|
1141
1130
|
]
|
|
1142
1131
|
};
|
|
1132
|
+
var IntegriteePolkadot$1 = {
|
|
1133
|
+
name: "Integritee Network",
|
|
1134
|
+
info: "integritee",
|
|
1135
|
+
paraId: 2039,
|
|
1136
|
+
providers: [
|
|
1137
|
+
{
|
|
1138
|
+
name: "Integritee",
|
|
1139
|
+
endpoint: "wss://polkadot.api.integritee.network"
|
|
1140
|
+
}
|
|
1141
|
+
]
|
|
1142
|
+
};
|
|
1143
1143
|
var Interlay$1 = {
|
|
1144
1144
|
name: "Interlay",
|
|
1145
1145
|
info: "interlay",
|
|
@@ -2196,6 +2196,17 @@ var CoretimePaseo$1 = {
|
|
|
2196
2196
|
}
|
|
2197
2197
|
]
|
|
2198
2198
|
};
|
|
2199
|
+
var EnergyWebXPaseo$1 = {
|
|
2200
|
+
name: "PEX",
|
|
2201
|
+
info: "paseoEwx",
|
|
2202
|
+
paraId: 3345,
|
|
2203
|
+
providers: [
|
|
2204
|
+
{
|
|
2205
|
+
name: "Energy Web",
|
|
2206
|
+
endpoint: "wss://public-rpc.testnet.energywebx.com/"
|
|
2207
|
+
}
|
|
2208
|
+
]
|
|
2209
|
+
};
|
|
2199
2210
|
var HeimaPaseo$1 = {
|
|
2200
2211
|
name: "Heima paseo",
|
|
2201
2212
|
info: "heima-paseo",
|
|
@@ -2501,8 +2512,8 @@ var configs = {
|
|
|
2501
2512
|
ComposableFinance: ComposableFinance$1,
|
|
2502
2513
|
Darwinia: Darwinia$1,
|
|
2503
2514
|
EnergyWebX: EnergyWebX$1,
|
|
2504
|
-
EnergyWebXPaseo: EnergyWebXPaseo$1,
|
|
2505
2515
|
Hydration: Hydration$1,
|
|
2516
|
+
IntegriteePolkadot: IntegriteePolkadot$1,
|
|
2506
2517
|
Interlay: Interlay$1,
|
|
2507
2518
|
Heima: Heima$1,
|
|
2508
2519
|
Jamton: Jamton$1,
|
|
@@ -2555,6 +2566,7 @@ var configs = {
|
|
|
2555
2566
|
BifrostPaseo: BifrostPaseo$1,
|
|
2556
2567
|
BridgeHubPaseo: BridgeHubPaseo$1,
|
|
2557
2568
|
CoretimePaseo: CoretimePaseo$1,
|
|
2569
|
+
EnergyWebXPaseo: EnergyWebXPaseo$1,
|
|
2558
2570
|
HeimaPaseo: HeimaPaseo$1,
|
|
2559
2571
|
HydrationPaseo: HydrationPaseo$1,
|
|
2560
2572
|
IntegriteePaseo: IntegriteePaseo$1,
|
|
@@ -3815,12 +3827,12 @@ var getBalanceForeignXTokens = /*#__PURE__*/function () {
|
|
|
3815
3827
|
return _regenerator().w(function (_context) {
|
|
3816
3828
|
while (1) switch (_context.n) {
|
|
3817
3829
|
case 0:
|
|
3818
|
-
if (!(chain === 'Astar' || chain === 'Shiden')) {
|
|
3830
|
+
if (!(chain === 'Astar' || chain === 'Shiden' || chain.startsWith('Integritee'))) {
|
|
3819
3831
|
_context.n = 1;
|
|
3820
3832
|
break;
|
|
3821
3833
|
}
|
|
3822
3834
|
assertHasId(asset);
|
|
3823
|
-
return _context.a(2, api.getBalanceAssetsPallet(address, BigInt(asset.assetId)));
|
|
3835
|
+
return _context.a(2, api.getBalanceAssetsPallet(address, chain.startsWith('Integritee') ? Number(asset.assetId) : BigInt(asset.assetId)));
|
|
3824
3836
|
case 1:
|
|
3825
3837
|
if (!(chain === 'BifrostPolkadot' || chain === 'BifrostKusama')) {
|
|
3826
3838
|
_context.n = 2;
|
|
@@ -6016,7 +6028,7 @@ var Parachain = /*#__PURE__*/function () {
|
|
|
6016
6028
|
key: "transfer",
|
|
6017
6029
|
value: function () {
|
|
6018
6030
|
var _transfer = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(sendOptions) {
|
|
6019
|
-
var api, asset, currency, feeAsset, feeCurrency, address, destination, paraIdTo, overriddenAsset, version, senderAddress, ahAddress, pallet, method, scenario, paraId, destChain, isLocalTransfer, isRelayAsset, supportsTypeThen, useTypeAndThen, isBifrostOrigin, isJamtonOrigin, isAssetHubDest, useMultiAssets, input, options, shouldUseTeleport, isAhToOtherPara, isOtherParaToAh, isAHPOrigin, isAHPDest, isExternalAsset, isEthDest, isExternalAssetViaAh, isExternalAssetToAh, call;
|
|
6031
|
+
var api, asset, currency, feeAsset, feeCurrency, address, destination, paraIdTo, overriddenAsset, version, senderAddress, ahAddress, pallet, method, scenario, paraId, destChain, isLocalTransfer, isRelayAsset, supportsTypeThen, useTypeAndThen, isBifrostOrigin, isJamtonOrigin, isAssetHubDest, useMultiAssets, input, options, shouldUseTeleport, isAhToOtherPara, isOtherParaToAh, isAllowedAhTransfer, isAHPOrigin, isAHPDest, isExternalAsset, isEthDest, isExternalAssetViaAh, isExternalAssetToAh, call;
|
|
6020
6032
|
return _regenerator().w(function (_context) {
|
|
6021
6033
|
while (1) switch (_context.n) {
|
|
6022
6034
|
case 0:
|
|
@@ -6127,7 +6139,10 @@ var Parachain = /*#__PURE__*/function () {
|
|
|
6127
6139
|
shouldUseTeleport = this.shouldUseNativeAssetTeleport(sendOptions);
|
|
6128
6140
|
isAhToOtherPara = this.chain.startsWith('AssetHub') && destChain && !isTrustedChain(destChain);
|
|
6129
6141
|
isOtherParaToAh = (destChain === null || destChain === void 0 ? void 0 : destChain.startsWith('AssetHub')) && !isTrustedChain(this.chain);
|
|
6130
|
-
|
|
6142
|
+
isAllowedAhTransfer = function isAllowedAhTransfer(chain) {
|
|
6143
|
+
return chain === null || chain === void 0 ? void 0 : chain.startsWith('Integritee');
|
|
6144
|
+
};
|
|
6145
|
+
if (!((isAhToOtherPara || isOtherParaToAh) && shouldUseTeleport && !isAllowedAhTransfer(destChain) && !isAllowedAhTransfer(this.chain))) {
|
|
6131
6146
|
_context.n = 8;
|
|
6132
6147
|
break;
|
|
6133
6148
|
}
|
|
@@ -6759,9 +6774,16 @@ var AssetHubKusama = /*#__PURE__*/function (_Parachain) {
|
|
|
6759
6774
|
if (scenario === 'ParaToPara' && asset.symbol === 'DOT' && !isForeignAsset(asset)) {
|
|
6760
6775
|
throw new ScenarioNotSupportedError(this.chain, scenario, 'Bridged DOT cannot currently be transfered from AssetHubKusama, if you are sending different DOT asset, please specify {id: <DOTID>}.');
|
|
6761
6776
|
}
|
|
6762
|
-
var method = scenario
|
|
6777
|
+
var method = this.getMethod(scenario, destination);
|
|
6763
6778
|
return transferPolkadotXcm(input, method, 'Unlimited');
|
|
6764
6779
|
}
|
|
6780
|
+
}, {
|
|
6781
|
+
key: "getMethod",
|
|
6782
|
+
value: function getMethod(scenario, destination) {
|
|
6783
|
+
var isTrusted = !isTLocation(destination) && isTrustedChain(destination);
|
|
6784
|
+
if (destination === 'IntegriteeKusama') return 'transfer_assets';
|
|
6785
|
+
return scenario === 'ParaToPara' && !isTrusted ? 'limited_reserve_transfer_assets' : 'limited_teleport_assets';
|
|
6786
|
+
}
|
|
6765
6787
|
}, {
|
|
6766
6788
|
key: "getRelayToParaOverrides",
|
|
6767
6789
|
value: function getRelayToParaOverrides() {
|
|
@@ -6989,7 +7011,7 @@ var AssetHubPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
6989
7011
|
key: "getMethod",
|
|
6990
7012
|
value: function getMethod(scenario, destination) {
|
|
6991
7013
|
var isTrusted = !isTLocation(destination) && isTrustedChain(destination);
|
|
6992
|
-
if (destination === 'Polimec' || destination === 'Moonbeam') return 'transfer_assets';
|
|
7014
|
+
if (destination === 'Polimec' || destination === 'Moonbeam' || typeof destination === 'string' && destination.startsWith('Integritee')) return 'transfer_assets';
|
|
6993
7015
|
return scenario === 'ParaToPara' && !isTrusted ? 'limited_reserve_transfer_assets' : 'limited_teleport_assets';
|
|
6994
7016
|
}
|
|
6995
7017
|
}, {
|
|
@@ -8320,28 +8342,20 @@ var HydrationPaseo = /*#__PURE__*/function (_Hydration) {
|
|
|
8320
8342
|
return _createClass(HydrationPaseo);
|
|
8321
8343
|
}(Hydration);
|
|
8322
8344
|
|
|
8323
|
-
var
|
|
8324
|
-
function
|
|
8325
|
-
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '
|
|
8345
|
+
var IntegriteePolkadot = /*#__PURE__*/function (_Parachain) {
|
|
8346
|
+
function IntegriteePolkadot() {
|
|
8347
|
+
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'IntegriteePolkadot';
|
|
8326
8348
|
var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'integritee';
|
|
8327
|
-
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '
|
|
8328
|
-
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Version.
|
|
8329
|
-
_classCallCheck(this,
|
|
8330
|
-
return _callSuper(this,
|
|
8349
|
+
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Polkadot';
|
|
8350
|
+
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Version.V5;
|
|
8351
|
+
_classCallCheck(this, IntegriteePolkadot);
|
|
8352
|
+
return _callSuper(this, IntegriteePolkadot, [chain, info, type, version]);
|
|
8331
8353
|
}
|
|
8332
|
-
_inherits(
|
|
8333
|
-
return _createClass(
|
|
8334
|
-
key: "
|
|
8335
|
-
value: function
|
|
8336
|
-
|
|
8337
|
-
scenario = input.scenario;
|
|
8338
|
-
if (scenario !== 'ParaToPara') {
|
|
8339
|
-
throw new ScenarioNotSupportedError(this.chain, scenario);
|
|
8340
|
-
}
|
|
8341
|
-
if (asset.symbol !== this.getNativeAssetSymbol()) {
|
|
8342
|
-
throw new InvalidCurrencyError("Asset ".concat(asset.symbol, " is not supported by chain ").concat(this.chain, "."));
|
|
8343
|
-
}
|
|
8344
|
-
return transferXTokens(input, asset.symbol);
|
|
8354
|
+
_inherits(IntegriteePolkadot, _Parachain);
|
|
8355
|
+
return _createClass(IntegriteePolkadot, [{
|
|
8356
|
+
key: "transferPolkadotXCM",
|
|
8357
|
+
value: function transferPolkadotXCM(input) {
|
|
8358
|
+
return transferPolkadotXcm(input, 'transfer_assets', 'Unlimited');
|
|
8345
8359
|
}
|
|
8346
8360
|
}, {
|
|
8347
8361
|
key: "transferRelayToPara",
|
|
@@ -8370,6 +8384,19 @@ var IntegriteeKusama = /*#__PURE__*/function (_Parachain) {
|
|
|
8370
8384
|
}]);
|
|
8371
8385
|
}(Parachain);
|
|
8372
8386
|
|
|
8387
|
+
var IntegriteeKusama = /*#__PURE__*/function (_IntegriteePolkadot) {
|
|
8388
|
+
function IntegriteeKusama() {
|
|
8389
|
+
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'IntegriteeKusama';
|
|
8390
|
+
var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'integritee';
|
|
8391
|
+
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Kusama';
|
|
8392
|
+
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Version.V5;
|
|
8393
|
+
_classCallCheck(this, IntegriteeKusama);
|
|
8394
|
+
return _callSuper(this, IntegriteeKusama, [chain, info, type, version]);
|
|
8395
|
+
}
|
|
8396
|
+
_inherits(IntegriteeKusama, _IntegriteePolkadot);
|
|
8397
|
+
return _createClass(IntegriteeKusama);
|
|
8398
|
+
}(IntegriteePolkadot);
|
|
8399
|
+
|
|
8373
8400
|
var IntegriteePaseo = /*#__PURE__*/function (_IntegriteeKusama) {
|
|
8374
8401
|
function IntegriteePaseo() {
|
|
8375
8402
|
_classCallCheck(this, IntegriteePaseo);
|
|
@@ -9487,6 +9514,7 @@ var chains = function chains() {
|
|
|
9487
9514
|
EnergyWebX: new EnergyWebX(),
|
|
9488
9515
|
Hydration: new Hydration(),
|
|
9489
9516
|
IntegriteeKusama: new IntegriteeKusama(),
|
|
9517
|
+
IntegriteePolkadot: new IntegriteePolkadot(),
|
|
9490
9518
|
Interlay: new Interlay(),
|
|
9491
9519
|
Heima: new Heima(),
|
|
9492
9520
|
Jamton: new Jamton(),
|
|
@@ -9573,7 +9601,7 @@ var RELAY_LOCATION = {
|
|
|
9573
9601
|
Here: null
|
|
9574
9602
|
}
|
|
9575
9603
|
};
|
|
9576
|
-
var CHAINS_DOT_RESERVE_AH = new Set(['Acala', 'Karura', 'Polimec', 'Moonbeam', 'Hydration', 'HydrationPaseo', 'AssetHubPolkadot', 'AssetHubKusama', 'AssetHubWestend', 'AssetHubPaseo', 'BifrostPolkadot', 'BifrostKusama', 'PeoplePolkadot', 'PeopleKusama', 'Ajuna']);
|
|
9604
|
+
var CHAINS_DOT_RESERVE_AH = new Set(['Acala', 'Karura', 'Polimec', 'Moonbeam', 'Hydration', 'HydrationPaseo', 'AssetHubPolkadot', 'AssetHubKusama', 'AssetHubWestend', 'AssetHubPaseo', 'BifrostPolkadot', 'BifrostKusama', 'PeoplePolkadot', 'PeopleKusama', 'Ajuna', 'IntegriteePolkadot', 'IntegriteeKusama', 'IntegriteePaseo']);
|
|
9577
9605
|
var ASSET_HUB_EXECUTION_FEE = 2200000000n; // 0.22 DOT
|
|
9578
9606
|
var TX_CLIENT_TIMEOUT_MS = 20 * 60 * 1000; // 20 minutes
|
|
9579
9607
|
var DRY_RUN_CLIENT_TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk-core",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.6.0",
|
|
4
4
|
"description": "SDK core for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"@noble/hashes": "^1.8.0",
|
|
27
27
|
"@scure/base": "^2.0.0",
|
|
28
28
|
"viem": "^2.36.0",
|
|
29
|
-
"@paraspell/assets": "11.
|
|
30
|
-
"@paraspell/
|
|
31
|
-
"@paraspell/
|
|
29
|
+
"@paraspell/assets": "11.6.0",
|
|
30
|
+
"@paraspell/sdk-common": "11.6.0",
|
|
31
|
+
"@paraspell/pallets": "11.6.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/plugin-syntax-import-attributes": "^7.27.1",
|