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