@paraspell/sdk-pjs 12.6.0 → 12.6.1

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 +3 -8
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { getEvmPrivateKeyHex, createClientCache, createClientPoolHelpers, isConfig, getChainProviders, BatchMode, findNativeAssetInfoOrThrow, isSenderSigner, MissingChainApiError, isExternalChain, UnsupportedOperationError, findAssetInfoOrThrow, computeFeeFromDryRunPjs, hasXcmPaymentApiSupport, resolveModuleError, getAssetsObject, RuntimeApiUnavailableError, wrapTxBypass, assertHasLocation, localizeLocation, addXcmVersionHeader, isAssetXcEqual, RELAY_LOCATION, getRelayChainOf, createChainClient as createChainClient$1, getBalance as getBalance$1, claimAssets as claimAssets$1, Foreign, ForeignAbstract, Native, Override, findAssetInfo, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTChain, hasSupportForAsset, isChainEvm, convertSs58 as convertSs58$1, assertHasId, getParaId, RoutingResolutionError, abstractDecimals, MissingParameterError, isOverrideLocationSpecifier, transferMoonbeamEvm, transferMoonbeamToEth, validateAddress as validateAddress$1, Builder as Builder$1, getBridgeStatus as getBridgeStatus$1, getParaEthTransferFees as getParaEthTransferFees$1, DRY_RUN_CLIENT_TIMEOUT_MS, send as send$1, dryRun as dryRun$1, dryRunOrigin as dryRunOrigin$1 } from '@paraspell/sdk-core';
1
+ import { getEvmPrivateKeyHex, createClientCache, createClientPoolHelpers, isConfig, getChainProviders, BatchMode, findNativeAssetInfoOrThrow, isSenderSigner, MissingChainApiError, isExternalChain, UnsupportedOperationError, findAssetInfoOrThrow, computeFeeFromDryRunPjs, hasXcmPaymentApiSupport, resolveModuleError, getAssetsObject, RuntimeApiUnavailableError, wrapTxBypass, localizeLocation, addXcmVersionHeader, isAssetXcEqual, RELAY_LOCATION, getRelayChainOf, createChainClient as createChainClient$1, getBalance as getBalance$1, claimAssets as claimAssets$1, Foreign, ForeignAbstract, Native, Override, findAssetInfo, getAllAssetsSymbols, getAssetDecimals, getAssetId, getAssets, getExistentialDeposit, getNativeAssetSymbol, getNativeAssets, getOtherAssets, getRelayChainSymbol, getSupportedAssets, getTChain, hasSupportForAsset, isChainEvm, convertSs58 as convertSs58$1, assertHasId, getParaId, RoutingResolutionError, abstractDecimals, MissingParameterError, isOverrideLocationSpecifier, transferMoonbeamEvm, transferMoonbeamToEth, validateAddress as validateAddress$1, Builder as Builder$1, getBridgeStatus as getBridgeStatus$1, getParaEthTransferFees as getParaEthTransferFees$1, DRY_RUN_CLIENT_TIMEOUT_MS, 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 { Keyring, WsProvider, ApiPromise } from '@polkadot/api';
4
4
  import { isHex, u8aToHex, hexToU8a, stringToU8a } from '@polkadot/util';
@@ -677,7 +677,7 @@ var PolkadotJsApi = /*#__PURE__*/function () {
677
677
  value: function () {
678
678
  var _getDryRunCall = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1(options) {
679
679
  var _this = this;
680
- var tx, address, feeAsset, chain, destination, version, _options$useRootOrigi, useRootOrigin, bypassOptions, supportsDryRunApi, basePayload, resolvedTx, resolvedFeeAsset, performDryRunCall, getExecutionSuccessFromResult, extractFailureReasonFromResult, response, resultHuman, resultJson, isSuccess, failureErr, shouldRetryWithVersion, msg, _msg, forwardedXcms, actualWeight, weight, nativeAsset, hasLocation, destParaId, overriddenWeight, xcmFee, _yield$this$getPaymen, executionFee, fee, _t, _t2, _t3, _t4;
680
+ var tx, address, feeAsset, chain, destination, version, _options$useRootOrigi, useRootOrigin, bypassOptions, supportsDryRunApi, basePayload, resolvedTx, resolvedFeeAsset, performDryRunCall, getExecutionSuccessFromResult, extractFailureReasonFromResult, response, resultHuman, resultJson, isSuccess, failureErr, shouldRetryWithVersion, msg, _msg, forwardedXcms, actualWeight, weight, destParaId, overriddenWeight, xcmFee, _yield$this$getPaymen, executionFee, fee, _t, _t2, _t3, _t4;
681
681
  return _regenerator().w(function (_context1) {
682
682
  while (1) switch (_context1.p = _context1.n) {
683
683
  case 0:
@@ -854,12 +854,10 @@ var PolkadotJsApi = /*#__PURE__*/function () {
854
854
  refTime: BigInt(actualWeight.refTime),
855
855
  proofSize: BigInt(actualWeight.proofSize)
856
856
  } : undefined;
857
- nativeAsset = findNativeAssetInfoOrThrow(chain);
858
- hasLocation = feeAsset ? Boolean(feeAsset.location) : Boolean(nativeAsset === null || nativeAsset === void 0 ? void 0 : nativeAsset.location);
859
857
  destParaId = forwardedXcms.length === 0 ? undefined : function (i, _ref7) {
860
858
  return i.here === null ? 0 : (_ref7 = Array.isArray(i.x1) ? i.x1[0] : i.x1) === null || _ref7 === void 0 ? void 0 : _ref7.parachain;
861
859
  }(Object.values(forwardedXcms[0])[0].interior);
862
- if (!(hasXcmPaymentApiSupport(chain) && resultJson.ok.local_xcm && hasLocation && (feeAsset || chain.startsWith('AssetHub') && destination === 'Ethereum') || resolvedFeeAsset.isCustomAsset)) {
860
+ if (!(hasXcmPaymentApiSupport(chain) && resultJson.ok.local_xcm && (feeAsset || chain.startsWith('AssetHub') && destination === 'Ethereum') || resolvedFeeAsset.isCustomAsset)) {
863
861
  _context1.n = 21;
864
862
  break;
865
863
  }
@@ -955,7 +953,6 @@ var PolkadotJsApi = /*#__PURE__*/function () {
955
953
  _t5 = _context10.v;
956
954
  case 3:
957
955
  weight = _t5;
958
- assertHasLocation(asset);
959
956
  assetLocalizedLoc = localizeLocation(chain, asset.location);
960
957
  _context10.n = 4;
961
958
  return this.api.call.xcmPaymentApi.queryWeightToAssetFee(weight, addXcmVersionHeader(assetLocalizedLoc, version));
@@ -1041,7 +1038,6 @@ var PolkadotJsApi = /*#__PURE__*/function () {
1041
1038
  return _context11.a(2, deliveryFeeResolved);
1042
1039
  case 7:
1043
1040
  _context11.p = 7;
1044
- assertHasLocation(nativeAsset);
1045
1041
  _context11.n = 8;
1046
1042
  return this.quoteAhPrice(localizeLocation(chain, nativeAsset.location), assetLocalizedLoc, deliveryFeeResolved, false);
1047
1043
  case 8:
@@ -1085,7 +1081,6 @@ var PolkadotJsApi = /*#__PURE__*/function () {
1085
1081
  _context12.n = 3;
1086
1082
  return ahApi.init(assetHubChain);
1087
1083
  case 3:
1088
- assertHasLocation(asset);
1089
1084
  ahLocalizedLoc = localizeLocation(assetHubChain, asset.location);
1090
1085
  _context12.n = 4;
1091
1086
  return ahApi.quoteAhPrice(RELAY_LOCATION, ahLocalizedLoc, fallbackExecFee, false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk-pjs",
3
- "version": "12.6.0",
3
+ "version": "12.6.1",
4
4
  "description": "Polkadot.js based SDK for ParaSpell XCM/XCMP tool for developers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -29,7 +29,7 @@
29
29
  "@snowbridge/registry": "^0.3.2",
30
30
  "ethers": "6.15.0",
31
31
  "viem": "2.45.0",
32
- "@paraspell/sdk-core": "12.6.0"
32
+ "@paraspell/sdk-core": "12.6.1"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "@polkadot/api": ">= 16.0 < 17",