@paraspell/sdk-core 11.2.1 → 11.2.3
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 +88 -66
- package/dist/index.mjs +88 -66
- package/package.json +11 -11
package/dist/index.cjs
CHANGED
|
@@ -326,19 +326,17 @@ function _regeneratorDefine(e, r, n, t) {
|
|
|
326
326
|
i = 0;
|
|
327
327
|
}
|
|
328
328
|
_regeneratorDefine = function (e, r, n, t) {
|
|
329
|
-
|
|
329
|
+
function o(r, n) {
|
|
330
|
+
_regeneratorDefine(e, r, function (e) {
|
|
331
|
+
return this._invoke(r, n, e);
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
r ? i ? i(e, r, {
|
|
330
335
|
value: n,
|
|
331
336
|
enumerable: !t,
|
|
332
337
|
configurable: !t,
|
|
333
338
|
writable: !t
|
|
334
|
-
}) : e[r] = n;
|
|
335
|
-
function o(r, n) {
|
|
336
|
-
_regeneratorDefine(e, r, function (e) {
|
|
337
|
-
return this._invoke(r, n, e);
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
o("next", 0), o("throw", 1), o("return", 2);
|
|
341
|
-
}
|
|
339
|
+
}) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
|
|
342
340
|
}, _regeneratorDefine(e, r, n, t);
|
|
343
341
|
}
|
|
344
342
|
function _setPrototypeOf(t, e) {
|
|
@@ -5343,7 +5341,7 @@ var validateAssetSupport = function validateAssetSupport(_ref, assetCheckEnabled
|
|
|
5343
5341
|
destination = _ref.to,
|
|
5344
5342
|
currency = _ref.currency;
|
|
5345
5343
|
var isDestAssetHub = destination === 'AssetHubPolkadot' || destination === 'AssetHubKusama';
|
|
5346
|
-
var allowedChainsToAh = ['AssetHubPolkadot', 'BifrostPolkadot', 'BifrostKusama', 'Hydration', 'Moonbeam', 'Ajuna', 'Polimec', 'Jamton'];
|
|
5344
|
+
var allowedChainsToAh = ['AssetHubPolkadot', 'BridgeHubPolkadot', 'PeoplePolkadot', 'CoretimePolkadot', 'Collectives', 'BifrostPolkadot', 'BifrostKusama', 'Hydration', 'Moonbeam', 'Ajuna', 'Polimec', 'Jamton'];
|
|
5347
5345
|
if (!sdkCommon.isRelayChain(origin) && !isBridge && isDestAssetHub && !allowedChainsToAh.includes(origin) && (asset === null || asset === void 0 ? void 0 : asset.symbol) === 'DOT') {
|
|
5348
5346
|
throw new TransferToAhNotSupported("Chain ".concat(origin, " does not support DOT transfer to AssetHub"));
|
|
5349
5347
|
}
|
|
@@ -6221,7 +6219,7 @@ var FEE_PADDING_PERCENTAGE$2 = 20;
|
|
|
6221
6219
|
var FEE_PADDING_HYDRATION = 150;
|
|
6222
6220
|
var computeInstructionFee = /*#__PURE__*/function () {
|
|
6223
6221
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(_ref, version, xcm) {
|
|
6224
|
-
var chain, api, _t
|
|
6222
|
+
var chain, api, _t;
|
|
6225
6223
|
return _regenerator().w(function (_context) {
|
|
6226
6224
|
while (1) switch (_context.n) {
|
|
6227
6225
|
case 0:
|
|
@@ -6232,9 +6230,7 @@ var computeInstructionFee = /*#__PURE__*/function () {
|
|
|
6232
6230
|
location: DOT_LOCATION
|
|
6233
6231
|
}, true);
|
|
6234
6232
|
case 1:
|
|
6235
|
-
|
|
6236
|
-
_t3 = chain === 'Hydration' ? FEE_PADDING_HYDRATION : FEE_PADDING_PERCENTAGE$2;
|
|
6237
|
-
return _context.a(2, _t(_t2, _t3));
|
|
6233
|
+
return _context.a(2, _t(_context.v, chain === 'Hydration' ? FEE_PADDING_HYDRATION : FEE_PADDING_PERCENTAGE$2));
|
|
6238
6234
|
}
|
|
6239
6235
|
}, _callee);
|
|
6240
6236
|
}));
|
|
@@ -6244,7 +6240,7 @@ var computeInstructionFee = /*#__PURE__*/function () {
|
|
|
6244
6240
|
}();
|
|
6245
6241
|
var computeAllFees = /*#__PURE__*/function () {
|
|
6246
6242
|
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(_ref3, customXcm, isDotAsset, refundInstruction) {
|
|
6247
|
-
var reserve, dest, version, _t4, _t5, _t6, _t7, _t8, _t9, _t0
|
|
6243
|
+
var reserve, dest, version, _t2, _t3, _t4, _t5, _t6, _t7, _t8, _t9, _t0;
|
|
6248
6244
|
return _regenerator().w(function (_context2) {
|
|
6249
6245
|
while (1) switch (_context2.n) {
|
|
6250
6246
|
case 0:
|
|
@@ -6256,7 +6252,7 @@ var computeAllFees = /*#__PURE__*/function () {
|
|
|
6256
6252
|
_context2.n = 1;
|
|
6257
6253
|
return computeInstructionFee(reserve, version, [customXcm]);
|
|
6258
6254
|
case 1:
|
|
6259
|
-
|
|
6255
|
+
_t3 = _context2.v;
|
|
6260
6256
|
if (!refundInstruction) {
|
|
6261
6257
|
_context2.n = 3;
|
|
6262
6258
|
break;
|
|
@@ -6264,21 +6260,21 @@ var computeAllFees = /*#__PURE__*/function () {
|
|
|
6264
6260
|
_context2.n = 2;
|
|
6265
6261
|
return computeInstructionFee(reserve, version, [refundInstruction]);
|
|
6266
6262
|
case 2:
|
|
6267
|
-
|
|
6263
|
+
_t4 = _context2.v;
|
|
6268
6264
|
_context2.n = 4;
|
|
6269
6265
|
break;
|
|
6270
6266
|
case 3:
|
|
6271
|
-
|
|
6267
|
+
_t4 = 0n;
|
|
6272
6268
|
case 4:
|
|
6273
|
-
|
|
6269
|
+
_t5 = _t4;
|
|
6274
6270
|
_context2.n = 5;
|
|
6275
6271
|
return computeInstructionFee(assets.hasXcmPaymentApiSupport(dest.chain) ? dest : reserve, version, customXcm.DepositReserveAsset.xcm);
|
|
6276
6272
|
case 5:
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
reserveFee:
|
|
6280
|
-
refundFee:
|
|
6281
|
-
destFee:
|
|
6273
|
+
_t6 = _context2.v;
|
|
6274
|
+
_t2 = {
|
|
6275
|
+
reserveFee: _t3,
|
|
6276
|
+
refundFee: _t5,
|
|
6277
|
+
destFee: _t6
|
|
6282
6278
|
};
|
|
6283
6279
|
_context2.n = 13;
|
|
6284
6280
|
break;
|
|
@@ -6290,13 +6286,13 @@ var computeAllFees = /*#__PURE__*/function () {
|
|
|
6290
6286
|
_context2.n = 7;
|
|
6291
6287
|
return computeInstructionFee(assets.hasXcmPaymentApiSupport(dest.chain) ? dest : reserve, version, [customXcm]);
|
|
6292
6288
|
case 7:
|
|
6293
|
-
|
|
6289
|
+
_t7 = _context2.v;
|
|
6294
6290
|
_context2.n = 9;
|
|
6295
6291
|
break;
|
|
6296
6292
|
case 8:
|
|
6297
|
-
|
|
6293
|
+
_t7 = 0n;
|
|
6298
6294
|
case 9:
|
|
6299
|
-
|
|
6295
|
+
_t8 = _t7;
|
|
6300
6296
|
if (isDotAsset) {
|
|
6301
6297
|
_context2.n = 11;
|
|
6302
6298
|
break;
|
|
@@ -6304,20 +6300,20 @@ var computeAllFees = /*#__PURE__*/function () {
|
|
|
6304
6300
|
_context2.n = 10;
|
|
6305
6301
|
return computeInstructionFee(assets.hasXcmPaymentApiSupport(reserve.chain) ? reserve : dest, version, [refundInstruction]);
|
|
6306
6302
|
case 10:
|
|
6307
|
-
|
|
6303
|
+
_t9 = _context2.v;
|
|
6308
6304
|
_context2.n = 12;
|
|
6309
6305
|
break;
|
|
6310
6306
|
case 11:
|
|
6311
|
-
|
|
6307
|
+
_t9 = 0n;
|
|
6312
6308
|
case 12:
|
|
6313
|
-
|
|
6314
|
-
|
|
6309
|
+
_t0 = _t9;
|
|
6310
|
+
_t2 = {
|
|
6315
6311
|
reserveFee: 0n,
|
|
6316
|
-
destFee:
|
|
6317
|
-
refundFee:
|
|
6312
|
+
destFee: _t8,
|
|
6313
|
+
refundFee: _t0
|
|
6318
6314
|
};
|
|
6319
6315
|
case 13:
|
|
6320
|
-
return _context2.a(2,
|
|
6316
|
+
return _context2.a(2, _t2);
|
|
6321
6317
|
}
|
|
6322
6318
|
}, _callee2);
|
|
6323
6319
|
}));
|
|
@@ -8413,7 +8409,7 @@ var Parachain = /*#__PURE__*/function () {
|
|
|
8413
8409
|
method: method
|
|
8414
8410
|
};
|
|
8415
8411
|
shouldUseTeleport = this.shouldUseNativeAssetTeleport(sendOptions);
|
|
8416
|
-
if (!(
|
|
8412
|
+
if (!((this.chain.includes('AssetHub') && destination !== 'Mythos' && typeof destination === 'string' && !sdkCommon.isSystemChain(destination) || !sdkCommon.isSystemChain(this.chain) && this.chain !== 'Mythos' && typeof destination === 'string' && destination.includes('AssetHub')) && shouldUseTeleport)) {
|
|
8417
8413
|
_context.n = 6;
|
|
8418
8414
|
break;
|
|
8419
8415
|
}
|
|
@@ -8770,7 +8766,7 @@ var Ajuna = /*#__PURE__*/function (_Parachain) {
|
|
|
8770
8766
|
key: "transferPolkadotXCM",
|
|
8771
8767
|
value: function () {
|
|
8772
8768
|
var _transferPolkadotXCM = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(input) {
|
|
8773
|
-
var api, _t
|
|
8769
|
+
var api, _t;
|
|
8774
8770
|
return _regenerator().w(function (_context) {
|
|
8775
8771
|
while (1) switch (_context.n) {
|
|
8776
8772
|
case 0:
|
|
@@ -8779,8 +8775,7 @@ var Ajuna = /*#__PURE__*/function (_Parachain) {
|
|
|
8779
8775
|
_context.n = 1;
|
|
8780
8776
|
return createTypeAndThenCall(this.chain, input);
|
|
8781
8777
|
case 1:
|
|
8782
|
-
|
|
8783
|
-
return _context.a(2, _t.callTxMethod.call(_t, _t2));
|
|
8778
|
+
return _context.a(2, _t.callTxMethod.call(_t, _context.v));
|
|
8784
8779
|
}
|
|
8785
8780
|
}, _callee, this);
|
|
8786
8781
|
}));
|
|
@@ -9186,7 +9181,7 @@ var AssetHubPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
9186
9181
|
key: "transferPolkadotXCM",
|
|
9187
9182
|
value: function () {
|
|
9188
9183
|
var _transferPolkadotXCM = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(options) {
|
|
9189
|
-
var api, scenario, assetInfo, destination, feeAssetInfo, overriddenAsset, call, isNativeAsset, isNativeFeeAsset, isEthereumAsset, _call, CHAINS_SUPPORT_DOT_TRANSFER, isTrusted, isDotReserveAh, method, modifiedInput, _t, _t2
|
|
9184
|
+
var api, scenario, assetInfo, destination, feeAssetInfo, overriddenAsset, call, isNativeAsset, isNativeFeeAsset, isEthereumAsset, _call, CHAINS_SUPPORT_DOT_TRANSFER, isTrusted, isDotReserveAh, method, modifiedInput, _t, _t2;
|
|
9190
9185
|
return _regenerator().w(function (_context3) {
|
|
9191
9186
|
while (1) switch (_context3.n) {
|
|
9192
9187
|
case 0:
|
|
@@ -9221,8 +9216,7 @@ var AssetHubPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
9221
9216
|
_context3.n = 4;
|
|
9222
9217
|
return handleExecuteTransfer(this.chain, options);
|
|
9223
9218
|
case 4:
|
|
9224
|
-
|
|
9225
|
-
return _context3.a(2, _t.callTxMethod.call(_t, _t2));
|
|
9219
|
+
return _context3.a(2, _t.callTxMethod.call(_t, _context3.v));
|
|
9226
9220
|
case 5:
|
|
9227
9221
|
if (!(destination === 'AssetHubKusama')) {
|
|
9228
9222
|
_context3.n = 6;
|
|
@@ -9273,12 +9267,11 @@ var AssetHubPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
9273
9267
|
_context3.n = 14;
|
|
9274
9268
|
break;
|
|
9275
9269
|
}
|
|
9276
|
-
|
|
9270
|
+
_t2 = api;
|
|
9277
9271
|
_context3.n = 13;
|
|
9278
9272
|
return createTypeAndThenCall(this.chain, options);
|
|
9279
9273
|
case 13:
|
|
9280
|
-
|
|
9281
|
-
return _context3.a(2, _t3.callTxMethod.call(_t3, _t4));
|
|
9274
|
+
return _context3.a(2, _t2.callTxMethod.call(_t2, _context3.v));
|
|
9282
9275
|
case 14:
|
|
9283
9276
|
modifiedInput = this.patchInput(options);
|
|
9284
9277
|
return _context3.a(2, transferPolkadotXcm(modifiedInput, method, 'Unlimited'));
|
|
@@ -9515,7 +9508,7 @@ var BifrostPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
9515
9508
|
key: "transferToAssetHub",
|
|
9516
9509
|
value: function () {
|
|
9517
9510
|
var _transferToAssetHub = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(input) {
|
|
9518
|
-
var api, assetInfo, _t
|
|
9511
|
+
var api, assetInfo, _t;
|
|
9519
9512
|
return _regenerator().w(function (_context) {
|
|
9520
9513
|
while (1) switch (_context.n) {
|
|
9521
9514
|
case 0:
|
|
@@ -9528,8 +9521,7 @@ var BifrostPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
9528
9521
|
_context.n = 1;
|
|
9529
9522
|
return createTypeAndThenCall(this.chain, input);
|
|
9530
9523
|
case 1:
|
|
9531
|
-
|
|
9532
|
-
return _context.a(2, _t.callTxMethod.call(_t, _t2));
|
|
9524
|
+
return _context.a(2, _t.callTxMethod.call(_t, _context.v));
|
|
9533
9525
|
case 2:
|
|
9534
9526
|
assertHasLocation(assetInfo);
|
|
9535
9527
|
return _context.a(2, transferPolkadotXcm(_objectSpread2(_objectSpread2({}, input), {}, {
|
|
@@ -9632,9 +9624,17 @@ var BridgeHubPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
9632
9624
|
return _createClass(BridgeHubPolkadot, [{
|
|
9633
9625
|
key: "transferPolkadotXCM",
|
|
9634
9626
|
value: function transferPolkadotXCM(input) {
|
|
9635
|
-
var scenario = input.scenario
|
|
9636
|
-
|
|
9637
|
-
|
|
9627
|
+
var scenario = input.scenario,
|
|
9628
|
+
destination = input.destination;
|
|
9629
|
+
var newOverridenAsset = {
|
|
9630
|
+
parents: 1,
|
|
9631
|
+
interior: {
|
|
9632
|
+
Here: null
|
|
9633
|
+
}
|
|
9634
|
+
};
|
|
9635
|
+
input.overriddenAsset = newOverridenAsset;
|
|
9636
|
+
if (scenario === 'ParaToPara' && destination !== 'AssetHubPolkadot' && destination !== 'AssetHubKusama' && destination !== 'AssetHubPaseo' && destination !== 'AssetHubWestend') {
|
|
9637
|
+
throw new ScenarioNotSupportedError(this.chain, scenario, 'Unable to use bridge hub for transfers to other Parachains.');
|
|
9638
9638
|
}
|
|
9639
9639
|
var method = 'limited_teleport_assets';
|
|
9640
9640
|
return transferPolkadotXcm(input, method, 'Unlimited');
|
|
@@ -9725,8 +9725,16 @@ var Collectives = /*#__PURE__*/function (_Parachain) {
|
|
|
9725
9725
|
return _createClass(Collectives, [{
|
|
9726
9726
|
key: "transferPolkadotXCM",
|
|
9727
9727
|
value: function transferPolkadotXCM(input) {
|
|
9728
|
-
var scenario = input.scenario
|
|
9729
|
-
|
|
9728
|
+
var scenario = input.scenario,
|
|
9729
|
+
destination = input.destination;
|
|
9730
|
+
var newOverridenAsset = {
|
|
9731
|
+
parents: 1,
|
|
9732
|
+
interior: {
|
|
9733
|
+
Here: null
|
|
9734
|
+
}
|
|
9735
|
+
};
|
|
9736
|
+
input.overriddenAsset = newOverridenAsset;
|
|
9737
|
+
if (scenario === 'ParaToPara' && destination !== 'AssetHubPolkadot' && destination !== 'AssetHubKusama' && destination !== 'AssetHubPaseo' && destination !== 'AssetHubWestend') {
|
|
9730
9738
|
throw new ScenarioNotSupportedError(this.chain, scenario);
|
|
9731
9739
|
}
|
|
9732
9740
|
return transferPolkadotXcm(input, 'limited_teleport_assets', 'Unlimited');
|
|
@@ -9806,8 +9814,17 @@ var CoretimePolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
9806
9814
|
key: "transferPolkadotXCM",
|
|
9807
9815
|
value: function transferPolkadotXCM(input) {
|
|
9808
9816
|
var scenario = input.scenario;
|
|
9809
|
-
var
|
|
9810
|
-
|
|
9817
|
+
var newOverridenAsset = {
|
|
9818
|
+
parents: 1,
|
|
9819
|
+
interior: {
|
|
9820
|
+
Here: null
|
|
9821
|
+
}
|
|
9822
|
+
};
|
|
9823
|
+
input.overriddenAsset = newOverridenAsset;
|
|
9824
|
+
if (scenario === 'ParaToPara') {
|
|
9825
|
+
throw new ScenarioNotSupportedError(this.chain, scenario);
|
|
9826
|
+
}
|
|
9827
|
+
return transferPolkadotXcm(input, 'limited_teleport_assets', 'Unlimited');
|
|
9811
9828
|
}
|
|
9812
9829
|
}, {
|
|
9813
9830
|
key: "getRelayToParaOverrides",
|
|
@@ -10375,7 +10392,7 @@ var Hydration = /*#__PURE__*/function (_Parachain) {
|
|
|
10375
10392
|
key: "transferPolkadotXCM",
|
|
10376
10393
|
value: function () {
|
|
10377
10394
|
var _transferPolkadotXCM = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(input) {
|
|
10378
|
-
var api, destination, feeAsset, asset, overriddenAsset, isNativeAsset, isNativeFeeAsset, _t
|
|
10395
|
+
var api, destination, feeAsset, asset, overriddenAsset, isNativeAsset, isNativeFeeAsset, _t;
|
|
10379
10396
|
return _regenerator().w(function (_context) {
|
|
10380
10397
|
while (1) switch (_context.n) {
|
|
10381
10398
|
case 0:
|
|
@@ -10406,8 +10423,7 @@ var Hydration = /*#__PURE__*/function (_Parachain) {
|
|
|
10406
10423
|
_context.n = 3;
|
|
10407
10424
|
return handleExecuteTransfer(this.chain, input);
|
|
10408
10425
|
case 3:
|
|
10409
|
-
|
|
10410
|
-
return _context.a(2, _t.callTxMethod.call(_t, _t2));
|
|
10426
|
+
return _context.a(2, _t.callTxMethod.call(_t, _context.v));
|
|
10411
10427
|
case 4:
|
|
10412
10428
|
if (!(destination === 'Polimec')) {
|
|
10413
10429
|
_context.n = 5;
|
|
@@ -10887,7 +10903,7 @@ var Moonbeam = /*#__PURE__*/function (_Parachain) {
|
|
|
10887
10903
|
key: "transferPolkadotXCM",
|
|
10888
10904
|
value: function () {
|
|
10889
10905
|
var _transferPolkadotXCM = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(input) {
|
|
10890
|
-
var api, destination, assetInfo, scenario, version, location, _t
|
|
10906
|
+
var api, destination, assetInfo, scenario, version, location, _t;
|
|
10891
10907
|
return _regenerator().w(function (_context) {
|
|
10892
10908
|
while (1) switch (_context.n) {
|
|
10893
10909
|
case 0:
|
|
@@ -10906,8 +10922,7 @@ var Moonbeam = /*#__PURE__*/function (_Parachain) {
|
|
|
10906
10922
|
_context.n = 2;
|
|
10907
10923
|
return createTypeAndThenCall(this.chain, input);
|
|
10908
10924
|
case 2:
|
|
10909
|
-
|
|
10910
|
-
return _context.a(2, _t.callTxMethod.call(_t, _t2));
|
|
10925
|
+
return _context.a(2, _t.callTxMethod.call(_t, _context.v));
|
|
10911
10926
|
case 3:
|
|
10912
10927
|
location = this.getLocation(assetInfo, scenario);
|
|
10913
10928
|
return _context.a(2, transferPolkadotXcm(_objectSpread2(_objectSpread2({}, input), {}, {
|
|
@@ -11095,7 +11110,7 @@ var Mythos = /*#__PURE__*/function (_Parachain) {
|
|
|
11095
11110
|
key: "transferPolkadotXCM",
|
|
11096
11111
|
value: function () {
|
|
11097
11112
|
var _transferPolkadotXCM = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(input) {
|
|
11098
|
-
var api, destination, defaultTx, _t
|
|
11113
|
+
var api, destination, defaultTx, _t;
|
|
11099
11114
|
return _regenerator().w(function (_context2) {
|
|
11100
11115
|
while (1) switch (_context2.n) {
|
|
11101
11116
|
case 0:
|
|
@@ -11118,8 +11133,7 @@ var Mythos = /*#__PURE__*/function (_Parachain) {
|
|
|
11118
11133
|
_context2.n = 3;
|
|
11119
11134
|
return createTypeAndThenTransfer(input, this.chain, this.version);
|
|
11120
11135
|
case 3:
|
|
11121
|
-
|
|
11122
|
-
return _context2.a(2, _t.callTxMethod.call(_t, _t2));
|
|
11136
|
+
return _context2.a(2, _t.callTxMethod.call(_t, _context2.v));
|
|
11123
11137
|
case 4:
|
|
11124
11138
|
return _context2.a(2, defaultTx);
|
|
11125
11139
|
}
|
|
@@ -11218,10 +11232,18 @@ var PeoplePolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
11218
11232
|
return _createClass(PeoplePolkadot, [{
|
|
11219
11233
|
key: "transferPolkadotXCM",
|
|
11220
11234
|
value: function transferPolkadotXCM(input) {
|
|
11221
|
-
var scenario = input.scenario
|
|
11222
|
-
|
|
11235
|
+
var scenario = input.scenario,
|
|
11236
|
+
destination = input.destination;
|
|
11237
|
+
if (scenario === 'ParaToPara' && destination !== 'AssetHubPolkadot' && destination !== 'AssetHubKusama' && destination !== 'AssetHubPaseo' && destination !== 'AssetHubWestend') {
|
|
11223
11238
|
throw new ScenarioNotSupportedError(this.chain, scenario);
|
|
11224
11239
|
}
|
|
11240
|
+
var newOverridenAsset = {
|
|
11241
|
+
parents: 1,
|
|
11242
|
+
interior: {
|
|
11243
|
+
Here: null
|
|
11244
|
+
}
|
|
11245
|
+
};
|
|
11246
|
+
input.overriddenAsset = newOverridenAsset;
|
|
11225
11247
|
return transferPolkadotXcm(input, 'limited_teleport_assets', 'Unlimited');
|
|
11226
11248
|
}
|
|
11227
11249
|
}, {
|
|
@@ -11625,7 +11647,7 @@ var Zeitgeist = /*#__PURE__*/function (_Parachain) {
|
|
|
11625
11647
|
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Zeitgeist';
|
|
11626
11648
|
var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'zeitgeist';
|
|
11627
11649
|
var ecosystem = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Polkadot';
|
|
11628
|
-
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : sdkCommon.Version.
|
|
11650
|
+
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : sdkCommon.Version.V4;
|
|
11629
11651
|
_classCallCheck(this, Zeitgeist);
|
|
11630
11652
|
return _callSuper(this, Zeitgeist, [chain, info, ecosystem, version]);
|
|
11631
11653
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -327,19 +327,17 @@ function _regeneratorDefine(e, r, n, t) {
|
|
|
327
327
|
i = 0;
|
|
328
328
|
}
|
|
329
329
|
_regeneratorDefine = function (e, r, n, t) {
|
|
330
|
-
|
|
330
|
+
function o(r, n) {
|
|
331
|
+
_regeneratorDefine(e, r, function (e) {
|
|
332
|
+
return this._invoke(r, n, e);
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
r ? i ? i(e, r, {
|
|
331
336
|
value: n,
|
|
332
337
|
enumerable: !t,
|
|
333
338
|
configurable: !t,
|
|
334
339
|
writable: !t
|
|
335
|
-
}) : e[r] = n;
|
|
336
|
-
function o(r, n) {
|
|
337
|
-
_regeneratorDefine(e, r, function (e) {
|
|
338
|
-
return this._invoke(r, n, e);
|
|
339
|
-
});
|
|
340
|
-
}
|
|
341
|
-
o("next", 0), o("throw", 1), o("return", 2);
|
|
342
|
-
}
|
|
340
|
+
}) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
|
|
343
341
|
}, _regeneratorDefine(e, r, n, t);
|
|
344
342
|
}
|
|
345
343
|
function _setPrototypeOf(t, e) {
|
|
@@ -5344,7 +5342,7 @@ var validateAssetSupport = function validateAssetSupport(_ref, assetCheckEnabled
|
|
|
5344
5342
|
destination = _ref.to,
|
|
5345
5343
|
currency = _ref.currency;
|
|
5346
5344
|
var isDestAssetHub = destination === 'AssetHubPolkadot' || destination === 'AssetHubKusama';
|
|
5347
|
-
var allowedChainsToAh = ['AssetHubPolkadot', 'BifrostPolkadot', 'BifrostKusama', 'Hydration', 'Moonbeam', 'Ajuna', 'Polimec', 'Jamton'];
|
|
5345
|
+
var allowedChainsToAh = ['AssetHubPolkadot', 'BridgeHubPolkadot', 'PeoplePolkadot', 'CoretimePolkadot', 'Collectives', 'BifrostPolkadot', 'BifrostKusama', 'Hydration', 'Moonbeam', 'Ajuna', 'Polimec', 'Jamton'];
|
|
5348
5346
|
if (!isRelayChain(origin) && !isBridge && isDestAssetHub && !allowedChainsToAh.includes(origin) && (asset === null || asset === void 0 ? void 0 : asset.symbol) === 'DOT') {
|
|
5349
5347
|
throw new TransferToAhNotSupported("Chain ".concat(origin, " does not support DOT transfer to AssetHub"));
|
|
5350
5348
|
}
|
|
@@ -6222,7 +6220,7 @@ var FEE_PADDING_PERCENTAGE$2 = 20;
|
|
|
6222
6220
|
var FEE_PADDING_HYDRATION = 150;
|
|
6223
6221
|
var computeInstructionFee = /*#__PURE__*/function () {
|
|
6224
6222
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(_ref, version, xcm) {
|
|
6225
|
-
var chain, api, _t
|
|
6223
|
+
var chain, api, _t;
|
|
6226
6224
|
return _regenerator().w(function (_context) {
|
|
6227
6225
|
while (1) switch (_context.n) {
|
|
6228
6226
|
case 0:
|
|
@@ -6233,9 +6231,7 @@ var computeInstructionFee = /*#__PURE__*/function () {
|
|
|
6233
6231
|
location: DOT_LOCATION
|
|
6234
6232
|
}, true);
|
|
6235
6233
|
case 1:
|
|
6236
|
-
|
|
6237
|
-
_t3 = chain === 'Hydration' ? FEE_PADDING_HYDRATION : FEE_PADDING_PERCENTAGE$2;
|
|
6238
|
-
return _context.a(2, _t(_t2, _t3));
|
|
6234
|
+
return _context.a(2, _t(_context.v, chain === 'Hydration' ? FEE_PADDING_HYDRATION : FEE_PADDING_PERCENTAGE$2));
|
|
6239
6235
|
}
|
|
6240
6236
|
}, _callee);
|
|
6241
6237
|
}));
|
|
@@ -6245,7 +6241,7 @@ var computeInstructionFee = /*#__PURE__*/function () {
|
|
|
6245
6241
|
}();
|
|
6246
6242
|
var computeAllFees = /*#__PURE__*/function () {
|
|
6247
6243
|
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(_ref3, customXcm, isDotAsset, refundInstruction) {
|
|
6248
|
-
var reserve, dest, version, _t4, _t5, _t6, _t7, _t8, _t9, _t0
|
|
6244
|
+
var reserve, dest, version, _t2, _t3, _t4, _t5, _t6, _t7, _t8, _t9, _t0;
|
|
6249
6245
|
return _regenerator().w(function (_context2) {
|
|
6250
6246
|
while (1) switch (_context2.n) {
|
|
6251
6247
|
case 0:
|
|
@@ -6257,7 +6253,7 @@ var computeAllFees = /*#__PURE__*/function () {
|
|
|
6257
6253
|
_context2.n = 1;
|
|
6258
6254
|
return computeInstructionFee(reserve, version, [customXcm]);
|
|
6259
6255
|
case 1:
|
|
6260
|
-
|
|
6256
|
+
_t3 = _context2.v;
|
|
6261
6257
|
if (!refundInstruction) {
|
|
6262
6258
|
_context2.n = 3;
|
|
6263
6259
|
break;
|
|
@@ -6265,21 +6261,21 @@ var computeAllFees = /*#__PURE__*/function () {
|
|
|
6265
6261
|
_context2.n = 2;
|
|
6266
6262
|
return computeInstructionFee(reserve, version, [refundInstruction]);
|
|
6267
6263
|
case 2:
|
|
6268
|
-
|
|
6264
|
+
_t4 = _context2.v;
|
|
6269
6265
|
_context2.n = 4;
|
|
6270
6266
|
break;
|
|
6271
6267
|
case 3:
|
|
6272
|
-
|
|
6268
|
+
_t4 = 0n;
|
|
6273
6269
|
case 4:
|
|
6274
|
-
|
|
6270
|
+
_t5 = _t4;
|
|
6275
6271
|
_context2.n = 5;
|
|
6276
6272
|
return computeInstructionFee(hasXcmPaymentApiSupport(dest.chain) ? dest : reserve, version, customXcm.DepositReserveAsset.xcm);
|
|
6277
6273
|
case 5:
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
reserveFee:
|
|
6281
|
-
refundFee:
|
|
6282
|
-
destFee:
|
|
6274
|
+
_t6 = _context2.v;
|
|
6275
|
+
_t2 = {
|
|
6276
|
+
reserveFee: _t3,
|
|
6277
|
+
refundFee: _t5,
|
|
6278
|
+
destFee: _t6
|
|
6283
6279
|
};
|
|
6284
6280
|
_context2.n = 13;
|
|
6285
6281
|
break;
|
|
@@ -6291,13 +6287,13 @@ var computeAllFees = /*#__PURE__*/function () {
|
|
|
6291
6287
|
_context2.n = 7;
|
|
6292
6288
|
return computeInstructionFee(hasXcmPaymentApiSupport(dest.chain) ? dest : reserve, version, [customXcm]);
|
|
6293
6289
|
case 7:
|
|
6294
|
-
|
|
6290
|
+
_t7 = _context2.v;
|
|
6295
6291
|
_context2.n = 9;
|
|
6296
6292
|
break;
|
|
6297
6293
|
case 8:
|
|
6298
|
-
|
|
6294
|
+
_t7 = 0n;
|
|
6299
6295
|
case 9:
|
|
6300
|
-
|
|
6296
|
+
_t8 = _t7;
|
|
6301
6297
|
if (isDotAsset) {
|
|
6302
6298
|
_context2.n = 11;
|
|
6303
6299
|
break;
|
|
@@ -6305,20 +6301,20 @@ var computeAllFees = /*#__PURE__*/function () {
|
|
|
6305
6301
|
_context2.n = 10;
|
|
6306
6302
|
return computeInstructionFee(hasXcmPaymentApiSupport(reserve.chain) ? reserve : dest, version, [refundInstruction]);
|
|
6307
6303
|
case 10:
|
|
6308
|
-
|
|
6304
|
+
_t9 = _context2.v;
|
|
6309
6305
|
_context2.n = 12;
|
|
6310
6306
|
break;
|
|
6311
6307
|
case 11:
|
|
6312
|
-
|
|
6308
|
+
_t9 = 0n;
|
|
6313
6309
|
case 12:
|
|
6314
|
-
|
|
6315
|
-
|
|
6310
|
+
_t0 = _t9;
|
|
6311
|
+
_t2 = {
|
|
6316
6312
|
reserveFee: 0n,
|
|
6317
|
-
destFee:
|
|
6318
|
-
refundFee:
|
|
6313
|
+
destFee: _t8,
|
|
6314
|
+
refundFee: _t0
|
|
6319
6315
|
};
|
|
6320
6316
|
case 13:
|
|
6321
|
-
return _context2.a(2,
|
|
6317
|
+
return _context2.a(2, _t2);
|
|
6322
6318
|
}
|
|
6323
6319
|
}, _callee2);
|
|
6324
6320
|
}));
|
|
@@ -8414,7 +8410,7 @@ var Parachain = /*#__PURE__*/function () {
|
|
|
8414
8410
|
method: method
|
|
8415
8411
|
};
|
|
8416
8412
|
shouldUseTeleport = this.shouldUseNativeAssetTeleport(sendOptions);
|
|
8417
|
-
if (!(
|
|
8413
|
+
if (!((this.chain.includes('AssetHub') && destination !== 'Mythos' && typeof destination === 'string' && !isSystemChain(destination) || !isSystemChain(this.chain) && this.chain !== 'Mythos' && typeof destination === 'string' && destination.includes('AssetHub')) && shouldUseTeleport)) {
|
|
8418
8414
|
_context.n = 6;
|
|
8419
8415
|
break;
|
|
8420
8416
|
}
|
|
@@ -8771,7 +8767,7 @@ var Ajuna = /*#__PURE__*/function (_Parachain) {
|
|
|
8771
8767
|
key: "transferPolkadotXCM",
|
|
8772
8768
|
value: function () {
|
|
8773
8769
|
var _transferPolkadotXCM = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(input) {
|
|
8774
|
-
var api, _t
|
|
8770
|
+
var api, _t;
|
|
8775
8771
|
return _regenerator().w(function (_context) {
|
|
8776
8772
|
while (1) switch (_context.n) {
|
|
8777
8773
|
case 0:
|
|
@@ -8780,8 +8776,7 @@ var Ajuna = /*#__PURE__*/function (_Parachain) {
|
|
|
8780
8776
|
_context.n = 1;
|
|
8781
8777
|
return createTypeAndThenCall(this.chain, input);
|
|
8782
8778
|
case 1:
|
|
8783
|
-
|
|
8784
|
-
return _context.a(2, _t.callTxMethod.call(_t, _t2));
|
|
8779
|
+
return _context.a(2, _t.callTxMethod.call(_t, _context.v));
|
|
8785
8780
|
}
|
|
8786
8781
|
}, _callee, this);
|
|
8787
8782
|
}));
|
|
@@ -9187,7 +9182,7 @@ var AssetHubPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
9187
9182
|
key: "transferPolkadotXCM",
|
|
9188
9183
|
value: function () {
|
|
9189
9184
|
var _transferPolkadotXCM = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(options) {
|
|
9190
|
-
var api, scenario, assetInfo, destination, feeAssetInfo, overriddenAsset, call, isNativeAsset, isNativeFeeAsset, isEthereumAsset, _call, CHAINS_SUPPORT_DOT_TRANSFER, isTrusted, isDotReserveAh, method, modifiedInput, _t, _t2
|
|
9185
|
+
var api, scenario, assetInfo, destination, feeAssetInfo, overriddenAsset, call, isNativeAsset, isNativeFeeAsset, isEthereumAsset, _call, CHAINS_SUPPORT_DOT_TRANSFER, isTrusted, isDotReserveAh, method, modifiedInput, _t, _t2;
|
|
9191
9186
|
return _regenerator().w(function (_context3) {
|
|
9192
9187
|
while (1) switch (_context3.n) {
|
|
9193
9188
|
case 0:
|
|
@@ -9222,8 +9217,7 @@ var AssetHubPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
9222
9217
|
_context3.n = 4;
|
|
9223
9218
|
return handleExecuteTransfer(this.chain, options);
|
|
9224
9219
|
case 4:
|
|
9225
|
-
|
|
9226
|
-
return _context3.a(2, _t.callTxMethod.call(_t, _t2));
|
|
9220
|
+
return _context3.a(2, _t.callTxMethod.call(_t, _context3.v));
|
|
9227
9221
|
case 5:
|
|
9228
9222
|
if (!(destination === 'AssetHubKusama')) {
|
|
9229
9223
|
_context3.n = 6;
|
|
@@ -9274,12 +9268,11 @@ var AssetHubPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
9274
9268
|
_context3.n = 14;
|
|
9275
9269
|
break;
|
|
9276
9270
|
}
|
|
9277
|
-
|
|
9271
|
+
_t2 = api;
|
|
9278
9272
|
_context3.n = 13;
|
|
9279
9273
|
return createTypeAndThenCall(this.chain, options);
|
|
9280
9274
|
case 13:
|
|
9281
|
-
|
|
9282
|
-
return _context3.a(2, _t3.callTxMethod.call(_t3, _t4));
|
|
9275
|
+
return _context3.a(2, _t2.callTxMethod.call(_t2, _context3.v));
|
|
9283
9276
|
case 14:
|
|
9284
9277
|
modifiedInput = this.patchInput(options);
|
|
9285
9278
|
return _context3.a(2, transferPolkadotXcm(modifiedInput, method, 'Unlimited'));
|
|
@@ -9516,7 +9509,7 @@ var BifrostPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
9516
9509
|
key: "transferToAssetHub",
|
|
9517
9510
|
value: function () {
|
|
9518
9511
|
var _transferToAssetHub = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(input) {
|
|
9519
|
-
var api, assetInfo, _t
|
|
9512
|
+
var api, assetInfo, _t;
|
|
9520
9513
|
return _regenerator().w(function (_context) {
|
|
9521
9514
|
while (1) switch (_context.n) {
|
|
9522
9515
|
case 0:
|
|
@@ -9529,8 +9522,7 @@ var BifrostPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
9529
9522
|
_context.n = 1;
|
|
9530
9523
|
return createTypeAndThenCall(this.chain, input);
|
|
9531
9524
|
case 1:
|
|
9532
|
-
|
|
9533
|
-
return _context.a(2, _t.callTxMethod.call(_t, _t2));
|
|
9525
|
+
return _context.a(2, _t.callTxMethod.call(_t, _context.v));
|
|
9534
9526
|
case 2:
|
|
9535
9527
|
assertHasLocation(assetInfo);
|
|
9536
9528
|
return _context.a(2, transferPolkadotXcm(_objectSpread2(_objectSpread2({}, input), {}, {
|
|
@@ -9633,9 +9625,17 @@ var BridgeHubPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
9633
9625
|
return _createClass(BridgeHubPolkadot, [{
|
|
9634
9626
|
key: "transferPolkadotXCM",
|
|
9635
9627
|
value: function transferPolkadotXCM(input) {
|
|
9636
|
-
var scenario = input.scenario
|
|
9637
|
-
|
|
9638
|
-
|
|
9628
|
+
var scenario = input.scenario,
|
|
9629
|
+
destination = input.destination;
|
|
9630
|
+
var newOverridenAsset = {
|
|
9631
|
+
parents: 1,
|
|
9632
|
+
interior: {
|
|
9633
|
+
Here: null
|
|
9634
|
+
}
|
|
9635
|
+
};
|
|
9636
|
+
input.overriddenAsset = newOverridenAsset;
|
|
9637
|
+
if (scenario === 'ParaToPara' && destination !== 'AssetHubPolkadot' && destination !== 'AssetHubKusama' && destination !== 'AssetHubPaseo' && destination !== 'AssetHubWestend') {
|
|
9638
|
+
throw new ScenarioNotSupportedError(this.chain, scenario, 'Unable to use bridge hub for transfers to other Parachains.');
|
|
9639
9639
|
}
|
|
9640
9640
|
var method = 'limited_teleport_assets';
|
|
9641
9641
|
return transferPolkadotXcm(input, method, 'Unlimited');
|
|
@@ -9726,8 +9726,16 @@ var Collectives = /*#__PURE__*/function (_Parachain) {
|
|
|
9726
9726
|
return _createClass(Collectives, [{
|
|
9727
9727
|
key: "transferPolkadotXCM",
|
|
9728
9728
|
value: function transferPolkadotXCM(input) {
|
|
9729
|
-
var scenario = input.scenario
|
|
9730
|
-
|
|
9729
|
+
var scenario = input.scenario,
|
|
9730
|
+
destination = input.destination;
|
|
9731
|
+
var newOverridenAsset = {
|
|
9732
|
+
parents: 1,
|
|
9733
|
+
interior: {
|
|
9734
|
+
Here: null
|
|
9735
|
+
}
|
|
9736
|
+
};
|
|
9737
|
+
input.overriddenAsset = newOverridenAsset;
|
|
9738
|
+
if (scenario === 'ParaToPara' && destination !== 'AssetHubPolkadot' && destination !== 'AssetHubKusama' && destination !== 'AssetHubPaseo' && destination !== 'AssetHubWestend') {
|
|
9731
9739
|
throw new ScenarioNotSupportedError(this.chain, scenario);
|
|
9732
9740
|
}
|
|
9733
9741
|
return transferPolkadotXcm(input, 'limited_teleport_assets', 'Unlimited');
|
|
@@ -9807,8 +9815,17 @@ var CoretimePolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
9807
9815
|
key: "transferPolkadotXCM",
|
|
9808
9816
|
value: function transferPolkadotXCM(input) {
|
|
9809
9817
|
var scenario = input.scenario;
|
|
9810
|
-
var
|
|
9811
|
-
|
|
9818
|
+
var newOverridenAsset = {
|
|
9819
|
+
parents: 1,
|
|
9820
|
+
interior: {
|
|
9821
|
+
Here: null
|
|
9822
|
+
}
|
|
9823
|
+
};
|
|
9824
|
+
input.overriddenAsset = newOverridenAsset;
|
|
9825
|
+
if (scenario === 'ParaToPara') {
|
|
9826
|
+
throw new ScenarioNotSupportedError(this.chain, scenario);
|
|
9827
|
+
}
|
|
9828
|
+
return transferPolkadotXcm(input, 'limited_teleport_assets', 'Unlimited');
|
|
9812
9829
|
}
|
|
9813
9830
|
}, {
|
|
9814
9831
|
key: "getRelayToParaOverrides",
|
|
@@ -10376,7 +10393,7 @@ var Hydration = /*#__PURE__*/function (_Parachain) {
|
|
|
10376
10393
|
key: "transferPolkadotXCM",
|
|
10377
10394
|
value: function () {
|
|
10378
10395
|
var _transferPolkadotXCM = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(input) {
|
|
10379
|
-
var api, destination, feeAsset, asset, overriddenAsset, isNativeAsset, isNativeFeeAsset, _t
|
|
10396
|
+
var api, destination, feeAsset, asset, overriddenAsset, isNativeAsset, isNativeFeeAsset, _t;
|
|
10380
10397
|
return _regenerator().w(function (_context) {
|
|
10381
10398
|
while (1) switch (_context.n) {
|
|
10382
10399
|
case 0:
|
|
@@ -10407,8 +10424,7 @@ var Hydration = /*#__PURE__*/function (_Parachain) {
|
|
|
10407
10424
|
_context.n = 3;
|
|
10408
10425
|
return handleExecuteTransfer(this.chain, input);
|
|
10409
10426
|
case 3:
|
|
10410
|
-
|
|
10411
|
-
return _context.a(2, _t.callTxMethod.call(_t, _t2));
|
|
10427
|
+
return _context.a(2, _t.callTxMethod.call(_t, _context.v));
|
|
10412
10428
|
case 4:
|
|
10413
10429
|
if (!(destination === 'Polimec')) {
|
|
10414
10430
|
_context.n = 5;
|
|
@@ -10888,7 +10904,7 @@ var Moonbeam = /*#__PURE__*/function (_Parachain) {
|
|
|
10888
10904
|
key: "transferPolkadotXCM",
|
|
10889
10905
|
value: function () {
|
|
10890
10906
|
var _transferPolkadotXCM = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(input) {
|
|
10891
|
-
var api, destination, assetInfo, scenario, version, location, _t
|
|
10907
|
+
var api, destination, assetInfo, scenario, version, location, _t;
|
|
10892
10908
|
return _regenerator().w(function (_context) {
|
|
10893
10909
|
while (1) switch (_context.n) {
|
|
10894
10910
|
case 0:
|
|
@@ -10907,8 +10923,7 @@ var Moonbeam = /*#__PURE__*/function (_Parachain) {
|
|
|
10907
10923
|
_context.n = 2;
|
|
10908
10924
|
return createTypeAndThenCall(this.chain, input);
|
|
10909
10925
|
case 2:
|
|
10910
|
-
|
|
10911
|
-
return _context.a(2, _t.callTxMethod.call(_t, _t2));
|
|
10926
|
+
return _context.a(2, _t.callTxMethod.call(_t, _context.v));
|
|
10912
10927
|
case 3:
|
|
10913
10928
|
location = this.getLocation(assetInfo, scenario);
|
|
10914
10929
|
return _context.a(2, transferPolkadotXcm(_objectSpread2(_objectSpread2({}, input), {}, {
|
|
@@ -11096,7 +11111,7 @@ var Mythos = /*#__PURE__*/function (_Parachain) {
|
|
|
11096
11111
|
key: "transferPolkadotXCM",
|
|
11097
11112
|
value: function () {
|
|
11098
11113
|
var _transferPolkadotXCM = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(input) {
|
|
11099
|
-
var api, destination, defaultTx, _t
|
|
11114
|
+
var api, destination, defaultTx, _t;
|
|
11100
11115
|
return _regenerator().w(function (_context2) {
|
|
11101
11116
|
while (1) switch (_context2.n) {
|
|
11102
11117
|
case 0:
|
|
@@ -11119,8 +11134,7 @@ var Mythos = /*#__PURE__*/function (_Parachain) {
|
|
|
11119
11134
|
_context2.n = 3;
|
|
11120
11135
|
return createTypeAndThenTransfer(input, this.chain, this.version);
|
|
11121
11136
|
case 3:
|
|
11122
|
-
|
|
11123
|
-
return _context2.a(2, _t.callTxMethod.call(_t, _t2));
|
|
11137
|
+
return _context2.a(2, _t.callTxMethod.call(_t, _context2.v));
|
|
11124
11138
|
case 4:
|
|
11125
11139
|
return _context2.a(2, defaultTx);
|
|
11126
11140
|
}
|
|
@@ -11219,10 +11233,18 @@ var PeoplePolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
11219
11233
|
return _createClass(PeoplePolkadot, [{
|
|
11220
11234
|
key: "transferPolkadotXCM",
|
|
11221
11235
|
value: function transferPolkadotXCM(input) {
|
|
11222
|
-
var scenario = input.scenario
|
|
11223
|
-
|
|
11236
|
+
var scenario = input.scenario,
|
|
11237
|
+
destination = input.destination;
|
|
11238
|
+
if (scenario === 'ParaToPara' && destination !== 'AssetHubPolkadot' && destination !== 'AssetHubKusama' && destination !== 'AssetHubPaseo' && destination !== 'AssetHubWestend') {
|
|
11224
11239
|
throw new ScenarioNotSupportedError(this.chain, scenario);
|
|
11225
11240
|
}
|
|
11241
|
+
var newOverridenAsset = {
|
|
11242
|
+
parents: 1,
|
|
11243
|
+
interior: {
|
|
11244
|
+
Here: null
|
|
11245
|
+
}
|
|
11246
|
+
};
|
|
11247
|
+
input.overriddenAsset = newOverridenAsset;
|
|
11226
11248
|
return transferPolkadotXcm(input, 'limited_teleport_assets', 'Unlimited');
|
|
11227
11249
|
}
|
|
11228
11250
|
}, {
|
|
@@ -11626,7 +11648,7 @@ var Zeitgeist = /*#__PURE__*/function (_Parachain) {
|
|
|
11626
11648
|
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Zeitgeist';
|
|
11627
11649
|
var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'zeitgeist';
|
|
11628
11650
|
var ecosystem = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Polkadot';
|
|
11629
|
-
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Version.
|
|
11651
|
+
var version = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Version.V4;
|
|
11630
11652
|
_classCallCheck(this, Zeitgeist);
|
|
11631
11653
|
return _callSuper(this, Zeitgeist, [chain, info, ecosystem, version]);
|
|
11632
11654
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk-core",
|
|
3
|
-
"version": "11.2.
|
|
3
|
+
"version": "11.2.3",
|
|
4
4
|
"description": "SDK core for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@noble/hashes": "^1.8.0",
|
|
27
|
-
"@scure/base": "^
|
|
28
|
-
"viem": "^2.
|
|
29
|
-
"@paraspell/
|
|
30
|
-
"@paraspell/sdk-common": "11.2.
|
|
31
|
-
"@paraspell/
|
|
27
|
+
"@scure/base": "^2.0.0",
|
|
28
|
+
"viem": "^2.36.0",
|
|
29
|
+
"@paraspell/assets": "11.2.3",
|
|
30
|
+
"@paraspell/sdk-common": "11.2.3",
|
|
31
|
+
"@paraspell/pallets": "11.2.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/plugin-syntax-import-attributes": "^7.27.1",
|
|
35
|
-
"@babel/preset-env": "^7.28.
|
|
35
|
+
"@babel/preset-env": "^7.28.3",
|
|
36
36
|
"@codecov/rollup-plugin": "^1.9.1",
|
|
37
|
-
"@polkadot/api": "^16.4.
|
|
38
|
-
"@polkadot/types": "^16.4.
|
|
37
|
+
"@polkadot/api": "^16.4.6",
|
|
38
|
+
"@polkadot/types": "^16.4.6",
|
|
39
39
|
"@rollup/plugin-babel": "^6.0.4",
|
|
40
40
|
"@rollup/plugin-json": "^6.1.0",
|
|
41
41
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"axios": "^1.11.0",
|
|
44
44
|
"dotenv": "^17.2.1",
|
|
45
45
|
"prettier": "^3.6.2",
|
|
46
|
-
"rollup": "^4.
|
|
47
|
-
"rollup-plugin-dts": "^6.2.
|
|
46
|
+
"rollup": "^4.50.0",
|
|
47
|
+
"rollup-plugin-dts": "^6.2.3",
|
|
48
48
|
"ts-morph": "^26.0.0",
|
|
49
49
|
"ts-node": "^10.9.2",
|
|
50
50
|
"tslib": "^2.8.1"
|