@paraspell/sdk 12.6.0 → 12.6.3

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
@@ -479,6 +479,8 @@ console.log(SUPPORTED_PALLETS)
479
479
 
480
480
  - Run end-to-end tests using `pnpm test:e2e`
481
481
 
482
+ - Run full end-to-end tests using `pnpm test:e2e:chopsticks`
483
+
482
484
  - Run all core tests and checks using `pnpm runAll`
483
485
 
484
486
  > [!NOTE]
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { isSenderSigner, getEvmPrivateKeyHex, NumberFormatError, createClientCache, createClientPoolHelpers, isConfig, getChainProviders, InvalidAddressError, BatchMode, findNativeAssetInfoOrThrow, MissingChainApiError, isExternalChain, Parents, findAssetInfoOrThrow, computeFeeFromDryRun, hasXcmPaymentApiSupport, replaceBigInt, getAssetsObject, RuntimeApiUnavailableError, wrapTxBypass, assertHasLocation, localizeLocation, isAssetXcEqual, addXcmVersionHeader, RELAY_LOCATION, getRelayChainOf, isRelayChain, padValueBy, isAssetEqual, 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, transferMoonbeamEvm, validateAddress, transferMoonbeamToEth, Builder as Builder$1, handleSwapExecuteTransfer as handleSwapExecuteTransfer$1, getBridgeStatus as getBridgeStatus$1, getParaEthTransferFees as getParaEthTransferFees$1, getXcmFee as getXcmFee$1, send as send$1, dryRun as dryRun$1, dryRunOrigin as dryRunOrigin$1, getOriginXcmFee as getOriginXcmFee$1 } from '@paraspell/sdk-core';
1
+ import { isSenderSigner, getEvmPrivateKeyHex, NumberFormatError, createClientCache, createClientPoolHelpers, isConfig, getChainProviders, InvalidAddressError, BatchMode, findNativeAssetInfoOrThrow, MissingChainApiError, isExternalChain, Parents, findAssetInfoOrThrow, computeFeeFromDryRun, hasXcmPaymentApiSupport, replaceBigInt, getAssetsObject, RuntimeApiUnavailableError, wrapTxBypass, localizeLocation, isAssetXcEqual, addXcmVersionHeader, RELAY_LOCATION, getRelayChainOf, isRelayChain, padValueBy, isAssetEqual, 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, transferMoonbeamEvm, validateAddress, transferMoonbeamToEth, Builder as Builder$1, handleSwapExecuteTransfer as handleSwapExecuteTransfer$1, getBridgeStatus as getBridgeStatus$1, getParaEthTransferFees as getParaEthTransferFees$1, getXcmFee as getXcmFee$1, send as send$1, dryRun as dryRun$1, dryRunOrigin as dryRunOrigin$1, getOriginXcmFee as getOriginXcmFee$1 } from '@paraspell/sdk-core';
2
2
  export * from '@paraspell/sdk-core';
3
3
  import { secp256k1 } from '@noble/curves/secp256k1.js';
4
4
  import { keccak_256 } from '@noble/hashes/sha3.js';
