@paraspell/sdk-pjs 8.9.8 → 8.9.10

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 CHANGED
@@ -16,6 +16,9 @@ function _arrayLikeToArray(r, a) {
16
16
  function _arrayWithHoles(r) {
17
17
  if (Array.isArray(r)) return r;
18
18
  }
19
+ function _arrayWithoutHoles(r) {
20
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
21
+ }
19
22
  function asyncGeneratorStep(n, t, e, r, o, a, c) {
20
23
  try {
21
24
  var i = n[a](c),
@@ -63,6 +66,9 @@ function _defineProperty(e, r, t) {
63
66
  writable: true
64
67
  }) : e[r] = t, e;
65
68
  }
69
+ function _iterableToArray(r) {
70
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
71
+ }
66
72
  function _iterableToArrayLimit(r, l) {
67
73
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
68
74
  if (null != t) {
@@ -90,6 +96,9 @@ function _iterableToArrayLimit(r, l) {
90
96
  function _nonIterableRest() {
91
97
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
92
98
  }
99
+ function _nonIterableSpread() {
100
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
101
+ }
93
102
  function ownKeys(e, r) {
94
103
  var t = Object.keys(e);
95
104
  if (Object.getOwnPropertySymbols) {
@@ -415,6 +424,9 @@ function _regeneratorRuntime() {
415
424
  function _slicedToArray(r, e) {
416
425
  return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
417
426
  }
427
+ function _toConsumableArray(r) {
428
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
429
+ }
418
430
  function _toPrimitive(t, r) {
419
431
  if ("object" != typeof t || !t) return t;
420
432
  var e = t[Symbol.toPrimitive];
@@ -945,7 +957,8 @@ var PolkadotJsApi = /*#__PURE__*/function () {
945
957
  key: "getDryRun",
946
958
  value: function () {
947
959
  var _getDryRun = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee16(_ref4) {
948
- var tx, address, node, supportsDryRunApi, response, result, isSuccess, moduleError, failureReason, executionFee, fee, actualWeight, weight;
960
+ var _this$api$call$dryRun;
961
+ var tx, address, node, supportsDryRunApi, isBifrost, DEFAULT_XCM_VERSION, response, result, isSuccess, moduleError, failureReason, executionFee, fee, actualWeight, weight;
949
962
  return _regeneratorRuntime().wrap(function _callee16$(_context16) {
950
963
  while (1) switch (_context16.prev = _context16.next) {
951
964
  case 0:
@@ -957,18 +970,21 @@ var PolkadotJsApi = /*#__PURE__*/function () {
957
970
  }
958
971
  throw new sdkCore.NodeNotSupportedError("DryRunApi is not available on node ".concat(node));
959
972
  case 4:
960
- _context16.next = 6;
961
- return this.api.call.dryRunApi.dryRunCall({
973
+ // Bifrost requires a third parameter XCM version
974
+ isBifrost = node === 'BifrostPolkadot' || node === 'BifrostKusama';
975
+ DEFAULT_XCM_VERSION = 3;
976
+ _context16.next = 8;
977
+ return (_this$api$call$dryRun = this.api.call.dryRunApi).dryRunCall.apply(_this$api$call$dryRun, [{
962
978
  system: {
963
979
  Signed: address
964
980
  }
965
- }, tx);
966
- case 6:
981
+ }, tx].concat(_toConsumableArray(isBifrost ? [DEFAULT_XCM_VERSION] : [])));
982
+ case 8:
967
983
  response = _context16.sent;
968
984
  result = response.toHuman();
969
985
  isSuccess = result.Ok && result.Ok.executionResult.Ok;
970
986
  if (isSuccess) {
971
- _context16.next = 13;
987
+ _context16.next = 15;
972
988
  break;
973
989
  }
974
990
  moduleError = result.Ok.executionResult.Err.error.Module;
@@ -977,10 +993,10 @@ var PolkadotJsApi = /*#__PURE__*/function () {
977
993
  success: false,
978
994
  failureReason: failureReason
979
995
  });
980
- case 13:
981
- _context16.next = 15;
982
- return this.calculateTransactionFee(tx, address);
983
996
  case 15:
997
+ _context16.next = 17;
998
+ return this.calculateTransactionFee(tx, address);
999
+ case 17:
984
1000
  executionFee = _context16.sent;
985
1001
  fee = sdkCore.computeFeeFromDryRunPjs(result, node, executionFee);
986
1002
  actualWeight = response.toJSON().ok.executionResult.ok.actualWeight;
@@ -993,7 +1009,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
993
1009
  fee: fee,
994
1010
  weight: weight
995
1011
  });
996
- case 20:
1012
+ case 22:
997
1013
  case "end":
998
1014
  return _context16.stop();
999
1015
  }
@@ -1004,6 +1020,30 @@ var PolkadotJsApi = /*#__PURE__*/function () {
1004
1020
  }
1005
1021
  return getDryRun;
1006
1022
  }()
1023
+ }, {
1024
+ key: "getBridgeStatus",
1025
+ value: function () {
1026
+ var _getBridgeStatus = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
1027
+ var outboundOperatingMode;
1028
+ return _regeneratorRuntime().wrap(function _callee17$(_context17) {
1029
+ while (1) switch (_context17.prev = _context17.next) {
1030
+ case 0:
1031
+ _context17.next = 2;
1032
+ return this.api.query.ethereumOutboundQueue.operatingMode();
1033
+ case 2:
1034
+ outboundOperatingMode = _context17.sent;
1035
+ return _context17.abrupt("return", outboundOperatingMode.toPrimitive());
1036
+ case 4:
1037
+ case "end":
1038
+ return _context17.stop();
1039
+ }
1040
+ }, _callee17, this);
1041
+ }));
1042
+ function getBridgeStatus() {
1043
+ return _getBridgeStatus.apply(this, arguments);
1044
+ }
1045
+ return getBridgeStatus;
1046
+ }()
1007
1047
  }, {
1008
1048
  key: "setDisconnectAllowed",
1009
1049
  value: function setDisconnectAllowed(allowed) {
@@ -1017,36 +1057,36 @@ var PolkadotJsApi = /*#__PURE__*/function () {
1017
1057
  }, {
1018
1058
  key: "disconnect",
1019
1059
  value: function () {
1020
- var _disconnect = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
1060
+ var _disconnect = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
1021
1061
  var force,
1022
- _args17 = arguments;
1023
- return _regeneratorRuntime().wrap(function _callee17$(_context17) {
1024
- while (1) switch (_context17.prev = _context17.next) {
1062
+ _args18 = arguments;
1063
+ return _regeneratorRuntime().wrap(function _callee18$(_context18) {
1064
+ while (1) switch (_context18.prev = _context18.next) {
1025
1065
  case 0:
1026
- force = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : false;
1066
+ force = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : false;
1027
1067
  if (this.initialized) {
1028
- _context17.next = 3;
1068
+ _context18.next = 3;
1029
1069
  break;
1030
1070
  }
1031
- return _context17.abrupt("return", Promise.resolve());
1071
+ return _context18.abrupt("return", Promise.resolve());
1032
1072
  case 3:
1033
1073
  if (!(!force && !this.disconnectAllowed)) {
1034
- _context17.next = 5;
1074
+ _context18.next = 5;
1035
1075
  break;
1036
1076
  }
1037
- return _context17.abrupt("return");
1077
+ return _context18.abrupt("return");
1038
1078
  case 5:
1039
1079
  if (!(force || typeof this._api === 'string' || this._api === undefined)) {
1040
- _context17.next = 8;
1080
+ _context18.next = 8;
1041
1081
  break;
1042
1082
  }
1043
- _context17.next = 8;
1083
+ _context18.next = 8;
1044
1084
  return this.api.disconnect();
1045
1085
  case 8:
1046
1086
  case "end":
1047
- return _context17.stop();
1087
+ return _context18.stop();
1048
1088
  }
1049
- }, _callee17, this);
1089
+ }, _callee18, this);
1050
1090
  }));
1051
1091
  function disconnect() {
1052
1092
  return _disconnect.apply(this, arguments);
@@ -1677,11 +1717,34 @@ var getParaEthTransferFees = /*#__PURE__*/function () {
1677
1717
  return _ref.apply(this, arguments);
1678
1718
  };
1679
1719
  }();
1720
+ /**
1721
+ * Gets the Ethereum bridge status.
1722
+ */
1723
+ var getBridgeStatus = /*#__PURE__*/function () {
1724
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(api) {
1725
+ var pjsApi;
1726
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1727
+ while (1) switch (_context2.prev = _context2.next) {
1728
+ case 0:
1729
+ pjsApi = new PolkadotJsApi();
1730
+ pjsApi.setApi(api);
1731
+ return _context2.abrupt("return", sdkCore.getBridgeStatus(pjsApi));
1732
+ case 3:
1733
+ case "end":
1734
+ return _context2.stop();
1735
+ }
1736
+ }, _callee2);
1737
+ }));
1738
+ return function getBridgeStatus(_x2) {
1739
+ return _ref2.apply(this, arguments);
1740
+ };
1741
+ }();
1680
1742
 
1681
1743
  var transfer = /*#__PURE__*/Object.freeze({
1682
1744
  __proto__: null,
1683
1745
  approveToken: approveToken,
1684
1746
  depositToken: depositToken,
1747
+ getBridgeStatus: getBridgeStatus,
1685
1748
  getDryRun: getDryRun,
1686
1749
  getParaEthTransferFees: getParaEthTransferFees,
1687
1750
  getTokenBalance: getTokenBalance,
@@ -1699,6 +1762,7 @@ exports.depositToken = depositToken;
1699
1762
  exports.getAssetBalance = getAssetBalance;
1700
1763
  exports.getBalanceForeign = getBalanceForeign;
1701
1764
  exports.getBalanceNative = getBalanceNative;
1765
+ exports.getBridgeStatus = getBridgeStatus;
1702
1766
  exports.getDryRun = getDryRun;
1703
1767
  exports.getMaxForeignTransferableAmount = getMaxForeignTransferableAmount;
1704
1768
  exports.getMaxNativeTransferableAmount = getMaxNativeTransferableAmount;
package/dist/index.d.ts CHANGED
@@ -227,9 +227,14 @@ declare const transferEthToPolkadot: (options: Omit<TEvmBuilderOptions<TPjsApi,
227
227
  messageReceipt: _snowbridge_api_dist_toPolkadot_v2.MessageReceipt;
228
228
  }>;
229
229
  declare const getParaEthTransferFees: (api?: TPjsApiOrUrl) => Promise<[bigint, bigint]>;
230
+ /**
231
+ * Gets the Ethereum bridge status.
232
+ */
233
+ declare const getBridgeStatus: (api?: TPjsApiOrUrl) => Promise<_paraspell_sdk_core.TBridgeStatus>;
230
234
 
231
235
  declare const transfer_approveToken: typeof approveToken;
232
236
  declare const transfer_depositToken: typeof depositToken;
237
+ declare const transfer_getBridgeStatus: typeof getBridgeStatus;
233
238
  declare const transfer_getDryRun: typeof getDryRun;
234
239
  declare const transfer_getParaEthTransferFees: typeof getParaEthTransferFees;
235
240
  declare const transfer_getTokenBalance: typeof getTokenBalance;
@@ -239,6 +244,7 @@ declare namespace transfer {
239
244
  export {
240
245
  transfer_approveToken as approveToken,
241
246
  transfer_depositToken as depositToken,
247
+ transfer_getBridgeStatus as getBridgeStatus,
242
248
  transfer_getDryRun as getDryRun,
243
249
  transfer_getParaEthTransferFees as getParaEthTransferFees,
244
250
  transfer_getTokenBalance as getTokenBalance,
@@ -249,5 +255,5 @@ declare namespace transfer {
249
255
 
250
256
  declare const createApiInstanceForNode: (node: TNodeDotKsmWithRelayChains) => Promise<_polkadot_api.ApiPromise>;
251
257
 
252
- export { Builder, EvmBuilder, approveToken, assets, claimAssets, createApiInstanceForNode, depositToken, getAssetBalance, getBalanceForeign, getBalanceNative, getDryRun, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getOriginFeeDetails, getParaEthTransferFees, getTokenBalance, getTransferInfo, getTransferableAmount, send, transferEthToPolkadot, verifyEdOnDestination, transfer as xcmPallet };
258
+ export { Builder, EvmBuilder, approveToken, assets, claimAssets, createApiInstanceForNode, depositToken, getAssetBalance, getBalanceForeign, getBalanceNative, getBridgeStatus, getDryRun, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getOriginFeeDetails, getParaEthTransferFees, getTokenBalance, getTransferInfo, getTransferableAmount, send, transferEthToPolkadot, verifyEdOnDestination, transfer as xcmPallet };
253
259
  export type { Extrinsic, GeneralBuilder, TPjsApi, TPjsApiOrUrl };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { BatchMode, createApiInstanceForNode as createApiInstanceForNode$1, getNode, isForeignAsset, computeFeeFromDryRunPjs, resolveModuleError, getAssetsObject, NodeNotSupportedError, getBalanceNative as getBalanceNative$1, getBalanceForeign as getBalanceForeign$1, getTransferInfo as getTransferInfo$1, getAssetBalance as getAssetBalance$1, claimAssets as claimAssets$1, getOriginFeeDetails as getOriginFeeDetails$1, getMaxNativeTransferableAmount as getMaxNativeTransferableAmount$1, getMaxForeignTransferableAmount as getMaxForeignTransferableAmount$1, getTransferableAmount as getTransferableAmount$1, verifyEdOnDestination as verifyEdOnDestination$1, Foreign, ForeignAbstract, Native, Override, findAsset, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTNode, hasSupportForAsset, isNodeEvm, getParaId, ETH_CHAIN_ID, InvalidCurrencyError, isEthersSigner, isOverrideMultiLocationSpecifier, validateAddress, transferMoonbeamToEth, transferMoonbeamEvm, Builder as Builder$1, getParaEthTransferFees as getParaEthTransferFees$1, send as send$1, getDryRun as getDryRun$1 } from '@paraspell/sdk-core';
1
+ import { BatchMode, createApiInstanceForNode as createApiInstanceForNode$1, getNode, isForeignAsset, computeFeeFromDryRunPjs, resolveModuleError, getAssetsObject, NodeNotSupportedError, getBalanceNative as getBalanceNative$1, getBalanceForeign as getBalanceForeign$1, getTransferInfo as getTransferInfo$1, getAssetBalance as getAssetBalance$1, claimAssets as claimAssets$1, getOriginFeeDetails as getOriginFeeDetails$1, getMaxNativeTransferableAmount as getMaxNativeTransferableAmount$1, getMaxForeignTransferableAmount as getMaxForeignTransferableAmount$1, getTransferableAmount as getTransferableAmount$1, verifyEdOnDestination as verifyEdOnDestination$1, Foreign, ForeignAbstract, Native, Override, findAsset, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTNode, hasSupportForAsset, isNodeEvm, getParaId, ETH_CHAIN_ID, InvalidCurrencyError, isEthersSigner, isOverrideMultiLocationSpecifier, validateAddress, transferMoonbeamToEth, transferMoonbeamEvm, Builder as Builder$1, getParaEthTransferFees as getParaEthTransferFees$1, getBridgeStatus as getBridgeStatus$1, send as send$1, getDryRun as getDryRun$1 } from '@paraspell/sdk-core';
2
2
  export * from '@paraspell/sdk-core';
3
3
  import { WsProvider, ApiPromise } from '@polkadot/api';
4
4
  import { u32 } from '@polkadot/types';
@@ -15,6 +15,9 @@ function _arrayLikeToArray(r, a) {
15
15
  function _arrayWithHoles(r) {
16
16
  if (Array.isArray(r)) return r;
17
17
  }
18
+ function _arrayWithoutHoles(r) {
19
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
20
+ }
18
21
  function asyncGeneratorStep(n, t, e, r, o, a, c) {
19
22
  try {
20
23
  var i = n[a](c),
@@ -62,6 +65,9 @@ function _defineProperty(e, r, t) {
62
65
  writable: true
63
66
  }) : e[r] = t, e;
64
67
  }
68
+ function _iterableToArray(r) {
69
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
70
+ }
65
71
  function _iterableToArrayLimit(r, l) {
66
72
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
67
73
  if (null != t) {
@@ -89,6 +95,9 @@ function _iterableToArrayLimit(r, l) {
89
95
  function _nonIterableRest() {
90
96
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
91
97
  }
98
+ function _nonIterableSpread() {
99
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
100
+ }
92
101
  function ownKeys(e, r) {
93
102
  var t = Object.keys(e);
94
103
  if (Object.getOwnPropertySymbols) {
@@ -414,6 +423,9 @@ function _regeneratorRuntime() {
414
423
  function _slicedToArray(r, e) {
415
424
  return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
416
425
  }
426
+ function _toConsumableArray(r) {
427
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
428
+ }
417
429
  function _toPrimitive(t, r) {
418
430
  if ("object" != typeof t || !t) return t;
419
431
  var e = t[Symbol.toPrimitive];
@@ -944,7 +956,8 @@ var PolkadotJsApi = /*#__PURE__*/function () {
944
956
  key: "getDryRun",
945
957
  value: function () {
946
958
  var _getDryRun = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee16(_ref4) {
947
- var tx, address, node, supportsDryRunApi, response, result, isSuccess, moduleError, failureReason, executionFee, fee, actualWeight, weight;
959
+ var _this$api$call$dryRun;
960
+ var tx, address, node, supportsDryRunApi, isBifrost, DEFAULT_XCM_VERSION, response, result, isSuccess, moduleError, failureReason, executionFee, fee, actualWeight, weight;
948
961
  return _regeneratorRuntime().wrap(function _callee16$(_context16) {
949
962
  while (1) switch (_context16.prev = _context16.next) {
950
963
  case 0:
@@ -956,18 +969,21 @@ var PolkadotJsApi = /*#__PURE__*/function () {
956
969
  }
957
970
  throw new NodeNotSupportedError("DryRunApi is not available on node ".concat(node));
958
971
  case 4:
959
- _context16.next = 6;
960
- return this.api.call.dryRunApi.dryRunCall({
972
+ // Bifrost requires a third parameter XCM version
973
+ isBifrost = node === 'BifrostPolkadot' || node === 'BifrostKusama';
974
+ DEFAULT_XCM_VERSION = 3;
975
+ _context16.next = 8;
976
+ return (_this$api$call$dryRun = this.api.call.dryRunApi).dryRunCall.apply(_this$api$call$dryRun, [{
961
977
  system: {
962
978
  Signed: address
963
979
  }
964
- }, tx);
965
- case 6:
980
+ }, tx].concat(_toConsumableArray(isBifrost ? [DEFAULT_XCM_VERSION] : [])));
981
+ case 8:
966
982
  response = _context16.sent;
967
983
  result = response.toHuman();
968
984
  isSuccess = result.Ok && result.Ok.executionResult.Ok;
969
985
  if (isSuccess) {
970
- _context16.next = 13;
986
+ _context16.next = 15;
971
987
  break;
972
988
  }
973
989
  moduleError = result.Ok.executionResult.Err.error.Module;
@@ -976,10 +992,10 @@ var PolkadotJsApi = /*#__PURE__*/function () {
976
992
  success: false,
977
993
  failureReason: failureReason
978
994
  });
979
- case 13:
980
- _context16.next = 15;
981
- return this.calculateTransactionFee(tx, address);
982
995
  case 15:
996
+ _context16.next = 17;
997
+ return this.calculateTransactionFee(tx, address);
998
+ case 17:
983
999
  executionFee = _context16.sent;
984
1000
  fee = computeFeeFromDryRunPjs(result, node, executionFee);
985
1001
  actualWeight = response.toJSON().ok.executionResult.ok.actualWeight;
@@ -992,7 +1008,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
992
1008
  fee: fee,
993
1009
  weight: weight
994
1010
  });
995
- case 20:
1011
+ case 22:
996
1012
  case "end":
997
1013
  return _context16.stop();
998
1014
  }
@@ -1003,6 +1019,30 @@ var PolkadotJsApi = /*#__PURE__*/function () {
1003
1019
  }
1004
1020
  return getDryRun;
1005
1021
  }()
1022
+ }, {
1023
+ key: "getBridgeStatus",
1024
+ value: function () {
1025
+ var _getBridgeStatus = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
1026
+ var outboundOperatingMode;
1027
+ return _regeneratorRuntime().wrap(function _callee17$(_context17) {
1028
+ while (1) switch (_context17.prev = _context17.next) {
1029
+ case 0:
1030
+ _context17.next = 2;
1031
+ return this.api.query.ethereumOutboundQueue.operatingMode();
1032
+ case 2:
1033
+ outboundOperatingMode = _context17.sent;
1034
+ return _context17.abrupt("return", outboundOperatingMode.toPrimitive());
1035
+ case 4:
1036
+ case "end":
1037
+ return _context17.stop();
1038
+ }
1039
+ }, _callee17, this);
1040
+ }));
1041
+ function getBridgeStatus() {
1042
+ return _getBridgeStatus.apply(this, arguments);
1043
+ }
1044
+ return getBridgeStatus;
1045
+ }()
1006
1046
  }, {
1007
1047
  key: "setDisconnectAllowed",
1008
1048
  value: function setDisconnectAllowed(allowed) {
@@ -1016,36 +1056,36 @@ var PolkadotJsApi = /*#__PURE__*/function () {
1016
1056
  }, {
1017
1057
  key: "disconnect",
1018
1058
  value: function () {
1019
- var _disconnect = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
1059
+ var _disconnect = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
1020
1060
  var force,
1021
- _args17 = arguments;
1022
- return _regeneratorRuntime().wrap(function _callee17$(_context17) {
1023
- while (1) switch (_context17.prev = _context17.next) {
1061
+ _args18 = arguments;
1062
+ return _regeneratorRuntime().wrap(function _callee18$(_context18) {
1063
+ while (1) switch (_context18.prev = _context18.next) {
1024
1064
  case 0:
1025
- force = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : false;
1065
+ force = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : false;
1026
1066
  if (this.initialized) {
1027
- _context17.next = 3;
1067
+ _context18.next = 3;
1028
1068
  break;
1029
1069
  }
1030
- return _context17.abrupt("return", Promise.resolve());
1070
+ return _context18.abrupt("return", Promise.resolve());
1031
1071
  case 3:
1032
1072
  if (!(!force && !this.disconnectAllowed)) {
1033
- _context17.next = 5;
1073
+ _context18.next = 5;
1034
1074
  break;
1035
1075
  }
1036
- return _context17.abrupt("return");
1076
+ return _context18.abrupt("return");
1037
1077
  case 5:
1038
1078
  if (!(force || typeof this._api === 'string' || this._api === undefined)) {
1039
- _context17.next = 8;
1079
+ _context18.next = 8;
1040
1080
  break;
1041
1081
  }
1042
- _context17.next = 8;
1082
+ _context18.next = 8;
1043
1083
  return this.api.disconnect();
1044
1084
  case 8:
1045
1085
  case "end":
1046
- return _context17.stop();
1086
+ return _context18.stop();
1047
1087
  }
1048
- }, _callee17, this);
1088
+ }, _callee18, this);
1049
1089
  }));
1050
1090
  function disconnect() {
1051
1091
  return _disconnect.apply(this, arguments);
@@ -1676,11 +1716,34 @@ var getParaEthTransferFees = /*#__PURE__*/function () {
1676
1716
  return _ref.apply(this, arguments);
1677
1717
  };
1678
1718
  }();
1719
+ /**
1720
+ * Gets the Ethereum bridge status.
1721
+ */
1722
+ var getBridgeStatus = /*#__PURE__*/function () {
1723
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(api) {
1724
+ var pjsApi;
1725
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1726
+ while (1) switch (_context2.prev = _context2.next) {
1727
+ case 0:
1728
+ pjsApi = new PolkadotJsApi();
1729
+ pjsApi.setApi(api);
1730
+ return _context2.abrupt("return", getBridgeStatus$1(pjsApi));
1731
+ case 3:
1732
+ case "end":
1733
+ return _context2.stop();
1734
+ }
1735
+ }, _callee2);
1736
+ }));
1737
+ return function getBridgeStatus(_x2) {
1738
+ return _ref2.apply(this, arguments);
1739
+ };
1740
+ }();
1679
1741
 
1680
1742
  var transfer = /*#__PURE__*/Object.freeze({
1681
1743
  __proto__: null,
1682
1744
  approveToken: approveToken,
1683
1745
  depositToken: depositToken,
1746
+ getBridgeStatus: getBridgeStatus,
1684
1747
  getDryRun: getDryRun,
1685
1748
  getParaEthTransferFees: getParaEthTransferFees,
1686
1749
  getTokenBalance: getTokenBalance,
@@ -1688,4 +1751,4 @@ var transfer = /*#__PURE__*/Object.freeze({
1688
1751
  transferEthToPolkadot: transferEthToPolkadot
1689
1752
  });
1690
1753
 
1691
- export { Builder, EvmBuilder, approveToken, assets, claimAssets, createApiInstanceForNode, depositToken, getAssetBalance, getBalanceForeign, getBalanceNative, getDryRun, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getOriginFeeDetails, getParaEthTransferFees, getTokenBalance, getTransferInfo, getTransferableAmount, send, transferEthToPolkadot, verifyEdOnDestination, transfer as xcmPallet };
1754
+ export { Builder, EvmBuilder, approveToken, assets, claimAssets, createApiInstanceForNode, depositToken, getAssetBalance, getBalanceForeign, getBalanceNative, getBridgeStatus, getDryRun, getMaxForeignTransferableAmount, getMaxNativeTransferableAmount, getOriginFeeDetails, getParaEthTransferFees, getTokenBalance, getTransferInfo, getTransferableAmount, send, transferEthToPolkadot, verifyEdOnDestination, transfer as xcmPallet };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk-pjs",
3
- "version": "8.9.8",
3
+ "version": "8.9.10",
4
4
  "description": "Polkadot.js based SDK for ParaSpell XCM/XCMP tool for developers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,7 +27,7 @@
27
27
  "@snowbridge/contract-types": "0.1.45",
28
28
  "ethers": "^6.13.5",
29
29
  "viem": "^2.23.15",
30
- "@paraspell/sdk-core": "8.9.8"
30
+ "@paraspell/sdk-core": "8.9.10"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@polkadot/api": ">= 15.0 < 16",