@paraspell/sdk-core 11.12.12 → 11.12.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +31 -221
- package/dist/index.d.ts +0 -35
- package/dist/index.mjs +31 -221
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -6637,32 +6637,26 @@ var Parachain = /*#__PURE__*/function () {
|
|
|
6637
6637
|
case 0:
|
|
6638
6638
|
api = options.api, version = options.version, pallet = options.pallet, assetInfo = options.assetInfo, address = options.address, senderAddress = options.senderAddress, destination = options.destination, paraIdTo = options.paraIdTo, methodOverride = options.method;
|
|
6639
6639
|
_this$getRelayToParaO = this.getRelayToParaOverrides(), method = _this$getRelayToParaO.method, includeFee = _this$getRelayToParaO.includeFee;
|
|
6640
|
-
if (!(getRelayChainOf(this.chain) === 'Polkadot')) {
|
|
6641
|
-
_context2.n = 1;
|
|
6642
|
-
break;
|
|
6643
|
-
}
|
|
6644
|
-
throw new InvalidParameterError("Sending from Polkadot relaychain is temporarily disabled");
|
|
6645
|
-
case 1:
|
|
6646
6640
|
if (!this.isReceivingTempDisabled('RelayToPara')) {
|
|
6647
|
-
_context2.n =
|
|
6641
|
+
_context2.n = 1;
|
|
6648
6642
|
break;
|
|
6649
6643
|
}
|
|
6650
6644
|
throw new InvalidParameterError("Receiving on ".concat(this.chain, " is temporarily disabled"));
|
|
6651
|
-
case
|
|
6645
|
+
case 1:
|
|
6652
6646
|
customMethod = methodOverride !== null && methodOverride !== void 0 ? methodOverride : method;
|
|
6653
6647
|
if (!(customMethod === 'transfer_assets_using_type_and_then')) {
|
|
6654
|
-
_context2.n =
|
|
6648
|
+
_context2.n = 3;
|
|
6655
6649
|
break;
|
|
6656
6650
|
}
|
|
6657
6651
|
paraId = resolveParaId(paraIdTo, destination);
|
|
6658
6652
|
destChain = resolveDestChain(this.chain, paraId);
|
|
6659
6653
|
scenario = 'RelayToPara';
|
|
6660
6654
|
if (destChain) {
|
|
6661
|
-
_context2.n =
|
|
6655
|
+
_context2.n = 2;
|
|
6662
6656
|
break;
|
|
6663
6657
|
}
|
|
6664
6658
|
throw new InvalidParameterError('Cannot override destination when using type and then transfer.');
|
|
6665
|
-
case
|
|
6659
|
+
case 2:
|
|
6666
6660
|
return _context2.a(2, createTypeThenAutoReserve(getRelayChainOf(destChain), _objectSpread2(_objectSpread2({}, options), {}, {
|
|
6667
6661
|
beneficiaryLocation: createBeneficiaryLocation({
|
|
6668
6662
|
api: api,
|
|
@@ -6676,7 +6670,7 @@ var Parachain = /*#__PURE__*/function () {
|
|
|
6676
6670
|
destChain: destChain,
|
|
6677
6671
|
paraIdTo: paraId
|
|
6678
6672
|
})));
|
|
6679
|
-
case
|
|
6673
|
+
case 3:
|
|
6680
6674
|
return _context2.a(2, {
|
|
6681
6675
|
module: pallet !== null && pallet !== void 0 ? pallet : 'XcmPallet',
|
|
6682
6676
|
method: customMethod,
|
|
@@ -7288,21 +7282,11 @@ var AssetHubKusama = /*#__PURE__*/function (_Parachain) {
|
|
|
7288
7282
|
value: function createCurrencySpec(amount, scenario, version, asset, isOverridenAsset) {
|
|
7289
7283
|
return getChain('AssetHubPolkadot').createCurrencySpec(amount, scenario, version, asset, isOverridenAsset);
|
|
7290
7284
|
}
|
|
7291
|
-
}, {
|
|
7292
|
-
key: "transferLocal",
|
|
7293
|
-
value: function transferLocal(_options) {
|
|
7294
|
-
throw new InvalidParameterError("Local transfers on ".concat(this.chain, " are temporarily disabled."));
|
|
7295
|
-
}
|
|
7296
7285
|
}, {
|
|
7297
7286
|
key: "transferLocalNonNativeAsset",
|
|
7298
7287
|
value: function transferLocalNonNativeAsset(options) {
|
|
7299
7288
|
return getChain('AssetHubPolkadot').transferLocalNonNativeAsset(options);
|
|
7300
7289
|
}
|
|
7301
|
-
}, {
|
|
7302
|
-
key: "isSendingTempDisabled",
|
|
7303
|
-
value: function isSendingTempDisabled(_options) {
|
|
7304
|
-
return true;
|
|
7305
|
-
}
|
|
7306
7290
|
}]);
|
|
7307
7291
|
}(Parachain);
|
|
7308
7292
|
|
|
@@ -7580,21 +7564,6 @@ var AssetHubPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
7580
7564
|
includeFee: true
|
|
7581
7565
|
};
|
|
7582
7566
|
}
|
|
7583
|
-
}, {
|
|
7584
|
-
key: "isSendingTempDisabled",
|
|
7585
|
-
value: function isSendingTempDisabled(_options) {
|
|
7586
|
-
return true;
|
|
7587
|
-
}
|
|
7588
|
-
}, {
|
|
7589
|
-
key: "isReceivingTempDisabled",
|
|
7590
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
7591
|
-
return true;
|
|
7592
|
-
}
|
|
7593
|
-
}, {
|
|
7594
|
-
key: "transferLocal",
|
|
7595
|
-
value: function transferLocal(_options) {
|
|
7596
|
-
throw new InvalidParameterError("Local transfers on ".concat(this.chain, " are temporarily disabled."));
|
|
7597
|
-
}
|
|
7598
7567
|
}, {
|
|
7599
7568
|
key: "createCurrencySpec",
|
|
7600
7569
|
value: function createCurrencySpec(amount, scenario, version, asset, isOverriddenAsset) {
|
|
@@ -7682,17 +7651,7 @@ var AssetHubPaseo = /*#__PURE__*/function (_AssetHubPolkadot) {
|
|
|
7682
7651
|
return _callSuper(this, AssetHubPaseo, ['AssetHubPaseo', 'PaseoAssetHub', 'Paseo', sdkCommon.Version.V5]);
|
|
7683
7652
|
}
|
|
7684
7653
|
_inherits(AssetHubPaseo, _AssetHubPolkadot);
|
|
7685
|
-
return _createClass(AssetHubPaseo
|
|
7686
|
-
key: "isSendingTempDisabled",
|
|
7687
|
-
value: function isSendingTempDisabled(_options) {
|
|
7688
|
-
return false;
|
|
7689
|
-
}
|
|
7690
|
-
}, {
|
|
7691
|
-
key: "isReceivingTempDisabled",
|
|
7692
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
7693
|
-
return false;
|
|
7694
|
-
}
|
|
7695
|
-
}]);
|
|
7654
|
+
return _createClass(AssetHubPaseo);
|
|
7696
7655
|
}(AssetHubPolkadot);
|
|
7697
7656
|
|
|
7698
7657
|
var AssetHubWestend = /*#__PURE__*/function (_AssetHubPolkadot) {
|
|
@@ -7701,17 +7660,7 @@ var AssetHubWestend = /*#__PURE__*/function (_AssetHubPolkadot) {
|
|
|
7701
7660
|
return _callSuper(this, AssetHubWestend, ['AssetHubWestend', 'WestendAssetHub', 'Westend', sdkCommon.Version.V5]);
|
|
7702
7661
|
}
|
|
7703
7662
|
_inherits(AssetHubWestend, _AssetHubPolkadot);
|
|
7704
|
-
return _createClass(AssetHubWestend
|
|
7705
|
-
key: "isSendingTempDisabled",
|
|
7706
|
-
value: function isSendingTempDisabled(_options) {
|
|
7707
|
-
return false;
|
|
7708
|
-
}
|
|
7709
|
-
}, {
|
|
7710
|
-
key: "isReceivingTempDisabled",
|
|
7711
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
7712
|
-
return false;
|
|
7713
|
-
}
|
|
7714
|
-
}]);
|
|
7663
|
+
return _createClass(AssetHubWestend);
|
|
7715
7664
|
}(AssetHubPolkadot);
|
|
7716
7665
|
|
|
7717
7666
|
var Astar = /*#__PURE__*/function (_Parachain) {
|
|
@@ -7903,12 +7852,9 @@ var BifrostPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
7903
7852
|
}, {
|
|
7904
7853
|
key: "transferPolkadotXCM",
|
|
7905
7854
|
value: function transferPolkadotXCM(options) {
|
|
7906
|
-
var destination = options.destination
|
|
7907
|
-
scenario = options.scenario;
|
|
7855
|
+
var destination = options.destination;
|
|
7908
7856
|
if (destination === 'Ethereum') {
|
|
7909
|
-
|
|
7910
|
-
//return this.transferToEthereum(options)
|
|
7911
|
-
throw new ScenarioNotSupportedError(this.chain, scenario, 'Snowbridge is temporarily disabled.');
|
|
7857
|
+
return this.transferToEthereum(options);
|
|
7912
7858
|
}
|
|
7913
7859
|
return this.transferToAssetHub(options);
|
|
7914
7860
|
}
|
|
@@ -8021,21 +7967,6 @@ var BridgeHubPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
8021
7967
|
includeFee: true
|
|
8022
7968
|
};
|
|
8023
7969
|
}
|
|
8024
|
-
}, {
|
|
8025
|
-
key: "transferLocal",
|
|
8026
|
-
value: function transferLocal(_options) {
|
|
8027
|
-
throw new InvalidParameterError("Local transfers on ".concat(this.chain, " are temporarily disabled."));
|
|
8028
|
-
}
|
|
8029
|
-
}, {
|
|
8030
|
-
key: "isSendingTempDisabled",
|
|
8031
|
-
value: function isSendingTempDisabled(_options) {
|
|
8032
|
-
return true;
|
|
8033
|
-
}
|
|
8034
|
-
}, {
|
|
8035
|
-
key: "isReceivingTempDisabled",
|
|
8036
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
8037
|
-
return true;
|
|
8038
|
-
}
|
|
8039
7970
|
}]);
|
|
8040
7971
|
}(Parachain);
|
|
8041
7972
|
|
|
@@ -8045,17 +7976,7 @@ var BridgeHubPaseo = /*#__PURE__*/function (_BridgeHubPolkadot) {
|
|
|
8045
7976
|
return _callSuper(this, BridgeHubPaseo, ['BridgeHubPaseo', 'PaseoBridgeHub', 'Paseo', sdkCommon.Version.V5]);
|
|
8046
7977
|
}
|
|
8047
7978
|
_inherits(BridgeHubPaseo, _BridgeHubPolkadot);
|
|
8048
|
-
return _createClass(BridgeHubPaseo
|
|
8049
|
-
key: "isSendingTempDisabled",
|
|
8050
|
-
value: function isSendingTempDisabled(_options) {
|
|
8051
|
-
return false;
|
|
8052
|
-
}
|
|
8053
|
-
}, {
|
|
8054
|
-
key: "isReceivingTempDisabled",
|
|
8055
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
8056
|
-
return false;
|
|
8057
|
-
}
|
|
8058
|
-
}]);
|
|
7979
|
+
return _createClass(BridgeHubPaseo);
|
|
8059
7980
|
}(BridgeHubPolkadot);
|
|
8060
7981
|
|
|
8061
7982
|
var BridgeHubWestend = /*#__PURE__*/function (_BridgeHubPolkadot) {
|
|
@@ -8064,17 +7985,7 @@ var BridgeHubWestend = /*#__PURE__*/function (_BridgeHubPolkadot) {
|
|
|
8064
7985
|
return _callSuper(this, BridgeHubWestend, ['BridgeHubWestend', 'westendBridgeHub', 'Westend', sdkCommon.Version.V5]);
|
|
8065
7986
|
}
|
|
8066
7987
|
_inherits(BridgeHubWestend, _BridgeHubPolkadot);
|
|
8067
|
-
return _createClass(BridgeHubWestend
|
|
8068
|
-
key: "isSendingTempDisabled",
|
|
8069
|
-
value: function isSendingTempDisabled(_options) {
|
|
8070
|
-
return false;
|
|
8071
|
-
}
|
|
8072
|
-
}, {
|
|
8073
|
-
key: "isReceivingTempDisabled",
|
|
8074
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
8075
|
-
return false;
|
|
8076
|
-
}
|
|
8077
|
-
}]);
|
|
7988
|
+
return _createClass(BridgeHubWestend);
|
|
8078
7989
|
}(BridgeHubPolkadot);
|
|
8079
7990
|
|
|
8080
7991
|
var Centrifuge = /*#__PURE__*/function (_Parachain) {
|
|
@@ -8154,11 +8065,6 @@ var Collectives = /*#__PURE__*/function (_Parachain) {
|
|
|
8154
8065
|
}
|
|
8155
8066
|
return transferPolkadotXcm(input, 'limited_teleport_assets', 'Unlimited');
|
|
8156
8067
|
}
|
|
8157
|
-
}, {
|
|
8158
|
-
key: "transferLocal",
|
|
8159
|
-
value: function transferLocal(_options) {
|
|
8160
|
-
throw new InvalidParameterError("Local transfers on ".concat(this.chain, " are temporarily disabled."));
|
|
8161
|
-
}
|
|
8162
8068
|
}, {
|
|
8163
8069
|
key: "getRelayToParaOverrides",
|
|
8164
8070
|
value: function getRelayToParaOverrides() {
|
|
@@ -8167,16 +8073,6 @@ var Collectives = /*#__PURE__*/function (_Parachain) {
|
|
|
8167
8073
|
includeFee: true
|
|
8168
8074
|
};
|
|
8169
8075
|
}
|
|
8170
|
-
}, {
|
|
8171
|
-
key: "isSendingTempDisabled",
|
|
8172
|
-
value: function isSendingTempDisabled(_options) {
|
|
8173
|
-
return true;
|
|
8174
|
-
}
|
|
8175
|
-
}, {
|
|
8176
|
-
key: "isReceivingTempDisabled",
|
|
8177
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
8178
|
-
return true;
|
|
8179
|
-
}
|
|
8180
8076
|
}]);
|
|
8181
8077
|
}(Parachain);
|
|
8182
8078
|
|
|
@@ -8186,17 +8082,7 @@ var CollectivesWestend = /*#__PURE__*/function (_Collectives) {
|
|
|
8186
8082
|
return _callSuper(this, CollectivesWestend, ['CollectivesWestend', 'westendCollectives', 'Westend', sdkCommon.Version.V5]);
|
|
8187
8083
|
}
|
|
8188
8084
|
_inherits(CollectivesWestend, _Collectives);
|
|
8189
|
-
return _createClass(CollectivesWestend
|
|
8190
|
-
key: "isSendingTempDisabled",
|
|
8191
|
-
value: function isSendingTempDisabled(_options) {
|
|
8192
|
-
return false;
|
|
8193
|
-
}
|
|
8194
|
-
}, {
|
|
8195
|
-
key: "isReceivingTempDisabled",
|
|
8196
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
8197
|
-
return false;
|
|
8198
|
-
}
|
|
8199
|
-
}]);
|
|
8085
|
+
return _createClass(CollectivesWestend);
|
|
8200
8086
|
}(Collectives);
|
|
8201
8087
|
|
|
8202
8088
|
var ComposableFinance = /*#__PURE__*/function (_Parachain) {
|
|
@@ -8283,21 +8169,6 @@ var CoretimePolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
8283
8169
|
includeFee: true
|
|
8284
8170
|
};
|
|
8285
8171
|
}
|
|
8286
|
-
}, {
|
|
8287
|
-
key: "transferLocal",
|
|
8288
|
-
value: function transferLocal(_options) {
|
|
8289
|
-
throw new InvalidParameterError("Local transfers on ".concat(this.chain, " are temporarily disabled."));
|
|
8290
|
-
}
|
|
8291
|
-
}, {
|
|
8292
|
-
key: "isSendingTempDisabled",
|
|
8293
|
-
value: function isSendingTempDisabled(_options) {
|
|
8294
|
-
return true;
|
|
8295
|
-
}
|
|
8296
|
-
}, {
|
|
8297
|
-
key: "isReceivingTempDisabled",
|
|
8298
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
8299
|
-
return true;
|
|
8300
|
-
}
|
|
8301
8172
|
}]);
|
|
8302
8173
|
}(Parachain);
|
|
8303
8174
|
|
|
@@ -8307,17 +8178,7 @@ var CoretimePaseo = /*#__PURE__*/function (_CoretimePolkadot) {
|
|
|
8307
8178
|
return _callSuper(this, CoretimePaseo, ['CoretimePaseo', 'PaseoCoretime', 'Paseo', sdkCommon.Version.V5]);
|
|
8308
8179
|
}
|
|
8309
8180
|
_inherits(CoretimePaseo, _CoretimePolkadot);
|
|
8310
|
-
return _createClass(CoretimePaseo
|
|
8311
|
-
key: "isSendingTempDisabled",
|
|
8312
|
-
value: function isSendingTempDisabled(_options) {
|
|
8313
|
-
return false;
|
|
8314
|
-
}
|
|
8315
|
-
}, {
|
|
8316
|
-
key: "isReceivingTempDisabled",
|
|
8317
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
8318
|
-
return false;
|
|
8319
|
-
}
|
|
8320
|
-
}]);
|
|
8181
|
+
return _createClass(CoretimePaseo);
|
|
8321
8182
|
}(CoretimePolkadot);
|
|
8322
8183
|
|
|
8323
8184
|
var CoretimeWestend = /*#__PURE__*/function (_CoretimePolkadot) {
|
|
@@ -8326,17 +8187,7 @@ var CoretimeWestend = /*#__PURE__*/function (_CoretimePolkadot) {
|
|
|
8326
8187
|
return _callSuper(this, CoretimeWestend, ['CoretimeWestend', 'westendCoretime', 'Westend', sdkCommon.Version.V5]);
|
|
8327
8188
|
}
|
|
8328
8189
|
_inherits(CoretimeWestend, _CoretimePolkadot);
|
|
8329
|
-
return _createClass(CoretimeWestend
|
|
8330
|
-
key: "isSendingTempDisabled",
|
|
8331
|
-
value: function isSendingTempDisabled(_options) {
|
|
8332
|
-
return false;
|
|
8333
|
-
}
|
|
8334
|
-
}, {
|
|
8335
|
-
key: "isReceivingTempDisabled",
|
|
8336
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
8337
|
-
return false;
|
|
8338
|
-
}
|
|
8339
|
-
}]);
|
|
8190
|
+
return _createClass(CoretimeWestend);
|
|
8340
8191
|
}(CoretimePolkadot);
|
|
8341
8192
|
|
|
8342
8193
|
var Crab = /*#__PURE__*/function (_Parachain) {
|
|
@@ -8725,16 +8576,16 @@ var Hydration = /*#__PURE__*/function (_Parachain) {
|
|
|
8725
8576
|
key: "transferPolkadotXCM",
|
|
8726
8577
|
value: function () {
|
|
8727
8578
|
var _transferPolkadotXCM = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(input) {
|
|
8728
|
-
var api, destination,
|
|
8579
|
+
var api, destination, feeAsset, asset, overriddenAsset, isNativeAsset, isNativeFeeAsset, _t;
|
|
8729
8580
|
return _regenerator().w(function (_context) {
|
|
8730
8581
|
while (1) switch (_context.n) {
|
|
8731
8582
|
case 0:
|
|
8732
|
-
api = input.api, destination = input.destination,
|
|
8583
|
+
api = input.api, destination = input.destination, feeAsset = input.feeAssetInfo, asset = input.assetInfo, overriddenAsset = input.overriddenAsset;
|
|
8733
8584
|
if (!(destination === 'Ethereum')) {
|
|
8734
8585
|
_context.n = 1;
|
|
8735
8586
|
break;
|
|
8736
8587
|
}
|
|
8737
|
-
|
|
8588
|
+
return _context.a(2, this.transferToEthereum(input));
|
|
8738
8589
|
case 1:
|
|
8739
8590
|
if (!feeAsset) {
|
|
8740
8591
|
_context.n = 4;
|
|
@@ -9307,7 +9158,7 @@ var Moonbeam = /*#__PURE__*/function (_Parachain) {
|
|
|
9307
9158
|
_context.n = 1;
|
|
9308
9159
|
break;
|
|
9309
9160
|
}
|
|
9310
|
-
|
|
9161
|
+
return _context.a(2, this.transferToEthereum(input));
|
|
9311
9162
|
case 1:
|
|
9312
9163
|
if (!assets.isSymbolMatch(assetInfo.symbol, assets.getRelayChainSymbol(this.chain))) {
|
|
9313
9164
|
_context.n = 3;
|
|
@@ -9638,21 +9489,6 @@ var PeoplePolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
9638
9489
|
includeFee: true
|
|
9639
9490
|
};
|
|
9640
9491
|
}
|
|
9641
|
-
}, {
|
|
9642
|
-
key: "transferLocal",
|
|
9643
|
-
value: function transferLocal(_options) {
|
|
9644
|
-
throw new InvalidParameterError("Local transfers on ".concat(this.chain, " are temporarily disabled."));
|
|
9645
|
-
}
|
|
9646
|
-
}, {
|
|
9647
|
-
key: "isSendingTempDisabled",
|
|
9648
|
-
value: function isSendingTempDisabled(_options) {
|
|
9649
|
-
return true;
|
|
9650
|
-
}
|
|
9651
|
-
}, {
|
|
9652
|
-
key: "isReceivingTempDisabled",
|
|
9653
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
9654
|
-
return true;
|
|
9655
|
-
}
|
|
9656
9492
|
}]);
|
|
9657
9493
|
}(Parachain);
|
|
9658
9494
|
|
|
@@ -9818,17 +9654,7 @@ var PeoplePaseo = /*#__PURE__*/function (_PeoplePolkadot) {
|
|
|
9818
9654
|
return _callSuper(this, PeoplePaseo, ['PeoplePaseo', 'PaseoPeopleChain', 'Paseo', sdkCommon.Version.V5]);
|
|
9819
9655
|
}
|
|
9820
9656
|
_inherits(PeoplePaseo, _PeoplePolkadot);
|
|
9821
|
-
return _createClass(PeoplePaseo
|
|
9822
|
-
key: "isSendingTempDisabled",
|
|
9823
|
-
value: function isSendingTempDisabled(_options) {
|
|
9824
|
-
return false;
|
|
9825
|
-
}
|
|
9826
|
-
}, {
|
|
9827
|
-
key: "isReceivingTempDisabled",
|
|
9828
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
9829
|
-
return false;
|
|
9830
|
-
}
|
|
9831
|
-
}]);
|
|
9657
|
+
return _createClass(PeoplePaseo);
|
|
9832
9658
|
}(PeoplePolkadot);
|
|
9833
9659
|
|
|
9834
9660
|
var PeopleWestend = /*#__PURE__*/function (_PeoplePolkadot) {
|
|
@@ -9837,17 +9663,7 @@ var PeopleWestend = /*#__PURE__*/function (_PeoplePolkadot) {
|
|
|
9837
9663
|
return _callSuper(this, PeopleWestend, ['PeopleWestend', 'westendPeople', 'Westend', sdkCommon.Version.V5]);
|
|
9838
9664
|
}
|
|
9839
9665
|
_inherits(PeopleWestend, _PeoplePolkadot);
|
|
9840
|
-
return _createClass(PeopleWestend
|
|
9841
|
-
key: "isSendingTempDisabled",
|
|
9842
|
-
value: function isSendingTempDisabled(_options) {
|
|
9843
|
-
return false;
|
|
9844
|
-
}
|
|
9845
|
-
}, {
|
|
9846
|
-
key: "isReceivingTempDisabled",
|
|
9847
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
9848
|
-
return false;
|
|
9849
|
-
}
|
|
9850
|
-
}]);
|
|
9666
|
+
return _createClass(PeopleWestend);
|
|
9851
9667
|
}(PeoplePolkadot);
|
|
9852
9668
|
|
|
9853
9669
|
var determineDestWeight = function determineDestWeight(destChain) {
|
|
@@ -11970,7 +11786,7 @@ var send = /*#__PURE__*/function () {
|
|
|
11970
11786
|
destVersion = !sdkCommon.isTLocation(destination) ? getChainVersion(destination) : undefined;
|
|
11971
11787
|
resolvedVersion = selectXcmVersion(version, originVersion, destVersion);
|
|
11972
11788
|
if (!sdkCommon.isRelayChain(origin)) {
|
|
11973
|
-
_context.n =
|
|
11789
|
+
_context.n = 6;
|
|
11974
11790
|
break;
|
|
11975
11791
|
}
|
|
11976
11792
|
if (!(destination === 'Ethereum')) {
|
|
@@ -11987,24 +11803,18 @@ var send = /*#__PURE__*/function () {
|
|
|
11987
11803
|
case 2:
|
|
11988
11804
|
isLocalTransfer = origin === destination;
|
|
11989
11805
|
if (!isLocalTransfer) {
|
|
11990
|
-
_context.n =
|
|
11991
|
-
break;
|
|
11992
|
-
}
|
|
11993
|
-
if (!(origin === 'Polkadot')) {
|
|
11994
|
-
_context.n = 3;
|
|
11806
|
+
_context.n = 5;
|
|
11995
11807
|
break;
|
|
11996
11808
|
}
|
|
11997
|
-
throw new InvalidParameterError('Local transfers on Polkadot relay chain are temporarily disabled.');
|
|
11998
|
-
case 3:
|
|
11999
11809
|
if (!sdkCommon.isTLocation(address)) {
|
|
12000
|
-
_context.n =
|
|
11810
|
+
_context.n = 3;
|
|
12001
11811
|
break;
|
|
12002
11812
|
}
|
|
12003
11813
|
throw new InvalidAddressError('Location address is not supported for local transfers.');
|
|
12004
|
-
case
|
|
12005
|
-
_context.n =
|
|
11814
|
+
case 3:
|
|
11815
|
+
_context.n = 4;
|
|
12006
11816
|
return api.init(origin, TX_CLIENT_TIMEOUT_MS);
|
|
12007
|
-
case
|
|
11817
|
+
case 4:
|
|
12008
11818
|
return _context.a(2, api.callTxMethod(isAmountAll ? {
|
|
12009
11819
|
module: 'Balances',
|
|
12010
11820
|
method: 'transfer_all',
|
|
@@ -12024,7 +11834,7 @@ var send = /*#__PURE__*/function () {
|
|
|
12024
11834
|
value: finalAmount
|
|
12025
11835
|
}
|
|
12026
11836
|
}));
|
|
12027
|
-
case
|
|
11837
|
+
case 5:
|
|
12028
11838
|
return _context.a(2, transferRelayToPara({
|
|
12029
11839
|
api: api,
|
|
12030
11840
|
origin: origin,
|
|
@@ -12040,11 +11850,11 @@ var send = /*#__PURE__*/function () {
|
|
|
12040
11850
|
pallet: pallet,
|
|
12041
11851
|
method: method
|
|
12042
11852
|
}));
|
|
12043
|
-
case
|
|
11853
|
+
case 6:
|
|
12044
11854
|
overriddenAsset = resolveOverriddenAsset(options, isBridge, assetCheckEnabled, resolvedFeeAsset);
|
|
12045
|
-
_context.n =
|
|
11855
|
+
_context.n = 7;
|
|
12046
11856
|
return api.init(origin, TX_CLIENT_TIMEOUT_MS);
|
|
12047
|
-
case
|
|
11857
|
+
case 7:
|
|
12048
11858
|
// In case asset check is disabled, we create asset object from currency symbol
|
|
12049
11859
|
resolvedAsset = asset !== null && asset !== void 0 ? asset : {
|
|
12050
11860
|
symbol: 'symbol' in currency ? currency.symbol : undefined
|
package/dist/index.d.ts
CHANGED
|
@@ -1581,9 +1581,7 @@ declare class AssetHubKusama<TApi, TRes> extends Parachain<TApi, TRes> implement
|
|
|
1581
1581
|
getMethod(scenario: TScenario, destination: TDestination): TPolkadotXcmMethod;
|
|
1582
1582
|
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
1583
1583
|
createCurrencySpec(amount: bigint, scenario: TScenario, version: Version, asset?: TAssetInfo, isOverridenAsset?: boolean): _paraspell_assets.TAsset;
|
|
1584
|
-
transferLocal(_options: TSendInternalOptions<TApi, TRes>): Promise<TRes>;
|
|
1585
1584
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
1586
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1587
1585
|
}
|
|
1588
1586
|
|
|
1589
1587
|
declare class AssetHubPolkadot<TApi, TRes> extends Parachain<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
@@ -1595,23 +1593,16 @@ declare class AssetHubPolkadot<TApi, TRes> extends Parachain<TApi, TRes> impleme
|
|
|
1595
1593
|
private getMethod;
|
|
1596
1594
|
transferPolkadotXCM<TApi, TRes>(options: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1597
1595
|
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
1598
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1599
|
-
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
1600
|
-
transferLocal(_options: TSendInternalOptions<TApi, TRes>): Promise<TRes>;
|
|
1601
1596
|
createCurrencySpec(amount: bigint, scenario: TScenario, version: Version, asset?: TAssetInfo, isOverriddenAsset?: boolean): _paraspell_assets.TAsset;
|
|
1602
1597
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
1603
1598
|
}
|
|
1604
1599
|
|
|
1605
1600
|
declare class AssetHubPaseo<TApi, TRes> extends AssetHubPolkadot<TApi, TRes> {
|
|
1606
1601
|
constructor();
|
|
1607
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1608
|
-
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
1609
1602
|
}
|
|
1610
1603
|
|
|
1611
1604
|
declare class AssetHubWestend<TApi, TRes> extends AssetHubPolkadot<TApi, TRes> {
|
|
1612
1605
|
constructor();
|
|
1613
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1614
|
-
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
1615
1606
|
}
|
|
1616
1607
|
|
|
1617
1608
|
declare class Astar<TApi, TRes> extends Parachain<TApi, TRes> implements IPolkadotXCMTransfer, IXTokensTransfer {
|
|
@@ -1701,21 +1692,14 @@ declare class BridgeHubPolkadot<TApi, TRes> extends Parachain<TApi, TRes> implem
|
|
|
1701
1692
|
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
1702
1693
|
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1703
1694
|
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
1704
|
-
transferLocal(_options: TSendInternalOptions<TApi, TRes>): Promise<TRes>;
|
|
1705
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1706
|
-
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
1707
1695
|
}
|
|
1708
1696
|
|
|
1709
1697
|
declare class BridgeHubPaseo<TApi, TRes> extends BridgeHubPolkadot<TApi, TRes> {
|
|
1710
1698
|
constructor();
|
|
1711
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1712
|
-
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
1713
1699
|
}
|
|
1714
1700
|
|
|
1715
1701
|
declare class BridgeHubWestend<TApi, TRes> extends BridgeHubPolkadot<TApi, TRes> {
|
|
1716
1702
|
constructor();
|
|
1717
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1718
|
-
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
1719
1703
|
}
|
|
1720
1704
|
|
|
1721
1705
|
declare class Centrifuge<TApi, TRes> extends Parachain<TApi, TRes> implements IXTokensTransfer {
|
|
@@ -1728,16 +1712,11 @@ declare class Centrifuge<TApi, TRes> extends Parachain<TApi, TRes> implements IX
|
|
|
1728
1712
|
declare class Collectives<TApi, TRes> extends Parachain<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
1729
1713
|
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
1730
1714
|
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1731
|
-
transferLocal(_options: TSendInternalOptions<TApi, TRes>): Promise<TRes>;
|
|
1732
1715
|
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
1733
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1734
|
-
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
1735
1716
|
}
|
|
1736
1717
|
|
|
1737
1718
|
declare class CollectivesWestend<TApi, TRes> extends Collectives<TApi, TRes> {
|
|
1738
1719
|
constructor();
|
|
1739
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1740
|
-
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
1741
1720
|
}
|
|
1742
1721
|
|
|
1743
1722
|
declare class ComposableFinance<TApi, TRes> extends Parachain<TApi, TRes> implements IXTokensTransfer {
|
|
@@ -1758,21 +1737,14 @@ declare class CoretimePolkadot<TApi, TRes> extends Parachain<TApi, TRes> impleme
|
|
|
1758
1737
|
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1759
1738
|
canReceiveFrom(origin: TChain): boolean;
|
|
1760
1739
|
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
1761
|
-
transferLocal(_options: TSendInternalOptions<TApi, TRes>): Promise<TRes>;
|
|
1762
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1763
|
-
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
1764
1740
|
}
|
|
1765
1741
|
|
|
1766
1742
|
declare class CoretimePaseo<TApi, TRes> extends CoretimePolkadot<TApi, TRes> {
|
|
1767
1743
|
constructor();
|
|
1768
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1769
|
-
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
1770
1744
|
}
|
|
1771
1745
|
|
|
1772
1746
|
declare class CoretimeWestend<TApi, TRes> extends CoretimePolkadot<TApi, TRes> {
|
|
1773
1747
|
constructor();
|
|
1774
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1775
|
-
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
1776
1748
|
}
|
|
1777
1749
|
|
|
1778
1750
|
declare class Crab<TApi, TRes> extends Parachain<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
@@ -1969,9 +1941,6 @@ declare class PeoplePolkadot<TApi, TRes> extends Parachain<TApi, TRes> implement
|
|
|
1969
1941
|
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
1970
1942
|
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1971
1943
|
getRelayToParaOverrides(): TRelayToParaOverrides;
|
|
1972
|
-
transferLocal(_options: TSendInternalOptions<TApi, TRes>): Promise<TRes>;
|
|
1973
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1974
|
-
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
1975
1944
|
}
|
|
1976
1945
|
|
|
1977
1946
|
declare class PAssetHub<TApi, TRes> extends PeoplePolkadot<TApi, TRes> {
|
|
@@ -2007,14 +1976,10 @@ declare class PeopleKusama<TApi, TRes> extends Parachain<TApi, TRes> implements
|
|
|
2007
1976
|
|
|
2008
1977
|
declare class PeoplePaseo<TApi, TRes> extends PeoplePolkadot<TApi, TRes> {
|
|
2009
1978
|
constructor();
|
|
2010
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
2011
|
-
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
2012
1979
|
}
|
|
2013
1980
|
|
|
2014
1981
|
declare class PeopleWestend<TApi, TRes> extends PeoplePolkadot<TApi, TRes> {
|
|
2015
1982
|
constructor();
|
|
2016
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
2017
|
-
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
2018
1983
|
}
|
|
2019
1984
|
|
|
2020
1985
|
declare class Phala<TApi, TRes> extends Parachain<TApi, TRes> implements IXTransferTransfer {
|
package/dist/index.mjs
CHANGED
|
@@ -6638,32 +6638,26 @@ var Parachain = /*#__PURE__*/function () {
|
|
|
6638
6638
|
case 0:
|
|
6639
6639
|
api = options.api, version = options.version, pallet = options.pallet, assetInfo = options.assetInfo, address = options.address, senderAddress = options.senderAddress, destination = options.destination, paraIdTo = options.paraIdTo, methodOverride = options.method;
|
|
6640
6640
|
_this$getRelayToParaO = this.getRelayToParaOverrides(), method = _this$getRelayToParaO.method, includeFee = _this$getRelayToParaO.includeFee;
|
|
6641
|
-
if (!(getRelayChainOf(this.chain) === 'Polkadot')) {
|
|
6642
|
-
_context2.n = 1;
|
|
6643
|
-
break;
|
|
6644
|
-
}
|
|
6645
|
-
throw new InvalidParameterError("Sending from Polkadot relaychain is temporarily disabled");
|
|
6646
|
-
case 1:
|
|
6647
6641
|
if (!this.isReceivingTempDisabled('RelayToPara')) {
|
|
6648
|
-
_context2.n =
|
|
6642
|
+
_context2.n = 1;
|
|
6649
6643
|
break;
|
|
6650
6644
|
}
|
|
6651
6645
|
throw new InvalidParameterError("Receiving on ".concat(this.chain, " is temporarily disabled"));
|
|
6652
|
-
case
|
|
6646
|
+
case 1:
|
|
6653
6647
|
customMethod = methodOverride !== null && methodOverride !== void 0 ? methodOverride : method;
|
|
6654
6648
|
if (!(customMethod === 'transfer_assets_using_type_and_then')) {
|
|
6655
|
-
_context2.n =
|
|
6649
|
+
_context2.n = 3;
|
|
6656
6650
|
break;
|
|
6657
6651
|
}
|
|
6658
6652
|
paraId = resolveParaId(paraIdTo, destination);
|
|
6659
6653
|
destChain = resolveDestChain(this.chain, paraId);
|
|
6660
6654
|
scenario = 'RelayToPara';
|
|
6661
6655
|
if (destChain) {
|
|
6662
|
-
_context2.n =
|
|
6656
|
+
_context2.n = 2;
|
|
6663
6657
|
break;
|
|
6664
6658
|
}
|
|
6665
6659
|
throw new InvalidParameterError('Cannot override destination when using type and then transfer.');
|
|
6666
|
-
case
|
|
6660
|
+
case 2:
|
|
6667
6661
|
return _context2.a(2, createTypeThenAutoReserve(getRelayChainOf(destChain), _objectSpread2(_objectSpread2({}, options), {}, {
|
|
6668
6662
|
beneficiaryLocation: createBeneficiaryLocation({
|
|
6669
6663
|
api: api,
|
|
@@ -6677,7 +6671,7 @@ var Parachain = /*#__PURE__*/function () {
|
|
|
6677
6671
|
destChain: destChain,
|
|
6678
6672
|
paraIdTo: paraId
|
|
6679
6673
|
})));
|
|
6680
|
-
case
|
|
6674
|
+
case 3:
|
|
6681
6675
|
return _context2.a(2, {
|
|
6682
6676
|
module: pallet !== null && pallet !== void 0 ? pallet : 'XcmPallet',
|
|
6683
6677
|
method: customMethod,
|
|
@@ -7289,21 +7283,11 @@ var AssetHubKusama = /*#__PURE__*/function (_Parachain) {
|
|
|
7289
7283
|
value: function createCurrencySpec(amount, scenario, version, asset, isOverridenAsset) {
|
|
7290
7284
|
return getChain('AssetHubPolkadot').createCurrencySpec(amount, scenario, version, asset, isOverridenAsset);
|
|
7291
7285
|
}
|
|
7292
|
-
}, {
|
|
7293
|
-
key: "transferLocal",
|
|
7294
|
-
value: function transferLocal(_options) {
|
|
7295
|
-
throw new InvalidParameterError("Local transfers on ".concat(this.chain, " are temporarily disabled."));
|
|
7296
|
-
}
|
|
7297
7286
|
}, {
|
|
7298
7287
|
key: "transferLocalNonNativeAsset",
|
|
7299
7288
|
value: function transferLocalNonNativeAsset(options) {
|
|
7300
7289
|
return getChain('AssetHubPolkadot').transferLocalNonNativeAsset(options);
|
|
7301
7290
|
}
|
|
7302
|
-
}, {
|
|
7303
|
-
key: "isSendingTempDisabled",
|
|
7304
|
-
value: function isSendingTempDisabled(_options) {
|
|
7305
|
-
return true;
|
|
7306
|
-
}
|
|
7307
7291
|
}]);
|
|
7308
7292
|
}(Parachain);
|
|
7309
7293
|
|
|
@@ -7581,21 +7565,6 @@ var AssetHubPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
7581
7565
|
includeFee: true
|
|
7582
7566
|
};
|
|
7583
7567
|
}
|
|
7584
|
-
}, {
|
|
7585
|
-
key: "isSendingTempDisabled",
|
|
7586
|
-
value: function isSendingTempDisabled(_options) {
|
|
7587
|
-
return true;
|
|
7588
|
-
}
|
|
7589
|
-
}, {
|
|
7590
|
-
key: "isReceivingTempDisabled",
|
|
7591
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
7592
|
-
return true;
|
|
7593
|
-
}
|
|
7594
|
-
}, {
|
|
7595
|
-
key: "transferLocal",
|
|
7596
|
-
value: function transferLocal(_options) {
|
|
7597
|
-
throw new InvalidParameterError("Local transfers on ".concat(this.chain, " are temporarily disabled."));
|
|
7598
|
-
}
|
|
7599
7568
|
}, {
|
|
7600
7569
|
key: "createCurrencySpec",
|
|
7601
7570
|
value: function createCurrencySpec(amount, scenario, version, asset, isOverriddenAsset) {
|
|
@@ -7683,17 +7652,7 @@ var AssetHubPaseo = /*#__PURE__*/function (_AssetHubPolkadot) {
|
|
|
7683
7652
|
return _callSuper(this, AssetHubPaseo, ['AssetHubPaseo', 'PaseoAssetHub', 'Paseo', Version.V5]);
|
|
7684
7653
|
}
|
|
7685
7654
|
_inherits(AssetHubPaseo, _AssetHubPolkadot);
|
|
7686
|
-
return _createClass(AssetHubPaseo
|
|
7687
|
-
key: "isSendingTempDisabled",
|
|
7688
|
-
value: function isSendingTempDisabled(_options) {
|
|
7689
|
-
return false;
|
|
7690
|
-
}
|
|
7691
|
-
}, {
|
|
7692
|
-
key: "isReceivingTempDisabled",
|
|
7693
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
7694
|
-
return false;
|
|
7695
|
-
}
|
|
7696
|
-
}]);
|
|
7655
|
+
return _createClass(AssetHubPaseo);
|
|
7697
7656
|
}(AssetHubPolkadot);
|
|
7698
7657
|
|
|
7699
7658
|
var AssetHubWestend = /*#__PURE__*/function (_AssetHubPolkadot) {
|
|
@@ -7702,17 +7661,7 @@ var AssetHubWestend = /*#__PURE__*/function (_AssetHubPolkadot) {
|
|
|
7702
7661
|
return _callSuper(this, AssetHubWestend, ['AssetHubWestend', 'WestendAssetHub', 'Westend', Version.V5]);
|
|
7703
7662
|
}
|
|
7704
7663
|
_inherits(AssetHubWestend, _AssetHubPolkadot);
|
|
7705
|
-
return _createClass(AssetHubWestend
|
|
7706
|
-
key: "isSendingTempDisabled",
|
|
7707
|
-
value: function isSendingTempDisabled(_options) {
|
|
7708
|
-
return false;
|
|
7709
|
-
}
|
|
7710
|
-
}, {
|
|
7711
|
-
key: "isReceivingTempDisabled",
|
|
7712
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
7713
|
-
return false;
|
|
7714
|
-
}
|
|
7715
|
-
}]);
|
|
7664
|
+
return _createClass(AssetHubWestend);
|
|
7716
7665
|
}(AssetHubPolkadot);
|
|
7717
7666
|
|
|
7718
7667
|
var Astar = /*#__PURE__*/function (_Parachain) {
|
|
@@ -7904,12 +7853,9 @@ var BifrostPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
7904
7853
|
}, {
|
|
7905
7854
|
key: "transferPolkadotXCM",
|
|
7906
7855
|
value: function transferPolkadotXCM(options) {
|
|
7907
|
-
var destination = options.destination
|
|
7908
|
-
scenario = options.scenario;
|
|
7856
|
+
var destination = options.destination;
|
|
7909
7857
|
if (destination === 'Ethereum') {
|
|
7910
|
-
|
|
7911
|
-
//return this.transferToEthereum(options)
|
|
7912
|
-
throw new ScenarioNotSupportedError(this.chain, scenario, 'Snowbridge is temporarily disabled.');
|
|
7858
|
+
return this.transferToEthereum(options);
|
|
7913
7859
|
}
|
|
7914
7860
|
return this.transferToAssetHub(options);
|
|
7915
7861
|
}
|
|
@@ -8022,21 +7968,6 @@ var BridgeHubPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
8022
7968
|
includeFee: true
|
|
8023
7969
|
};
|
|
8024
7970
|
}
|
|
8025
|
-
}, {
|
|
8026
|
-
key: "transferLocal",
|
|
8027
|
-
value: function transferLocal(_options) {
|
|
8028
|
-
throw new InvalidParameterError("Local transfers on ".concat(this.chain, " are temporarily disabled."));
|
|
8029
|
-
}
|
|
8030
|
-
}, {
|
|
8031
|
-
key: "isSendingTempDisabled",
|
|
8032
|
-
value: function isSendingTempDisabled(_options) {
|
|
8033
|
-
return true;
|
|
8034
|
-
}
|
|
8035
|
-
}, {
|
|
8036
|
-
key: "isReceivingTempDisabled",
|
|
8037
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
8038
|
-
return true;
|
|
8039
|
-
}
|
|
8040
7971
|
}]);
|
|
8041
7972
|
}(Parachain);
|
|
8042
7973
|
|
|
@@ -8046,17 +7977,7 @@ var BridgeHubPaseo = /*#__PURE__*/function (_BridgeHubPolkadot) {
|
|
|
8046
7977
|
return _callSuper(this, BridgeHubPaseo, ['BridgeHubPaseo', 'PaseoBridgeHub', 'Paseo', Version.V5]);
|
|
8047
7978
|
}
|
|
8048
7979
|
_inherits(BridgeHubPaseo, _BridgeHubPolkadot);
|
|
8049
|
-
return _createClass(BridgeHubPaseo
|
|
8050
|
-
key: "isSendingTempDisabled",
|
|
8051
|
-
value: function isSendingTempDisabled(_options) {
|
|
8052
|
-
return false;
|
|
8053
|
-
}
|
|
8054
|
-
}, {
|
|
8055
|
-
key: "isReceivingTempDisabled",
|
|
8056
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
8057
|
-
return false;
|
|
8058
|
-
}
|
|
8059
|
-
}]);
|
|
7980
|
+
return _createClass(BridgeHubPaseo);
|
|
8060
7981
|
}(BridgeHubPolkadot);
|
|
8061
7982
|
|
|
8062
7983
|
var BridgeHubWestend = /*#__PURE__*/function (_BridgeHubPolkadot) {
|
|
@@ -8065,17 +7986,7 @@ var BridgeHubWestend = /*#__PURE__*/function (_BridgeHubPolkadot) {
|
|
|
8065
7986
|
return _callSuper(this, BridgeHubWestend, ['BridgeHubWestend', 'westendBridgeHub', 'Westend', Version.V5]);
|
|
8066
7987
|
}
|
|
8067
7988
|
_inherits(BridgeHubWestend, _BridgeHubPolkadot);
|
|
8068
|
-
return _createClass(BridgeHubWestend
|
|
8069
|
-
key: "isSendingTempDisabled",
|
|
8070
|
-
value: function isSendingTempDisabled(_options) {
|
|
8071
|
-
return false;
|
|
8072
|
-
}
|
|
8073
|
-
}, {
|
|
8074
|
-
key: "isReceivingTempDisabled",
|
|
8075
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
8076
|
-
return false;
|
|
8077
|
-
}
|
|
8078
|
-
}]);
|
|
7989
|
+
return _createClass(BridgeHubWestend);
|
|
8079
7990
|
}(BridgeHubPolkadot);
|
|
8080
7991
|
|
|
8081
7992
|
var Centrifuge = /*#__PURE__*/function (_Parachain) {
|
|
@@ -8155,11 +8066,6 @@ var Collectives = /*#__PURE__*/function (_Parachain) {
|
|
|
8155
8066
|
}
|
|
8156
8067
|
return transferPolkadotXcm(input, 'limited_teleport_assets', 'Unlimited');
|
|
8157
8068
|
}
|
|
8158
|
-
}, {
|
|
8159
|
-
key: "transferLocal",
|
|
8160
|
-
value: function transferLocal(_options) {
|
|
8161
|
-
throw new InvalidParameterError("Local transfers on ".concat(this.chain, " are temporarily disabled."));
|
|
8162
|
-
}
|
|
8163
8069
|
}, {
|
|
8164
8070
|
key: "getRelayToParaOverrides",
|
|
8165
8071
|
value: function getRelayToParaOverrides() {
|
|
@@ -8168,16 +8074,6 @@ var Collectives = /*#__PURE__*/function (_Parachain) {
|
|
|
8168
8074
|
includeFee: true
|
|
8169
8075
|
};
|
|
8170
8076
|
}
|
|
8171
|
-
}, {
|
|
8172
|
-
key: "isSendingTempDisabled",
|
|
8173
|
-
value: function isSendingTempDisabled(_options) {
|
|
8174
|
-
return true;
|
|
8175
|
-
}
|
|
8176
|
-
}, {
|
|
8177
|
-
key: "isReceivingTempDisabled",
|
|
8178
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
8179
|
-
return true;
|
|
8180
|
-
}
|
|
8181
8077
|
}]);
|
|
8182
8078
|
}(Parachain);
|
|
8183
8079
|
|
|
@@ -8187,17 +8083,7 @@ var CollectivesWestend = /*#__PURE__*/function (_Collectives) {
|
|
|
8187
8083
|
return _callSuper(this, CollectivesWestend, ['CollectivesWestend', 'westendCollectives', 'Westend', Version.V5]);
|
|
8188
8084
|
}
|
|
8189
8085
|
_inherits(CollectivesWestend, _Collectives);
|
|
8190
|
-
return _createClass(CollectivesWestend
|
|
8191
|
-
key: "isSendingTempDisabled",
|
|
8192
|
-
value: function isSendingTempDisabled(_options) {
|
|
8193
|
-
return false;
|
|
8194
|
-
}
|
|
8195
|
-
}, {
|
|
8196
|
-
key: "isReceivingTempDisabled",
|
|
8197
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
8198
|
-
return false;
|
|
8199
|
-
}
|
|
8200
|
-
}]);
|
|
8086
|
+
return _createClass(CollectivesWestend);
|
|
8201
8087
|
}(Collectives);
|
|
8202
8088
|
|
|
8203
8089
|
var ComposableFinance = /*#__PURE__*/function (_Parachain) {
|
|
@@ -8284,21 +8170,6 @@ var CoretimePolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
8284
8170
|
includeFee: true
|
|
8285
8171
|
};
|
|
8286
8172
|
}
|
|
8287
|
-
}, {
|
|
8288
|
-
key: "transferLocal",
|
|
8289
|
-
value: function transferLocal(_options) {
|
|
8290
|
-
throw new InvalidParameterError("Local transfers on ".concat(this.chain, " are temporarily disabled."));
|
|
8291
|
-
}
|
|
8292
|
-
}, {
|
|
8293
|
-
key: "isSendingTempDisabled",
|
|
8294
|
-
value: function isSendingTempDisabled(_options) {
|
|
8295
|
-
return true;
|
|
8296
|
-
}
|
|
8297
|
-
}, {
|
|
8298
|
-
key: "isReceivingTempDisabled",
|
|
8299
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
8300
|
-
return true;
|
|
8301
|
-
}
|
|
8302
8173
|
}]);
|
|
8303
8174
|
}(Parachain);
|
|
8304
8175
|
|
|
@@ -8308,17 +8179,7 @@ var CoretimePaseo = /*#__PURE__*/function (_CoretimePolkadot) {
|
|
|
8308
8179
|
return _callSuper(this, CoretimePaseo, ['CoretimePaseo', 'PaseoCoretime', 'Paseo', Version.V5]);
|
|
8309
8180
|
}
|
|
8310
8181
|
_inherits(CoretimePaseo, _CoretimePolkadot);
|
|
8311
|
-
return _createClass(CoretimePaseo
|
|
8312
|
-
key: "isSendingTempDisabled",
|
|
8313
|
-
value: function isSendingTempDisabled(_options) {
|
|
8314
|
-
return false;
|
|
8315
|
-
}
|
|
8316
|
-
}, {
|
|
8317
|
-
key: "isReceivingTempDisabled",
|
|
8318
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
8319
|
-
return false;
|
|
8320
|
-
}
|
|
8321
|
-
}]);
|
|
8182
|
+
return _createClass(CoretimePaseo);
|
|
8322
8183
|
}(CoretimePolkadot);
|
|
8323
8184
|
|
|
8324
8185
|
var CoretimeWestend = /*#__PURE__*/function (_CoretimePolkadot) {
|
|
@@ -8327,17 +8188,7 @@ var CoretimeWestend = /*#__PURE__*/function (_CoretimePolkadot) {
|
|
|
8327
8188
|
return _callSuper(this, CoretimeWestend, ['CoretimeWestend', 'westendCoretime', 'Westend', Version.V5]);
|
|
8328
8189
|
}
|
|
8329
8190
|
_inherits(CoretimeWestend, _CoretimePolkadot);
|
|
8330
|
-
return _createClass(CoretimeWestend
|
|
8331
|
-
key: "isSendingTempDisabled",
|
|
8332
|
-
value: function isSendingTempDisabled(_options) {
|
|
8333
|
-
return false;
|
|
8334
|
-
}
|
|
8335
|
-
}, {
|
|
8336
|
-
key: "isReceivingTempDisabled",
|
|
8337
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
8338
|
-
return false;
|
|
8339
|
-
}
|
|
8340
|
-
}]);
|
|
8191
|
+
return _createClass(CoretimeWestend);
|
|
8341
8192
|
}(CoretimePolkadot);
|
|
8342
8193
|
|
|
8343
8194
|
var Crab = /*#__PURE__*/function (_Parachain) {
|
|
@@ -8726,16 +8577,16 @@ var Hydration = /*#__PURE__*/function (_Parachain) {
|
|
|
8726
8577
|
key: "transferPolkadotXCM",
|
|
8727
8578
|
value: function () {
|
|
8728
8579
|
var _transferPolkadotXCM = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(input) {
|
|
8729
|
-
var api, destination,
|
|
8580
|
+
var api, destination, feeAsset, asset, overriddenAsset, isNativeAsset, isNativeFeeAsset, _t;
|
|
8730
8581
|
return _regenerator().w(function (_context) {
|
|
8731
8582
|
while (1) switch (_context.n) {
|
|
8732
8583
|
case 0:
|
|
8733
|
-
api = input.api, destination = input.destination,
|
|
8584
|
+
api = input.api, destination = input.destination, feeAsset = input.feeAssetInfo, asset = input.assetInfo, overriddenAsset = input.overriddenAsset;
|
|
8734
8585
|
if (!(destination === 'Ethereum')) {
|
|
8735
8586
|
_context.n = 1;
|
|
8736
8587
|
break;
|
|
8737
8588
|
}
|
|
8738
|
-
|
|
8589
|
+
return _context.a(2, this.transferToEthereum(input));
|
|
8739
8590
|
case 1:
|
|
8740
8591
|
if (!feeAsset) {
|
|
8741
8592
|
_context.n = 4;
|
|
@@ -9308,7 +9159,7 @@ var Moonbeam = /*#__PURE__*/function (_Parachain) {
|
|
|
9308
9159
|
_context.n = 1;
|
|
9309
9160
|
break;
|
|
9310
9161
|
}
|
|
9311
|
-
|
|
9162
|
+
return _context.a(2, this.transferToEthereum(input));
|
|
9312
9163
|
case 1:
|
|
9313
9164
|
if (!isSymbolMatch(assetInfo.symbol, getRelayChainSymbol(this.chain))) {
|
|
9314
9165
|
_context.n = 3;
|
|
@@ -9639,21 +9490,6 @@ var PeoplePolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
9639
9490
|
includeFee: true
|
|
9640
9491
|
};
|
|
9641
9492
|
}
|
|
9642
|
-
}, {
|
|
9643
|
-
key: "transferLocal",
|
|
9644
|
-
value: function transferLocal(_options) {
|
|
9645
|
-
throw new InvalidParameterError("Local transfers on ".concat(this.chain, " are temporarily disabled."));
|
|
9646
|
-
}
|
|
9647
|
-
}, {
|
|
9648
|
-
key: "isSendingTempDisabled",
|
|
9649
|
-
value: function isSendingTempDisabled(_options) {
|
|
9650
|
-
return true;
|
|
9651
|
-
}
|
|
9652
|
-
}, {
|
|
9653
|
-
key: "isReceivingTempDisabled",
|
|
9654
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
9655
|
-
return true;
|
|
9656
|
-
}
|
|
9657
9493
|
}]);
|
|
9658
9494
|
}(Parachain);
|
|
9659
9495
|
|
|
@@ -9819,17 +9655,7 @@ var PeoplePaseo = /*#__PURE__*/function (_PeoplePolkadot) {
|
|
|
9819
9655
|
return _callSuper(this, PeoplePaseo, ['PeoplePaseo', 'PaseoPeopleChain', 'Paseo', Version.V5]);
|
|
9820
9656
|
}
|
|
9821
9657
|
_inherits(PeoplePaseo, _PeoplePolkadot);
|
|
9822
|
-
return _createClass(PeoplePaseo
|
|
9823
|
-
key: "isSendingTempDisabled",
|
|
9824
|
-
value: function isSendingTempDisabled(_options) {
|
|
9825
|
-
return false;
|
|
9826
|
-
}
|
|
9827
|
-
}, {
|
|
9828
|
-
key: "isReceivingTempDisabled",
|
|
9829
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
9830
|
-
return false;
|
|
9831
|
-
}
|
|
9832
|
-
}]);
|
|
9658
|
+
return _createClass(PeoplePaseo);
|
|
9833
9659
|
}(PeoplePolkadot);
|
|
9834
9660
|
|
|
9835
9661
|
var PeopleWestend = /*#__PURE__*/function (_PeoplePolkadot) {
|
|
@@ -9838,17 +9664,7 @@ var PeopleWestend = /*#__PURE__*/function (_PeoplePolkadot) {
|
|
|
9838
9664
|
return _callSuper(this, PeopleWestend, ['PeopleWestend', 'westendPeople', 'Westend', Version.V5]);
|
|
9839
9665
|
}
|
|
9840
9666
|
_inherits(PeopleWestend, _PeoplePolkadot);
|
|
9841
|
-
return _createClass(PeopleWestend
|
|
9842
|
-
key: "isSendingTempDisabled",
|
|
9843
|
-
value: function isSendingTempDisabled(_options) {
|
|
9844
|
-
return false;
|
|
9845
|
-
}
|
|
9846
|
-
}, {
|
|
9847
|
-
key: "isReceivingTempDisabled",
|
|
9848
|
-
value: function isReceivingTempDisabled(_scenario) {
|
|
9849
|
-
return false;
|
|
9850
|
-
}
|
|
9851
|
-
}]);
|
|
9667
|
+
return _createClass(PeopleWestend);
|
|
9852
9668
|
}(PeoplePolkadot);
|
|
9853
9669
|
|
|
9854
9670
|
var determineDestWeight = function determineDestWeight(destChain) {
|
|
@@ -11971,7 +11787,7 @@ var send = /*#__PURE__*/function () {
|
|
|
11971
11787
|
destVersion = !isTLocation(destination) ? getChainVersion(destination) : undefined;
|
|
11972
11788
|
resolvedVersion = selectXcmVersion(version, originVersion, destVersion);
|
|
11973
11789
|
if (!isRelayChain(origin)) {
|
|
11974
|
-
_context.n =
|
|
11790
|
+
_context.n = 6;
|
|
11975
11791
|
break;
|
|
11976
11792
|
}
|
|
11977
11793
|
if (!(destination === 'Ethereum')) {
|
|
@@ -11988,24 +11804,18 @@ var send = /*#__PURE__*/function () {
|
|
|
11988
11804
|
case 2:
|
|
11989
11805
|
isLocalTransfer = origin === destination;
|
|
11990
11806
|
if (!isLocalTransfer) {
|
|
11991
|
-
_context.n =
|
|
11992
|
-
break;
|
|
11993
|
-
}
|
|
11994
|
-
if (!(origin === 'Polkadot')) {
|
|
11995
|
-
_context.n = 3;
|
|
11807
|
+
_context.n = 5;
|
|
11996
11808
|
break;
|
|
11997
11809
|
}
|
|
11998
|
-
throw new InvalidParameterError('Local transfers on Polkadot relay chain are temporarily disabled.');
|
|
11999
|
-
case 3:
|
|
12000
11810
|
if (!isTLocation(address)) {
|
|
12001
|
-
_context.n =
|
|
11811
|
+
_context.n = 3;
|
|
12002
11812
|
break;
|
|
12003
11813
|
}
|
|
12004
11814
|
throw new InvalidAddressError('Location address is not supported for local transfers.');
|
|
12005
|
-
case
|
|
12006
|
-
_context.n =
|
|
11815
|
+
case 3:
|
|
11816
|
+
_context.n = 4;
|
|
12007
11817
|
return api.init(origin, TX_CLIENT_TIMEOUT_MS);
|
|
12008
|
-
case
|
|
11818
|
+
case 4:
|
|
12009
11819
|
return _context.a(2, api.callTxMethod(isAmountAll ? {
|
|
12010
11820
|
module: 'Balances',
|
|
12011
11821
|
method: 'transfer_all',
|
|
@@ -12025,7 +11835,7 @@ var send = /*#__PURE__*/function () {
|
|
|
12025
11835
|
value: finalAmount
|
|
12026
11836
|
}
|
|
12027
11837
|
}));
|
|
12028
|
-
case
|
|
11838
|
+
case 5:
|
|
12029
11839
|
return _context.a(2, transferRelayToPara({
|
|
12030
11840
|
api: api,
|
|
12031
11841
|
origin: origin,
|
|
@@ -12041,11 +11851,11 @@ var send = /*#__PURE__*/function () {
|
|
|
12041
11851
|
pallet: pallet,
|
|
12042
11852
|
method: method
|
|
12043
11853
|
}));
|
|
12044
|
-
case
|
|
11854
|
+
case 6:
|
|
12045
11855
|
overriddenAsset = resolveOverriddenAsset(options, isBridge, assetCheckEnabled, resolvedFeeAsset);
|
|
12046
|
-
_context.n =
|
|
11856
|
+
_context.n = 7;
|
|
12047
11857
|
return api.init(origin, TX_CLIENT_TIMEOUT_MS);
|
|
12048
|
-
case
|
|
11858
|
+
case 7:
|
|
12049
11859
|
// In case asset check is disabled, we create asset object from currency symbol
|
|
12050
11860
|
resolvedAsset = asset !== null && asset !== void 0 ? asset : {
|
|
12051
11861
|
symbol: 'symbol' in currency ? currency.symbol : undefined
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk-core",
|
|
3
|
-
"version": "11.12.
|
|
3
|
+
"version": "11.12.13",
|
|
4
4
|
"description": "SDK core for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"@noble/hashes": "^1.8.0",
|
|
27
27
|
"@scure/base": "^2.0.0",
|
|
28
28
|
"viem": "^2.38.5",
|
|
29
|
-
"@paraspell/assets": "11.12.
|
|
30
|
-
"@paraspell/
|
|
31
|
-
"@paraspell/
|
|
29
|
+
"@paraspell/assets": "11.12.13",
|
|
30
|
+
"@paraspell/sdk-common": "11.12.13",
|
|
31
|
+
"@paraspell/pallets": "11.12.13"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/plugin-syntax-import-attributes": "^7.27.1",
|