@paraspell/sdk-dedot 13.8.0 → 13.9.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.
Files changed (2) hide show
  1. package/dist/index.mjs +19 -5
  2. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -750,13 +750,23 @@ var extractDryRunXcmFailureReason = function extractDryRunXcmFailureReason(resul
750
750
  var executionResult = result === null || result === void 0 || (_result$value = result.value) === null || _result$value === void 0 ? void 0 : _result$value.executionResult;
751
751
  var error = executionResult === null || executionResult === void 0 || (_executionResult$valu = executionResult.value) === null || _executionResult$valu === void 0 ? void 0 : _executionResult$valu.error;
752
752
  var failureType = (_ref3 = (_ref4 = (_ref5 = (_error$error$type = error === null || error === void 0 || (_error$error = error.error) === null || _error$error === void 0 ? void 0 : _error$error.type) !== null && _error$error$type !== void 0 ? _error$error$type : error === null || error === void 0 || (_error$value = error.value) === null || _error$value === void 0 || (_error$value = _error$value.error) === null || _error$value === void 0 ? void 0 : _error$value.type) !== null && _ref5 !== void 0 ? _ref5 : error === null || error === void 0 || (_error$value2 = error.value) === null || _error$value2 === void 0 || (_error$value2 = _error$value2.value) === null || _error$value2 === void 0 ? void 0 : _error$value2.type) !== null && _ref4 !== void 0 ? _ref4 : error === null || error === void 0 || (_error$value3 = error.value) === null || _error$value3 === void 0 ? void 0 : _error$value3.type) !== null && _ref3 !== void 0 ? _ref3 : error === null || error === void 0 ? void 0 : error.type;
753
+ var failureIndex = typeof (error === null || error === void 0 ? void 0 : error.index) === "number" ? error.index : undefined;
753
754
  if (typeof failureType === "string") {
754
- return failureType;
755
+ return {
756
+ failureReason: failureType,
757
+ failureIndex: failureIndex
758
+ };
755
759
  }
756
760
  if (typeof (executionResult === null || executionResult === void 0 ? void 0 : executionResult.type) === "string") {
757
- return executionResult.type;
761
+ return {
762
+ failureReason: executionResult.type,
763
+ failureIndex: failureIndex
764
+ };
758
765
  }
759
- return JSON.stringify((_ref6 = (_result$value2 = result === null || result === void 0 ? void 0 : result.value) !== null && _result$value2 !== void 0 ? _result$value2 : result) !== null && _ref6 !== void 0 ? _ref6 : "Unknown error structure", replaceBigInt);
766
+ return {
767
+ failureReason: JSON.stringify((_ref6 = (_result$value2 = result === null || result === void 0 ? void 0 : result.value) !== null && _result$value2 !== void 0 ? _result$value2 : result) !== null && _ref6 !== void 0 ? _ref6 : "Unknown error structure", replaceBigInt),
768
+ failureIndex: failureIndex
769
+ };
760
770
  };
761
771
  var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
762
772
  function DedotApi() {
@@ -1251,6 +1261,7 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1251
1261
  success: false,
1252
1262
  failureReason: failureErr.failureReason,
1253
1263
  failureSubReason: failureErr.failureSubReason,
1264
+ failureIndex: failureErr.failureIndex,
1254
1265
  asset: resolvedFeeAsset.asset
1255
1266
  });
1256
1267
  case 14:
@@ -1262,6 +1273,7 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1262
1273
  success: false,
1263
1274
  failureReason: failureErr.failureReason || "Unknown error",
1264
1275
  failureSubReason: failureErr.failureSubReason,
1276
+ failureIndex: failureErr.failureIndex,
1265
1277
  asset: resolvedFeeAsset.asset
1266
1278
  });
1267
1279
  case 15:
@@ -1587,7 +1599,7 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1587
1599
  value: function () {
1588
1600
  var _getDryRunXcm = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee11(_ref10) {
1589
1601
  var _result$value5;
1590
- var originLocation, xcm, asset, chain, version, supportsDryRunApi, transformedOriginLocation, result, executionResult, isSuccess, actualWeight, weight, forwardedXcms, destParaId, fee;
1602
+ var originLocation, xcm, asset, chain, version, supportsDryRunApi, transformedOriginLocation, result, executionResult, isSuccess, _extractDryRunXcmFail, failureReason, failureIndex, actualWeight, weight, forwardedXcms, destParaId, fee;
1591
1603
  return _regenerator().w(function (_context11) {
1592
1604
  while (1) switch (_context11.n) {
1593
1605
  case 0:
@@ -1610,9 +1622,11 @@ var DedotApi = /*#__PURE__*/function (_PolkadotApi) {
1610
1622
  _context11.n = 3;
1611
1623
  break;
1612
1624
  }
1625
+ _extractDryRunXcmFail = extractDryRunXcmFailureReason(result), failureReason = _extractDryRunXcmFail.failureReason, failureIndex = _extractDryRunXcmFail.failureIndex;
1613
1626
  return _context11.a(2, {
1614
1627
  success: false,
1615
- failureReason: extractDryRunXcmFailureReason(result),
1628
+ failureReason: failureReason,
1629
+ failureIndex: failureIndex,
1616
1630
  asset: asset
1617
1631
  });
1618
1632
  case 3:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk-dedot",
3
- "version": "13.8.0",
3
+ "version": "13.9.0",
4
4
  "description": "Dedot-based SDK for ParaSpell XCM/XCMP tool for developers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,8 +22,8 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "@paraspell/sdk-core": "13.8.0",
26
- "@paraspell/sdk-common": "13.8.0"
25
+ "@paraspell/sdk-common": "13.9.0",
26
+ "@paraspell/sdk-core": "13.9.0"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "dedot": ">= 1.3.0",