@paraspell/sdk 1.1.9 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +276 -325
- package/dist/index.d.ts +8 -2
- package/dist/index.mjs +277 -326
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -4,6 +4,13 @@ require('@polkadot/api');
|
|
|
4
4
|
var ethers = require('ethers');
|
|
5
5
|
require('@polkadot/apps-config/endpoints');
|
|
6
6
|
|
|
7
|
+
// derrived from https://github.com/kodadot/packages/blob/main/minimark/src/common/types.ts
|
|
8
|
+
exports.Version = void 0;
|
|
9
|
+
(function (Version) {
|
|
10
|
+
Version[Version["V1"] = 0] = "V1";
|
|
11
|
+
Version[Version["V3"] = 1] = "V3";
|
|
12
|
+
})(exports.Version || (exports.Version = {}));
|
|
13
|
+
|
|
7
14
|
function _classCallCheck(instance, Constructor) {
|
|
8
15
|
if (!(instance instanceof Constructor)) {
|
|
9
16
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -229,6 +236,42 @@ function _toPropertyKey(arg) {
|
|
|
229
236
|
return typeof key === "symbol" ? key : String(key);
|
|
230
237
|
}
|
|
231
238
|
|
|
239
|
+
/******************************************************************************
|
|
240
|
+
Copyright (c) Microsoft Corporation.
|
|
241
|
+
|
|
242
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
243
|
+
purpose with or without fee is hereby granted.
|
|
244
|
+
|
|
245
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
246
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
247
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
248
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
249
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
250
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
251
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
252
|
+
***************************************************************************** */
|
|
253
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
257
|
+
var e = new Error(message);
|
|
258
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
// Used to inform user, that Parachain they wish to use has not yet implemented full XCM Support
|
|
262
|
+
var NoXCMSupportImplementedError = /*#__PURE__*/function (_Error) {
|
|
263
|
+
_inherits(NoXCMSupportImplementedError, _Error);
|
|
264
|
+
var _super = _createSuper(NoXCMSupportImplementedError);
|
|
265
|
+
function NoXCMSupportImplementedError(node) {
|
|
266
|
+
var _this;
|
|
267
|
+
_classCallCheck(this, NoXCMSupportImplementedError);
|
|
268
|
+
_this = _super.call(this, "No XCM support implemented for ".concat(node, " node yet."));
|
|
269
|
+
_this.name = 'NoXCMSupportImplemented';
|
|
270
|
+
return _this;
|
|
271
|
+
}
|
|
272
|
+
return _createClass(NoXCMSupportImplementedError);
|
|
273
|
+
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
274
|
+
|
|
232
275
|
var Acala$2 = {
|
|
233
276
|
paraId: 2000,
|
|
234
277
|
relayChainAssetSymbol: "DOT",
|
|
@@ -3562,19 +3605,82 @@ var assetsMapJson = /*#__PURE__*/Object.freeze({
|
|
|
3562
3605
|
default: assets
|
|
3563
3606
|
});
|
|
3564
3607
|
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3608
|
+
var assetsMap = assetsMapJson;
|
|
3609
|
+
function getAssetsObject(node) {
|
|
3610
|
+
return assetsMap[node];
|
|
3611
|
+
}
|
|
3612
|
+
function getAssetId(node, symbol) {
|
|
3613
|
+
var info = getAssetsObject(node).otherAssets.find(function (o) {
|
|
3614
|
+
return o.symbol === symbol;
|
|
3615
|
+
});
|
|
3616
|
+
return info ? info.assetId : null;
|
|
3617
|
+
}
|
|
3618
|
+
function getRelayChainSymbol(node) {
|
|
3619
|
+
return getAssetsObject(node).relayChainAssetSymbol;
|
|
3620
|
+
}
|
|
3621
|
+
function getNativeAssets(node) {
|
|
3622
|
+
var info = getAssetsObject(node).nativeAssets;
|
|
3623
|
+
return info || [];
|
|
3624
|
+
}
|
|
3625
|
+
function getOtherAssets(node) {
|
|
3626
|
+
return getAssetsObject(node).otherAssets;
|
|
3627
|
+
}
|
|
3628
|
+
function getAllAssetsSymbols(node) {
|
|
3629
|
+
var _getAssetsObject = getAssetsObject(node),
|
|
3630
|
+
relayChainAssetSymbol = _getAssetsObject.relayChainAssetSymbol,
|
|
3631
|
+
nativeAssets = _getAssetsObject.nativeAssets,
|
|
3632
|
+
otherAssets = _getAssetsObject.otherAssets;
|
|
3633
|
+
return [relayChainAssetSymbol].concat(_toConsumableArray(nativeAssets.map(function (_ref) {
|
|
3634
|
+
var symbol = _ref.symbol;
|
|
3635
|
+
return symbol;
|
|
3636
|
+
})), _toConsumableArray(otherAssets.map(function (_ref2) {
|
|
3637
|
+
var symbol = _ref2.symbol;
|
|
3638
|
+
return symbol;
|
|
3639
|
+
})));
|
|
3640
|
+
}
|
|
3641
|
+
function hasSupportForAsset(node, symbol) {
|
|
3642
|
+
return getAllAssetsSymbols(node).includes(symbol);
|
|
3643
|
+
}
|
|
3644
|
+
function getAssetDecimals(node, symbol) {
|
|
3645
|
+
var _getAssetsObject2 = getAssetsObject(node),
|
|
3646
|
+
otherAssets = _getAssetsObject2.otherAssets,
|
|
3647
|
+
nativeAssets = _getAssetsObject2.nativeAssets;
|
|
3648
|
+
var asset = [].concat(_toConsumableArray(otherAssets), _toConsumableArray(nativeAssets)).find(function (o) {
|
|
3649
|
+
return o.symbol === symbol;
|
|
3650
|
+
});
|
|
3651
|
+
return asset ? asset.decimals : null;
|
|
3652
|
+
}
|
|
3653
|
+
function getParaId(node) {
|
|
3654
|
+
return getAssetsObject(node).paraId;
|
|
3655
|
+
}
|
|
3656
|
+
function getTNode(nodeID) {
|
|
3657
|
+
var _iterator = _createForOfIteratorHelper(NODE_NAMES),
|
|
3658
|
+
_step;
|
|
3659
|
+
try {
|
|
3660
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
3661
|
+
var node = _step.value;
|
|
3662
|
+
if (getParaId(node) === nodeID) return node;
|
|
3663
|
+
}
|
|
3664
|
+
} catch (err) {
|
|
3665
|
+
_iterator.e(err);
|
|
3666
|
+
} finally {
|
|
3667
|
+
_iterator.f();
|
|
3575
3668
|
}
|
|
3576
|
-
|
|
3577
|
-
|
|
3669
|
+
}
|
|
3670
|
+
|
|
3671
|
+
var index$4 = /*#__PURE__*/Object.freeze({
|
|
3672
|
+
__proto__: null,
|
|
3673
|
+
getAllAssetsSymbols: getAllAssetsSymbols,
|
|
3674
|
+
getAssetDecimals: getAssetDecimals,
|
|
3675
|
+
getAssetId: getAssetId,
|
|
3676
|
+
getAssetsObject: getAssetsObject,
|
|
3677
|
+
getNativeAssets: getNativeAssets,
|
|
3678
|
+
getOtherAssets: getOtherAssets,
|
|
3679
|
+
getParaId: getParaId,
|
|
3680
|
+
getRelayChainSymbol: getRelayChainSymbol,
|
|
3681
|
+
getTNode: getTNode,
|
|
3682
|
+
hasSupportForAsset: hasSupportForAsset
|
|
3683
|
+
});
|
|
3578
3684
|
|
|
3579
3685
|
var supportsXTokens = function supportsXTokens(obj) {
|
|
3580
3686
|
return 'transferXTokens' in obj;
|
|
@@ -3583,11 +3689,12 @@ var supportsPolkadotXCM = function supportsPolkadotXCM(obj) {
|
|
|
3583
3689
|
return 'transferPolkadotXCM' in obj;
|
|
3584
3690
|
};
|
|
3585
3691
|
var ParachainNode = /*#__PURE__*/function () {
|
|
3586
|
-
function ParachainNode(node, name, type) {
|
|
3692
|
+
function ParachainNode(node, name, type, version) {
|
|
3587
3693
|
_classCallCheck(this, ParachainNode);
|
|
3588
3694
|
this._name = name;
|
|
3589
3695
|
this._type = type;
|
|
3590
3696
|
this._node = node;
|
|
3697
|
+
this._version = version;
|
|
3591
3698
|
}
|
|
3592
3699
|
_createClass(ParachainNode, [{
|
|
3593
3700
|
key: "name",
|
|
@@ -3604,6 +3711,11 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
3604
3711
|
get: function get() {
|
|
3605
3712
|
return this._node;
|
|
3606
3713
|
}
|
|
3714
|
+
}, {
|
|
3715
|
+
key: "version",
|
|
3716
|
+
get: function get() {
|
|
3717
|
+
return this._version;
|
|
3718
|
+
}
|
|
3607
3719
|
}, {
|
|
3608
3720
|
key: "transfer",
|
|
3609
3721
|
value: function transfer(api, currencySymbol, currencyId, amount, to, destination) {
|
|
@@ -3615,15 +3727,15 @@ var ParachainNode = /*#__PURE__*/function () {
|
|
|
3615
3727
|
currency: currencySymbol,
|
|
3616
3728
|
currencyID: currencyId,
|
|
3617
3729
|
amount: amount,
|
|
3618
|
-
addressSelection: handleAddress(scenario, 'xTokens', api, to,
|
|
3730
|
+
addressSelection: handleAddress(scenario, 'xTokens', api, to, this.version, paraId),
|
|
3619
3731
|
fees: getFees(scenario)
|
|
3620
3732
|
});
|
|
3621
3733
|
} else if (supportsPolkadotXCM(this)) {
|
|
3622
3734
|
return this.transferPolkadotXCM({
|
|
3623
3735
|
api: api,
|
|
3624
|
-
header: createHeaderPolkadotXCM(scenario,
|
|
3625
|
-
addressSelection: handleAddress(scenario, 'polkadotXCM', api, to,
|
|
3626
|
-
currencySelection: createCurrencySpecification(amount, scenario, this._node, currencyId),
|
|
3736
|
+
header: createHeaderPolkadotXCM(scenario, this.version, paraId),
|
|
3737
|
+
addressSelection: handleAddress(scenario, 'polkadotXCM', api, to, this.version, paraId),
|
|
3738
|
+
currencySelection: createCurrencySpecification(amount, scenario, this.version, this._node, currencyId),
|
|
3627
3739
|
scenario: scenario
|
|
3628
3740
|
});
|
|
3629
3741
|
} else {
|
|
@@ -3657,7 +3769,7 @@ var Acala$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
3657
3769
|
var _super = _createSuper(Acala);
|
|
3658
3770
|
function Acala() {
|
|
3659
3771
|
_classCallCheck(this, Acala);
|
|
3660
|
-
return _super.call(this, 'Acala', 'acala', 'polkadot');
|
|
3772
|
+
return _super.call(this, 'Acala', 'acala', 'polkadot', exports.Version.V1);
|
|
3661
3773
|
}
|
|
3662
3774
|
_createClass(Acala, [{
|
|
3663
3775
|
key: "transferXTokens",
|
|
@@ -3680,7 +3792,7 @@ var Unique$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
3680
3792
|
var _super = _createSuper(Unique);
|
|
3681
3793
|
function Unique() {
|
|
3682
3794
|
_classCallCheck(this, Unique);
|
|
3683
|
-
return _super.call(this, 'Unique', 'unique', 'polkadot');
|
|
3795
|
+
return _super.call(this, 'Unique', 'unique', 'polkadot', exports.Version.V3);
|
|
3684
3796
|
}
|
|
3685
3797
|
_createClass(Unique, [{
|
|
3686
3798
|
key: "transferXTokens",
|
|
@@ -3712,7 +3824,7 @@ var Crust$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
3712
3824
|
var _super = _createSuper(Crust);
|
|
3713
3825
|
function Crust() {
|
|
3714
3826
|
_classCallCheck(this, Crust);
|
|
3715
|
-
return _super.call(this, 'Crust', 'crustParachain', 'polkadot');
|
|
3827
|
+
return _super.call(this, 'Crust', 'crustParachain', 'polkadot', exports.Version.V1);
|
|
3716
3828
|
}
|
|
3717
3829
|
_createClass(Crust, [{
|
|
3718
3830
|
key: "getCurrencySelection",
|
|
@@ -3743,7 +3855,7 @@ var Efinity$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
3743
3855
|
var _super = _createSuper(Efinity);
|
|
3744
3856
|
function Efinity() {
|
|
3745
3857
|
_classCallCheck(this, Efinity);
|
|
3746
|
-
return _super.call(this, 'Efinity', 'efinity', 'polkadot');
|
|
3858
|
+
return _super.call(this, 'Efinity', 'efinity', 'polkadot', exports.Version.V3);
|
|
3747
3859
|
}
|
|
3748
3860
|
_createClass(Efinity, [{
|
|
3749
3861
|
key: "transferXTokens",
|
|
@@ -3762,7 +3874,7 @@ var BifrostPolkadot$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
3762
3874
|
var _super = _createSuper(BifrostPolkadot);
|
|
3763
3875
|
function BifrostPolkadot() {
|
|
3764
3876
|
_classCallCheck(this, BifrostPolkadot);
|
|
3765
|
-
return _super.call(this, 'BifrostPolkadot', 'bifrost', 'polkadot');
|
|
3877
|
+
return _super.call(this, 'BifrostPolkadot', 'bifrost', 'polkadot', exports.Version.V3);
|
|
3766
3878
|
}
|
|
3767
3879
|
_createClass(BifrostPolkadot, [{
|
|
3768
3880
|
key: "transferXTokens",
|
|
@@ -3782,7 +3894,7 @@ var Bitgreen$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
3782
3894
|
var _super = _createSuper(Bitgreen);
|
|
3783
3895
|
function Bitgreen() {
|
|
3784
3896
|
_classCallCheck(this, Bitgreen);
|
|
3785
|
-
return _super.call(this, 'Bitgreen', 'bitgreen', 'polkadot');
|
|
3897
|
+
return _super.call(this, 'Bitgreen', 'bitgreen', 'polkadot', exports.Version.V1);
|
|
3786
3898
|
}
|
|
3787
3899
|
return _createClass(Bitgreen);
|
|
3788
3900
|
}(ParachainNode);
|
|
@@ -3792,7 +3904,7 @@ var Centrifuge$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
3792
3904
|
var _super = _createSuper(Centrifuge);
|
|
3793
3905
|
function Centrifuge() {
|
|
3794
3906
|
_classCallCheck(this, Centrifuge);
|
|
3795
|
-
return _super.call(this, 'Centrifuge', 'centrifuge', 'polkadot');
|
|
3907
|
+
return _super.call(this, 'Centrifuge', 'centrifuge', 'polkadot', exports.Version.V1);
|
|
3796
3908
|
}
|
|
3797
3909
|
_createClass(Centrifuge, [{
|
|
3798
3910
|
key: "transferXTokens",
|
|
@@ -3813,7 +3925,7 @@ var Clover$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
3813
3925
|
var _super = _createSuper(Clover);
|
|
3814
3926
|
function Clover() {
|
|
3815
3927
|
_classCallCheck(this, Clover);
|
|
3816
|
-
return _super.call(this, 'Clover', 'clover', 'polkadot');
|
|
3928
|
+
return _super.call(this, 'Clover', 'clover', 'polkadot', exports.Version.V1);
|
|
3817
3929
|
}
|
|
3818
3930
|
_createClass(Clover, [{
|
|
3819
3931
|
key: "getCurrencySelection",
|
|
@@ -3844,7 +3956,7 @@ var ComposableFinance$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
3844
3956
|
var _super = _createSuper(ComposableFinance);
|
|
3845
3957
|
function ComposableFinance() {
|
|
3846
3958
|
_classCallCheck(this, ComposableFinance);
|
|
3847
|
-
return _super.call(this, 'ComposableFinance', 'composableFinance', 'polkadot');
|
|
3959
|
+
return _super.call(this, 'ComposableFinance', 'composableFinance', 'polkadot', exports.Version.V3);
|
|
3848
3960
|
}
|
|
3849
3961
|
return _createClass(ComposableFinance);
|
|
3850
3962
|
}(ParachainNode);
|
|
@@ -3854,14 +3966,14 @@ var HydraDX$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
3854
3966
|
var _super = _createSuper(HydraDX);
|
|
3855
3967
|
function HydraDX() {
|
|
3856
3968
|
_classCallCheck(this, HydraDX);
|
|
3857
|
-
return _super.call(this, 'HydraDX', 'hydra', 'polkadot');
|
|
3969
|
+
return _super.call(this, 'HydraDX', 'hydra', 'polkadot', exports.Version.V3);
|
|
3858
3970
|
}
|
|
3859
3971
|
_createClass(HydraDX, [{
|
|
3860
3972
|
key: "transferXTokens",
|
|
3861
3973
|
value: function transferXTokens(input) {
|
|
3862
|
-
var currencyID = input.currencyID
|
|
3863
|
-
|
|
3864
|
-
return XTokensTransferImpl.transferXTokens(input, currencyID
|
|
3974
|
+
var currencyID = input.currencyID;
|
|
3975
|
+
input.fees;
|
|
3976
|
+
return XTokensTransferImpl.transferXTokens(input, currencyID);
|
|
3865
3977
|
}
|
|
3866
3978
|
}]);
|
|
3867
3979
|
return HydraDX;
|
|
@@ -3872,7 +3984,7 @@ var Interlay$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
3872
3984
|
var _super = _createSuper(Interlay);
|
|
3873
3985
|
function Interlay() {
|
|
3874
3986
|
_classCallCheck(this, Interlay);
|
|
3875
|
-
return _super.call(this, 'Interlay', 'interlay', 'polkadot');
|
|
3987
|
+
return _super.call(this, 'Interlay', 'interlay', 'polkadot', exports.Version.V3);
|
|
3876
3988
|
}
|
|
3877
3989
|
_createClass(Interlay, [{
|
|
3878
3990
|
key: "transferXTokens",
|
|
@@ -3895,7 +4007,7 @@ var Kylin$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
3895
4007
|
var _super = _createSuper(Kylin);
|
|
3896
4008
|
function Kylin() {
|
|
3897
4009
|
_classCallCheck(this, Kylin);
|
|
3898
|
-
return _super.call(this, 'Kylin', 'kylin', 'polkadot');
|
|
4010
|
+
return _super.call(this, 'Kylin', 'kylin', 'polkadot', exports.Version.V1);
|
|
3899
4011
|
}
|
|
3900
4012
|
_createClass(Kylin, [{
|
|
3901
4013
|
key: "transferXTokens",
|
|
@@ -3913,7 +4025,7 @@ var Litentry$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
3913
4025
|
var _super = _createSuper(Litentry);
|
|
3914
4026
|
function Litentry() {
|
|
3915
4027
|
_classCallCheck(this, Litentry);
|
|
3916
|
-
return _super.call(this, 'Litentry', 'litentry', 'polkadot');
|
|
4028
|
+
return _super.call(this, 'Litentry', 'litentry', 'polkadot', exports.Version.V1);
|
|
3917
4029
|
}
|
|
3918
4030
|
_createClass(Litentry, [{
|
|
3919
4031
|
key: "transferXTokens",
|
|
@@ -3929,7 +4041,7 @@ var Moonbeam$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
3929
4041
|
var _super = _createSuper(Moonbeam);
|
|
3930
4042
|
function Moonbeam() {
|
|
3931
4043
|
_classCallCheck(this, Moonbeam);
|
|
3932
|
-
return _super.call(this, 'Moonbeam', 'moonbeam', 'polkadot');
|
|
4044
|
+
return _super.call(this, 'Moonbeam', 'moonbeam', 'polkadot', exports.Version.V3);
|
|
3933
4045
|
}
|
|
3934
4046
|
_createClass(Moonbeam, [{
|
|
3935
4047
|
key: "transferXTokens",
|
|
@@ -3950,7 +4062,7 @@ var Parallel$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
3950
4062
|
var _super = _createSuper(Parallel);
|
|
3951
4063
|
function Parallel() {
|
|
3952
4064
|
_classCallCheck(this, Parallel);
|
|
3953
|
-
return _super.call(this, 'Parallel', 'parallel', 'polkadot');
|
|
4065
|
+
return _super.call(this, 'Parallel', 'parallel', 'polkadot', exports.Version.V1);
|
|
3954
4066
|
}
|
|
3955
4067
|
_createClass(Parallel, [{
|
|
3956
4068
|
key: "transferXTokens",
|
|
@@ -3966,7 +4078,7 @@ var Altair$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
3966
4078
|
var _super = _createSuper(Altair);
|
|
3967
4079
|
function Altair() {
|
|
3968
4080
|
_classCallCheck(this, Altair);
|
|
3969
|
-
return _super.call(this, 'Altair', 'altair', 'kusama');
|
|
4081
|
+
return _super.call(this, 'Altair', 'altair', 'kusama', exports.Version.V1);
|
|
3970
4082
|
}
|
|
3971
4083
|
_createClass(Altair, [{
|
|
3972
4084
|
key: "transferXTokens",
|
|
@@ -3994,7 +4106,7 @@ var Amplitude$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
3994
4106
|
var _super = _createSuper(Amplitude);
|
|
3995
4107
|
function Amplitude() {
|
|
3996
4108
|
_classCallCheck(this, Amplitude);
|
|
3997
|
-
return _super.call(this, 'Amplitude', 'amplitude', 'kusama');
|
|
4109
|
+
return _super.call(this, 'Amplitude', 'amplitude', 'kusama', exports.Version.V1);
|
|
3998
4110
|
}
|
|
3999
4111
|
_createClass(Amplitude, [{
|
|
4000
4112
|
key: "transferXTokens",
|
|
@@ -4012,7 +4124,7 @@ var Bajun$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4012
4124
|
var _super = _createSuper(Bajun);
|
|
4013
4125
|
function Bajun() {
|
|
4014
4126
|
_classCallCheck(this, Bajun);
|
|
4015
|
-
return _super.call(this, 'Bajun', 'bajun', 'kusama');
|
|
4127
|
+
return _super.call(this, 'Bajun', 'bajun', 'kusama', exports.Version.V1);
|
|
4016
4128
|
}
|
|
4017
4129
|
return _createClass(Bajun);
|
|
4018
4130
|
}(ParachainNode);
|
|
@@ -4022,14 +4134,14 @@ var Basilisk$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4022
4134
|
var _super = _createSuper(Basilisk);
|
|
4023
4135
|
function Basilisk() {
|
|
4024
4136
|
_classCallCheck(this, Basilisk);
|
|
4025
|
-
return _super.call(this, 'Basilisk', 'basilisk', 'kusama');
|
|
4137
|
+
return _super.call(this, 'Basilisk', 'basilisk', 'kusama', exports.Version.V3);
|
|
4026
4138
|
}
|
|
4027
4139
|
_createClass(Basilisk, [{
|
|
4028
4140
|
key: "transferXTokens",
|
|
4029
4141
|
value: function transferXTokens(input) {
|
|
4030
|
-
var currencyID = input.currencyID
|
|
4031
|
-
|
|
4032
|
-
return XTokensTransferImpl.transferXTokens(input, currencyID
|
|
4142
|
+
var currencyID = input.currencyID;
|
|
4143
|
+
input.fees;
|
|
4144
|
+
return XTokensTransferImpl.transferXTokens(input, currencyID);
|
|
4033
4145
|
}
|
|
4034
4146
|
}]);
|
|
4035
4147
|
return Basilisk;
|
|
@@ -4040,7 +4152,7 @@ var BifrostKusama$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4040
4152
|
var _super = _createSuper(BifrostKusama);
|
|
4041
4153
|
function BifrostKusama() {
|
|
4042
4154
|
_classCallCheck(this, BifrostKusama);
|
|
4043
|
-
return _super.call(this, 'BifrostKusama', 'bifrost', 'kusama');
|
|
4155
|
+
return _super.call(this, 'BifrostKusama', 'bifrost', 'kusama', exports.Version.V3);
|
|
4044
4156
|
}
|
|
4045
4157
|
_createClass(BifrostKusama, [{
|
|
4046
4158
|
key: "transferXTokens",
|
|
@@ -4059,7 +4171,7 @@ var Pioneer$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4059
4171
|
var _super = _createSuper(Pioneer);
|
|
4060
4172
|
function Pioneer() {
|
|
4061
4173
|
_classCallCheck(this, Pioneer);
|
|
4062
|
-
return _super.call(this, 'Pioneer', 'bitcountryPioneer', 'kusama');
|
|
4174
|
+
return _super.call(this, 'Pioneer', 'bitcountryPioneer', 'kusama', exports.Version.V1);
|
|
4063
4175
|
}
|
|
4064
4176
|
_createClass(Pioneer, [{
|
|
4065
4177
|
key: "transferXTokens",
|
|
@@ -4076,14 +4188,14 @@ var Turing$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4076
4188
|
var _super = _createSuper(Turing);
|
|
4077
4189
|
function Turing() {
|
|
4078
4190
|
_classCallCheck(this, Turing);
|
|
4079
|
-
return _super.call(this, 'Turing', 'turing', 'kusama');
|
|
4191
|
+
return _super.call(this, 'Turing', 'turing', 'kusama', exports.Version.V3);
|
|
4080
4192
|
}
|
|
4081
4193
|
_createClass(Turing, [{
|
|
4082
4194
|
key: "transferXTokens",
|
|
4083
4195
|
value: function transferXTokens(input) {
|
|
4084
|
-
var currencyID = input.currencyID
|
|
4085
|
-
|
|
4086
|
-
return XTokensTransferImpl.transferXTokens(input, currencyID
|
|
4196
|
+
var currencyID = input.currencyID;
|
|
4197
|
+
input.fees;
|
|
4198
|
+
return XTokensTransferImpl.transferXTokens(input, currencyID);
|
|
4087
4199
|
}
|
|
4088
4200
|
}]);
|
|
4089
4201
|
return Turing;
|
|
@@ -4094,7 +4206,7 @@ var Pichiu$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4094
4206
|
var _super = _createSuper(Pichiu);
|
|
4095
4207
|
function Pichiu() {
|
|
4096
4208
|
_classCallCheck(this, Pichiu);
|
|
4097
|
-
return _super.call(this, 'Pichiu', 'pichiu', 'kusama');
|
|
4209
|
+
return _super.call(this, 'Pichiu', 'pichiu', 'kusama', exports.Version.V1);
|
|
4098
4210
|
}
|
|
4099
4211
|
_createClass(Pichiu, [{
|
|
4100
4212
|
key: "transferXTokens",
|
|
@@ -4112,7 +4224,7 @@ var Picasso$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4112
4224
|
var _super = _createSuper(Picasso);
|
|
4113
4225
|
function Picasso() {
|
|
4114
4226
|
_classCallCheck(this, Picasso);
|
|
4115
|
-
return _super.call(this, 'Picasso', 'picasso', 'kusama');
|
|
4227
|
+
return _super.call(this, 'Picasso', 'picasso', 'kusama', exports.Version.V3);
|
|
4116
4228
|
}
|
|
4117
4229
|
_createClass(Picasso, [{
|
|
4118
4230
|
key: "transferXTokens",
|
|
@@ -4128,7 +4240,7 @@ var ParallelHeiko$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4128
4240
|
var _super = _createSuper(ParallelHeiko);
|
|
4129
4241
|
function ParallelHeiko() {
|
|
4130
4242
|
_classCallCheck(this, ParallelHeiko);
|
|
4131
|
-
return _super.call(this, 'ParallelHeiko', 'heiko', 'kusama');
|
|
4243
|
+
return _super.call(this, 'ParallelHeiko', 'heiko', 'kusama', exports.Version.V1);
|
|
4132
4244
|
}
|
|
4133
4245
|
_createClass(ParallelHeiko, [{
|
|
4134
4246
|
key: "transferXTokens",
|
|
@@ -4144,7 +4256,7 @@ var Moonriver$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4144
4256
|
var _super = _createSuper(Moonriver);
|
|
4145
4257
|
function Moonriver() {
|
|
4146
4258
|
_classCallCheck(this, Moonriver);
|
|
4147
|
-
return _super.call(this, 'Moonriver', 'moonriver', 'kusama');
|
|
4259
|
+
return _super.call(this, 'Moonriver', 'moonriver', 'kusama', exports.Version.V3);
|
|
4148
4260
|
}
|
|
4149
4261
|
_createClass(Moonriver, [{
|
|
4150
4262
|
key: "transferXTokens",
|
|
@@ -4165,7 +4277,7 @@ var Mangata$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4165
4277
|
var _super = _createSuper(Mangata);
|
|
4166
4278
|
function Mangata() {
|
|
4167
4279
|
_classCallCheck(this, Mangata);
|
|
4168
|
-
return _super.call(this, 'Mangata', 'mangata', 'kusama');
|
|
4280
|
+
return _super.call(this, 'Mangata', 'mangata', 'kusama', exports.Version.V3);
|
|
4169
4281
|
}
|
|
4170
4282
|
_createClass(Mangata, [{
|
|
4171
4283
|
key: "transferXTokens",
|
|
@@ -4181,7 +4293,7 @@ var Litmus$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4181
4293
|
var _super = _createSuper(Litmus);
|
|
4182
4294
|
function Litmus() {
|
|
4183
4295
|
_classCallCheck(this, Litmus);
|
|
4184
|
-
return _super.call(this, 'Litmus', 'litmus', 'kusama');
|
|
4296
|
+
return _super.call(this, 'Litmus', 'litmus', 'kusama', exports.Version.V1);
|
|
4185
4297
|
}
|
|
4186
4298
|
_createClass(Litmus, [{
|
|
4187
4299
|
key: "transferXTokens",
|
|
@@ -4198,7 +4310,7 @@ var Kintsugi$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4198
4310
|
var _super = _createSuper(Kintsugi);
|
|
4199
4311
|
function Kintsugi() {
|
|
4200
4312
|
_classCallCheck(this, Kintsugi);
|
|
4201
|
-
return _super.call(this, 'Kintsugi', 'kintsugi', 'kusama');
|
|
4313
|
+
return _super.call(this, 'Kintsugi', 'kintsugi', 'kusama', exports.Version.V3);
|
|
4202
4314
|
}
|
|
4203
4315
|
_createClass(Kintsugi, [{
|
|
4204
4316
|
key: "transferXTokens",
|
|
@@ -4221,7 +4333,7 @@ var Kico$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4221
4333
|
var _super = _createSuper(Kico);
|
|
4222
4334
|
function Kico() {
|
|
4223
4335
|
_classCallCheck(this, Kico);
|
|
4224
|
-
return _super.call(this, 'Kico', 'kico', 'kusama');
|
|
4336
|
+
return _super.call(this, 'Kico', 'kico', 'kusama', exports.Version.V1);
|
|
4225
4337
|
}
|
|
4226
4338
|
_createClass(Kico, [{
|
|
4227
4339
|
key: "transferXTokens",
|
|
@@ -4239,7 +4351,7 @@ var Calamari$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4239
4351
|
var _super = _createSuper(Calamari);
|
|
4240
4352
|
function Calamari() {
|
|
4241
4353
|
_classCallCheck(this, Calamari);
|
|
4242
|
-
return _super.call(this, 'Calamari', 'calamari', 'kusama');
|
|
4354
|
+
return _super.call(this, 'Calamari', 'calamari', 'kusama', exports.Version.V1);
|
|
4243
4355
|
}
|
|
4244
4356
|
_createClass(Calamari, [{
|
|
4245
4357
|
key: "transferXTokens",
|
|
@@ -4260,7 +4372,7 @@ var CrustShadow$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4260
4372
|
var _super = _createSuper(CrustShadow);
|
|
4261
4373
|
function CrustShadow() {
|
|
4262
4374
|
_classCallCheck(this, CrustShadow);
|
|
4263
|
-
return _super.call(this, 'CrustShadow', 'shadow', 'kusama');
|
|
4375
|
+
return _super.call(this, 'CrustShadow', 'shadow', 'kusama', exports.Version.V1);
|
|
4264
4376
|
}
|
|
4265
4377
|
_createClass(CrustShadow, [{
|
|
4266
4378
|
key: "getCurrencySelection",
|
|
@@ -4291,7 +4403,7 @@ var Dorafactory$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4291
4403
|
var _super = _createSuper(Dorafactory);
|
|
4292
4404
|
function Dorafactory() {
|
|
4293
4405
|
_classCallCheck(this, Dorafactory);
|
|
4294
|
-
return _super.call(this, 'Dorafactory', 'dorafactory', 'kusama');
|
|
4406
|
+
return _super.call(this, 'Dorafactory', 'dorafactory', 'kusama', exports.Version.V1);
|
|
4295
4407
|
}
|
|
4296
4408
|
_createClass(Dorafactory, [{
|
|
4297
4409
|
key: "transferXTokens",
|
|
@@ -4309,14 +4421,14 @@ var Imbue$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4309
4421
|
var _super = _createSuper(Imbue);
|
|
4310
4422
|
function Imbue() {
|
|
4311
4423
|
_classCallCheck(this, Imbue);
|
|
4312
|
-
return _super.call(this, 'Imbue', 'imbue', 'kusama');
|
|
4424
|
+
return _super.call(this, 'Imbue', 'imbue', 'kusama', exports.Version.V3);
|
|
4313
4425
|
}
|
|
4314
4426
|
_createClass(Imbue, [{
|
|
4315
4427
|
key: "transferXTokens",
|
|
4316
4428
|
value: function transferXTokens(input) {
|
|
4317
|
-
var currency = input.currency
|
|
4318
|
-
|
|
4319
|
-
return XTokensTransferImpl.transferXTokens(input, currency
|
|
4429
|
+
var currency = input.currency;
|
|
4430
|
+
input.fees;
|
|
4431
|
+
return XTokensTransferImpl.transferXTokens(input, currency);
|
|
4320
4432
|
}
|
|
4321
4433
|
}]);
|
|
4322
4434
|
return Imbue;
|
|
@@ -4327,7 +4439,7 @@ var Integritee$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4327
4439
|
var _super = _createSuper(Integritee);
|
|
4328
4440
|
function Integritee() {
|
|
4329
4441
|
_classCallCheck(this, Integritee);
|
|
4330
|
-
return _super.call(this, 'Integritee', 'integritee', 'kusama');
|
|
4442
|
+
return _super.call(this, 'Integritee', 'integritee', 'kusama', exports.Version.V1);
|
|
4331
4443
|
}
|
|
4332
4444
|
_createClass(Integritee, [{
|
|
4333
4445
|
key: "transferXTokens",
|
|
@@ -4343,7 +4455,7 @@ var InvArchTinker$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4343
4455
|
var _super = _createSuper(InvArchTinker);
|
|
4344
4456
|
function InvArchTinker() {
|
|
4345
4457
|
_classCallCheck(this, InvArchTinker);
|
|
4346
|
-
return _super.call(this, 'InvArchTinker', 'tinker', 'kusama');
|
|
4458
|
+
return _super.call(this, 'InvArchTinker', 'tinker', 'kusama', exports.Version.V1);
|
|
4347
4459
|
}
|
|
4348
4460
|
_createClass(InvArchTinker, [{
|
|
4349
4461
|
key: "transferXTokens",
|
|
@@ -4361,7 +4473,7 @@ var Karura$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4361
4473
|
var _super = _createSuper(Karura);
|
|
4362
4474
|
function Karura() {
|
|
4363
4475
|
_classCallCheck(this, Karura);
|
|
4364
|
-
return _super.call(this, 'Karura', 'karura', 'kusama');
|
|
4476
|
+
return _super.call(this, 'Karura', 'karura', 'kusama', exports.Version.V3);
|
|
4365
4477
|
}
|
|
4366
4478
|
_createClass(Karura, [{
|
|
4367
4479
|
key: "transferXTokens",
|
|
@@ -4403,7 +4515,7 @@ var Statemint$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4403
4515
|
var _super = _createSuper(Statemint);
|
|
4404
4516
|
function Statemint() {
|
|
4405
4517
|
_classCallCheck(this, Statemint);
|
|
4406
|
-
return _super.call(this, 'Statemint', 'statemint', 'polkadot');
|
|
4518
|
+
return _super.call(this, 'Statemint', 'statemint', 'polkadot', exports.Version.V3);
|
|
4407
4519
|
}
|
|
4408
4520
|
_createClass(Statemint, [{
|
|
4409
4521
|
key: "transferPolkadotXCM",
|
|
@@ -4422,7 +4534,7 @@ var Statemine$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4422
4534
|
var _super = _createSuper(Statemine);
|
|
4423
4535
|
function Statemine() {
|
|
4424
4536
|
_classCallCheck(this, Statemine);
|
|
4425
|
-
return _super.call(this, 'Statemine', 'statemine', 'kusama');
|
|
4537
|
+
return _super.call(this, 'Statemine', 'statemine', 'kusama', exports.Version.V3);
|
|
4426
4538
|
}
|
|
4427
4539
|
_createClass(Statemine, [{
|
|
4428
4540
|
key: "transferPolkadotXCM",
|
|
@@ -4455,7 +4567,7 @@ var Encointer$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4455
4567
|
var _super = _createSuper(Encointer);
|
|
4456
4568
|
function Encointer() {
|
|
4457
4569
|
_classCallCheck(this, Encointer);
|
|
4458
|
-
return _super.call(this, 'Encointer', 'encointer', 'kusama');
|
|
4570
|
+
return _super.call(this, 'Encointer', 'encointer', 'kusama', exports.Version.V1);
|
|
4459
4571
|
}
|
|
4460
4572
|
_createClass(Encointer, [{
|
|
4461
4573
|
key: "transferPolkadotXCM",
|
|
@@ -4476,7 +4588,7 @@ var Robonomics$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4476
4588
|
var _super = _createSuper(Robonomics);
|
|
4477
4589
|
function Robonomics() {
|
|
4478
4590
|
_classCallCheck(this, Robonomics);
|
|
4479
|
-
return _super.call(this, 'Robonomics', 'robonomics', 'kusama');
|
|
4591
|
+
return _super.call(this, 'Robonomics', 'robonomics', 'kusama', exports.Version.V1);
|
|
4480
4592
|
}
|
|
4481
4593
|
_createClass(Robonomics, [{
|
|
4482
4594
|
key: "transferPolkadotXCM",
|
|
@@ -4500,7 +4612,7 @@ var Astar$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4500
4612
|
var _super = _createSuper(Astar);
|
|
4501
4613
|
function Astar() {
|
|
4502
4614
|
_classCallCheck(this, Astar);
|
|
4503
|
-
return _super.call(this, 'Astar', 'astar', 'polkadot');
|
|
4615
|
+
return _super.call(this, 'Astar', 'astar', 'polkadot', exports.Version.V3);
|
|
4504
4616
|
}
|
|
4505
4617
|
_createClass(Astar, [{
|
|
4506
4618
|
key: "transferPolkadotXCM",
|
|
@@ -4518,7 +4630,7 @@ var Equilibrium$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4518
4630
|
var _super = _createSuper(Equilibrium);
|
|
4519
4631
|
function Equilibrium() {
|
|
4520
4632
|
_classCallCheck(this, Equilibrium);
|
|
4521
|
-
return _super.call(this, 'Equilibrium', 'equilibrium', 'polkadot');
|
|
4633
|
+
return _super.call(this, 'Equilibrium', 'equilibrium', 'polkadot', exports.Version.V1);
|
|
4522
4634
|
}
|
|
4523
4635
|
_createClass(Equilibrium, [{
|
|
4524
4636
|
key: "transferPolkadotXCM",
|
|
@@ -4535,7 +4647,7 @@ var Darwinia$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4535
4647
|
var _super = _createSuper(Darwinia);
|
|
4536
4648
|
function Darwinia() {
|
|
4537
4649
|
_classCallCheck(this, Darwinia);
|
|
4538
|
-
return _super.call(this, 'Darwinia', 'darwinia', 'polkadot');
|
|
4650
|
+
return _super.call(this, 'Darwinia', 'darwinia', 'polkadot', exports.Version.V3);
|
|
4539
4651
|
}
|
|
4540
4652
|
_createClass(Darwinia, [{
|
|
4541
4653
|
key: "transferPolkadotXCM",
|
|
@@ -4555,7 +4667,7 @@ var Crab$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4555
4667
|
var _super = _createSuper(Crab);
|
|
4556
4668
|
function Crab() {
|
|
4557
4669
|
_classCallCheck(this, Crab);
|
|
4558
|
-
return _super.call(this, 'Crab', 'crab', 'kusama');
|
|
4670
|
+
return _super.call(this, 'Crab', 'crab', 'kusama', exports.Version.V3);
|
|
4559
4671
|
}
|
|
4560
4672
|
_createClass(Crab, [{
|
|
4561
4673
|
key: "transferPolkadotXCM",
|
|
@@ -4575,13 +4687,13 @@ var Ipci$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4575
4687
|
var _super = _createSuper(Ipci);
|
|
4576
4688
|
function Ipci() {
|
|
4577
4689
|
_classCallCheck(this, Ipci);
|
|
4578
|
-
return _super.call(this, 'Ipci', 'ipci', 'kusama');
|
|
4690
|
+
return _super.call(this, 'Ipci', 'ipci', 'kusama', exports.Version.V1);
|
|
4579
4691
|
}
|
|
4580
4692
|
_createClass(Ipci, [{
|
|
4581
4693
|
key: "transferPolkadotXCM",
|
|
4582
4694
|
value: function transferPolkadotXCM(input) {
|
|
4583
4695
|
// UNTESTED, ONLY HAS CHANNELS W ROBONOMICS & 0 TRANSACTIONS
|
|
4584
|
-
if (input.scenario
|
|
4696
|
+
if (input.scenario === 'ParaToPara') {
|
|
4585
4697
|
return PolkadotXCMTransferImpl.transferPolkadotXCM(input, 'reserveTransferAssets');
|
|
4586
4698
|
}
|
|
4587
4699
|
throw new ScenarioNotSupportedError(this.node, input.scenario);
|
|
@@ -4595,7 +4707,7 @@ var Quartz$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4595
4707
|
var _super = _createSuper(Quartz);
|
|
4596
4708
|
function Quartz() {
|
|
4597
4709
|
_classCallCheck(this, Quartz);
|
|
4598
|
-
return _super.call(this, 'Quartz', 'quartz', 'kusama');
|
|
4710
|
+
return _super.call(this, 'Quartz', 'quartz', 'kusama', exports.Version.V3);
|
|
4599
4711
|
}
|
|
4600
4712
|
_createClass(Quartz, [{
|
|
4601
4713
|
key: "transferPolkadotXCM",
|
|
@@ -4615,7 +4727,7 @@ var Shiden$1 = /*#__PURE__*/function (_ParachainNode) {
|
|
|
4615
4727
|
var _super = _createSuper(Shiden);
|
|
4616
4728
|
function Shiden() {
|
|
4617
4729
|
_classCallCheck(this, Shiden);
|
|
4618
|
-
return _super.call(this, 'Shiden', 'shiden', 'kusama');
|
|
4730
|
+
return _super.call(this, 'Shiden', 'shiden', 'kusama', exports.Version.V3);
|
|
4619
4731
|
}
|
|
4620
4732
|
_createClass(Shiden, [{
|
|
4621
4733
|
key: "transferPolkadotXCM",
|
|
@@ -4683,83 +4795,6 @@ var nodes = {
|
|
|
4683
4795
|
};
|
|
4684
4796
|
var SUPPORTED_PALLETS = ['XTokens', 'OrmlXTokens', 'PolkadotXcm', 'RelayerXcm'];
|
|
4685
4797
|
|
|
4686
|
-
var assetsMap = assetsMapJson;
|
|
4687
|
-
function getAssetsObject(node) {
|
|
4688
|
-
return assetsMap[node];
|
|
4689
|
-
}
|
|
4690
|
-
function getAssetId(node, symbol) {
|
|
4691
|
-
var info = getAssetsObject(node).otherAssets.find(function (o) {
|
|
4692
|
-
return o.symbol === symbol;
|
|
4693
|
-
});
|
|
4694
|
-
return info ? info.assetId : null;
|
|
4695
|
-
}
|
|
4696
|
-
function getRelayChainSymbol(node) {
|
|
4697
|
-
return getAssetsObject(node).relayChainAssetSymbol;
|
|
4698
|
-
}
|
|
4699
|
-
function getNativeAssets(node) {
|
|
4700
|
-
var info = getAssetsObject(node).nativeAssets;
|
|
4701
|
-
return info || [];
|
|
4702
|
-
}
|
|
4703
|
-
function getOtherAssets(node) {
|
|
4704
|
-
return getAssetsObject(node).otherAssets;
|
|
4705
|
-
}
|
|
4706
|
-
function getAllAssetsSymbols(node) {
|
|
4707
|
-
var _getAssetsObject = getAssetsObject(node),
|
|
4708
|
-
relayChainAssetSymbol = _getAssetsObject.relayChainAssetSymbol,
|
|
4709
|
-
nativeAssets = _getAssetsObject.nativeAssets,
|
|
4710
|
-
otherAssets = _getAssetsObject.otherAssets;
|
|
4711
|
-
return [relayChainAssetSymbol].concat(_toConsumableArray(nativeAssets.map(function (_ref) {
|
|
4712
|
-
var symbol = _ref.symbol;
|
|
4713
|
-
return symbol;
|
|
4714
|
-
})), _toConsumableArray(otherAssets.map(function (_ref2) {
|
|
4715
|
-
var symbol = _ref2.symbol;
|
|
4716
|
-
return symbol;
|
|
4717
|
-
})));
|
|
4718
|
-
}
|
|
4719
|
-
function hasSupportForAsset(node, symbol) {
|
|
4720
|
-
return getAllAssetsSymbols(node).includes(symbol);
|
|
4721
|
-
}
|
|
4722
|
-
function getAssetDecimals(node, symbol) {
|
|
4723
|
-
var _getAssetsObject2 = getAssetsObject(node),
|
|
4724
|
-
otherAssets = _getAssetsObject2.otherAssets,
|
|
4725
|
-
nativeAssets = _getAssetsObject2.nativeAssets;
|
|
4726
|
-
var asset = [].concat(_toConsumableArray(otherAssets), _toConsumableArray(nativeAssets)).find(function (o) {
|
|
4727
|
-
return o.symbol === symbol;
|
|
4728
|
-
});
|
|
4729
|
-
return asset ? asset.decimals : null;
|
|
4730
|
-
}
|
|
4731
|
-
function getParaId(node) {
|
|
4732
|
-
return getAssetsObject(node).paraId;
|
|
4733
|
-
}
|
|
4734
|
-
function getTNode(nodeID) {
|
|
4735
|
-
var _iterator = _createForOfIteratorHelper(NODE_NAMES),
|
|
4736
|
-
_step;
|
|
4737
|
-
try {
|
|
4738
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
4739
|
-
var node = _step.value;
|
|
4740
|
-
if (getParaId(node) === nodeID) return node;
|
|
4741
|
-
}
|
|
4742
|
-
} catch (err) {
|
|
4743
|
-
_iterator.e(err);
|
|
4744
|
-
} finally {
|
|
4745
|
-
_iterator.f();
|
|
4746
|
-
}
|
|
4747
|
-
}
|
|
4748
|
-
|
|
4749
|
-
var index$4 = /*#__PURE__*/Object.freeze({
|
|
4750
|
-
__proto__: null,
|
|
4751
|
-
getAllAssetsSymbols: getAllAssetsSymbols,
|
|
4752
|
-
getAssetDecimals: getAssetDecimals,
|
|
4753
|
-
getAssetId: getAssetId,
|
|
4754
|
-
getAssetsObject: getAssetsObject,
|
|
4755
|
-
getNativeAssets: getNativeAssets,
|
|
4756
|
-
getOtherAssets: getOtherAssets,
|
|
4757
|
-
getParaId: getParaId,
|
|
4758
|
-
getRelayChainSymbol: getRelayChainSymbol,
|
|
4759
|
-
getTNode: getTNode,
|
|
4760
|
-
hasSupportForAsset: hasSupportForAsset
|
|
4761
|
-
});
|
|
4762
|
-
|
|
4763
4798
|
function createAccID(api, account) {
|
|
4764
4799
|
console.log('Generating AccountId32 address');
|
|
4765
4800
|
return api.createType('AccountId32', account).toHex();
|
|
@@ -4774,10 +4809,10 @@ function getFees(scenario) {
|
|
|
4774
4809
|
}
|
|
4775
4810
|
throw new Error("Fees for scenario ".concat(scenario, " are not defined."));
|
|
4776
4811
|
}
|
|
4777
|
-
function handleAddress(scenario, pallet, api, to,
|
|
4812
|
+
function handleAddress(scenario, pallet, api, to, version, nodeId) {
|
|
4778
4813
|
if (scenario === 'ParaToRelay' && pallet === 'xTokens') {
|
|
4779
4814
|
console.log('AccountId32 transfer');
|
|
4780
|
-
if (
|
|
4815
|
+
if (version === exports.Version.V3) {
|
|
4781
4816
|
return {
|
|
4782
4817
|
V3: {
|
|
4783
4818
|
parents: 1,
|
|
@@ -4808,10 +4843,10 @@ function handleAddress(scenario, pallet, api, to, nodeId, node) {
|
|
|
4808
4843
|
if (scenario === 'ParaToPara' && pallet === 'xTokens') {
|
|
4809
4844
|
if (ethers.ethers.utils.isAddress(to)) {
|
|
4810
4845
|
console.log('AccountKey20 transfer');
|
|
4811
|
-
if (
|
|
4846
|
+
if (version === exports.Version.V3) {
|
|
4812
4847
|
return {
|
|
4813
4848
|
V3: {
|
|
4814
|
-
parents:
|
|
4849
|
+
parents: 1,
|
|
4815
4850
|
interior: {
|
|
4816
4851
|
X2: [{
|
|
4817
4852
|
Parachain: nodeId
|
|
@@ -4841,6 +4876,22 @@ function handleAddress(scenario, pallet, api, to, nodeId, node) {
|
|
|
4841
4876
|
};
|
|
4842
4877
|
} else {
|
|
4843
4878
|
console.log('AccountId32 transfer');
|
|
4879
|
+
if (version === exports.Version.V3) {
|
|
4880
|
+
return {
|
|
4881
|
+
V3: {
|
|
4882
|
+
parents: 1,
|
|
4883
|
+
interior: {
|
|
4884
|
+
X2: [{
|
|
4885
|
+
Parachain: nodeId
|
|
4886
|
+
}, {
|
|
4887
|
+
AccountId32: {
|
|
4888
|
+
id: createAccID(api, to)
|
|
4889
|
+
}
|
|
4890
|
+
}]
|
|
4891
|
+
}
|
|
4892
|
+
}
|
|
4893
|
+
};
|
|
4894
|
+
}
|
|
4844
4895
|
return {
|
|
4845
4896
|
V1: {
|
|
4846
4897
|
parents: 1,
|
|
@@ -4860,7 +4911,7 @@ function handleAddress(scenario, pallet, api, to, nodeId, node) {
|
|
|
4860
4911
|
}
|
|
4861
4912
|
if (scenario === 'ParaToRelay' && pallet === 'polkadotXCM') {
|
|
4862
4913
|
console.log('AccountId32 transfer');
|
|
4863
|
-
if (
|
|
4914
|
+
if (version === exports.Version.V3) {
|
|
4864
4915
|
return {
|
|
4865
4916
|
V3: {
|
|
4866
4917
|
parents: 0,
|
|
@@ -4890,21 +4941,9 @@ function handleAddress(scenario, pallet, api, to, nodeId, node) {
|
|
|
4890
4941
|
}
|
|
4891
4942
|
}
|
|
4892
4943
|
if (scenario === 'ParaToPara' && pallet === 'polkadotXCM') {
|
|
4893
|
-
if (node === 'Quartz') {
|
|
4894
|
-
return {
|
|
4895
|
-
V0: {
|
|
4896
|
-
X1: {
|
|
4897
|
-
AccountId32: {
|
|
4898
|
-
network: 'Any',
|
|
4899
|
-
id: createAccID(api, to)
|
|
4900
|
-
}
|
|
4901
|
-
}
|
|
4902
|
-
}
|
|
4903
|
-
};
|
|
4904
|
-
}
|
|
4905
4944
|
if (ethers.ethers.utils.isAddress(to)) {
|
|
4906
4945
|
console.log('AccountKey20 transfer');
|
|
4907
|
-
if (
|
|
4946
|
+
if (version === exports.Version.V3) {
|
|
4908
4947
|
return {
|
|
4909
4948
|
V3: {
|
|
4910
4949
|
parents: 0,
|
|
@@ -4934,7 +4973,7 @@ function handleAddress(scenario, pallet, api, to, nodeId, node) {
|
|
|
4934
4973
|
}
|
|
4935
4974
|
} else {
|
|
4936
4975
|
console.log('AccountId32 transfer');
|
|
4937
|
-
if (
|
|
4976
|
+
if (version === exports.Version.V3) {
|
|
4938
4977
|
return {
|
|
4939
4978
|
V3: {
|
|
4940
4979
|
parents: 0,
|
|
@@ -4965,74 +5004,41 @@ function handleAddress(scenario, pallet, api, to, nodeId, node) {
|
|
|
4965
5004
|
}
|
|
4966
5005
|
}
|
|
4967
5006
|
if (scenario === 'RelayToPara') {
|
|
4968
|
-
var asset = getRelayChainSymbol(node);
|
|
4969
5007
|
if (ethers.ethers.utils.isAddress(to)) {
|
|
4970
5008
|
console.log('AccountKey20 transfer');
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
key: to
|
|
4979
|
-
}
|
|
4980
|
-
}
|
|
4981
|
-
}
|
|
4982
|
-
}
|
|
4983
|
-
};
|
|
4984
|
-
} else {
|
|
4985
|
-
return {
|
|
4986
|
-
V1: {
|
|
4987
|
-
parents: 0,
|
|
4988
|
-
interior: {
|
|
4989
|
-
X1: {
|
|
4990
|
-
AccountKey20: {
|
|
4991
|
-
network: 'Any',
|
|
4992
|
-
key: to
|
|
4993
|
-
}
|
|
5009
|
+
return {
|
|
5010
|
+
V3: {
|
|
5011
|
+
parents: 0,
|
|
5012
|
+
interior: {
|
|
5013
|
+
X1: {
|
|
5014
|
+
AccountKey20: {
|
|
5015
|
+
key: to
|
|
4994
5016
|
}
|
|
4995
5017
|
}
|
|
4996
5018
|
}
|
|
4997
|
-
}
|
|
4998
|
-
}
|
|
5019
|
+
}
|
|
5020
|
+
};
|
|
4999
5021
|
} else {
|
|
5000
5022
|
console.log('AccountId32 transfer');
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
id: createAccID(api, to)
|
|
5009
|
-
}
|
|
5010
|
-
}
|
|
5011
|
-
}
|
|
5012
|
-
}
|
|
5013
|
-
};
|
|
5014
|
-
} else {
|
|
5015
|
-
return {
|
|
5016
|
-
V1: {
|
|
5017
|
-
parents: 0,
|
|
5018
|
-
interior: {
|
|
5019
|
-
X1: {
|
|
5020
|
-
AccountId32: {
|
|
5021
|
-
network: 'Any',
|
|
5022
|
-
id: createAccID(api, to)
|
|
5023
|
-
}
|
|
5023
|
+
return {
|
|
5024
|
+
V3: {
|
|
5025
|
+
parents: 0,
|
|
5026
|
+
interior: {
|
|
5027
|
+
X1: {
|
|
5028
|
+
AccountId32: {
|
|
5029
|
+
id: createAccID(api, to)
|
|
5024
5030
|
}
|
|
5025
5031
|
}
|
|
5026
5032
|
}
|
|
5027
|
-
}
|
|
5028
|
-
}
|
|
5033
|
+
}
|
|
5034
|
+
};
|
|
5029
5035
|
}
|
|
5030
5036
|
}
|
|
5031
5037
|
}
|
|
5032
|
-
function createCurrencySpecification(amount, scenario, node, cur) {
|
|
5038
|
+
function createCurrencySpecification(amount, scenario, version, node, cur) {
|
|
5033
5039
|
if (scenario === 'ParaToRelay') {
|
|
5034
5040
|
console.log('polkadotXCM transfer in native currency to Relay chain');
|
|
5035
|
-
if (
|
|
5041
|
+
if (version === exports.Version.V3) {
|
|
5036
5042
|
return {
|
|
5037
5043
|
V3: [{
|
|
5038
5044
|
id: {
|
|
@@ -5064,20 +5070,10 @@ function createCurrencySpecification(amount, scenario, node, cur) {
|
|
|
5064
5070
|
}
|
|
5065
5071
|
if (scenario === 'RelayToPara' || scenario === 'ParaToPara') {
|
|
5066
5072
|
console.log('polkadotXCM Native currency to sender chain transfer');
|
|
5067
|
-
if (node === 'Quartz' && scenario === 'ParaToPara') {
|
|
5068
|
-
return {
|
|
5069
|
-
V0: [{
|
|
5070
|
-
ConcreteFungible: {
|
|
5071
|
-
id: null,
|
|
5072
|
-
amount: amount
|
|
5073
|
-
}
|
|
5074
|
-
}]
|
|
5075
|
-
};
|
|
5076
|
-
}
|
|
5077
5073
|
if ((node === 'Darwinia' || node === 'Crab') && scenario === 'ParaToPara') {
|
|
5078
5074
|
// Special case for Darwinia&Crab node
|
|
5079
5075
|
return {
|
|
5080
|
-
|
|
5076
|
+
V3: [{
|
|
5081
5077
|
id: {
|
|
5082
5078
|
Concrete: {
|
|
5083
5079
|
parents: 0,
|
|
@@ -5093,59 +5089,20 @@ function createCurrencySpecification(amount, scenario, node, cur) {
|
|
|
5093
5089
|
}
|
|
5094
5090
|
}]
|
|
5095
5091
|
};
|
|
5096
|
-
} else if ((node === '
|
|
5092
|
+
} else if ((node === 'Statemine' || node === 'Statemint') && scenario === 'ParaToPara') {
|
|
5097
5093
|
// Another specific case for Statemint & Statemine to send for example USDt
|
|
5098
|
-
if (node === 'Statemine') {
|
|
5099
|
-
return {
|
|
5100
|
-
V3: [{
|
|
5101
|
-
id: {
|
|
5102
|
-
Concrete: {
|
|
5103
|
-
parents: 0,
|
|
5104
|
-
interior: {
|
|
5105
|
-
X2: [{
|
|
5106
|
-
PalletInstance: 50
|
|
5107
|
-
}, {
|
|
5108
|
-
GeneralIndex: cur
|
|
5109
|
-
}]
|
|
5110
|
-
}
|
|
5111
|
-
}
|
|
5112
|
-
},
|
|
5113
|
-
fun: {
|
|
5114
|
-
Fungible: amount
|
|
5115
|
-
}
|
|
5116
|
-
}]
|
|
5117
|
-
};
|
|
5118
|
-
} else {
|
|
5119
|
-
return {
|
|
5120
|
-
V1: [{
|
|
5121
|
-
id: {
|
|
5122
|
-
Concrete: {
|
|
5123
|
-
parents: 0,
|
|
5124
|
-
interior: {
|
|
5125
|
-
X2: [{
|
|
5126
|
-
PalletInstance: 50
|
|
5127
|
-
}, {
|
|
5128
|
-
GeneralIndex: cur
|
|
5129
|
-
}]
|
|
5130
|
-
}
|
|
5131
|
-
}
|
|
5132
|
-
},
|
|
5133
|
-
fun: {
|
|
5134
|
-
Fungible: amount
|
|
5135
|
-
}
|
|
5136
|
-
}]
|
|
5137
|
-
};
|
|
5138
|
-
}
|
|
5139
|
-
}
|
|
5140
|
-
// Otherwise
|
|
5141
|
-
var asset = getRelayChainSymbol(node);
|
|
5142
|
-
if (asset === 'KSM') {
|
|
5143
5094
|
return {
|
|
5144
5095
|
V3: [{
|
|
5145
5096
|
id: {
|
|
5146
5097
|
Concrete: {
|
|
5147
5098
|
parents: 0,
|
|
5148
|
-
interior:
|
|
5099
|
+
interior: {
|
|
5100
|
+
X2: [{
|
|
5101
|
+
PalletInstance: 50
|
|
5102
|
+
}, {
|
|
5103
|
+
GeneralIndex: cur
|
|
5104
|
+
}]
|
|
5105
|
+
}
|
|
5149
5106
|
}
|
|
5150
5107
|
},
|
|
5151
5108
|
fun: {
|
|
@@ -5154,8 +5111,9 @@ function createCurrencySpecification(amount, scenario, node, cur) {
|
|
|
5154
5111
|
}]
|
|
5155
5112
|
};
|
|
5156
5113
|
}
|
|
5114
|
+
// Otherwise
|
|
5157
5115
|
return {
|
|
5158
|
-
|
|
5116
|
+
V3: [{
|
|
5159
5117
|
id: {
|
|
5160
5118
|
Concrete: {
|
|
5161
5119
|
parents: 0,
|
|
@@ -5169,10 +5127,10 @@ function createCurrencySpecification(amount, scenario, node, cur) {
|
|
|
5169
5127
|
};
|
|
5170
5128
|
}
|
|
5171
5129
|
}
|
|
5172
|
-
function createHeaderPolkadotXCM(scenario,
|
|
5130
|
+
function createHeaderPolkadotXCM(scenario, version, nodeId) {
|
|
5173
5131
|
console.log('Generating header for polkadotXCM transfer');
|
|
5174
5132
|
if (scenario === 'ParaToRelay') {
|
|
5175
|
-
if (
|
|
5133
|
+
if (version === exports.Version.V3) {
|
|
5176
5134
|
return {
|
|
5177
5135
|
V3: {
|
|
5178
5136
|
parents: 1,
|
|
@@ -5189,33 +5147,10 @@ function createHeaderPolkadotXCM(scenario, nodeId, node) {
|
|
|
5189
5147
|
}
|
|
5190
5148
|
}
|
|
5191
5149
|
if (scenario === 'ParaToPara') {
|
|
5192
|
-
if (
|
|
5193
|
-
return {
|
|
5194
|
-
V0: {
|
|
5195
|
-
X2: ['Parent', {
|
|
5196
|
-
Parachain: nodeId
|
|
5197
|
-
}]
|
|
5198
|
-
}
|
|
5199
|
-
};
|
|
5200
|
-
}
|
|
5201
|
-
return {
|
|
5202
|
-
V1: {
|
|
5203
|
-
parents: 1,
|
|
5204
|
-
interior: {
|
|
5205
|
-
X1: {
|
|
5206
|
-
Parachain: nodeId
|
|
5207
|
-
}
|
|
5208
|
-
}
|
|
5209
|
-
}
|
|
5210
|
-
};
|
|
5211
|
-
}
|
|
5212
|
-
if (scenario === 'RelayToPara') {
|
|
5213
|
-
//We check nodeID currency (IF KSM then V3 IF DOT then V1)
|
|
5214
|
-
var asset = getRelayChainSymbol(node);
|
|
5215
|
-
if (asset === 'KSM') {
|
|
5150
|
+
if (version === exports.Version.V3) {
|
|
5216
5151
|
return {
|
|
5217
5152
|
V3: {
|
|
5218
|
-
parents:
|
|
5153
|
+
parents: 1,
|
|
5219
5154
|
interior: {
|
|
5220
5155
|
X1: {
|
|
5221
5156
|
Parachain: nodeId
|
|
@@ -5226,7 +5161,7 @@ function createHeaderPolkadotXCM(scenario, nodeId, node) {
|
|
|
5226
5161
|
} else {
|
|
5227
5162
|
return {
|
|
5228
5163
|
V1: {
|
|
5229
|
-
parents:
|
|
5164
|
+
parents: 1,
|
|
5230
5165
|
interior: {
|
|
5231
5166
|
X1: {
|
|
5232
5167
|
Parachain: nodeId
|
|
@@ -5236,6 +5171,18 @@ function createHeaderPolkadotXCM(scenario, nodeId, node) {
|
|
|
5236
5171
|
};
|
|
5237
5172
|
}
|
|
5238
5173
|
}
|
|
5174
|
+
if (scenario === 'RelayToPara') {
|
|
5175
|
+
return {
|
|
5176
|
+
V3: {
|
|
5177
|
+
parents: 0,
|
|
5178
|
+
interior: {
|
|
5179
|
+
X1: {
|
|
5180
|
+
Parachain: nodeId
|
|
5181
|
+
}
|
|
5182
|
+
}
|
|
5183
|
+
}
|
|
5184
|
+
};
|
|
5185
|
+
}
|
|
5239
5186
|
}
|
|
5240
5187
|
function getNode(node) {
|
|
5241
5188
|
return nodes[node];
|
|
@@ -5282,7 +5229,7 @@ var NodeNotSupportedError = /*#__PURE__*/function (_Error) {
|
|
|
5282
5229
|
return _createClass(NodeNotSupportedError);
|
|
5283
5230
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
5284
5231
|
|
|
5285
|
-
//Contains basic call formatting for different XCM Palletss
|
|
5232
|
+
// Contains basic call formatting for different XCM Palletss
|
|
5286
5233
|
function send(api, origin, currencySymbolOrId, amount, to, destination) {
|
|
5287
5234
|
var asset = getAssetBySymbolOrId(origin, currencySymbolOrId.toString());
|
|
5288
5235
|
if (!asset) {
|
|
@@ -5297,14 +5244,16 @@ function send(api, origin, currencySymbolOrId, amount, to, destination) {
|
|
|
5297
5244
|
}
|
|
5298
5245
|
function transferRelayToPara(api, destination, amount, to) {
|
|
5299
5246
|
var paraId = getParaId(destination);
|
|
5300
|
-
if (destination === 'Statemint' || destination === 'Statemine'
|
|
5247
|
+
if (destination === 'Statemint' || destination === 'Statemine') {
|
|
5301
5248
|
// Same for Statemint, Statemine and Encoiter
|
|
5302
|
-
return api.tx.xcmPallet.limitedTeleportAssets(createHeaderPolkadotXCM('RelayToPara',
|
|
5303
|
-
} else if (destination === '
|
|
5304
|
-
|
|
5249
|
+
return api.tx.xcmPallet.limitedTeleportAssets(createHeaderPolkadotXCM('RelayToPara', exports.Version.V3, paraId), handleAddress('RelayToPara', '', api, to, exports.Version.V3, paraId), createCurrencySpecification(amount, 'RelayToPara', exports.Version.V3, destination), 0, 'Unlimited');
|
|
5250
|
+
} else if (destination === 'Encointer') {
|
|
5251
|
+
return api.tx.xcmPallet.limitedTeleportAssets(createHeaderPolkadotXCM('RelayToPara', exports.Version.V1, paraId), handleAddress('RelayToPara', '', api, to, exports.Version.V1, paraId), createCurrencySpecification(amount, 'RelayToPara', exports.Version.V1, destination), 0, 'Unlimited');
|
|
5252
|
+
} else if (destination === 'Darwinia' || destination === 'Crab') {
|
|
5253
|
+
// Do not do anything because Darwinia and Crab does not have DOT and KSM registered
|
|
5305
5254
|
throw new NodeNotSupportedError('These nodes do not support XCM transfers from Relay / to Relay chain.');
|
|
5306
5255
|
}
|
|
5307
|
-
return api.tx.xcmPallet.reserveTransferAssets(createHeaderPolkadotXCM('RelayToPara',
|
|
5256
|
+
return api.tx.xcmPallet.reserveTransferAssets(createHeaderPolkadotXCM('RelayToPara', exports.Version.V3, paraId), handleAddress('RelayToPara', '', api, to, exports.Version.V3, paraId), createCurrencySpecification(amount, 'RelayToPara', exports.Version.V3, destination), 0);
|
|
5308
5257
|
}
|
|
5309
5258
|
|
|
5310
5259
|
var index$3 = /*#__PURE__*/Object.freeze({
|
|
@@ -5737,10 +5686,11 @@ var ToGeneralBuilder = /*#__PURE__*/function () {
|
|
|
5737
5686
|
return ToGeneralBuilder;
|
|
5738
5687
|
}();
|
|
5739
5688
|
var FromGeneralBuilder = /*#__PURE__*/function () {
|
|
5740
|
-
function FromGeneralBuilder(api, from) {
|
|
5689
|
+
function FromGeneralBuilder(api, from, version) {
|
|
5741
5690
|
_classCallCheck(this, FromGeneralBuilder);
|
|
5742
5691
|
this.api = api;
|
|
5743
5692
|
this.from = from;
|
|
5693
|
+
this.version = version;
|
|
5744
5694
|
}
|
|
5745
5695
|
_createClass(FromGeneralBuilder, [{
|
|
5746
5696
|
key: "to",
|
|
@@ -5768,7 +5718,7 @@ var GeneralBuilder = /*#__PURE__*/function () {
|
|
|
5768
5718
|
_createClass(GeneralBuilder, [{
|
|
5769
5719
|
key: "from",
|
|
5770
5720
|
value: function from(node) {
|
|
5771
|
-
return new FromGeneralBuilder(this.api, node);
|
|
5721
|
+
return new FromGeneralBuilder(this.api, node, this.version);
|
|
5772
5722
|
}
|
|
5773
5723
|
}, {
|
|
5774
5724
|
key: "to",
|
|
@@ -5854,9 +5804,10 @@ var Clover = {
|
|
|
5854
5804
|
]
|
|
5855
5805
|
};
|
|
5856
5806
|
var ComposableFinance = {
|
|
5857
|
-
defaultPallet: "
|
|
5807
|
+
defaultPallet: "XTokens",
|
|
5858
5808
|
supportedPallets: [
|
|
5859
|
-
"
|
|
5809
|
+
"PolkadotXcm",
|
|
5810
|
+
"XTokens"
|
|
5860
5811
|
]
|
|
5861
5812
|
};
|
|
5862
5813
|
var Darwinia = {
|
|
@@ -6060,7 +6011,7 @@ var ParallelHeiko = {
|
|
|
6060
6011
|
var Picasso = {
|
|
6061
6012
|
defaultPallet: "XTokens",
|
|
6062
6013
|
supportedPallets: [
|
|
6063
|
-
"
|
|
6014
|
+
"PolkadotXcm",
|
|
6064
6015
|
"XTokens"
|
|
6065
6016
|
]
|
|
6066
6017
|
};
|