@paraspell/sdk-pjs 11.4.0 → 11.4.2

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
@@ -777,13 +777,12 @@ var PolkadotJsApi = /*#__PURE__*/function () {
777
777
  key: "getDryRunCall",
778
778
  value: function () {
779
779
  var _getDryRunCall = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee16(_ref4) {
780
- var _feeAsset$symbol,
781
- _this = this;
782
- var tx, address, asset, feeAsset, chain, supportsDryRunApi, DEFAULT_XCM_VERSION, usedSymbol, usedAsset, performDryRunCall, getExecutionSuccessFromResult, extractFailureReasonFromResult, response, resultHuman, resultJson, isSuccess, failureReason, shouldRetryWithVersion, msg, _msg, executionFee, fee, actualWeight, weight, forwardedXcms, destParaId, _t, _t2;
780
+ var _this = this;
781
+ var tx, address, feeAsset, chain, supportsDryRunApi, DEFAULT_XCM_VERSION, usedAsset, usedSymbol, performDryRunCall, getExecutionSuccessFromResult, extractFailureReasonFromResult, response, resultHuman, resultJson, isSuccess, failureReason, shouldRetryWithVersion, msg, _msg, executionFee, fee, actualWeight, weight, forwardedXcms, destParaId, _t, _t2;
783
782
  return _regenerator().w(function (_context16) {
784
783
  while (1) switch (_context16.p = _context16.n) {
785
784
  case 0:
786
- tx = _ref4.tx, address = _ref4.address, asset = _ref4.asset, feeAsset = _ref4.feeAsset, chain = _ref4.chain;
785
+ tx = _ref4.tx, address = _ref4.address, feeAsset = _ref4.feeAsset, chain = _ref4.chain;
787
786
  supportsDryRunApi = sdkCore.getAssetsObject(chain).supportsDryRunApi;
788
787
  if (supportsDryRunApi) {
789
788
  _context16.n = 1;
@@ -792,8 +791,8 @@ var PolkadotJsApi = /*#__PURE__*/function () {
792
791
  throw new sdkCore.ChainNotSupportedError("DryRunApi is not available on chain ".concat(chain));
793
792
  case 1:
794
793
  DEFAULT_XCM_VERSION = 3;
795
- usedSymbol = (_feeAsset$symbol = feeAsset === null || feeAsset === void 0 ? void 0 : feeAsset.symbol) !== null && _feeAsset$symbol !== void 0 ? _feeAsset$symbol : asset === null || asset === void 0 ? void 0 : asset.symbol;
796
- usedAsset = feeAsset !== null && feeAsset !== void 0 ? feeAsset : asset;
794
+ usedAsset = feeAsset !== null && feeAsset !== void 0 ? feeAsset : sdkCore.findNativeAssetInfoOrThrow(chain);
795
+ usedSymbol = usedAsset.symbol;
797
796
  performDryRunCall = /*#__PURE__*/function () {
798
797
  var _ref5 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee15(includeVersion) {
799
798
  var _this$api$call$dryRun;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { isConfig, BatchMode, MissingChainApiError, createChainClient as createChainClient$1, getChain, isForeignAsset, InvalidParameterError, computeFeeFromDryRunPjs, resolveModuleError, getAssetsObject, ChainNotSupportedError, assertHasLocation, localizeLocation, isRelayChain, addXcmVersionHeader, Version, getBalanceNative as getBalanceNative$1, getBalanceForeign as getBalanceForeign$1, getAssetBalance as getAssetBalance$1, claimAssets as claimAssets$1, getOriginFeeDetails as getOriginFeeDetails$1, Foreign, ForeignAbstract, Native, Override, findAssetInfo, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTChain, hasSupportForAsset, isChainEvm, convertSs58 as convertSs58$1, getParaId, ETH_CHAIN_ID, findAssetInfoOrThrow, abstractDecimals, assertHasId, isOverrideLocationSpecifier, transferMoonbeamEvm, transferMoonbeamToEth, validateAddress, Builder as Builder$1, getParaEthTransferFees as getParaEthTransferFees$1, DRY_RUN_CLIENT_TIMEOUT_MS, getBridgeStatus as getBridgeStatus$1, send as send$1, dryRun as dryRun$1, dryRunOrigin as dryRunOrigin$1 } from '@paraspell/sdk-core';
1
+ import { isConfig, BatchMode, MissingChainApiError, createChainClient as createChainClient$1, getChain, isForeignAsset, InvalidParameterError, computeFeeFromDryRunPjs, findNativeAssetInfoOrThrow, resolveModuleError, getAssetsObject, ChainNotSupportedError, assertHasLocation, localizeLocation, isRelayChain, addXcmVersionHeader, Version, getBalanceNative as getBalanceNative$1, getBalanceForeign as getBalanceForeign$1, getAssetBalance as getAssetBalance$1, claimAssets as claimAssets$1, getOriginFeeDetails as getOriginFeeDetails$1, Foreign, ForeignAbstract, Native, Override, findAssetInfo, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTChain, hasSupportForAsset, isChainEvm, convertSs58 as convertSs58$1, getParaId, ETH_CHAIN_ID, findAssetInfoOrThrow, abstractDecimals, assertHasId, isOverrideLocationSpecifier, transferMoonbeamEvm, transferMoonbeamToEth, validateAddress, Builder as Builder$1, getParaEthTransferFees as getParaEthTransferFees$1, DRY_RUN_CLIENT_TIMEOUT_MS, getBridgeStatus as getBridgeStatus$1, send as send$1, dryRun as dryRun$1, dryRunOrigin as dryRunOrigin$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';
@@ -776,13 +776,12 @@ var PolkadotJsApi = /*#__PURE__*/function () {
776
776
  key: "getDryRunCall",
777
777
  value: function () {
778
778
  var _getDryRunCall = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee16(_ref4) {
779
- var _feeAsset$symbol,
780
- _this = this;
781
- var tx, address, asset, feeAsset, chain, supportsDryRunApi, DEFAULT_XCM_VERSION, usedSymbol, usedAsset, performDryRunCall, getExecutionSuccessFromResult, extractFailureReasonFromResult, response, resultHuman, resultJson, isSuccess, failureReason, shouldRetryWithVersion, msg, _msg, executionFee, fee, actualWeight, weight, forwardedXcms, destParaId, _t, _t2;
779
+ var _this = this;
780
+ var tx, address, feeAsset, chain, supportsDryRunApi, DEFAULT_XCM_VERSION, usedAsset, usedSymbol, performDryRunCall, getExecutionSuccessFromResult, extractFailureReasonFromResult, response, resultHuman, resultJson, isSuccess, failureReason, shouldRetryWithVersion, msg, _msg, executionFee, fee, actualWeight, weight, forwardedXcms, destParaId, _t, _t2;
782
781
  return _regenerator().w(function (_context16) {
783
782
  while (1) switch (_context16.p = _context16.n) {
784
783
  case 0:
785
- tx = _ref4.tx, address = _ref4.address, asset = _ref4.asset, feeAsset = _ref4.feeAsset, chain = _ref4.chain;
784
+ tx = _ref4.tx, address = _ref4.address, feeAsset = _ref4.feeAsset, chain = _ref4.chain;
786
785
  supportsDryRunApi = getAssetsObject(chain).supportsDryRunApi;
787
786
  if (supportsDryRunApi) {
788
787
  _context16.n = 1;
@@ -791,8 +790,8 @@ var PolkadotJsApi = /*#__PURE__*/function () {
791
790
  throw new ChainNotSupportedError("DryRunApi is not available on chain ".concat(chain));
792
791
  case 1:
793
792
  DEFAULT_XCM_VERSION = 3;
794
- usedSymbol = (_feeAsset$symbol = feeAsset === null || feeAsset === void 0 ? void 0 : feeAsset.symbol) !== null && _feeAsset$symbol !== void 0 ? _feeAsset$symbol : asset === null || asset === void 0 ? void 0 : asset.symbol;
795
- usedAsset = feeAsset !== null && feeAsset !== void 0 ? feeAsset : asset;
793
+ usedAsset = feeAsset !== null && feeAsset !== void 0 ? feeAsset : findNativeAssetInfoOrThrow(chain);
794
+ usedSymbol = usedAsset.symbol;
796
795
  performDryRunCall = /*#__PURE__*/function () {
797
796
  var _ref5 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee15(includeVersion) {
798
797
  var _this$api$call$dryRun;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk-pjs",
3
- "version": "11.4.0",
3
+ "version": "11.4.2",
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.2.0",
28
28
  "ethers": "^6.15.0",
29
29
  "viem": "^2.36.0",
30
- "@paraspell/sdk-core": "11.4.0"
30
+ "@paraspell/sdk-core": "11.4.2"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@polkadot/api": ">= 16.0 < 17",