@paraspell/sdk-core 11.12.15 → 11.14.0
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 +120 -77
- package/dist/index.d.ts +63 -19
- package/dist/index.mjs +121 -78
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1141,6 +1141,7 @@ exports.XTokensError = void 0;
|
|
|
1141
1141
|
XTokensError["MinXcmFeeNotDefined"] = "MinXcmFeeNotDefined";
|
|
1142
1142
|
XTokensError["RateLimited"] = "RateLimited";
|
|
1143
1143
|
})(exports.XTokensError || (exports.XTokensError = {}));
|
|
1144
|
+
// Mirrors https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/pallet-xcm/src/errors.rs
|
|
1144
1145
|
exports.PolkadotXcmError = void 0;
|
|
1145
1146
|
(function (PolkadotXcmError) {
|
|
1146
1147
|
PolkadotXcmError["Unreachable"] = "Unreachable";
|
|
@@ -1173,6 +1174,50 @@ exports.PolkadotXcmError = void 0;
|
|
|
1173
1174
|
PolkadotXcmError["AliasNotFound"] = "AliasNotFound";
|
|
1174
1175
|
PolkadotXcmError["LocalExecutionIncompleteWithError"] = "LocalExecutionIncompleteWithError";
|
|
1175
1176
|
})(exports.PolkadotXcmError || (exports.PolkadotXcmError = {}));
|
|
1177
|
+
exports.PolkadotXcmExecutionError = void 0;
|
|
1178
|
+
(function (PolkadotXcmExecutionError) {
|
|
1179
|
+
PolkadotXcmExecutionError["Overflow"] = "Overflow";
|
|
1180
|
+
PolkadotXcmExecutionError["Unimplemented"] = "Unimplemented";
|
|
1181
|
+
PolkadotXcmExecutionError["UntrustedReserveLocation"] = "UntrustedReserveLocation";
|
|
1182
|
+
PolkadotXcmExecutionError["UntrustedTeleportLocation"] = "UntrustedTeleportLocation";
|
|
1183
|
+
PolkadotXcmExecutionError["LocationFull"] = "LocationFull";
|
|
1184
|
+
PolkadotXcmExecutionError["LocationNotInvertible"] = "LocationNotInvertible";
|
|
1185
|
+
PolkadotXcmExecutionError["BadOrigin"] = "BadOrigin";
|
|
1186
|
+
PolkadotXcmExecutionError["InvalidLocation"] = "InvalidLocation";
|
|
1187
|
+
PolkadotXcmExecutionError["AssetNotFound"] = "AssetNotFound";
|
|
1188
|
+
PolkadotXcmExecutionError["FailedToTransactAsset"] = "FailedToTransactAsset";
|
|
1189
|
+
PolkadotXcmExecutionError["NotWithdrawable"] = "NotWithdrawable";
|
|
1190
|
+
PolkadotXcmExecutionError["LocationCannotHold"] = "LocationCannotHold";
|
|
1191
|
+
PolkadotXcmExecutionError["ExceedsMaxMessageSize"] = "ExceedsMaxMessageSize";
|
|
1192
|
+
PolkadotXcmExecutionError["DestinationUnsupported"] = "DestinationUnsupported";
|
|
1193
|
+
PolkadotXcmExecutionError["Transport"] = "Transport";
|
|
1194
|
+
PolkadotXcmExecutionError["Unroutable"] = "Unroutable";
|
|
1195
|
+
PolkadotXcmExecutionError["UnknownClaim"] = "UnknownClaim";
|
|
1196
|
+
PolkadotXcmExecutionError["FailedToDecode"] = "FailedToDecode";
|
|
1197
|
+
PolkadotXcmExecutionError["MaxWeightInvalid"] = "MaxWeightInvalid";
|
|
1198
|
+
PolkadotXcmExecutionError["NotHoldingFees"] = "NotHoldingFees";
|
|
1199
|
+
PolkadotXcmExecutionError["TooExpensive"] = "TooExpensive";
|
|
1200
|
+
PolkadotXcmExecutionError["Trap"] = "Trap";
|
|
1201
|
+
PolkadotXcmExecutionError["ExpectationFalse"] = "ExpectationFalse";
|
|
1202
|
+
PolkadotXcmExecutionError["PalletNotFound"] = "PalletNotFound";
|
|
1203
|
+
PolkadotXcmExecutionError["NameMismatch"] = "NameMismatch";
|
|
1204
|
+
PolkadotXcmExecutionError["VersionIncompatible"] = "VersionIncompatible";
|
|
1205
|
+
PolkadotXcmExecutionError["HoldingWouldOverflow"] = "HoldingWouldOverflow";
|
|
1206
|
+
PolkadotXcmExecutionError["ExportError"] = "ExportError";
|
|
1207
|
+
PolkadotXcmExecutionError["ReanchorFailed"] = "ReanchorFailed";
|
|
1208
|
+
PolkadotXcmExecutionError["NoDeal"] = "NoDeal";
|
|
1209
|
+
PolkadotXcmExecutionError["FeesNotMet"] = "FeesNotMet";
|
|
1210
|
+
PolkadotXcmExecutionError["LockError"] = "LockError";
|
|
1211
|
+
PolkadotXcmExecutionError["NoPermission"] = "NoPermission";
|
|
1212
|
+
PolkadotXcmExecutionError["Unanchored"] = "Unanchored";
|
|
1213
|
+
PolkadotXcmExecutionError["NotDepositable"] = "NotDepositable";
|
|
1214
|
+
PolkadotXcmExecutionError["TooManyAssets"] = "TooManyAssets";
|
|
1215
|
+
PolkadotXcmExecutionError["UnhandledXcmVersion"] = "UnhandledXcmVersion";
|
|
1216
|
+
PolkadotXcmExecutionError["WeightLimitReached"] = "WeightLimitReached";
|
|
1217
|
+
PolkadotXcmExecutionError["Barrier"] = "Barrier";
|
|
1218
|
+
PolkadotXcmExecutionError["WeightNotComputable"] = "WeightNotComputable";
|
|
1219
|
+
PolkadotXcmExecutionError["ExceedsStackLimit"] = "ExceedsStackLimit";
|
|
1220
|
+
})(exports.PolkadotXcmExecutionError || (exports.PolkadotXcmExecutionError = {}));
|
|
1176
1221
|
|
|
1177
1222
|
var resolveModuleError = function resolveModuleError(chain, error) {
|
|
1178
1223
|
var palletDetails = pallets.getSupportedPalletsDetails(chain).find(function (p) {
|
|
@@ -1182,6 +1227,7 @@ var resolveModuleError = function resolveModuleError(chain, error) {
|
|
|
1182
1227
|
throw new InvalidParameterError("Pallet with index ".concat(error.index, " not found"));
|
|
1183
1228
|
}
|
|
1184
1229
|
// Use only the first byte of the error to get the error index
|
|
1230
|
+
// Including 0x prefix
|
|
1185
1231
|
var errorIndex = Number(error.error.slice(0, 4));
|
|
1186
1232
|
var name = palletDetails.name;
|
|
1187
1233
|
if (name !== 'XTokens' && name !== 'PolkadotXcm' && name !== 'XcmPallet') {
|
|
@@ -1191,7 +1237,20 @@ var resolveModuleError = function resolveModuleError(chain, error) {
|
|
|
1191
1237
|
if (!failureReason) {
|
|
1192
1238
|
throw new InvalidParameterError("Error index ".concat(errorIndex, " not found in ").concat(name, " pallet"));
|
|
1193
1239
|
}
|
|
1194
|
-
|
|
1240
|
+
if (failureReason === exports.PolkadotXcmError.LocalExecutionIncompleteWithError) {
|
|
1241
|
+
var subErrorIndex = Number("0x".concat(error.error.slice(6, 8)));
|
|
1242
|
+
var failureSubReason = Object.values(exports.PolkadotXcmExecutionError)[subErrorIndex];
|
|
1243
|
+
if (!failureSubReason) {
|
|
1244
|
+
throw new InvalidParameterError("Sub-error index ".concat(subErrorIndex, " not found in PolkadotXcm pallet"));
|
|
1245
|
+
}
|
|
1246
|
+
return {
|
|
1247
|
+
failureReason: failureReason,
|
|
1248
|
+
failureSubReason: failureSubReason
|
|
1249
|
+
};
|
|
1250
|
+
}
|
|
1251
|
+
return {
|
|
1252
|
+
failureReason: failureReason
|
|
1253
|
+
};
|
|
1195
1254
|
};
|
|
1196
1255
|
|
|
1197
1256
|
var isAssetHub = function isAssetHub(chain) {
|
|
@@ -1228,7 +1287,8 @@ var padFee = function padFee(raw, origin, dest, side) {
|
|
|
1228
1287
|
return mul(raw, 130n, 100n);
|
|
1229
1288
|
};
|
|
1230
1289
|
var padValueBy = function padValueBy(amount, percent) {
|
|
1231
|
-
|
|
1290
|
+
var scaled = BigInt(Math.round(percent * 100)); // 2 decimal precision
|
|
1291
|
+
return amount * (BigInt(10000) + scaled) / BigInt(10000);
|
|
1232
1292
|
};
|
|
1233
1293
|
|
|
1234
1294
|
var resolveScenario = function resolveScenario(origin, destination) {
|
|
@@ -1506,17 +1566,6 @@ var Centrifuge$1 = {
|
|
|
1506
1566
|
}
|
|
1507
1567
|
]
|
|
1508
1568
|
};
|
|
1509
|
-
var ComposableFinance$1 = {
|
|
1510
|
-
name: "Composable Finance",
|
|
1511
|
-
info: "composable",
|
|
1512
|
-
paraId: 2019,
|
|
1513
|
-
providers: [
|
|
1514
|
-
{
|
|
1515
|
-
name: "Composable",
|
|
1516
|
-
endpoint: "wss://rpc.composable.finance"
|
|
1517
|
-
}
|
|
1518
|
-
]
|
|
1519
|
-
};
|
|
1520
1569
|
var Darwinia$1 = {
|
|
1521
1570
|
name: "Darwinia",
|
|
1522
1571
|
info: "darwinia",
|
|
@@ -2899,7 +2948,6 @@ var configs = {
|
|
|
2899
2948
|
BifrostPolkadot: BifrostPolkadot$1,
|
|
2900
2949
|
BridgeHubPolkadot: BridgeHubPolkadot$1,
|
|
2901
2950
|
Centrifuge: Centrifuge$1,
|
|
2902
|
-
ComposableFinance: ComposableFinance$1,
|
|
2903
2951
|
Darwinia: Darwinia$1,
|
|
2904
2952
|
EnergyWebX: EnergyWebX$1,
|
|
2905
2953
|
Hydration: Hydration$1,
|
|
@@ -3268,6 +3316,7 @@ var getAssetReserveChain = function getAssetReserveChain(chain, assetLocation) {
|
|
|
3268
3316
|
}
|
|
3269
3317
|
return resolvedChain;
|
|
3270
3318
|
}
|
|
3319
|
+
if (sdkCommon.isRelayChain(chain)) return chain;
|
|
3271
3320
|
var relaychain = getRelayChainOf(chain);
|
|
3272
3321
|
var ahChain = "AssetHub".concat(relaychain);
|
|
3273
3322
|
if (hasGlobalConsensusJunction) {
|
|
@@ -4419,7 +4468,8 @@ var getDestXcmFee = /*#__PURE__*/function () {
|
|
|
4419
4468
|
break;
|
|
4420
4469
|
}
|
|
4421
4470
|
return _context3.a(2, {
|
|
4422
|
-
dryRunError: dryRunResult.failureReason
|
|
4471
|
+
dryRunError: dryRunResult.failureReason,
|
|
4472
|
+
dryRunSubError: dryRunResult.failureSubReason
|
|
4423
4473
|
});
|
|
4424
4474
|
case 5:
|
|
4425
4475
|
_context3.n = 6;
|
|
@@ -4430,6 +4480,7 @@ var getDestXcmFee = /*#__PURE__*/function () {
|
|
|
4430
4480
|
fee: _fee2,
|
|
4431
4481
|
feeType: 'paymentInfo',
|
|
4432
4482
|
dryRunError: dryRunResult.failureReason,
|
|
4483
|
+
dryRunSubError: dryRunResult.failureSubReason,
|
|
4433
4484
|
sufficient: false,
|
|
4434
4485
|
asset: asset,
|
|
4435
4486
|
currency: asset.symbol
|
|
@@ -4684,7 +4735,8 @@ var getFailureInfo$1 = function getFailureInfo(result) {
|
|
|
4684
4735
|
if (chainResult && chainResult.success === false && chainResult.failureReason) {
|
|
4685
4736
|
return {
|
|
4686
4737
|
failureChain: chain,
|
|
4687
|
-
failureReason: chainResult.failureReason
|
|
4738
|
+
failureReason: chainResult.failureReason,
|
|
4739
|
+
failureSubReason: chainResult.failureSubReason
|
|
4688
4740
|
};
|
|
4689
4741
|
}
|
|
4690
4742
|
}
|
|
@@ -4695,7 +4747,8 @@ var getFailureInfo$1 = function getFailureInfo(result) {
|
|
|
4695
4747
|
}
|
|
4696
4748
|
return {
|
|
4697
4749
|
failureChain: result.failureChain,
|
|
4698
|
-
failureReason: result.failureReason
|
|
4750
|
+
failureReason: result.failureReason,
|
|
4751
|
+
failureSubReason: result.failureSubReason
|
|
4699
4752
|
};
|
|
4700
4753
|
};
|
|
4701
4754
|
|
|
@@ -5456,6 +5509,7 @@ var dryRunInternal = /*#__PURE__*/function () {
|
|
|
5456
5509
|
}
|
|
5457
5510
|
return _context2.a(2, {
|
|
5458
5511
|
failureReason: originDryRun.failureReason,
|
|
5512
|
+
failureSubReason: originDryRun.failureSubReason,
|
|
5459
5513
|
failureChain: 'origin',
|
|
5460
5514
|
origin: originDryRun,
|
|
5461
5515
|
hops: []
|
|
@@ -7711,25 +7765,6 @@ var Basilisk = /*#__PURE__*/function (_Parachain) {
|
|
|
7711
7765
|
}]);
|
|
7712
7766
|
}(Parachain);
|
|
7713
7767
|
|
|
7714
|
-
var BifrostKusama = /*#__PURE__*/function (_Parachain) {
|
|
7715
|
-
function BifrostKusama() {
|
|
7716
|
-
_classCallCheck(this, BifrostKusama);
|
|
7717
|
-
return _callSuper(this, BifrostKusama, ['BifrostKusama', 'bifrost', 'Kusama', sdkCommon.Version.V5]);
|
|
7718
|
-
}
|
|
7719
|
-
_inherits(BifrostKusama, _Parachain);
|
|
7720
|
-
return _createClass(BifrostKusama, [{
|
|
7721
|
-
key: "transferXTokens",
|
|
7722
|
-
value: function transferXTokens(input) {
|
|
7723
|
-
return getChain('BifrostPolkadot').transferXTokens(input);
|
|
7724
|
-
}
|
|
7725
|
-
}, {
|
|
7726
|
-
key: "transferLocalNonNativeAsset",
|
|
7727
|
-
value: function transferLocalNonNativeAsset(options) {
|
|
7728
|
-
return getChain('BifrostPolkadot').transferLocalNonNativeAsset(options);
|
|
7729
|
-
}
|
|
7730
|
-
}]);
|
|
7731
|
-
}(Parachain);
|
|
7732
|
-
|
|
7733
7768
|
var BifrostPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
7734
7769
|
function BifrostPolkadot() {
|
|
7735
7770
|
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'BifrostPolkadot';
|
|
@@ -7751,7 +7786,7 @@ var BifrostPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
7751
7786
|
}
|
|
7752
7787
|
var isVToken = asset.symbol && asset.symbol.startsWith('v');
|
|
7753
7788
|
var isVSToken = asset.symbol && asset.symbol.startsWith('vs');
|
|
7754
|
-
if (!assets.isForeignAsset(asset)) {
|
|
7789
|
+
if (!assets.isForeignAsset(asset) || assets.isForeignAsset(asset) && !asset.assetId) {
|
|
7755
7790
|
return isVToken ? {
|
|
7756
7791
|
VToken: asset.symbol.substring(1)
|
|
7757
7792
|
} : {
|
|
@@ -7831,6 +7866,15 @@ var BifrostPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
7831
7866
|
}]);
|
|
7832
7867
|
}(Parachain);
|
|
7833
7868
|
|
|
7869
|
+
var BifrostKusama = /*#__PURE__*/function (_BifrostPolkadot) {
|
|
7870
|
+
function BifrostKusama() {
|
|
7871
|
+
_classCallCheck(this, BifrostKusama);
|
|
7872
|
+
return _callSuper(this, BifrostKusama, ['BifrostKusama', 'bifrost', 'Kusama', sdkCommon.Version.V5]);
|
|
7873
|
+
}
|
|
7874
|
+
_inherits(BifrostKusama, _BifrostPolkadot);
|
|
7875
|
+
return _createClass(BifrostKusama);
|
|
7876
|
+
}(BifrostPolkadot);
|
|
7877
|
+
|
|
7834
7878
|
var BifrostPaseo = /*#__PURE__*/function (_BifrostPolkadot) {
|
|
7835
7879
|
function BifrostPaseo() {
|
|
7836
7880
|
_classCallCheck(this, BifrostPaseo);
|
|
@@ -8013,32 +8057,6 @@ var CollectivesWestend = /*#__PURE__*/function (_Collectives) {
|
|
|
8013
8057
|
return _createClass(CollectivesWestend);
|
|
8014
8058
|
}(Collectives);
|
|
8015
8059
|
|
|
8016
|
-
var ComposableFinance = /*#__PURE__*/function (_Parachain) {
|
|
8017
|
-
function ComposableFinance() {
|
|
8018
|
-
_classCallCheck(this, ComposableFinance);
|
|
8019
|
-
return _callSuper(this, ComposableFinance, ['ComposableFinance', 'composable', 'Polkadot', sdkCommon.Version.V3]);
|
|
8020
|
-
}
|
|
8021
|
-
_inherits(ComposableFinance, _Parachain);
|
|
8022
|
-
return _createClass(ComposableFinance, [{
|
|
8023
|
-
key: "transferXTokens",
|
|
8024
|
-
value: function transferXTokens$1(input) {
|
|
8025
|
-
var asset = input.asset;
|
|
8026
|
-
assertHasId(asset);
|
|
8027
|
-
return transferXTokens(input, BigInt(asset.assetId));
|
|
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
|
-
}]);
|
|
8040
|
-
}(Parachain);
|
|
8041
|
-
|
|
8042
8060
|
var CoretimeKusama = /*#__PURE__*/function (_Parachain) {
|
|
8043
8061
|
function CoretimeKusama() {
|
|
8044
8062
|
_classCallCheck(this, CoretimeKusama);
|
|
@@ -8646,6 +8664,16 @@ var IntegriteePolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
8646
8664
|
value: function transferRelayToPara() {
|
|
8647
8665
|
throw new ChainNotSupportedError();
|
|
8648
8666
|
}
|
|
8667
|
+
}, {
|
|
8668
|
+
key: "isSendingTempDisabled",
|
|
8669
|
+
value: function isSendingTempDisabled(_options) {
|
|
8670
|
+
return true;
|
|
8671
|
+
}
|
|
8672
|
+
}, {
|
|
8673
|
+
key: "isReceivingTempDisabled",
|
|
8674
|
+
value: function isReceivingTempDisabled(_scenario) {
|
|
8675
|
+
return true;
|
|
8676
|
+
}
|
|
8649
8677
|
}, {
|
|
8650
8678
|
key: "transferLocalNonNativeAsset",
|
|
8651
8679
|
value: function transferLocalNonNativeAsset(options) {
|
|
@@ -9868,7 +9896,6 @@ var chains = function chains() {
|
|
|
9868
9896
|
BifrostPolkadot: new BifrostPolkadot(),
|
|
9869
9897
|
BridgeHubPolkadot: new BridgeHubPolkadot(),
|
|
9870
9898
|
Centrifuge: new Centrifuge(),
|
|
9871
|
-
ComposableFinance: new ComposableFinance(),
|
|
9872
9899
|
Darwinia: new Darwinia(),
|
|
9873
9900
|
EnergyWebX: new EnergyWebX(),
|
|
9874
9901
|
Hydration: new Hydration(),
|
|
@@ -10328,14 +10355,13 @@ var SystemPallet = /*#__PURE__*/function (_BaseAssetsPallet) {
|
|
|
10328
10355
|
}(BaseAssetsPallet);
|
|
10329
10356
|
|
|
10330
10357
|
var resolveId = function resolveId(asset, chain) {
|
|
10331
|
-
|
|
10332
|
-
if (isBifrost) {
|
|
10358
|
+
if (chain === 'BifrostPolkadot' || chain === 'BifrostKusama' || chain === 'BifrostPaseo') {
|
|
10333
10359
|
var _asset$assetId;
|
|
10334
10360
|
var isEthAsset = assets.isForeignAsset(asset) && ((_asset$assetId = asset.assetId) === null || _asset$assetId === void 0 ? void 0 : _asset$assetId.startsWith('0x'));
|
|
10335
10361
|
var resolvedAsset = isEthAsset && asset.location ? assets.findAssetInfoOrThrow(chain, {
|
|
10336
10362
|
location: asset.location
|
|
10337
10363
|
}, null) : asset;
|
|
10338
|
-
return getChain(
|
|
10364
|
+
return getChain(chain).getCurrencySelection(resolvedAsset);
|
|
10339
10365
|
} else {
|
|
10340
10366
|
assertHasId(asset);
|
|
10341
10367
|
return asset.assetId;
|
|
@@ -10865,6 +10891,7 @@ var getOriginXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
10865
10891
|
}
|
|
10866
10892
|
return _context.a(2, {
|
|
10867
10893
|
dryRunError: dryRunResult.failureReason,
|
|
10894
|
+
dryRunSubError: dryRunResult.failureSubReason,
|
|
10868
10895
|
currency: dryRunResult.currency,
|
|
10869
10896
|
asset: dryRunResult.asset
|
|
10870
10897
|
});
|
|
@@ -10880,6 +10907,7 @@ var getOriginXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
10880
10907
|
asset: dryRunResult.asset,
|
|
10881
10908
|
feeType: 'paymentInfo',
|
|
10882
10909
|
dryRunError: dryRunResult.failureReason,
|
|
10910
|
+
dryRunSubError: dryRunResult.failureSubReason,
|
|
10883
10911
|
sufficient: false
|
|
10884
10912
|
});
|
|
10885
10913
|
case 8:
|
|
@@ -10993,19 +11021,23 @@ var getFailureInfo = function getFailureInfo(chains, hops) {
|
|
|
10993
11021
|
// Check standard chains first for backwards compatibility
|
|
10994
11022
|
if ((_chains$origin = chains.origin) !== null && _chains$origin !== void 0 && _chains$origin.dryRunError) return {
|
|
10995
11023
|
failureChain: 'origin',
|
|
10996
|
-
failureReason: chains.origin.dryRunError
|
|
11024
|
+
failureReason: chains.origin.dryRunError,
|
|
11025
|
+
failureSubReason: chains.origin.dryRunSubError
|
|
10997
11026
|
};
|
|
10998
11027
|
if ((_chains$assetHub = chains.assetHub) !== null && _chains$assetHub !== void 0 && _chains$assetHub.dryRunError) return {
|
|
10999
11028
|
failureChain: 'assetHub',
|
|
11000
|
-
failureReason: chains.assetHub.dryRunError
|
|
11029
|
+
failureReason: chains.assetHub.dryRunError,
|
|
11030
|
+
failureSubReason: chains.assetHub.dryRunSubError
|
|
11001
11031
|
};
|
|
11002
11032
|
if ((_chains$bridgeHub = chains.bridgeHub) !== null && _chains$bridgeHub !== void 0 && _chains$bridgeHub.dryRunError) return {
|
|
11003
11033
|
failureChain: 'bridgeHub',
|
|
11004
|
-
failureReason: chains.bridgeHub.dryRunError
|
|
11034
|
+
failureReason: chains.bridgeHub.dryRunError,
|
|
11035
|
+
failureSubReason: chains.bridgeHub.dryRunSubError
|
|
11005
11036
|
};
|
|
11006
11037
|
if ((_chains$destination = chains.destination) !== null && _chains$destination !== void 0 && _chains$destination.dryRunError) return {
|
|
11007
11038
|
failureChain: 'destination',
|
|
11008
|
-
failureReason: chains.destination.dryRunError
|
|
11039
|
+
failureReason: chains.destination.dryRunError,
|
|
11040
|
+
failureSubReason: chains.destination.dryRunSubError
|
|
11009
11041
|
};
|
|
11010
11042
|
// Check hops for failures
|
|
11011
11043
|
var _iterator = _createForOfIteratorHelper(hops),
|
|
@@ -11016,7 +11048,8 @@ var getFailureInfo = function getFailureInfo(chains, hops) {
|
|
|
11016
11048
|
if (hop.result.dryRunError) {
|
|
11017
11049
|
return {
|
|
11018
11050
|
failureChain: hop.chain,
|
|
11019
|
-
failureReason: hop.result.dryRunError
|
|
11051
|
+
failureReason: hop.result.dryRunError,
|
|
11052
|
+
failureSubReason: hop.result.dryRunSubError
|
|
11020
11053
|
};
|
|
11021
11054
|
}
|
|
11022
11055
|
}
|
|
@@ -11029,7 +11062,7 @@ var getFailureInfo = function getFailureInfo(chains, hops) {
|
|
|
11029
11062
|
};
|
|
11030
11063
|
var getXcmFeeInternal = /*#__PURE__*/function () {
|
|
11031
11064
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(_ref) {
|
|
11032
|
-
var api, tx, origin, destination, senderAddress, address, currency, feeAsset, disableFallback, swapConfig, useRootOrigin, asset, amount, _yield$getOriginXcmFe, originFeeRaw, originCurrency, originAsset, originFeeType, originDryRunError, initialForwardedXcm, initialDestParaId, originWeight, sufficientOriginFee, isMythosToEthereum, originFee, destApi, destFeeRes, _result, _getFailureInfo, _failureChain, _failureReason, processHop, traversalResult, destFee, destCurrency, destAsset, destFeeType, destDryRunError, destSufficient, destResult, _destApi, destFallback, assetHubChain, processedBridgeHub, bridgeHubChain, bridgeHubHopIndex, convertToFeeDetail, result, _getFailureInfo2, failureChain, failureReason, _t, _t2, _t3, _t4;
|
|
11065
|
+
var api, tx, origin, destination, senderAddress, address, currency, feeAsset, disableFallback, swapConfig, useRootOrigin, asset, amount, _yield$getOriginXcmFe, originFeeRaw, originCurrency, originAsset, originFeeType, originDryRunError, originDryRunSubError, initialForwardedXcm, initialDestParaId, originWeight, sufficientOriginFee, isMythosToEthereum, originFee, destApi, destFeeRes, _result, _getFailureInfo, _failureChain, _failureReason, processHop, traversalResult, destFee, destCurrency, destAsset, destFeeType, destDryRunError, destDryRunSubError, destSufficient, destResult, _destApi, destFallback, assetHubChain, processedBridgeHub, bridgeHubChain, bridgeHubHopIndex, convertToFeeDetail, result, _getFailureInfo2, failureChain, failureReason, _t, _t2, _t3, _t4;
|
|
11033
11066
|
return _regenerator().w(function (_context2) {
|
|
11034
11067
|
while (1) switch (_context2.p = _context2.n) {
|
|
11035
11068
|
case 0:
|
|
@@ -11055,6 +11088,7 @@ var getXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
11055
11088
|
originAsset = _yield$getOriginXcmFe.asset;
|
|
11056
11089
|
originFeeType = _yield$getOriginXcmFe.feeType;
|
|
11057
11090
|
originDryRunError = _yield$getOriginXcmFe.dryRunError;
|
|
11091
|
+
originDryRunSubError = _yield$getOriginXcmFe.dryRunSubError;
|
|
11058
11092
|
initialForwardedXcm = _yield$getOriginXcmFe.forwardedXcms;
|
|
11059
11093
|
initialDestParaId = _yield$getOriginXcmFe.destParaId;
|
|
11060
11094
|
originWeight = _yield$getOriginXcmFe.weight;
|
|
@@ -11108,7 +11142,7 @@ var getXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
11108
11142
|
case 7:
|
|
11109
11143
|
destFeeRes = _context2.v;
|
|
11110
11144
|
_result = {
|
|
11111
|
-
origin: _objectSpread2(_objectSpread2(_objectSpread2({}, originFee && {
|
|
11145
|
+
origin: _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, originFee && {
|
|
11112
11146
|
fee: originFee
|
|
11113
11147
|
}), originFeeType && {
|
|
11114
11148
|
feeType: originFeeType
|
|
@@ -11118,6 +11152,8 @@ var getXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
11118
11152
|
asset: originAsset
|
|
11119
11153
|
}, originDryRunError && {
|
|
11120
11154
|
dryRunError: originDryRunError
|
|
11155
|
+
}), originDryRunSubError && {
|
|
11156
|
+
dryRunSubError: originDryRunSubError
|
|
11121
11157
|
}),
|
|
11122
11158
|
destination: _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, destFeeRes.fee ? {
|
|
11123
11159
|
fee: destFeeRes.fee
|
|
@@ -11231,6 +11267,7 @@ var getXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
11231
11267
|
destFee = destResult.fee;
|
|
11232
11268
|
destFeeType = destResult.feeType;
|
|
11233
11269
|
destDryRunError = destResult.dryRunError;
|
|
11270
|
+
destDryRunSubError = destResult.dryRunSubError;
|
|
11234
11271
|
destSufficient = destResult.sufficient;
|
|
11235
11272
|
destCurrency = destResult.currency;
|
|
11236
11273
|
destAsset = destResult.asset;
|
|
@@ -11309,7 +11346,7 @@ var getXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
11309
11346
|
}
|
|
11310
11347
|
}
|
|
11311
11348
|
convertToFeeDetail = function convertToFeeDetail(result) {
|
|
11312
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, result.fee !== undefined && {
|
|
11349
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, result.fee !== undefined && {
|
|
11313
11350
|
fee: result.fee
|
|
11314
11351
|
}), result.feeType && {
|
|
11315
11352
|
feeType: result.feeType
|
|
@@ -11320,10 +11357,12 @@ var getXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
11320
11357
|
asset: result.asset
|
|
11321
11358
|
}, result.dryRunError && {
|
|
11322
11359
|
dryRunError: result.dryRunError
|
|
11360
|
+
}), result.dryRunSubError && {
|
|
11361
|
+
dryRunSubError: result.dryRunSubError
|
|
11323
11362
|
});
|
|
11324
11363
|
};
|
|
11325
11364
|
result = _objectSpread2(_objectSpread2(_objectSpread2({
|
|
11326
|
-
origin: _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, originWeight && {
|
|
11365
|
+
origin: _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, originWeight && {
|
|
11327
11366
|
weight: originWeight
|
|
11328
11367
|
}), originFee && {
|
|
11329
11368
|
fee: originFee
|
|
@@ -11336,13 +11375,15 @@ var getXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
11336
11375
|
asset: originAsset
|
|
11337
11376
|
}, originDryRunError && {
|
|
11338
11377
|
dryRunError: originDryRunError
|
|
11378
|
+
}), originDryRunSubError && {
|
|
11379
|
+
dryRunSubError: originDryRunSubError
|
|
11339
11380
|
})
|
|
11340
11381
|
}, traversalResult.assetHub && {
|
|
11341
11382
|
assetHub: convertToFeeDetail(traversalResult.assetHub)
|
|
11342
11383
|
}), processedBridgeHub && {
|
|
11343
11384
|
bridgeHub: convertToFeeDetail(processedBridgeHub)
|
|
11344
11385
|
}), {}, {
|
|
11345
|
-
destination: _objectSpread2(_objectSpread2(_objectSpread2({}, destFee !== undefined && {
|
|
11386
|
+
destination: _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, destFee !== undefined && {
|
|
11346
11387
|
fee: destFee
|
|
11347
11388
|
}), destFeeType && {
|
|
11348
11389
|
feeType: destFeeType
|
|
@@ -11352,6 +11393,8 @@ var getXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
11352
11393
|
asset: destAsset
|
|
11353
11394
|
}, destDryRunError && {
|
|
11354
11395
|
dryRunError: destDryRunError
|
|
11396
|
+
}), destDryRunSubError && {
|
|
11397
|
+
dryRunSubError: destDryRunSubError
|
|
11355
11398
|
}),
|
|
11356
11399
|
hops: traversalResult.hops.map(function (hop) {
|
|
11357
11400
|
return {
|
package/dist/index.d.ts
CHANGED
|
@@ -626,6 +626,7 @@ type TDryRunChainSuccess = TDryRunResBase & {
|
|
|
626
626
|
type TDryRunChainFailure = TDryRunResBase & {
|
|
627
627
|
success: false;
|
|
628
628
|
failureReason: string;
|
|
629
|
+
failureSubReason?: string;
|
|
629
630
|
};
|
|
630
631
|
type TDryRunChainResult = TDryRunChainSuccess | TDryRunChainFailure;
|
|
631
632
|
type THopInfo = {
|
|
@@ -635,6 +636,7 @@ type THopInfo = {
|
|
|
635
636
|
type TDryRunChain = 'origin' | 'destination' | 'assetHub' | 'bridgeHub' | TChain;
|
|
636
637
|
type TDryRunResult = {
|
|
637
638
|
failureReason?: string;
|
|
639
|
+
failureSubReason?: string;
|
|
638
640
|
failureChain?: TDryRunChain;
|
|
639
641
|
origin: TDryRunChainResult;
|
|
640
642
|
destination?: TDryRunChainResult;
|
|
@@ -746,10 +748,57 @@ declare enum PolkadotXcmError {
|
|
|
746
748
|
AliasNotFound = "AliasNotFound",
|
|
747
749
|
LocalExecutionIncompleteWithError = "LocalExecutionIncompleteWithError"
|
|
748
750
|
}
|
|
751
|
+
declare enum PolkadotXcmExecutionError {
|
|
752
|
+
Overflow = "Overflow",
|
|
753
|
+
Unimplemented = "Unimplemented",
|
|
754
|
+
UntrustedReserveLocation = "UntrustedReserveLocation",
|
|
755
|
+
UntrustedTeleportLocation = "UntrustedTeleportLocation",
|
|
756
|
+
LocationFull = "LocationFull",
|
|
757
|
+
LocationNotInvertible = "LocationNotInvertible",
|
|
758
|
+
BadOrigin = "BadOrigin",
|
|
759
|
+
InvalidLocation = "InvalidLocation",
|
|
760
|
+
AssetNotFound = "AssetNotFound",
|
|
761
|
+
FailedToTransactAsset = "FailedToTransactAsset",
|
|
762
|
+
NotWithdrawable = "NotWithdrawable",
|
|
763
|
+
LocationCannotHold = "LocationCannotHold",
|
|
764
|
+
ExceedsMaxMessageSize = "ExceedsMaxMessageSize",
|
|
765
|
+
DestinationUnsupported = "DestinationUnsupported",
|
|
766
|
+
Transport = "Transport",
|
|
767
|
+
Unroutable = "Unroutable",
|
|
768
|
+
UnknownClaim = "UnknownClaim",
|
|
769
|
+
FailedToDecode = "FailedToDecode",
|
|
770
|
+
MaxWeightInvalid = "MaxWeightInvalid",
|
|
771
|
+
NotHoldingFees = "NotHoldingFees",
|
|
772
|
+
TooExpensive = "TooExpensive",
|
|
773
|
+
Trap = "Trap",
|
|
774
|
+
ExpectationFalse = "ExpectationFalse",
|
|
775
|
+
PalletNotFound = "PalletNotFound",
|
|
776
|
+
NameMismatch = "NameMismatch",
|
|
777
|
+
VersionIncompatible = "VersionIncompatible",
|
|
778
|
+
HoldingWouldOverflow = "HoldingWouldOverflow",
|
|
779
|
+
ExportError = "ExportError",
|
|
780
|
+
ReanchorFailed = "ReanchorFailed",
|
|
781
|
+
NoDeal = "NoDeal",
|
|
782
|
+
FeesNotMet = "FeesNotMet",
|
|
783
|
+
LockError = "LockError",
|
|
784
|
+
NoPermission = "NoPermission",
|
|
785
|
+
Unanchored = "Unanchored",
|
|
786
|
+
NotDepositable = "NotDepositable",
|
|
787
|
+
TooManyAssets = "TooManyAssets",
|
|
788
|
+
UnhandledXcmVersion = "UnhandledXcmVersion",
|
|
789
|
+
WeightLimitReached = "WeightLimitReached",
|
|
790
|
+
Barrier = "Barrier",
|
|
791
|
+
WeightNotComputable = "WeightNotComputable",
|
|
792
|
+
ExceedsStackLimit = "ExceedsStackLimit"
|
|
793
|
+
}
|
|
749
794
|
type TModuleError = {
|
|
750
795
|
index: string;
|
|
751
796
|
error: string;
|
|
752
797
|
};
|
|
798
|
+
type TDryRunError = {
|
|
799
|
+
failureReason: string;
|
|
800
|
+
failureSubReason?: string;
|
|
801
|
+
};
|
|
753
802
|
|
|
754
803
|
type TXcmFeeSwapConfig = TSwapConfig & {
|
|
755
804
|
amountOut: bigint;
|
|
@@ -835,12 +884,14 @@ type TXcmFeeDetailSuccess = TXcmFeeBase$1 & {
|
|
|
835
884
|
fee: bigint;
|
|
836
885
|
feeType: TFeeType;
|
|
837
886
|
dryRunError?: string;
|
|
887
|
+
dryRunSubError?: string;
|
|
838
888
|
};
|
|
839
889
|
type TXcmFeeDetailWithFallback = TXcmFeeDetailSuccess;
|
|
840
890
|
type TXcmFeeDetailError = TXcmFeeBase$1 & {
|
|
841
891
|
fee?: bigint;
|
|
842
892
|
feeType?: TFeeType;
|
|
843
893
|
dryRunError: string;
|
|
894
|
+
dryRunSubError?: string;
|
|
844
895
|
};
|
|
845
896
|
type TXcmFeeDetail = TXcmFeeDetailSuccess | TXcmFeeDetailError;
|
|
846
897
|
type TXcmFeeHopResult = {
|
|
@@ -848,6 +899,7 @@ type TXcmFeeHopResult = {
|
|
|
848
899
|
feeType?: TFeeType;
|
|
849
900
|
sufficient?: boolean;
|
|
850
901
|
dryRunError?: string;
|
|
902
|
+
dryRunSubError?: string;
|
|
851
903
|
forwardedXcms?: any;
|
|
852
904
|
destParaId?: number;
|
|
853
905
|
/** @deprecated Use `asset` property instead. */
|
|
@@ -1617,12 +1669,6 @@ declare class Basilisk<TApi, TRes> extends Parachain<TApi, TRes> implements IXTo
|
|
|
1617
1669
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
1618
1670
|
}
|
|
1619
1671
|
|
|
1620
|
-
declare class BifrostKusama<TApi, TRes> extends Parachain<TApi, TRes> implements IXTokensTransfer {
|
|
1621
|
-
constructor();
|
|
1622
|
-
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
1623
|
-
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
1624
|
-
}
|
|
1625
|
-
|
|
1626
1672
|
declare class BifrostPolkadot<TApi, TRes> extends Parachain<TApi, TRes> implements IXTokensTransfer, IPolkadotXCMTransfer {
|
|
1627
1673
|
constructor(chain?: TParachain, info?: string, ecosystem?: TRelaychain, version?: Version);
|
|
1628
1674
|
getCurrencySelection(asset: TAssetInfo): {
|
|
@@ -1674,6 +1720,10 @@ declare class BifrostPolkadot<TApi, TRes> extends Parachain<TApi, TRes> implemen
|
|
|
1674
1720
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
1675
1721
|
}
|
|
1676
1722
|
|
|
1723
|
+
declare class BifrostKusama<TApi, TRes> extends BifrostPolkadot<TApi, TRes> {
|
|
1724
|
+
constructor();
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1677
1727
|
declare class BifrostPaseo<TApi, TRes> extends BifrostPolkadot<TApi, TRes> {
|
|
1678
1728
|
constructor();
|
|
1679
1729
|
}
|
|
@@ -1715,13 +1765,6 @@ declare class CollectivesWestend<TApi, TRes> extends Collectives<TApi, TRes> {
|
|
|
1715
1765
|
constructor();
|
|
1716
1766
|
}
|
|
1717
1767
|
|
|
1718
|
-
declare class ComposableFinance<TApi, TRes> extends Parachain<TApi, TRes> implements IXTokensTransfer {
|
|
1719
|
-
constructor();
|
|
1720
|
-
transferXTokens<TApi, TRes>(input: TXTokensTransferOptions<TApi, TRes>): TRes;
|
|
1721
|
-
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1722
|
-
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
1723
|
-
}
|
|
1724
|
-
|
|
1725
1768
|
declare class CoretimeKusama<TApi, TRes> extends Parachain<TApi, TRes> implements IPolkadotXCMTransfer {
|
|
1726
1769
|
constructor();
|
|
1727
1770
|
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
@@ -1822,6 +1865,8 @@ declare class IntegriteePolkadot<TApi, TRes> extends Parachain<TApi, TRes> imple
|
|
|
1822
1865
|
constructor(chain?: TParachain, info?: string, type?: TRelaychain, version?: Version);
|
|
1823
1866
|
transferPolkadotXCM<TApi, TRes>(input: TPolkadotXCMTransferOptions<TApi, TRes>): Promise<TRes>;
|
|
1824
1867
|
transferRelayToPara(): Promise<TSerializedApiCall>;
|
|
1868
|
+
isSendingTempDisabled(_options: TSendInternalOptions<TApi, TRes>): boolean;
|
|
1869
|
+
isReceivingTempDisabled(_scenario: TScenario): boolean;
|
|
1825
1870
|
transferLocalNonNativeAsset(options: TTransferLocalOptions<TApi, TRes>): TRes;
|
|
1826
1871
|
}
|
|
1827
1872
|
|
|
@@ -2042,7 +2087,6 @@ declare const chains: <TApi, TRes>() => {
|
|
|
2042
2087
|
BifrostPolkadot: BifrostPolkadot<TApi, TRes>;
|
|
2043
2088
|
BridgeHubPolkadot: BridgeHubPolkadot<TApi, TRes>;
|
|
2044
2089
|
Centrifuge: Centrifuge<TApi, TRes>;
|
|
2045
|
-
ComposableFinance: ComposableFinance<TApi, TRes>;
|
|
2046
2090
|
Darwinia: Darwinia<TApi, TRes>;
|
|
2047
2091
|
EnergyWebX: EnergyWebX<TApi, TRes>;
|
|
2048
2092
|
Hydration: Hydration<TApi, TRes>;
|
|
@@ -2148,7 +2192,7 @@ declare const dryRunInternal: <TApi, TRes>(options: TDryRunOptions<TApi, TRes>)
|
|
|
2148
2192
|
|
|
2149
2193
|
declare const dryRunOrigin: <TApi, TRes>(options: TDryRunCallOptions<TApi, TRes>) => Promise<TDryRunChainResult>;
|
|
2150
2194
|
|
|
2151
|
-
declare const getFailureInfo: (result: TDryRunResult) => Pick<TDryRunResult, "failureReason" | "failureChain">;
|
|
2195
|
+
declare const getFailureInfo: (result: TDryRunResult) => Pick<TDryRunResult, "failureReason" | "failureSubReason" | "failureChain">;
|
|
2152
2196
|
|
|
2153
2197
|
declare const traverseXcmHops: <TApi, TRes, THopResult>(config: HopTraversalConfig<TApi, TRes, THopResult>) => Promise<HopTraversalResult<THopResult>>;
|
|
2154
2198
|
declare const addEthereumBridgeFees: <TApi, TRes, TResult extends {
|
|
@@ -2248,7 +2292,7 @@ declare const computeFeeFromDryRun: (dryRun: any, chain: TSubstrateChain, execut
|
|
|
2248
2292
|
|
|
2249
2293
|
declare const computeFeeFromDryRunPjs: (dryRun: any, chain: TSubstrateChain, executionFee: bigint) => bigint;
|
|
2250
2294
|
|
|
2251
|
-
declare const resolveModuleError: (chain: TSubstrateChain, error: TModuleError) =>
|
|
2295
|
+
declare const resolveModuleError: (chain: TSubstrateChain, error: TModuleError) => TDryRunError;
|
|
2252
2296
|
|
|
2253
2297
|
declare const padFee: (raw: bigint, origin: TSubstrateChain, dest: TChain, side: "origin" | "destination") => bigint;
|
|
2254
2298
|
declare const padValueBy: (amount: bigint, percent: number) => bigint;
|
|
@@ -2283,7 +2327,7 @@ declare const reverseTransformLocation: (location: TLocation) => TLocation;
|
|
|
2283
2327
|
|
|
2284
2328
|
declare const normalizeAmount: (amount: bigint) => bigint;
|
|
2285
2329
|
|
|
2286
|
-
declare const resolveDestChain: (originChain: TSubstrateChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "
|
|
2330
|
+
declare const resolveDestChain: (originChain: TSubstrateChain, paraId: number | undefined) => "AssetHubPolkadot" | "Acala" | "Ajuna" | "Astar" | "BifrostPolkadot" | "BridgeHubPolkadot" | "Centrifuge" | "Darwinia" | "EnergyWebX" | "Hydration" | "IntegriteePolkadot" | "Interlay" | "Heima" | "Jamton" | "Moonbeam" | "CoretimePolkadot" | "Collectives" | "Crust" | "Manta" | "Nodle" | "NeuroWeb" | "Pendulum" | "Phala" | "KiltSpiritnet" | "Curio" | "Mythos" | "Peaq" | "RobonomicsPolkadot" | "PeoplePolkadot" | "Unique" | "Xode" | "AssetHubKusama" | "BridgeHubKusama" | "IntegriteeKusama" | "Karura" | "Kintsugi" | "Moonriver" | "CoretimeKusama" | "Encointer" | "Altair" | "Amplitude" | "Basilisk" | "BifrostKusama" | "CrustShadow" | "Crab" | "Laos" | "Quartz" | "RobonomicsKusama" | "PeopleKusama" | "Shiden" | "Zeitgeist" | "AssetHubWestend" | "BridgeHubWestend" | "CollectivesWestend" | "CoretimeWestend" | "Penpal" | "PeopleWestend" | "AjunaPaseo" | "AssetHubPaseo" | "BifrostPaseo" | "BridgeHubPaseo" | "CoretimePaseo" | "EnergyWebXPaseo" | "HeimaPaseo" | "HydrationPaseo" | "IntegriteePaseo" | "KiltPaseo" | "LaosPaseo" | "NeuroWebPaseo" | "NodlePaseo" | "PAssetHub" | "PeoplePaseo" | "ZeitgeistPaseo" | undefined;
|
|
2287
2331
|
|
|
2288
2332
|
declare const resolveParaId: (paraId: number | undefined, destination: TDestination) => number | undefined;
|
|
2289
2333
|
|
|
@@ -2322,5 +2366,5 @@ declare const formatUnits: typeof formatUnits$1;
|
|
|
2322
2366
|
|
|
2323
2367
|
declare const validateAddress: (address: TAddress, chain: TChain, isDestination?: boolean) => void;
|
|
2324
2368
|
|
|
2325
|
-
export { AmountTooLowError, AssetClaimBuilder, AssetsPallet, BatchMode, BridgeHaltedError, Builder, ChainNotSupportedError, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, GeneralBuilder, IncompatibleChainsError, InvalidAddressError, InvalidParameterError, MissingChainApiError, NoXCMSupportImplementedError, PolkadotXcmError, ScenarioNotSupportedError, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, UnableToComputeError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, applyDecimalAbstraction, assertAddressIsString, assertHasId, assertHasLocation, assertIsForeign, assertSenderAddress, assertToIsString, blake2b256, blake2b512, calcPreviewMintAmount, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, computeOverridenAmount, convertSs58, createAsset, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createDirectExecuteXcm, createExecuteCall, createExecuteExchangeXcm, createTx, createTypeAndThenCall, createVersionedAssets, createX1Payload, deriveAccountId, dryRun, dryRunInternal, dryRunOrigin, encodeSs58, formatUnits, getAssetBalance, getAssetBalanceInternal, getAssetReserveChain, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getBridgeStatus, getChain, getChainConfig, getChainLocation, getChainProviders, getChainVersion, getCurrencySelection, getFailureInfo, getMinTransferableAmount, getMinTransferableAmountInternal, getOriginFeeDetails, getOriginFeeDetailsInternal, getOriginXcmFee, getOriginXcmFeeEstimate, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getRelayChainOf, getTChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeEstimate, getXcmFeeInternal, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, localizeLocation, maybeOverrideAsset, maybeOverrideAssets, normalizeAmount, overrideTxAmount, padFee, padValueBy, parseUnits, resolveDestChain, resolveModuleError, resolveParaId, reverseTransformLocation, send, sortAssets, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, traverseXcmHops, validateAddress, validateAssetSpecifiers, validateCurrency, validateDestination, verifyEdOnDestination, wrapTxBypass };
|
|
2326
|
-
export type { BuildHopInfoOptions, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotApi, IPolkadotXCMTransfer, IXTokensTransfer, IXTransferTransfer, OneKey, TAddress, TApiOrUrl, TAssetClaimInternalOptions, TAssetClaimOptions, TAssetClaimOptionsBase, TBatchOptions, TBatchedSendOptions, TBifrostToken, TBridgeStatus, TBuildDestInfoOptions, TBuildInternalRes, TBuilderConfig, TBuilderOptions, TBypassOptions, TChainConfig, TChainConfigMap, TChainWithApi, TConditionalXcmFeeDetail, TConditionalXcmFeeHopInfo, TCreateBaseSwapXcmOptions, TCreateBaseTransferXcmOptions, TCreateBeneficiaryOptions, TCreateBeneficiaryXTokensOptions, TCreateSwapXcmInternalOptions, TCreateSwapXcmOptions, TCreateTransferXcmOptions, TCreateTxsOptions, TDestWeight, TDestXcmFeeDetail, TDestination, TDryRunBaseOptions, TDryRunBypassOptions, TDryRunCallBaseOptions, TDryRunCallOptions, TDryRunChain, TDryRunChainFailure, TDryRunChainResult, TDryRunChainSuccess, TDryRunOptions, TDryRunPreviewOptions, TDryRunResBase, TDryRunResult, TDryRunXcmBaseOptions, TDryRunXcmOptions, TEvmBuilderOptions, TEvmBuilderOptionsBase, TEvmChainFrom, TFeeType, TForeignAssetId, TForeignOrNativeAsset, TForeignOrTokenAsset, TGetAssetBalanceOptions, TGetAssetBalanceOptionsBase, TGetBalanceForeignByAssetOptions, TGetBalanceForeignOptions, TGetBalanceForeignOptionsBase, TGetBalanceNativeOptions, TGetBalanceNativeOptionsBase, TGetFeeForDestChainBaseOptions, TGetFeeForDestChainOptions, TGetMinTransferableAmountOptions, TGetOriginFeeDetailsOptions, TGetOriginFeeDetailsOptionsBase, TGetOriginXcmFeeBaseOptions, TGetOriginXcmFeeEstimateOptions, TGetOriginXcmFeeInternalOptions, TGetOriginXcmFeeOptions, TGetReverseTxFeeOptions, TGetTransferInfoOptions, TGetTransferInfoOptionsBase, TGetTransferableAmountOptions, TGetTransferableAmountOptionsBase, TGetXcmFeeBaseOptions, TGetXcmFeeBuilderOptions, TGetXcmFeeEstimateDetail, TGetXcmFeeEstimateOptions, TGetXcmFeeEstimateResult, TGetXcmFeeInternalOptions, TGetXcmFeeOptions, TGetXcmFeeResult, THopInfo, THopTransferInfo, THubKey, TMantaAsset, TModuleError, TNativeTokenAsset, TNodleAsset, TOriginFeeDetails, TOtherReserveAsset, TPolkadotXCMTransferOptions, TPolkadotXcmMethod, TProviderEntry, TRelayToParaDestination, TRelayToParaOptions, TRelayToParaOverrides, TReserveAsset, TResolveHopParams, TScenario, TSelfReserveAsset, TSendBaseOptions, TSendBaseOptionsWithSenderAddress, TSendInternalOptions, TSendOptions, TSerializeEthTransferOptions, TSerializedApiCall, TSerializedEthTransfer, TSwapConfig, TSwapFeeEstimates, TTransferFeeEstimates, TTransferInfo, TTransferLocalOptions, TTxFactory, TTypeAndThenCallContext, TTypeAndThenFees, TUrl, TVerifyEdOnDestinationOptions, TVerifyEdOnDestinationOptionsBase, TWeight, TXTokensCurrencySelection, TXTokensMethod, TXTokensTransferOptions, TXTransferMethod, TXTransferTransferOptions, TXcmAsset, TXcmFeeBase, TXcmFeeChain, TXcmFeeDetail, TXcmFeeDetailError, TXcmFeeDetailSuccess, TXcmFeeDetailWithFallback, TXcmFeeHopInfo, TXcmFeeHopResult, TXcmFeeSwapConfig, TXcmForeignAsset, TXcmPalletMethod, TXcmVersioned, TZeitgeistAsset, WithApi, WithRequiredSenderAddress };
|
|
2369
|
+
export { AmountTooLowError, AssetClaimBuilder, AssetsPallet, BatchMode, BridgeHaltedError, Builder, ChainNotSupportedError, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, GeneralBuilder, IncompatibleChainsError, InvalidAddressError, InvalidParameterError, MissingChainApiError, NoXCMSupportImplementedError, PolkadotXcmError, PolkadotXcmExecutionError, ScenarioNotSupportedError, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, UnableToComputeError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, applyDecimalAbstraction, assertAddressIsString, assertHasId, assertHasLocation, assertIsForeign, assertSenderAddress, assertToIsString, blake2b256, blake2b512, calcPreviewMintAmount, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, computeOverridenAmount, convertSs58, createAsset, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createDirectExecuteXcm, createExecuteCall, createExecuteExchangeXcm, createTx, createTypeAndThenCall, createVersionedAssets, createX1Payload, deriveAccountId, dryRun, dryRunInternal, dryRunOrigin, encodeSs58, formatUnits, getAssetBalance, getAssetBalanceInternal, getAssetReserveChain, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getBridgeStatus, getChain, getChainConfig, getChainLocation, getChainProviders, getChainVersion, getCurrencySelection, getFailureInfo, getMinTransferableAmount, getMinTransferableAmountInternal, getOriginFeeDetails, getOriginFeeDetailsInternal, getOriginXcmFee, getOriginXcmFeeEstimate, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getRelayChainOf, getTChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeEstimate, getXcmFeeInternal, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, localizeLocation, maybeOverrideAsset, maybeOverrideAssets, normalizeAmount, overrideTxAmount, padFee, padValueBy, parseUnits, resolveDestChain, resolveModuleError, resolveParaId, reverseTransformLocation, send, sortAssets, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, traverseXcmHops, validateAddress, validateAssetSpecifiers, validateCurrency, validateDestination, verifyEdOnDestination, wrapTxBypass };
|
|
2370
|
+
export type { BuildHopInfoOptions, HopProcessParams, HopTraversalConfig, HopTraversalResult, IPolkadotApi, IPolkadotXCMTransfer, IXTokensTransfer, IXTransferTransfer, OneKey, TAddress, TApiOrUrl, TAssetClaimInternalOptions, TAssetClaimOptions, TAssetClaimOptionsBase, TBatchOptions, TBatchedSendOptions, TBifrostToken, TBridgeStatus, TBuildDestInfoOptions, TBuildInternalRes, TBuilderConfig, TBuilderOptions, TBypassOptions, TChainConfig, TChainConfigMap, TChainWithApi, TConditionalXcmFeeDetail, TConditionalXcmFeeHopInfo, TCreateBaseSwapXcmOptions, TCreateBaseTransferXcmOptions, TCreateBeneficiaryOptions, TCreateBeneficiaryXTokensOptions, TCreateSwapXcmInternalOptions, TCreateSwapXcmOptions, TCreateTransferXcmOptions, TCreateTxsOptions, TDestWeight, TDestXcmFeeDetail, TDestination, TDryRunBaseOptions, TDryRunBypassOptions, TDryRunCallBaseOptions, TDryRunCallOptions, TDryRunChain, TDryRunChainFailure, TDryRunChainResult, TDryRunChainSuccess, TDryRunError, TDryRunOptions, TDryRunPreviewOptions, TDryRunResBase, TDryRunResult, TDryRunXcmBaseOptions, TDryRunXcmOptions, TEvmBuilderOptions, TEvmBuilderOptionsBase, TEvmChainFrom, TFeeType, TForeignAssetId, TForeignOrNativeAsset, TForeignOrTokenAsset, TGetAssetBalanceOptions, TGetAssetBalanceOptionsBase, TGetBalanceForeignByAssetOptions, TGetBalanceForeignOptions, TGetBalanceForeignOptionsBase, TGetBalanceNativeOptions, TGetBalanceNativeOptionsBase, TGetFeeForDestChainBaseOptions, TGetFeeForDestChainOptions, TGetMinTransferableAmountOptions, TGetOriginFeeDetailsOptions, TGetOriginFeeDetailsOptionsBase, TGetOriginXcmFeeBaseOptions, TGetOriginXcmFeeEstimateOptions, TGetOriginXcmFeeInternalOptions, TGetOriginXcmFeeOptions, TGetReverseTxFeeOptions, TGetTransferInfoOptions, TGetTransferInfoOptionsBase, TGetTransferableAmountOptions, TGetTransferableAmountOptionsBase, TGetXcmFeeBaseOptions, TGetXcmFeeBuilderOptions, TGetXcmFeeEstimateDetail, TGetXcmFeeEstimateOptions, TGetXcmFeeEstimateResult, TGetXcmFeeInternalOptions, TGetXcmFeeOptions, TGetXcmFeeResult, THopInfo, THopTransferInfo, THubKey, TMantaAsset, TModuleError, TNativeTokenAsset, TNodleAsset, TOriginFeeDetails, TOtherReserveAsset, TPolkadotXCMTransferOptions, TPolkadotXcmMethod, TProviderEntry, TRelayToParaDestination, TRelayToParaOptions, TRelayToParaOverrides, TReserveAsset, TResolveHopParams, TScenario, TSelfReserveAsset, TSendBaseOptions, TSendBaseOptionsWithSenderAddress, TSendInternalOptions, TSendOptions, TSerializeEthTransferOptions, TSerializedApiCall, TSerializedEthTransfer, TSwapConfig, TSwapFeeEstimates, TTransferFeeEstimates, TTransferInfo, TTransferLocalOptions, TTxFactory, TTypeAndThenCallContext, TTypeAndThenFees, TUrl, TVerifyEdOnDestinationOptions, TVerifyEdOnDestinationOptionsBase, TWeight, TXTokensCurrencySelection, TXTokensMethod, TXTokensTransferOptions, TXTransferMethod, TXTransferTransferOptions, TXcmAsset, TXcmFeeBase, TXcmFeeChain, TXcmFeeDetail, TXcmFeeDetailError, TXcmFeeDetailSuccess, TXcmFeeDetailWithFallback, TXcmFeeHopInfo, TXcmFeeHopResult, TXcmFeeSwapConfig, TXcmForeignAsset, TXcmPalletMethod, TXcmVersioned, TZeitgeistAsset, WithApi, WithRequiredSenderAddress };
|
package/dist/index.mjs
CHANGED
|
@@ -1142,6 +1142,7 @@ var XTokensError;
|
|
|
1142
1142
|
XTokensError["MinXcmFeeNotDefined"] = "MinXcmFeeNotDefined";
|
|
1143
1143
|
XTokensError["RateLimited"] = "RateLimited";
|
|
1144
1144
|
})(XTokensError || (XTokensError = {}));
|
|
1145
|
+
// Mirrors https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/pallet-xcm/src/errors.rs
|
|
1145
1146
|
var PolkadotXcmError;
|
|
1146
1147
|
(function (PolkadotXcmError) {
|
|
1147
1148
|
PolkadotXcmError["Unreachable"] = "Unreachable";
|
|
@@ -1174,6 +1175,50 @@ var PolkadotXcmError;
|
|
|
1174
1175
|
PolkadotXcmError["AliasNotFound"] = "AliasNotFound";
|
|
1175
1176
|
PolkadotXcmError["LocalExecutionIncompleteWithError"] = "LocalExecutionIncompleteWithError";
|
|
1176
1177
|
})(PolkadotXcmError || (PolkadotXcmError = {}));
|
|
1178
|
+
var PolkadotXcmExecutionError;
|
|
1179
|
+
(function (PolkadotXcmExecutionError) {
|
|
1180
|
+
PolkadotXcmExecutionError["Overflow"] = "Overflow";
|
|
1181
|
+
PolkadotXcmExecutionError["Unimplemented"] = "Unimplemented";
|
|
1182
|
+
PolkadotXcmExecutionError["UntrustedReserveLocation"] = "UntrustedReserveLocation";
|
|
1183
|
+
PolkadotXcmExecutionError["UntrustedTeleportLocation"] = "UntrustedTeleportLocation";
|
|
1184
|
+
PolkadotXcmExecutionError["LocationFull"] = "LocationFull";
|
|
1185
|
+
PolkadotXcmExecutionError["LocationNotInvertible"] = "LocationNotInvertible";
|
|
1186
|
+
PolkadotXcmExecutionError["BadOrigin"] = "BadOrigin";
|
|
1187
|
+
PolkadotXcmExecutionError["InvalidLocation"] = "InvalidLocation";
|
|
1188
|
+
PolkadotXcmExecutionError["AssetNotFound"] = "AssetNotFound";
|
|
1189
|
+
PolkadotXcmExecutionError["FailedToTransactAsset"] = "FailedToTransactAsset";
|
|
1190
|
+
PolkadotXcmExecutionError["NotWithdrawable"] = "NotWithdrawable";
|
|
1191
|
+
PolkadotXcmExecutionError["LocationCannotHold"] = "LocationCannotHold";
|
|
1192
|
+
PolkadotXcmExecutionError["ExceedsMaxMessageSize"] = "ExceedsMaxMessageSize";
|
|
1193
|
+
PolkadotXcmExecutionError["DestinationUnsupported"] = "DestinationUnsupported";
|
|
1194
|
+
PolkadotXcmExecutionError["Transport"] = "Transport";
|
|
1195
|
+
PolkadotXcmExecutionError["Unroutable"] = "Unroutable";
|
|
1196
|
+
PolkadotXcmExecutionError["UnknownClaim"] = "UnknownClaim";
|
|
1197
|
+
PolkadotXcmExecutionError["FailedToDecode"] = "FailedToDecode";
|
|
1198
|
+
PolkadotXcmExecutionError["MaxWeightInvalid"] = "MaxWeightInvalid";
|
|
1199
|
+
PolkadotXcmExecutionError["NotHoldingFees"] = "NotHoldingFees";
|
|
1200
|
+
PolkadotXcmExecutionError["TooExpensive"] = "TooExpensive";
|
|
1201
|
+
PolkadotXcmExecutionError["Trap"] = "Trap";
|
|
1202
|
+
PolkadotXcmExecutionError["ExpectationFalse"] = "ExpectationFalse";
|
|
1203
|
+
PolkadotXcmExecutionError["PalletNotFound"] = "PalletNotFound";
|
|
1204
|
+
PolkadotXcmExecutionError["NameMismatch"] = "NameMismatch";
|
|
1205
|
+
PolkadotXcmExecutionError["VersionIncompatible"] = "VersionIncompatible";
|
|
1206
|
+
PolkadotXcmExecutionError["HoldingWouldOverflow"] = "HoldingWouldOverflow";
|
|
1207
|
+
PolkadotXcmExecutionError["ExportError"] = "ExportError";
|
|
1208
|
+
PolkadotXcmExecutionError["ReanchorFailed"] = "ReanchorFailed";
|
|
1209
|
+
PolkadotXcmExecutionError["NoDeal"] = "NoDeal";
|
|
1210
|
+
PolkadotXcmExecutionError["FeesNotMet"] = "FeesNotMet";
|
|
1211
|
+
PolkadotXcmExecutionError["LockError"] = "LockError";
|
|
1212
|
+
PolkadotXcmExecutionError["NoPermission"] = "NoPermission";
|
|
1213
|
+
PolkadotXcmExecutionError["Unanchored"] = "Unanchored";
|
|
1214
|
+
PolkadotXcmExecutionError["NotDepositable"] = "NotDepositable";
|
|
1215
|
+
PolkadotXcmExecutionError["TooManyAssets"] = "TooManyAssets";
|
|
1216
|
+
PolkadotXcmExecutionError["UnhandledXcmVersion"] = "UnhandledXcmVersion";
|
|
1217
|
+
PolkadotXcmExecutionError["WeightLimitReached"] = "WeightLimitReached";
|
|
1218
|
+
PolkadotXcmExecutionError["Barrier"] = "Barrier";
|
|
1219
|
+
PolkadotXcmExecutionError["WeightNotComputable"] = "WeightNotComputable";
|
|
1220
|
+
PolkadotXcmExecutionError["ExceedsStackLimit"] = "ExceedsStackLimit";
|
|
1221
|
+
})(PolkadotXcmExecutionError || (PolkadotXcmExecutionError = {}));
|
|
1177
1222
|
|
|
1178
1223
|
var resolveModuleError = function resolveModuleError(chain, error) {
|
|
1179
1224
|
var palletDetails = getSupportedPalletsDetails(chain).find(function (p) {
|
|
@@ -1183,6 +1228,7 @@ var resolveModuleError = function resolveModuleError(chain, error) {
|
|
|
1183
1228
|
throw new InvalidParameterError("Pallet with index ".concat(error.index, " not found"));
|
|
1184
1229
|
}
|
|
1185
1230
|
// Use only the first byte of the error to get the error index
|
|
1231
|
+
// Including 0x prefix
|
|
1186
1232
|
var errorIndex = Number(error.error.slice(0, 4));
|
|
1187
1233
|
var name = palletDetails.name;
|
|
1188
1234
|
if (name !== 'XTokens' && name !== 'PolkadotXcm' && name !== 'XcmPallet') {
|
|
@@ -1192,7 +1238,20 @@ var resolveModuleError = function resolveModuleError(chain, error) {
|
|
|
1192
1238
|
if (!failureReason) {
|
|
1193
1239
|
throw new InvalidParameterError("Error index ".concat(errorIndex, " not found in ").concat(name, " pallet"));
|
|
1194
1240
|
}
|
|
1195
|
-
|
|
1241
|
+
if (failureReason === PolkadotXcmError.LocalExecutionIncompleteWithError) {
|
|
1242
|
+
var subErrorIndex = Number("0x".concat(error.error.slice(6, 8)));
|
|
1243
|
+
var failureSubReason = Object.values(PolkadotXcmExecutionError)[subErrorIndex];
|
|
1244
|
+
if (!failureSubReason) {
|
|
1245
|
+
throw new InvalidParameterError("Sub-error index ".concat(subErrorIndex, " not found in PolkadotXcm pallet"));
|
|
1246
|
+
}
|
|
1247
|
+
return {
|
|
1248
|
+
failureReason: failureReason,
|
|
1249
|
+
failureSubReason: failureSubReason
|
|
1250
|
+
};
|
|
1251
|
+
}
|
|
1252
|
+
return {
|
|
1253
|
+
failureReason: failureReason
|
|
1254
|
+
};
|
|
1196
1255
|
};
|
|
1197
1256
|
|
|
1198
1257
|
var isAssetHub = function isAssetHub(chain) {
|
|
@@ -1229,7 +1288,8 @@ var padFee = function padFee(raw, origin, dest, side) {
|
|
|
1229
1288
|
return mul(raw, 130n, 100n);
|
|
1230
1289
|
};
|
|
1231
1290
|
var padValueBy = function padValueBy(amount, percent) {
|
|
1232
|
-
|
|
1291
|
+
var scaled = BigInt(Math.round(percent * 100)); // 2 decimal precision
|
|
1292
|
+
return amount * (BigInt(10000) + scaled) / BigInt(10000);
|
|
1233
1293
|
};
|
|
1234
1294
|
|
|
1235
1295
|
var resolveScenario = function resolveScenario(origin, destination) {
|
|
@@ -1507,17 +1567,6 @@ var Centrifuge$1 = {
|
|
|
1507
1567
|
}
|
|
1508
1568
|
]
|
|
1509
1569
|
};
|
|
1510
|
-
var ComposableFinance$1 = {
|
|
1511
|
-
name: "Composable Finance",
|
|
1512
|
-
info: "composable",
|
|
1513
|
-
paraId: 2019,
|
|
1514
|
-
providers: [
|
|
1515
|
-
{
|
|
1516
|
-
name: "Composable",
|
|
1517
|
-
endpoint: "wss://rpc.composable.finance"
|
|
1518
|
-
}
|
|
1519
|
-
]
|
|
1520
|
-
};
|
|
1521
1570
|
var Darwinia$1 = {
|
|
1522
1571
|
name: "Darwinia",
|
|
1523
1572
|
info: "darwinia",
|
|
@@ -2900,7 +2949,6 @@ var configs = {
|
|
|
2900
2949
|
BifrostPolkadot: BifrostPolkadot$1,
|
|
2901
2950
|
BridgeHubPolkadot: BridgeHubPolkadot$1,
|
|
2902
2951
|
Centrifuge: Centrifuge$1,
|
|
2903
|
-
ComposableFinance: ComposableFinance$1,
|
|
2904
2952
|
Darwinia: Darwinia$1,
|
|
2905
2953
|
EnergyWebX: EnergyWebX$1,
|
|
2906
2954
|
Hydration: Hydration$1,
|
|
@@ -3269,6 +3317,7 @@ var getAssetReserveChain = function getAssetReserveChain(chain, assetLocation) {
|
|
|
3269
3317
|
}
|
|
3270
3318
|
return resolvedChain;
|
|
3271
3319
|
}
|
|
3320
|
+
if (isRelayChain(chain)) return chain;
|
|
3272
3321
|
var relaychain = getRelayChainOf(chain);
|
|
3273
3322
|
var ahChain = "AssetHub".concat(relaychain);
|
|
3274
3323
|
if (hasGlobalConsensusJunction) {
|
|
@@ -4420,7 +4469,8 @@ var getDestXcmFee = /*#__PURE__*/function () {
|
|
|
4420
4469
|
break;
|
|
4421
4470
|
}
|
|
4422
4471
|
return _context3.a(2, {
|
|
4423
|
-
dryRunError: dryRunResult.failureReason
|
|
4472
|
+
dryRunError: dryRunResult.failureReason,
|
|
4473
|
+
dryRunSubError: dryRunResult.failureSubReason
|
|
4424
4474
|
});
|
|
4425
4475
|
case 5:
|
|
4426
4476
|
_context3.n = 6;
|
|
@@ -4431,6 +4481,7 @@ var getDestXcmFee = /*#__PURE__*/function () {
|
|
|
4431
4481
|
fee: _fee2,
|
|
4432
4482
|
feeType: 'paymentInfo',
|
|
4433
4483
|
dryRunError: dryRunResult.failureReason,
|
|
4484
|
+
dryRunSubError: dryRunResult.failureSubReason,
|
|
4434
4485
|
sufficient: false,
|
|
4435
4486
|
asset: asset,
|
|
4436
4487
|
currency: asset.symbol
|
|
@@ -4685,7 +4736,8 @@ var getFailureInfo$1 = function getFailureInfo(result) {
|
|
|
4685
4736
|
if (chainResult && chainResult.success === false && chainResult.failureReason) {
|
|
4686
4737
|
return {
|
|
4687
4738
|
failureChain: chain,
|
|
4688
|
-
failureReason: chainResult.failureReason
|
|
4739
|
+
failureReason: chainResult.failureReason,
|
|
4740
|
+
failureSubReason: chainResult.failureSubReason
|
|
4689
4741
|
};
|
|
4690
4742
|
}
|
|
4691
4743
|
}
|
|
@@ -4696,7 +4748,8 @@ var getFailureInfo$1 = function getFailureInfo(result) {
|
|
|
4696
4748
|
}
|
|
4697
4749
|
return {
|
|
4698
4750
|
failureChain: result.failureChain,
|
|
4699
|
-
failureReason: result.failureReason
|
|
4751
|
+
failureReason: result.failureReason,
|
|
4752
|
+
failureSubReason: result.failureSubReason
|
|
4700
4753
|
};
|
|
4701
4754
|
};
|
|
4702
4755
|
|
|
@@ -5457,6 +5510,7 @@ var dryRunInternal = /*#__PURE__*/function () {
|
|
|
5457
5510
|
}
|
|
5458
5511
|
return _context2.a(2, {
|
|
5459
5512
|
failureReason: originDryRun.failureReason,
|
|
5513
|
+
failureSubReason: originDryRun.failureSubReason,
|
|
5460
5514
|
failureChain: 'origin',
|
|
5461
5515
|
origin: originDryRun,
|
|
5462
5516
|
hops: []
|
|
@@ -7712,25 +7766,6 @@ var Basilisk = /*#__PURE__*/function (_Parachain) {
|
|
|
7712
7766
|
}]);
|
|
7713
7767
|
}(Parachain);
|
|
7714
7768
|
|
|
7715
|
-
var BifrostKusama = /*#__PURE__*/function (_Parachain) {
|
|
7716
|
-
function BifrostKusama() {
|
|
7717
|
-
_classCallCheck(this, BifrostKusama);
|
|
7718
|
-
return _callSuper(this, BifrostKusama, ['BifrostKusama', 'bifrost', 'Kusama', Version.V5]);
|
|
7719
|
-
}
|
|
7720
|
-
_inherits(BifrostKusama, _Parachain);
|
|
7721
|
-
return _createClass(BifrostKusama, [{
|
|
7722
|
-
key: "transferXTokens",
|
|
7723
|
-
value: function transferXTokens(input) {
|
|
7724
|
-
return getChain('BifrostPolkadot').transferXTokens(input);
|
|
7725
|
-
}
|
|
7726
|
-
}, {
|
|
7727
|
-
key: "transferLocalNonNativeAsset",
|
|
7728
|
-
value: function transferLocalNonNativeAsset(options) {
|
|
7729
|
-
return getChain('BifrostPolkadot').transferLocalNonNativeAsset(options);
|
|
7730
|
-
}
|
|
7731
|
-
}]);
|
|
7732
|
-
}(Parachain);
|
|
7733
|
-
|
|
7734
7769
|
var BifrostPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
7735
7770
|
function BifrostPolkadot() {
|
|
7736
7771
|
var chain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'BifrostPolkadot';
|
|
@@ -7752,7 +7787,7 @@ var BifrostPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
7752
7787
|
}
|
|
7753
7788
|
var isVToken = asset.symbol && asset.symbol.startsWith('v');
|
|
7754
7789
|
var isVSToken = asset.symbol && asset.symbol.startsWith('vs');
|
|
7755
|
-
if (!isForeignAsset(asset)) {
|
|
7790
|
+
if (!isForeignAsset(asset) || isForeignAsset(asset) && !asset.assetId) {
|
|
7756
7791
|
return isVToken ? {
|
|
7757
7792
|
VToken: asset.symbol.substring(1)
|
|
7758
7793
|
} : {
|
|
@@ -7832,6 +7867,15 @@ var BifrostPolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
7832
7867
|
}]);
|
|
7833
7868
|
}(Parachain);
|
|
7834
7869
|
|
|
7870
|
+
var BifrostKusama = /*#__PURE__*/function (_BifrostPolkadot) {
|
|
7871
|
+
function BifrostKusama() {
|
|
7872
|
+
_classCallCheck(this, BifrostKusama);
|
|
7873
|
+
return _callSuper(this, BifrostKusama, ['BifrostKusama', 'bifrost', 'Kusama', Version.V5]);
|
|
7874
|
+
}
|
|
7875
|
+
_inherits(BifrostKusama, _BifrostPolkadot);
|
|
7876
|
+
return _createClass(BifrostKusama);
|
|
7877
|
+
}(BifrostPolkadot);
|
|
7878
|
+
|
|
7835
7879
|
var BifrostPaseo = /*#__PURE__*/function (_BifrostPolkadot) {
|
|
7836
7880
|
function BifrostPaseo() {
|
|
7837
7881
|
_classCallCheck(this, BifrostPaseo);
|
|
@@ -8014,32 +8058,6 @@ var CollectivesWestend = /*#__PURE__*/function (_Collectives) {
|
|
|
8014
8058
|
return _createClass(CollectivesWestend);
|
|
8015
8059
|
}(Collectives);
|
|
8016
8060
|
|
|
8017
|
-
var ComposableFinance = /*#__PURE__*/function (_Parachain) {
|
|
8018
|
-
function ComposableFinance() {
|
|
8019
|
-
_classCallCheck(this, ComposableFinance);
|
|
8020
|
-
return _callSuper(this, ComposableFinance, ['ComposableFinance', 'composable', 'Polkadot', Version.V3]);
|
|
8021
|
-
}
|
|
8022
|
-
_inherits(ComposableFinance, _Parachain);
|
|
8023
|
-
return _createClass(ComposableFinance, [{
|
|
8024
|
-
key: "transferXTokens",
|
|
8025
|
-
value: function transferXTokens$1(input) {
|
|
8026
|
-
var asset = input.asset;
|
|
8027
|
-
assertHasId(asset);
|
|
8028
|
-
return transferXTokens(input, BigInt(asset.assetId));
|
|
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
|
-
}]);
|
|
8041
|
-
}(Parachain);
|
|
8042
|
-
|
|
8043
8061
|
var CoretimeKusama = /*#__PURE__*/function (_Parachain) {
|
|
8044
8062
|
function CoretimeKusama() {
|
|
8045
8063
|
_classCallCheck(this, CoretimeKusama);
|
|
@@ -8647,6 +8665,16 @@ var IntegriteePolkadot = /*#__PURE__*/function (_Parachain) {
|
|
|
8647
8665
|
value: function transferRelayToPara() {
|
|
8648
8666
|
throw new ChainNotSupportedError();
|
|
8649
8667
|
}
|
|
8668
|
+
}, {
|
|
8669
|
+
key: "isSendingTempDisabled",
|
|
8670
|
+
value: function isSendingTempDisabled(_options) {
|
|
8671
|
+
return true;
|
|
8672
|
+
}
|
|
8673
|
+
}, {
|
|
8674
|
+
key: "isReceivingTempDisabled",
|
|
8675
|
+
value: function isReceivingTempDisabled(_scenario) {
|
|
8676
|
+
return true;
|
|
8677
|
+
}
|
|
8650
8678
|
}, {
|
|
8651
8679
|
key: "transferLocalNonNativeAsset",
|
|
8652
8680
|
value: function transferLocalNonNativeAsset(options) {
|
|
@@ -9869,7 +9897,6 @@ var chains = function chains() {
|
|
|
9869
9897
|
BifrostPolkadot: new BifrostPolkadot(),
|
|
9870
9898
|
BridgeHubPolkadot: new BridgeHubPolkadot(),
|
|
9871
9899
|
Centrifuge: new Centrifuge(),
|
|
9872
|
-
ComposableFinance: new ComposableFinance(),
|
|
9873
9900
|
Darwinia: new Darwinia(),
|
|
9874
9901
|
EnergyWebX: new EnergyWebX(),
|
|
9875
9902
|
Hydration: new Hydration(),
|
|
@@ -10329,14 +10356,13 @@ var SystemPallet = /*#__PURE__*/function (_BaseAssetsPallet) {
|
|
|
10329
10356
|
}(BaseAssetsPallet);
|
|
10330
10357
|
|
|
10331
10358
|
var resolveId = function resolveId(asset, chain) {
|
|
10332
|
-
|
|
10333
|
-
if (isBifrost) {
|
|
10359
|
+
if (chain === 'BifrostPolkadot' || chain === 'BifrostKusama' || chain === 'BifrostPaseo') {
|
|
10334
10360
|
var _asset$assetId;
|
|
10335
10361
|
var isEthAsset = isForeignAsset(asset) && ((_asset$assetId = asset.assetId) === null || _asset$assetId === void 0 ? void 0 : _asset$assetId.startsWith('0x'));
|
|
10336
10362
|
var resolvedAsset = isEthAsset && asset.location ? findAssetInfoOrThrow(chain, {
|
|
10337
10363
|
location: asset.location
|
|
10338
10364
|
}, null) : asset;
|
|
10339
|
-
return getChain(
|
|
10365
|
+
return getChain(chain).getCurrencySelection(resolvedAsset);
|
|
10340
10366
|
} else {
|
|
10341
10367
|
assertHasId(asset);
|
|
10342
10368
|
return asset.assetId;
|
|
@@ -10866,6 +10892,7 @@ var getOriginXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
10866
10892
|
}
|
|
10867
10893
|
return _context.a(2, {
|
|
10868
10894
|
dryRunError: dryRunResult.failureReason,
|
|
10895
|
+
dryRunSubError: dryRunResult.failureSubReason,
|
|
10869
10896
|
currency: dryRunResult.currency,
|
|
10870
10897
|
asset: dryRunResult.asset
|
|
10871
10898
|
});
|
|
@@ -10881,6 +10908,7 @@ var getOriginXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
10881
10908
|
asset: dryRunResult.asset,
|
|
10882
10909
|
feeType: 'paymentInfo',
|
|
10883
10910
|
dryRunError: dryRunResult.failureReason,
|
|
10911
|
+
dryRunSubError: dryRunResult.failureSubReason,
|
|
10884
10912
|
sufficient: false
|
|
10885
10913
|
});
|
|
10886
10914
|
case 8:
|
|
@@ -10994,19 +11022,23 @@ var getFailureInfo = function getFailureInfo(chains, hops) {
|
|
|
10994
11022
|
// Check standard chains first for backwards compatibility
|
|
10995
11023
|
if ((_chains$origin = chains.origin) !== null && _chains$origin !== void 0 && _chains$origin.dryRunError) return {
|
|
10996
11024
|
failureChain: 'origin',
|
|
10997
|
-
failureReason: chains.origin.dryRunError
|
|
11025
|
+
failureReason: chains.origin.dryRunError,
|
|
11026
|
+
failureSubReason: chains.origin.dryRunSubError
|
|
10998
11027
|
};
|
|
10999
11028
|
if ((_chains$assetHub = chains.assetHub) !== null && _chains$assetHub !== void 0 && _chains$assetHub.dryRunError) return {
|
|
11000
11029
|
failureChain: 'assetHub',
|
|
11001
|
-
failureReason: chains.assetHub.dryRunError
|
|
11030
|
+
failureReason: chains.assetHub.dryRunError,
|
|
11031
|
+
failureSubReason: chains.assetHub.dryRunSubError
|
|
11002
11032
|
};
|
|
11003
11033
|
if ((_chains$bridgeHub = chains.bridgeHub) !== null && _chains$bridgeHub !== void 0 && _chains$bridgeHub.dryRunError) return {
|
|
11004
11034
|
failureChain: 'bridgeHub',
|
|
11005
|
-
failureReason: chains.bridgeHub.dryRunError
|
|
11035
|
+
failureReason: chains.bridgeHub.dryRunError,
|
|
11036
|
+
failureSubReason: chains.bridgeHub.dryRunSubError
|
|
11006
11037
|
};
|
|
11007
11038
|
if ((_chains$destination = chains.destination) !== null && _chains$destination !== void 0 && _chains$destination.dryRunError) return {
|
|
11008
11039
|
failureChain: 'destination',
|
|
11009
|
-
failureReason: chains.destination.dryRunError
|
|
11040
|
+
failureReason: chains.destination.dryRunError,
|
|
11041
|
+
failureSubReason: chains.destination.dryRunSubError
|
|
11010
11042
|
};
|
|
11011
11043
|
// Check hops for failures
|
|
11012
11044
|
var _iterator = _createForOfIteratorHelper(hops),
|
|
@@ -11017,7 +11049,8 @@ var getFailureInfo = function getFailureInfo(chains, hops) {
|
|
|
11017
11049
|
if (hop.result.dryRunError) {
|
|
11018
11050
|
return {
|
|
11019
11051
|
failureChain: hop.chain,
|
|
11020
|
-
failureReason: hop.result.dryRunError
|
|
11052
|
+
failureReason: hop.result.dryRunError,
|
|
11053
|
+
failureSubReason: hop.result.dryRunSubError
|
|
11021
11054
|
};
|
|
11022
11055
|
}
|
|
11023
11056
|
}
|
|
@@ -11030,7 +11063,7 @@ var getFailureInfo = function getFailureInfo(chains, hops) {
|
|
|
11030
11063
|
};
|
|
11031
11064
|
var getXcmFeeInternal = /*#__PURE__*/function () {
|
|
11032
11065
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(_ref) {
|
|
11033
|
-
var api, tx, origin, destination, senderAddress, address, currency, feeAsset, disableFallback, swapConfig, useRootOrigin, asset, amount, _yield$getOriginXcmFe, originFeeRaw, originCurrency, originAsset, originFeeType, originDryRunError, initialForwardedXcm, initialDestParaId, originWeight, sufficientOriginFee, isMythosToEthereum, originFee, destApi, destFeeRes, _result, _getFailureInfo, _failureChain, _failureReason, processHop, traversalResult, destFee, destCurrency, destAsset, destFeeType, destDryRunError, destSufficient, destResult, _destApi, destFallback, assetHubChain, processedBridgeHub, bridgeHubChain, bridgeHubHopIndex, convertToFeeDetail, result, _getFailureInfo2, failureChain, failureReason, _t, _t2, _t3, _t4;
|
|
11066
|
+
var api, tx, origin, destination, senderAddress, address, currency, feeAsset, disableFallback, swapConfig, useRootOrigin, asset, amount, _yield$getOriginXcmFe, originFeeRaw, originCurrency, originAsset, originFeeType, originDryRunError, originDryRunSubError, initialForwardedXcm, initialDestParaId, originWeight, sufficientOriginFee, isMythosToEthereum, originFee, destApi, destFeeRes, _result, _getFailureInfo, _failureChain, _failureReason, processHop, traversalResult, destFee, destCurrency, destAsset, destFeeType, destDryRunError, destDryRunSubError, destSufficient, destResult, _destApi, destFallback, assetHubChain, processedBridgeHub, bridgeHubChain, bridgeHubHopIndex, convertToFeeDetail, result, _getFailureInfo2, failureChain, failureReason, _t, _t2, _t3, _t4;
|
|
11034
11067
|
return _regenerator().w(function (_context2) {
|
|
11035
11068
|
while (1) switch (_context2.p = _context2.n) {
|
|
11036
11069
|
case 0:
|
|
@@ -11056,6 +11089,7 @@ var getXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
11056
11089
|
originAsset = _yield$getOriginXcmFe.asset;
|
|
11057
11090
|
originFeeType = _yield$getOriginXcmFe.feeType;
|
|
11058
11091
|
originDryRunError = _yield$getOriginXcmFe.dryRunError;
|
|
11092
|
+
originDryRunSubError = _yield$getOriginXcmFe.dryRunSubError;
|
|
11059
11093
|
initialForwardedXcm = _yield$getOriginXcmFe.forwardedXcms;
|
|
11060
11094
|
initialDestParaId = _yield$getOriginXcmFe.destParaId;
|
|
11061
11095
|
originWeight = _yield$getOriginXcmFe.weight;
|
|
@@ -11109,7 +11143,7 @@ var getXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
11109
11143
|
case 7:
|
|
11110
11144
|
destFeeRes = _context2.v;
|
|
11111
11145
|
_result = {
|
|
11112
|
-
origin: _objectSpread2(_objectSpread2(_objectSpread2({}, originFee && {
|
|
11146
|
+
origin: _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, originFee && {
|
|
11113
11147
|
fee: originFee
|
|
11114
11148
|
}), originFeeType && {
|
|
11115
11149
|
feeType: originFeeType
|
|
@@ -11119,6 +11153,8 @@ var getXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
11119
11153
|
asset: originAsset
|
|
11120
11154
|
}, originDryRunError && {
|
|
11121
11155
|
dryRunError: originDryRunError
|
|
11156
|
+
}), originDryRunSubError && {
|
|
11157
|
+
dryRunSubError: originDryRunSubError
|
|
11122
11158
|
}),
|
|
11123
11159
|
destination: _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, destFeeRes.fee ? {
|
|
11124
11160
|
fee: destFeeRes.fee
|
|
@@ -11232,6 +11268,7 @@ var getXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
11232
11268
|
destFee = destResult.fee;
|
|
11233
11269
|
destFeeType = destResult.feeType;
|
|
11234
11270
|
destDryRunError = destResult.dryRunError;
|
|
11271
|
+
destDryRunSubError = destResult.dryRunSubError;
|
|
11235
11272
|
destSufficient = destResult.sufficient;
|
|
11236
11273
|
destCurrency = destResult.currency;
|
|
11237
11274
|
destAsset = destResult.asset;
|
|
@@ -11310,7 +11347,7 @@ var getXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
11310
11347
|
}
|
|
11311
11348
|
}
|
|
11312
11349
|
convertToFeeDetail = function convertToFeeDetail(result) {
|
|
11313
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, result.fee !== undefined && {
|
|
11350
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, result.fee !== undefined && {
|
|
11314
11351
|
fee: result.fee
|
|
11315
11352
|
}), result.feeType && {
|
|
11316
11353
|
feeType: result.feeType
|
|
@@ -11321,10 +11358,12 @@ var getXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
11321
11358
|
asset: result.asset
|
|
11322
11359
|
}, result.dryRunError && {
|
|
11323
11360
|
dryRunError: result.dryRunError
|
|
11361
|
+
}), result.dryRunSubError && {
|
|
11362
|
+
dryRunSubError: result.dryRunSubError
|
|
11324
11363
|
});
|
|
11325
11364
|
};
|
|
11326
11365
|
result = _objectSpread2(_objectSpread2(_objectSpread2({
|
|
11327
|
-
origin: _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, originWeight && {
|
|
11366
|
+
origin: _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, originWeight && {
|
|
11328
11367
|
weight: originWeight
|
|
11329
11368
|
}), originFee && {
|
|
11330
11369
|
fee: originFee
|
|
@@ -11337,13 +11376,15 @@ var getXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
11337
11376
|
asset: originAsset
|
|
11338
11377
|
}, originDryRunError && {
|
|
11339
11378
|
dryRunError: originDryRunError
|
|
11379
|
+
}), originDryRunSubError && {
|
|
11380
|
+
dryRunSubError: originDryRunSubError
|
|
11340
11381
|
})
|
|
11341
11382
|
}, traversalResult.assetHub && {
|
|
11342
11383
|
assetHub: convertToFeeDetail(traversalResult.assetHub)
|
|
11343
11384
|
}), processedBridgeHub && {
|
|
11344
11385
|
bridgeHub: convertToFeeDetail(processedBridgeHub)
|
|
11345
11386
|
}), {}, {
|
|
11346
|
-
destination: _objectSpread2(_objectSpread2(_objectSpread2({}, destFee !== undefined && {
|
|
11387
|
+
destination: _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, destFee !== undefined && {
|
|
11347
11388
|
fee: destFee
|
|
11348
11389
|
}), destFeeType && {
|
|
11349
11390
|
feeType: destFeeType
|
|
@@ -11353,6 +11394,8 @@ var getXcmFeeInternal = /*#__PURE__*/function () {
|
|
|
11353
11394
|
asset: destAsset
|
|
11354
11395
|
}, destDryRunError && {
|
|
11355
11396
|
dryRunError: destDryRunError
|
|
11397
|
+
}), destDryRunSubError && {
|
|
11398
|
+
dryRunSubError: destDryRunSubError
|
|
11356
11399
|
}),
|
|
11357
11400
|
hops: traversalResult.hops.map(function (hop) {
|
|
11358
11401
|
return {
|
|
@@ -13979,4 +14022,4 @@ var Builder = function Builder(api) {
|
|
|
13979
14022
|
return new GeneralBuilder(api, new BatchTransactionManager());
|
|
13980
14023
|
};
|
|
13981
14024
|
|
|
13982
|
-
export { AmountTooLowError, AssetClaimBuilder, AssetsPallet, BatchMode, BridgeHaltedError, Builder, ChainNotSupportedError, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, GeneralBuilder, IncompatibleChainsError, InvalidAddressError, InvalidParameterError, MissingChainApiError, NoXCMSupportImplementedError, PolkadotXcmError, ScenarioNotSupportedError, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, UnableToComputeError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, applyDecimalAbstraction, assertAddressIsString, assertHasId, assertHasLocation, assertIsForeign, assertSenderAddress, assertToIsString, blake2b256, blake2b512, calcPreviewMintAmount, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, computeOverridenAmount, convertSs58, createAsset, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createDirectExecuteXcm, createExecuteCall, createExecuteExchangeXcm, createTx, createTypeAndThenCall, createVersionedAssets, createX1Payload, deriveAccountId, dryRun, dryRunInternal, dryRunOrigin, encodeSs58, formatUnits, getAssetBalance, getAssetBalanceInternal, getAssetReserveChain, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getBridgeStatus, getChain, getChainConfig, getChainLocation, getChainProviders, getChainVersion, getCurrencySelection, getFailureInfo$1 as getFailureInfo, getMinTransferableAmount, getMinTransferableAmountInternal, getOriginFeeDetails, getOriginFeeDetailsInternal, getOriginXcmFee, getOriginXcmFeeEstimate, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getRelayChainOf, getTChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeEstimate, getXcmFeeInternal, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, localizeLocation, maybeOverrideAsset, maybeOverrideAssets, normalizeAmount, overrideTxAmount, padFee, padValueBy, parseUnits, resolveDestChain, resolveModuleError, resolveParaId, reverseTransformLocation, send, sortAssets, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, traverseXcmHops, validateAddress, validateAssetSpecifiers, validateCurrency, validateDestination, verifyEdOnDestination, wrapTxBypass };
|
|
14025
|
+
export { AmountTooLowError, AssetClaimBuilder, AssetsPallet, BatchMode, BridgeHaltedError, Builder, ChainNotSupportedError, DRY_RUN_CLIENT_TIMEOUT_MS, DryRunFailedError, ETHEREUM_JUNCTION, ETH_CHAIN_ID, GeneralBuilder, IncompatibleChainsError, InvalidAddressError, InvalidParameterError, MissingChainApiError, NoXCMSupportImplementedError, PolkadotXcmError, PolkadotXcmExecutionError, ScenarioNotSupportedError, TX_CLIENT_TIMEOUT_MS, TransferToAhNotSupported, UnableToComputeError, XTokensError, abstractDecimals, addEthereumBridgeFees, addXcmVersionHeader, applyDecimalAbstraction, assertAddressIsString, assertHasId, assertHasLocation, assertIsForeign, assertSenderAddress, assertToIsString, blake2b256, blake2b512, calcPreviewMintAmount, claimAssets, computeFeeFromDryRun, computeFeeFromDryRunPjs, computeOverridenAmount, convertSs58, createAsset, createAssetsFilter, createBaseExecuteXcm, createBeneficiaryLocXTokens, createBeneficiaryLocation, createChainClient, createDirectExecuteXcm, createExecuteCall, createExecuteExchangeXcm, createTx, createTypeAndThenCall, createVersionedAssets, createX1Payload, deriveAccountId, dryRun, dryRunInternal, dryRunOrigin, encodeSs58, formatUnits, getAssetBalance, getAssetBalanceInternal, getAssetReserveChain, getBalanceForeign, getBalanceForeignInternal, getBalanceNative, getBalanceNativeInternal, getBridgeStatus, getChain, getChainConfig, getChainLocation, getChainProviders, getChainVersion, getCurrencySelection, getFailureInfo$1 as getFailureInfo, getMinTransferableAmount, getMinTransferableAmountInternal, getOriginFeeDetails, getOriginFeeDetailsInternal, getOriginXcmFee, getOriginXcmFeeEstimate, getOriginXcmFeeInternal, getParaEthTransferFees, getParaId, getRelayChainOf, getTChain, getTransferInfo, getTransferableAmount, getTransferableAmountInternal, getXcmFee, getXcmFeeEstimate, getXcmFeeInternal, handleExecuteTransfer, handleSwapExecuteTransfer, handleToAhTeleport, isConfig, localizeLocation, maybeOverrideAsset, maybeOverrideAssets, normalizeAmount, overrideTxAmount, padFee, padValueBy, parseUnits, resolveDestChain, resolveModuleError, resolveParaId, reverseTransformLocation, send, sortAssets, transferMoonbeamEvm, transferMoonbeamToEth, transferRelayToPara, traverseXcmHops, validateAddress, validateAssetSpecifiers, validateCurrency, validateDestination, verifyEdOnDestination, wrapTxBypass };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk-core",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.14.0",
|
|
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/
|
|
30
|
-
"@paraspell/
|
|
31
|
-
"@paraspell/pallets": "11.
|
|
29
|
+
"@paraspell/sdk-common": "11.14.0",
|
|
30
|
+
"@paraspell/assets": "11.14.0",
|
|
31
|
+
"@paraspell/pallets": "11.14.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/plugin-syntax-import-attributes": "^7.27.1",
|