@paraspell/sdk 11.9.2 → 11.9.3
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 +9 -9
- package/dist/index.mjs +9 -9
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1374,7 +1374,7 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1374
1374
|
value: function () {
|
|
1375
1375
|
var _getDryRunCall = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee17(options) {
|
|
1376
1376
|
var _this = this;
|
|
1377
|
-
var tx, chain, destination, address, feeAsset, bypassOptions, _options$useRootOrigi, useRootOrigin, supportsDryRunApi, DEFAULT_XCM_VERSION, basePayload, resolvedTx, performDryRunCall, getExecutionSuccessFromResult, extractFailureReasonFromResult, result, isSuccess, failureOutputReason, initialFailureReason, usedAsset, usedSymbol, actualWeight, weight, forwardedXcms, destParaId,
|
|
1377
|
+
var tx, chain, destination, address, feeAsset, bypassOptions, _options$useRootOrigi, useRootOrigin, supportsDryRunApi, DEFAULT_XCM_VERSION, basePayload, resolvedTx, performDryRunCall, getExecutionSuccessFromResult, extractFailureReasonFromResult, result, isSuccess, failureOutputReason, initialFailureReason, usedAsset, usedSymbol, actualWeight, weight, forwardedXcms, destParaId, nativeAsset, hasLocation, xcmFee, executionFee, fee, _t2;
|
|
1378
1378
|
return _regenerator().w(function (_context17) {
|
|
1379
1379
|
while (1) switch (_context17.n) {
|
|
1380
1380
|
case 0:
|
|
@@ -1503,22 +1503,18 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1503
1503
|
} : undefined;
|
|
1504
1504
|
forwardedXcms = result.value.forwarded_xcms.length > 0 ? result.value.forwarded_xcms[0] : [];
|
|
1505
1505
|
destParaId = forwardedXcms.length === 0 ? undefined : forwardedXcms[0].value.interior.type === 'Here' ? 0 : forwardedXcms[0].value.interior.value.value;
|
|
1506
|
-
_context17.n = 9;
|
|
1507
|
-
return this.calculateTransactionFee(tx, address);
|
|
1508
|
-
case 9:
|
|
1509
|
-
executionFee = _context17.v;
|
|
1510
1506
|
nativeAsset = sdkCore.findNativeAssetInfoOrThrow(chain);
|
|
1511
1507
|
hasLocation = feeAsset ? Boolean(feeAsset.location) : Boolean(nativeAsset === null || nativeAsset === void 0 ? void 0 : nativeAsset.location);
|
|
1512
1508
|
if (!(sdkCore.hasXcmPaymentApiSupport(chain) && result.value.local_xcm && hasLocation && (feeAsset || chain.startsWith('AssetHub') && destination === 'Ethereum'))) {
|
|
1513
|
-
_context17.n =
|
|
1509
|
+
_context17.n = 10;
|
|
1514
1510
|
break;
|
|
1515
1511
|
}
|
|
1516
|
-
_context17.n =
|
|
1512
|
+
_context17.n = 9;
|
|
1517
1513
|
return this.getXcmPaymentApiFee(chain, result.value.local_xcm, forwardedXcms, feeAsset !== null && feeAsset !== void 0 ? feeAsset : nativeAsset);
|
|
1518
|
-
case
|
|
1514
|
+
case 9:
|
|
1519
1515
|
xcmFee = _context17.v;
|
|
1520
1516
|
if (!(typeof xcmFee === 'bigint')) {
|
|
1521
|
-
_context17.n =
|
|
1517
|
+
_context17.n = 10;
|
|
1522
1518
|
break;
|
|
1523
1519
|
}
|
|
1524
1520
|
return _context17.a(2, Promise.resolve({
|
|
@@ -1530,7 +1526,11 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1530
1526
|
forwardedXcms: forwardedXcms,
|
|
1531
1527
|
destParaId: destParaId
|
|
1532
1528
|
}));
|
|
1529
|
+
case 10:
|
|
1530
|
+
_context17.n = 11;
|
|
1531
|
+
return this.calculateTransactionFee(tx, address);
|
|
1533
1532
|
case 11:
|
|
1533
|
+
executionFee = _context17.v;
|
|
1534
1534
|
fee = sdkCore.computeFeeFromDryRun(result, chain, executionFee, !!feeAsset);
|
|
1535
1535
|
return _context17.a(2, Promise.resolve({
|
|
1536
1536
|
success: true,
|
package/dist/index.mjs
CHANGED
|
@@ -1373,7 +1373,7 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1373
1373
|
value: function () {
|
|
1374
1374
|
var _getDryRunCall = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee17(options) {
|
|
1375
1375
|
var _this = this;
|
|
1376
|
-
var tx, chain, destination, address, feeAsset, bypassOptions, _options$useRootOrigi, useRootOrigin, supportsDryRunApi, DEFAULT_XCM_VERSION, basePayload, resolvedTx, performDryRunCall, getExecutionSuccessFromResult, extractFailureReasonFromResult, result, isSuccess, failureOutputReason, initialFailureReason, usedAsset, usedSymbol, actualWeight, weight, forwardedXcms, destParaId,
|
|
1376
|
+
var tx, chain, destination, address, feeAsset, bypassOptions, _options$useRootOrigi, useRootOrigin, supportsDryRunApi, DEFAULT_XCM_VERSION, basePayload, resolvedTx, performDryRunCall, getExecutionSuccessFromResult, extractFailureReasonFromResult, result, isSuccess, failureOutputReason, initialFailureReason, usedAsset, usedSymbol, actualWeight, weight, forwardedXcms, destParaId, nativeAsset, hasLocation, xcmFee, executionFee, fee, _t2;
|
|
1377
1377
|
return _regenerator().w(function (_context17) {
|
|
1378
1378
|
while (1) switch (_context17.n) {
|
|
1379
1379
|
case 0:
|
|
@@ -1502,22 +1502,18 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1502
1502
|
} : undefined;
|
|
1503
1503
|
forwardedXcms = result.value.forwarded_xcms.length > 0 ? result.value.forwarded_xcms[0] : [];
|
|
1504
1504
|
destParaId = forwardedXcms.length === 0 ? undefined : forwardedXcms[0].value.interior.type === 'Here' ? 0 : forwardedXcms[0].value.interior.value.value;
|
|
1505
|
-
_context17.n = 9;
|
|
1506
|
-
return this.calculateTransactionFee(tx, address);
|
|
1507
|
-
case 9:
|
|
1508
|
-
executionFee = _context17.v;
|
|
1509
1505
|
nativeAsset = findNativeAssetInfoOrThrow(chain);
|
|
1510
1506
|
hasLocation = feeAsset ? Boolean(feeAsset.location) : Boolean(nativeAsset === null || nativeAsset === void 0 ? void 0 : nativeAsset.location);
|
|
1511
1507
|
if (!(hasXcmPaymentApiSupport(chain) && result.value.local_xcm && hasLocation && (feeAsset || chain.startsWith('AssetHub') && destination === 'Ethereum'))) {
|
|
1512
|
-
_context17.n =
|
|
1508
|
+
_context17.n = 10;
|
|
1513
1509
|
break;
|
|
1514
1510
|
}
|
|
1515
|
-
_context17.n =
|
|
1511
|
+
_context17.n = 9;
|
|
1516
1512
|
return this.getXcmPaymentApiFee(chain, result.value.local_xcm, forwardedXcms, feeAsset !== null && feeAsset !== void 0 ? feeAsset : nativeAsset);
|
|
1517
|
-
case
|
|
1513
|
+
case 9:
|
|
1518
1514
|
xcmFee = _context17.v;
|
|
1519
1515
|
if (!(typeof xcmFee === 'bigint')) {
|
|
1520
|
-
_context17.n =
|
|
1516
|
+
_context17.n = 10;
|
|
1521
1517
|
break;
|
|
1522
1518
|
}
|
|
1523
1519
|
return _context17.a(2, Promise.resolve({
|
|
@@ -1529,7 +1525,11 @@ var PapiApi = /*#__PURE__*/function () {
|
|
|
1529
1525
|
forwardedXcms: forwardedXcms,
|
|
1530
1526
|
destParaId: destParaId
|
|
1531
1527
|
}));
|
|
1528
|
+
case 10:
|
|
1529
|
+
_context17.n = 11;
|
|
1530
|
+
return this.calculateTransactionFee(tx, address);
|
|
1532
1531
|
case 11:
|
|
1532
|
+
executionFee = _context17.v;
|
|
1533
1533
|
fee = computeFeeFromDryRun(result, chain, executionFee, !!feeAsset);
|
|
1534
1534
|
return _context17.a(2, Promise.resolve({
|
|
1535
1535
|
success: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk",
|
|
3
|
-
"version": "11.9.
|
|
3
|
+
"version": "11.9.3",
|
|
4
4
|
"description": "SDK for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@noble/hashes": "^1.8.0",
|
|
27
27
|
"@polkadot-api/legacy-provider": "^0.3.3",
|
|
28
28
|
"viem": "^2.37.9",
|
|
29
|
-
"@paraspell/sdk-core": "11.9.
|
|
29
|
+
"@paraspell/sdk-core": "11.9.3"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"polkadot-api": ">= 1.20.0 < 2"
|