@@ -1060,7 +1060,7 @@ var PapiApi = /*#__PURE__*/function () {
1060
1060
  value: function () {
1061
1061
  var _getDryRunCall = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee10(options) {
1062
1062
  var _this = this;
1063
- var tx, chain, destination, address, feeAsset, bypassOptions, version, _options$useRootOrigi, useRootOrigin, supportsDryRunApi, basePayload, resolvedTx, performDryRunCall, getExecutionSuccessFromResult, findFailureObjectFromResult, extractFailureReasonFromResult, result, isSuccess, failureOutputReason, initialFailureReason, resolvedFeeAsset, actualWeight, weight, forwardedXcms, destParaId, hasLocation, USE_XCM_PAYMENT_API_CHAINS, overriddenWeight, xcmFee, _yield$this$getPaymen, executionFee, fee, _t2, _t3;
1063
+ var tx, chain, destination, address, feeAsset, bypassOptions, version, _options$useRootOrigi, useRootOrigin, supportsDryRunApi, basePayload, resolvedTx, performDryRunCall, getExecutionSuccessFromResult, findFailureObjectFromResult, extractFailureReasonFromResult, result, isSuccess, failureOutputReason, initialFailureReason, resolvedFeeAsset, actualWeight, weight, forwardedXcms, destParaId, USE_XCM_PAYMENT_API_CHAINS, overriddenWeight, xcmFee, _yield$this$getPaymen, executionFee, fee, _t2, _t3;
1064
1064
  return _regenerator().w(function (_context10) {
1065
1065
  while (1) switch (_context10.n) {
1066
1066
  case 0:
@@ -1217,9 +1217,8 @@ var PapiApi = /*#__PURE__*/function () {
1217
1217
  } : undefined;
1218
1218
  forwardedXcms = result.value.forwarded_xcms.length > 0 ? result.value.forwarded_xcms[0] : [];
1219
1219
  destParaId = forwardedXcms.length === 0 ? undefined : forwardedXcms[0].value.interior.type === 'Here' ? 0 : forwardedXcms[0].value.interior.value.value;
1220
- hasLocation = resolvedFeeAsset.asset.location;
1221
1220
  USE_XCM_PAYMENT_API_CHAINS = ['Astar'];
1222
- if (!(hasXcmPaymentApiSupport(chain) && result.value.local_xcm && hasLocation && (feeAsset || USE_XCM_PAYMENT_API_CHAINS.includes(chain) || chain.startsWith('AssetHub') && destination === 'Ethereum') || resolvedFeeAsset.isCustomAsset)) {
1221
+ if (!(hasXcmPaymentApiSupport(chain) && result.value.local_xcm && (feeAsset || USE_XCM_PAYMENT_API_CHAINS.includes(chain) || chain.startsWith('AssetHub') && destination === 'Ethereum') || resolvedFeeAsset.isCustomAsset)) {
1223
1222
  _context10.n = 15;
1224
1223
  break;
1225
1224
  }
@@ -1358,7 +1357,6 @@ var PapiApi = /*#__PURE__*/function () {
1358
1357
  return _context12.a(2, deliveryFeeResolved);
1359
1358
  case 7:
1360
1359
  _context12.p = 7;
1361
- assertHasLocation(nativeAsset);
1362
1360
  _context12.n = 8;
1363
1361
  return this.quoteAhPrice(localizeLocation(chain, nativeAsset.location), assetLocalizedLoc, deliveryFeeResolved, false);
1364
1362
  case 8:
@@ -1444,7 +1442,6 @@ var PapiApi = /*#__PURE__*/function () {
1444
1442
  _t6 = _context14.v;
1445
1443
  case 3:
1446
1444
  weight = _t6;
1447
- assertHasLocation(asset);
1448
1445
  assetLocalizedLoc = localizeLocation(chain, asset.location);
1449
1446
  transformedAssetLoc = _transform(assetLocalizedLoc);
1450
1447
  _context14.n = 4;
@@ -1506,7 +1503,6 @@ var PapiApi = /*#__PURE__*/function () {
1506
1503
  _context15.n = 3;
1507
1504
  return ahApi.init(assetHubChain);
1508
1505
  case 3:
1509
- assertHasLocation(asset);
1510
1506
  ahLocalizedLoc = localizeLocation(assetHubChain, asset.location);
1511
1507
  _context15.n = 4;
1512
1508
  return ahApi.quoteAhPrice(RELAY_LOCATION, ahLocalizedLoc, fallbackExecFeeRes.value, false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk",
3
- "version": "12.6.0",
3
+ "version": "12.6.3",
4
4
  "description": "SDK for ParaSpell XCM/XCMP tool for developers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,7 +28,7 @@
28
28
  "@polkadot-labs/hdkd": "^0.0.26",
29
29
  "@polkadot-labs/hdkd-helpers": "^0.0.27",
30
30
  "viem": "2.45.0",
31
- "@paraspell/sdk-core": "12.6.0"
31
+ "@paraspell/sdk-core": "12.6.3"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "polkadot-api": ">= 1.23.3 < 2"