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