@paraspell/sdk-pjs 8.5.3 → 8.6.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/README.md CHANGED
@@ -223,6 +223,11 @@ const result = await Builder(API /*optional*/)
223
223
 
224
224
  //Function pattern
225
225
  await getDryRun({api /*optional*/, node, address /*sender address*/, tx /* Extrinsic object */})
226
+
227
+ //Check Parachain for DryRun support - returns true/false
228
+ import { hasDryRunSupport } from "@paraspell/sdk-pjs";
229
+
230
+ const result = hasDryRunSupport(node)
226
231
  ```
227
232
 
228
233
  ### Asset claim:
package/dist/index.cjs CHANGED
@@ -37,7 +37,7 @@ function _asyncToGenerator(n) {
37
37
  function _throw(n) {
38
38
  asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
39
39
  }
40
- _next(undefined);
40
+ _next(void 0);
41
41
  });
42
42
  };
43
43
  }
@@ -311,7 +311,7 @@ function _regeneratorRuntime() {
311
311
  }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
312
312
  return this;
313
313
  }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
314
- undefined === i && (i = Promise);
314
+ void 0 === i && (i = Promise);
315
315
  var a = new AsyncIterator(wrap(t, r, n, o), i);
316
316
  return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
317
317
  return t.done ? t.value : a.next();
@@ -418,8 +418,8 @@ function _slicedToArray(r, e) {
418
418
  function _toPrimitive(t, r) {
419
419
  if ("object" != typeof t || !t) return t;
420
420
  var e = t[Symbol.toPrimitive];
421
- if (undefined !== e) {
422
- var i = e.call(t, r || "default");
421
+ if (void 0 !== e) {
422
+ var i = e.call(t, r);
423
423
  if ("object" != typeof i) return i;
424
424
  throw new TypeError("@@toPrimitive must return a primitive value.");
425
425
  }
@@ -433,7 +433,7 @@ function _unsupportedIterableToArray(r, a) {
433
433
  if (r) {
434
434
  if ("string" == typeof r) return _arrayLikeToArray(r, a);
435
435
  var t = {}.toString.call(r).slice(8, -1);
436
- return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : undefined;
436
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
437
437
  }
438
438
  }
439
439
 
@@ -816,7 +816,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
816
816
  _context.next = 16;
817
817
  break;
818
818
  case 8:
819
- if (!((_this$_api = this._api) !== null && _this$_api !== undefined)) {
819
+ if (!((_this$_api = this._api) !== null && _this$_api !== void 0)) {
820
820
  _context.next = 12;
821
821
  break;
822
822
  }
@@ -1134,7 +1134,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
1134
1134
  var assetItem = _ref3$0$args[1];
1135
1135
  _ref3[1];
1136
1136
  var assetSymbol = assetItem.toString().toLowerCase();
1137
- return assetSymbol === ((_asset$symbol = asset.symbol) === null || _asset$symbol === undefined ? undefined : _asset$symbol.toLowerCase()) || sdkCore.isForeignAsset(asset) && assetSymbol === ((_asset$assetId = asset.assetId) === null || _asset$assetId === undefined ? undefined : _asset$assetId.toLowerCase()) || Object.values((_assetItem$toHuman = assetItem.toHuman()) !== null && _assetItem$toHuman !== undefined ? _assetItem$toHuman : {}).toString().toLowerCase() === ((_asset$symbol2 = asset.symbol) === null || _asset$symbol2 === undefined ? undefined : _asset$symbol2.toLowerCase()) || sdkCore.isForeignAsset(asset) && Object.values((_assetItem$toHuman2 = assetItem.toHuman()) !== null && _assetItem$toHuman2 !== undefined ? _assetItem$toHuman2 : {}).toString().toLowerCase() === ((_asset$assetId2 = asset.assetId) === null || _asset$assetId2 === undefined ? undefined : _asset$assetId2.toLowerCase());
1137
+ return assetSymbol === ((_asset$symbol = asset.symbol) === null || _asset$symbol === void 0 ? void 0 : _asset$symbol.toLowerCase()) || sdkCore.isForeignAsset(asset) && assetSymbol === ((_asset$assetId = asset.assetId) === null || _asset$assetId === void 0 ? void 0 : _asset$assetId.toLowerCase()) || Object.values((_assetItem$toHuman = assetItem.toHuman()) !== null && _assetItem$toHuman !== void 0 ? _assetItem$toHuman : {}).toString().toLowerCase() === ((_asset$symbol2 = asset.symbol) === null || _asset$symbol2 === void 0 ? void 0 : _asset$symbol2.toLowerCase()) || sdkCore.isForeignAsset(asset) && Object.values((_assetItem$toHuman2 = assetItem.toHuman()) !== null && _assetItem$toHuman2 !== void 0 ? _assetItem$toHuman2 : {}).toString().toLowerCase() === ((_asset$assetId2 = asset.assetId) === null || _asset$assetId2 === void 0 ? void 0 : _asset$assetId2.toLowerCase());
1138
1138
  });
1139
1139
  accountData = entry ? entry[1] : null;
1140
1140
  return _context11.abrupt("return", accountData ? BigInt(accountData.free.toString()) : 0n);
@@ -1594,7 +1594,7 @@ var EvmBuilderClass = /*#__PURE__*/function () {
1594
1594
  }
1595
1595
  return _context.abrupt("return", sdkCore.transferMoonbeamToEth(this._options));
1596
1596
  case 12:
1597
- if (!(this._options.from === 'Moonbeam' || this._options.from === 'Moonriver')) {
1597
+ if (!(this._options.from === 'Moonbeam' || this._options.from === 'Moonriver' || this._options.from === 'Darwinia')) {
1598
1598
  _context.next = 16;
1599
1599
  break;
1600
1600
  }
package/dist/index.d.ts CHANGED
@@ -156,7 +156,7 @@ declare namespace assets {
156
156
  declare class EvmBuilderClass<TApi, TRes> {
157
157
  _options: TOptionalEvmBuilderOptions<TApi, TRes>;
158
158
  constructor(api: IPolkadotApi<TApi, TRes>, provider?: AbstractProvider);
159
- from(node: 'Ethereum' | 'Moonbeam' | 'Moonriver'): this;
159
+ from(node: 'Ethereum' | 'Moonbeam' | 'Moonriver' | 'Darwinia'): this;
160
160
  /**
161
161
  * Specifies the destination node on Polkadot.
162
162
  *
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { getParaId, isForeignAsset, InvalidCurrencyError, getAssetBySymbolOrId, isEthersSigner, isOverrideMultiLocationSpecifier, BatchMode, createApiInstanceForNode as createApiInstanceForNode$1, getNode, computeFeeFromDryRunPjs, resolveModuleError, getAssetsObject, send as send$1, getDryRun as getDryRun$1, getParaEthTransferFees as getParaEthTransferFees$1, 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, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTNode, hasSupportForAsset, isNodeEvm, transferMoonbeamEvm, validateAddress, transferMoonbeamToEth, Builder as Builder$1, GeneralBuilder as GeneralBuilder$1 } from '@paraspell/sdk-core';
1
+ import { getParaId, isForeignAsset, InvalidCurrencyError, getAssetBySymbolOrId, isEthersSigner, isOverrideMultiLocationSpecifier, BatchMode, createApiInstanceForNode as createApiInstanceForNode$1, getNode, computeFeeFromDryRunPjs, resolveModuleError, getAssetsObject, getParaEthTransferFees as getParaEthTransferFees$1, send as send$1, getDryRun as getDryRun$1, 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, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTNode, hasSupportForAsset, isNodeEvm, transferMoonbeamEvm, validateAddress, transferMoonbeamToEth, GeneralBuilder as GeneralBuilder$1, Builder as Builder$1 } from '@paraspell/sdk-core';
2
2
  export * from '@paraspell/sdk-core';
3
3
  import { Context, toPolkadotV2, assetsV2, environment } from '@snowbridge/api';
4
4
  import { WETH9__factory } from '@snowbridge/contract-types';
@@ -36,7 +36,7 @@ function _asyncToGenerator(n) {
36
36
  function _throw(n) {
37
37
  asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
38
38
  }
39
- _next(undefined);
39
+ _next(void 0);
40
40
  });
41
41
  };
42
42
  }
@@ -310,7 +310,7 @@ function _regeneratorRuntime() {
310
310
  }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
311
311
  return this;
312
312
  }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
313
- undefined === i && (i = Promise);
313
+ void 0 === i && (i = Promise);
314
314
  var a = new AsyncIterator(wrap(t, r, n, o), i);
315
315
  return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
316
316
  return t.done ? t.value : a.next();
@@ -417,8 +417,8 @@ function _slicedToArray(r, e) {
417
417
  function _toPrimitive(t, r) {
418
418
  if ("object" != typeof t || !t) return t;
419
419
  var e = t[Symbol.toPrimitive];
420
- if (undefined !== e) {
421
- var i = e.call(t, r || "default");
420
+ if (void 0 !== e) {
421
+ var i = e.call(t, r);
422
422
  if ("object" != typeof i) return i;
423
423
  throw new TypeError("@@toPrimitive must return a primitive value.");
424
424
  }
@@ -432,7 +432,7 @@ function _unsupportedIterableToArray(r, a) {
432
432
  if (r) {
433
433
  if ("string" == typeof r) return _arrayLikeToArray(r, a);
434
434
  var t = {}.toString.call(r).slice(8, -1);
435
- return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : undefined;
435
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
436
436
  }
437
437
  }
438
438
 
@@ -815,7 +815,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
815
815
  _context.next = 16;
816
816
  break;
817
817
  case 8:
818
- if (!((_this$_api = this._api) !== null && _this$_api !== undefined)) {
818
+ if (!((_this$_api = this._api) !== null && _this$_api !== void 0)) {
819
819
  _context.next = 12;
820
820
  break;
821
821
  }
@@ -1133,7 +1133,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
1133
1133
  var assetItem = _ref3$0$args[1];
1134
1134
  _ref3[1];
1135
1135
  var assetSymbol = assetItem.toString().toLowerCase();
1136
- return assetSymbol === ((_asset$symbol = asset.symbol) === null || _asset$symbol === undefined ? undefined : _asset$symbol.toLowerCase()) || isForeignAsset(asset) && assetSymbol === ((_asset$assetId = asset.assetId) === null || _asset$assetId === undefined ? undefined : _asset$assetId.toLowerCase()) || Object.values((_assetItem$toHuman = assetItem.toHuman()) !== null && _assetItem$toHuman !== undefined ? _assetItem$toHuman : {}).toString().toLowerCase() === ((_asset$symbol2 = asset.symbol) === null || _asset$symbol2 === undefined ? undefined : _asset$symbol2.toLowerCase()) || isForeignAsset(asset) && Object.values((_assetItem$toHuman2 = assetItem.toHuman()) !== null && _assetItem$toHuman2 !== undefined ? _assetItem$toHuman2 : {}).toString().toLowerCase() === ((_asset$assetId2 = asset.assetId) === null || _asset$assetId2 === undefined ? undefined : _asset$assetId2.toLowerCase());
1136
+ return assetSymbol === ((_asset$symbol = asset.symbol) === null || _asset$symbol === void 0 ? void 0 : _asset$symbol.toLowerCase()) || isForeignAsset(asset) && assetSymbol === ((_asset$assetId = asset.assetId) === null || _asset$assetId === void 0 ? void 0 : _asset$assetId.toLowerCase()) || Object.values((_assetItem$toHuman = assetItem.toHuman()) !== null && _assetItem$toHuman !== void 0 ? _assetItem$toHuman : {}).toString().toLowerCase() === ((_asset$symbol2 = asset.symbol) === null || _asset$symbol2 === void 0 ? void 0 : _asset$symbol2.toLowerCase()) || isForeignAsset(asset) && Object.values((_assetItem$toHuman2 = assetItem.toHuman()) !== null && _assetItem$toHuman2 !== void 0 ? _assetItem$toHuman2 : {}).toString().toLowerCase() === ((_asset$assetId2 = asset.assetId) === null || _asset$assetId2 === void 0 ? void 0 : _asset$assetId2.toLowerCase());
1137
1137
  });
1138
1138
  accountData = entry ? entry[1] : null;
1139
1139
  return _context11.abrupt("return", accountData ? BigInt(accountData.free.toString()) : 0n);
@@ -1593,7 +1593,7 @@ var EvmBuilderClass = /*#__PURE__*/function () {
1593
1593
  }
1594
1594
  return _context.abrupt("return", transferMoonbeamToEth(this._options));
1595
1595
  case 12:
1596
- if (!(this._options.from === 'Moonbeam' || this._options.from === 'Moonriver')) {
1596
+ if (!(this._options.from === 'Moonbeam' || this._options.from === 'Moonriver' || this._options.from === 'Darwinia')) {
1597
1597
  _context.next = 16;
1598
1598
  break;
1599
1599
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk-pjs",
3
- "version": "8.5.3",
3
+ "version": "8.6.0",
4
4
  "description": "Polkadot.js based SDK for ParaSpell XCM/XCMP tool for developers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,11 +23,11 @@
23
23
  "dist"
24
24
  ],
25
25
  "dependencies": {
26
- "@snowbridge/api": "^0.1.32",
27
- "@snowbridge/contract-types": "^0.1.32",
26
+ "@snowbridge/api": "0.1.32",
27
+ "@snowbridge/contract-types": "0.1.32",
28
28
  "ethers": "^6.13.5",
29
- "viem": "^2.22.22",
30
- "@paraspell/sdk-core": "8.5.3"
29
+ "viem": "^2.23.5",
30
+ "@paraspell/sdk-core": "8.6.0"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@polkadot/api": ">= 15.0 < 16",
@@ -38,16 +38,16 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@babel/plugin-syntax-import-attributes": "^7.26.0",
41
- "@babel/preset-env": "^7.26.7",
42
- "@codecov/rollup-plugin": "^1.8.0",
41
+ "@babel/preset-env": "^7.26.9",
42
+ "@codecov/rollup-plugin": "^1.9.0",
43
43
  "@rollup/plugin-babel": "^6.0.4",
44
44
  "@rollup/plugin-json": "^6.1.0",
45
45
  "@rollup/plugin-typescript": "^12.1.2",
46
- "@vitest/coverage-v8": "^3.0.4",
47
- "axios": "^1.7.9",
46
+ "@vitest/coverage-v8": "^3.0.7",
47
+ "axios": "^1.8.1",
48
48
  "dotenv": "^16.4.7",
49
- "prettier": "^3.4.2",
50
- "rollup": "^4.32.0",
49
+ "prettier": "^3.5.2",
50
+ "rollup": "^4.34.8",
51
51
  "rollup-plugin-dts": "^6.1.1",
52
52
  "tslib": "^2.8.1"
53
53
  },