@paraspell/sdk-pjs 11.14.2 → 11.14.4

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
@@ -1313,6 +1313,16 @@ var PolkadotJsApi = /*#__PURE__*/function () {
1313
1313
  }
1314
1314
  return disconnect;
1315
1315
  }()
1316
+ }, {
1317
+ key: "validateSubstrateAddress",
1318
+ value: function validateSubstrateAddress(address) {
1319
+ try {
1320
+ utilCrypto.validateAddress(address);
1321
+ return true;
1322
+ } catch (_unused) {
1323
+ return false;
1324
+ }
1325
+ }
1316
1326
  }]);
1317
1327
  }();
1318
1328
 
@@ -1811,12 +1821,12 @@ var EvmBuilderCore = /*#__PURE__*/function () {
1811
1821
  key: "build",
1812
1822
  value: (function () {
1813
1823
  var _build = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
1814
- var _this$_options, from, to, address, signer, _yield$transferEthToP, response;
1824
+ var _this$_options, from, to, address, signer, api, _yield$transferEthToP, response;
1815
1825
  return _regenerator().w(function (_context) {
1816
1826
  while (1) switch (_context.n) {
1817
1827
  case 0:
1818
- _this$_options = this._options, from = _this$_options.from, to = _this$_options.to, address = _this$_options.address, signer = _this$_options.signer;
1819
- sdkCore.validateAddress(address, to);
1828
+ _this$_options = this._options, from = _this$_options.from, to = _this$_options.to, address = _this$_options.address, signer = _this$_options.signer, api = _this$_options.api;
1829
+ sdkCore.validateAddress(api, address, to);
1820
1830
  if (!(from === 'Moonbeam' && to === 'Ethereum')) {
1821
1831
  _context.n = 2;
1822
1832
  break;
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { isConfig, BatchMode, MissingChainApiError, getChainProviders, assertHasId, getChain, isForeignAsset, InvalidParameterError, computeFeeFromDryRunPjs, findNativeAssetInfoOrThrow, hasXcmPaymentApiSupport, resolveModuleError, getAssetsObject, ChainNotSupportedError, wrapTxBypass, assertHasLocation, localizeLocation, isAssetXcEqual, addXcmVersionHeader, Version, createChainClient as createChainClient$1, 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, 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, getChainProviders, assertHasId, getChain, isForeignAsset, InvalidParameterError, computeFeeFromDryRunPjs, findNativeAssetInfoOrThrow, hasXcmPaymentApiSupport, resolveModuleError, getAssetsObject, ChainNotSupportedError, wrapTxBypass, assertHasLocation, localizeLocation, isAssetXcEqual, addXcmVersionHeader, Version, createChainClient as createChainClient$1, 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, isOverrideLocationSpecifier, transferMoonbeamEvm, transferMoonbeamToEth, validateAddress as validateAddress$1, 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';
5
5
  import { isHex, u8aToHex, hexToU8a, stringToU8a } from '@polkadot/util';
6
- import { decodeAddress, blake2AsHex } from '@polkadot/util-crypto';
6
+ import { decodeAddress, blake2AsHex, validateAddress } from '@polkadot/util-crypto';
7
7
  import { environment, Context, toPolkadotV2, assetsV2 } from '@snowbridge/api';
8
8
  import { WETH9__factory } from '@snowbridge/contract-types';
9
9
 
@@ -1312,6 +1312,16 @@ var PolkadotJsApi = /*#__PURE__*/function () {
1312
1312
  }
1313
1313
  return disconnect;
1314
1314
  }()
1315
+ }, {
1316
+ key: "validateSubstrateAddress",
1317
+ value: function validateSubstrateAddress(address) {
1318
+ try {
1319
+ validateAddress(address);
1320
+ return true;
1321
+ } catch (_unused) {
1322
+ return false;
1323
+ }
1324
+ }
1315
1325
  }]);
1316
1326
  }();
1317
1327
 
@@ -1810,12 +1820,12 @@ var EvmBuilderCore = /*#__PURE__*/function () {
1810
1820
  key: "build",
1811
1821
  value: (function () {
1812
1822
  var _build = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
1813
- var _this$_options, from, to, address, signer, _yield$transferEthToP, response;
1823
+ var _this$_options, from, to, address, signer, api, _yield$transferEthToP, response;
1814
1824
  return _regenerator().w(function (_context) {
1815
1825
  while (1) switch (_context.n) {
1816
1826
  case 0:
1817
- _this$_options = this._options, from = _this$_options.from, to = _this$_options.to, address = _this$_options.address, signer = _this$_options.signer;
1818
- validateAddress(address, to);
1827
+ _this$_options = this._options, from = _this$_options.from, to = _this$_options.to, address = _this$_options.address, signer = _this$_options.signer, api = _this$_options.api;
1828
+ validateAddress$1(api, address, to);
1819
1829
  if (!(from === 'Moonbeam' && to === 'Ethereum')) {
1820
1830
  _context.n = 2;
1821
1831
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk-pjs",
3
- "version": "11.14.2",
3
+ "version": "11.14.4",
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.12",
28
28
  "ethers": "^6.15.0",
29
29
  "viem": "^2.38.5",
30
- "@paraspell/sdk-core": "11.14.2"
30
+ "@paraspell/sdk-core": "11.14.4"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@polkadot/api": ">= 16.0 < 17",