@paraspell/sdk-pjs 14.4.0 → 14.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.mjs +8 -4
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ export * from '@paraspell/sdk-core';
|
|
|
3
3
|
import { Keyring, WsProvider, ApiPromise } from '@polkadot/api';
|
|
4
4
|
import { snakeToCamel, lowercaseFirstLetter } from '@paraspell/sdk-common';
|
|
5
5
|
import { u8aConcat, compactToU8a, u8aEq, isHex, u8aToHex, hexToU8a, stringToU8a } from '@polkadot/util';
|
|
6
|
-
import { decodeAddress, blake2AsHex, validateAddress } from '@polkadot/util-crypto';
|
|
6
|
+
import { decodeAddress, blake2AsHex, xxhashAsHex, validateAddress } from '@polkadot/util-crypto';
|
|
7
7
|
|
|
8
8
|
function _arrayLikeToArray(r, a) {
|
|
9
9
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -529,9 +529,8 @@ var PolkadotJsApi = /*#__PURE__*/function (_PolkadotApi) {
|
|
|
529
529
|
key: "accountToHex",
|
|
530
530
|
value: function accountToHex(address) {
|
|
531
531
|
var isPrefixed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
return u8aToHex(uint8Array, -1, isPrefixed);
|
|
532
|
+
var hex = isHex(address) ? address : u8aToHex(decodeAddress(address));
|
|
533
|
+
return isPrefixed ? hex : hex.slice(2);
|
|
535
534
|
}
|
|
536
535
|
}, {
|
|
537
536
|
key: "accountToUint8a",
|
|
@@ -776,6 +775,11 @@ var PolkadotJsApi = /*#__PURE__*/function (_PolkadotApi) {
|
|
|
776
775
|
value: function blake2AsHex$1(data) {
|
|
777
776
|
return blake2AsHex(data);
|
|
778
777
|
}
|
|
778
|
+
}, {
|
|
779
|
+
key: "xxhashAsHex",
|
|
780
|
+
value: function xxhashAsHex$1(data) {
|
|
781
|
+
return xxhashAsHex(data);
|
|
782
|
+
}
|
|
779
783
|
}, {
|
|
780
784
|
key: "clone",
|
|
781
785
|
value: function clone() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraspell/sdk-pjs",
|
|
3
|
-
"version": "14.4.
|
|
3
|
+
"version": "14.4.2",
|
|
4
4
|
"description": "Polkadot.js based SDK for ParaSpell XCM/XCMP tool for developers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@paraspell/sdk-common": "14.4.
|
|
26
|
-
"@paraspell/sdk-core": "14.4.
|
|
25
|
+
"@paraspell/sdk-common": "14.4.2",
|
|
26
|
+
"@paraspell/sdk-core": "14.4.2"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@polkadot/api": ">= 17 < 18",
|