@paraspell/sdk 14.4.0 → 14.4.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.
Files changed (2) hide show
  1. package/dist/index.mjs +7 -3
  2. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -9,7 +9,7 @@ import { AccountId, Binary, getSs58AddressInfo } from 'polkadot-api';
9
9
  import { getTxCreator, getFakeTxCreator } from 'polkadot-api/tx-creator';
10
10
  import { blake2b } from '@noble/hashes/blake2.js';
11
11
  import { hydration } from '@paraspell/descriptors';
12
- import { unifyMetadata, decAnyMetadata } from '@polkadot-api/substrate-bindings';
12
+ import { unifyMetadata, decAnyMetadata, Twox64Concat } from '@polkadot-api/substrate-bindings';
13
13
  import { toHex } from 'polkadot-api/utils';
14
14
  import { createWsClient } from 'polkadot-api/ws';
15
15
  import { isAddress, isHex } from 'viem';
@@ -826,8 +826,7 @@ var PapiApi = /*#__PURE__*/function (_PolkadotApi) {
826
826
  key: "accountToHex",
827
827
  value: function accountToHex(address) {
828
828
  var isPrefixed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
829
- if (isHex(address)) return address;
830
- var hex = toHex(AccountId().enc(address));
829
+ var hex = isHex(address) ? address : toHex(AccountId().enc(address));
831
830
  return isPrefixed ? hex : hex.slice(2);
832
831
  }
833
832
  }, {
@@ -985,6 +984,11 @@ var PapiApi = /*#__PURE__*/function (_PolkadotApi) {
985
984
  dkLen: 32
986
985
  })));
987
986
  }
987
+ }, {
988
+ key: "xxhashAsHex",
989
+ value: function xxhashAsHex(data) {
990
+ return toHex(Twox64Concat(data).subarray(0, 8));
991
+ }
988
992
  }, {
989
993
  key: "hasMethod",
990
994
  value: function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraspell/sdk",
3
- "version": "14.4.0",
3
+ "version": "14.4.3",
4
4
  "description": "SDK for ParaSpell XCM/XCMP tool for developers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,7 +23,7 @@
23
23
  ],
24
24
  "dependencies": {
25
25
  "@noble/hashes": "^2.4.0",
26
- "@paraspell/sdk-core": "14.4.0",
26
+ "@paraspell/sdk-core": "14.4.3",
27
27
  "@polkadot-api/signers-common": "^0.4.0",
28
28
  "@polkadot-api/substrate-bindings": "^0.21.2",
29
29
  "@polkadot-labs/hdkd": "^0.0.32",
@@ -31,7 +31,7 @@
31
31
  "viem": "^2.57.0"
32
32
  },
33
33
  "peerDependencies": {
34
- "@paraspell/descriptors": "14.4.0",
34
+ "@paraspell/descriptors": "14.4.3",
35
35
  "polkadot-api": ">= 3 < 4"
36
36
  },
37
37
  "devDependencies": {