@talismn/crypto 0.1.3 → 0.1.5
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.
|
@@ -2,7 +2,7 @@ export declare const blake3: {
|
|
|
2
2
|
(msg: import("@noble/hashes/utils").Input, opts?: Object | undefined): Uint8Array;
|
|
3
3
|
outputLen: number;
|
|
4
4
|
blockLen: number;
|
|
5
|
-
create(opts
|
|
5
|
+
create(opts?: Object | undefined): import("@noble/hashes/utils").HashXOF<import("@noble/hashes/utils").HashXOF<import("@noble/hashes/utils").HashXOF<any>>>;
|
|
6
6
|
};
|
|
7
7
|
export declare const blake2b256: (msg: Uint8Array) => Uint8Array<ArrayBufferLike>;
|
|
8
8
|
export declare const blake2b512: (msg: Uint8Array) => Uint8Array<ArrayBufferLike>;
|
|
@@ -393,7 +393,12 @@ const normalizeAnyAddress = address => {
|
|
|
393
393
|
};
|
|
394
394
|
|
|
395
395
|
const isAddressEqual = (address1, address2) => {
|
|
396
|
-
|
|
396
|
+
try {
|
|
397
|
+
return normalizeAddress(address1) === normalizeAddress(address2);
|
|
398
|
+
} catch (err) {
|
|
399
|
+
// if normalization fails, assume the addresses are not equal
|
|
400
|
+
return false;
|
|
401
|
+
}
|
|
397
402
|
};
|
|
398
403
|
|
|
399
404
|
// Inspired from MIT licensed @polkadot-labs/hdkd helpers
|
|
@@ -393,7 +393,12 @@ const normalizeAnyAddress = address => {
|
|
|
393
393
|
};
|
|
394
394
|
|
|
395
395
|
const isAddressEqual = (address1, address2) => {
|
|
396
|
-
|
|
396
|
+
try {
|
|
397
|
+
return normalizeAddress(address1) === normalizeAddress(address2);
|
|
398
|
+
} catch (err) {
|
|
399
|
+
// if normalization fails, assume the addresses are not equal
|
|
400
|
+
return false;
|
|
401
|
+
}
|
|
397
402
|
};
|
|
398
403
|
|
|
399
404
|
// Inspired from MIT licensed @polkadot-labs/hdkd helpers
|
|
@@ -388,7 +388,12 @@ const normalizeAnyAddress = address => {
|
|
|
388
388
|
};
|
|
389
389
|
|
|
390
390
|
const isAddressEqual = (address1, address2) => {
|
|
391
|
-
|
|
391
|
+
try {
|
|
392
|
+
return normalizeAddress(address1) === normalizeAddress(address2);
|
|
393
|
+
} catch (err) {
|
|
394
|
+
// if normalization fails, assume the addresses are not equal
|
|
395
|
+
return false;
|
|
396
|
+
}
|
|
392
397
|
};
|
|
393
398
|
|
|
394
399
|
// Inspired from MIT licensed @polkadot-labs/hdkd helpers
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@talismn/crypto",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"author": "Talisman",
|
|
5
5
|
"homepage": "https://talisman.xyz",
|
|
6
6
|
"license": "GPL-3.0-or-later",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"node": ">=18"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@noble/curves": "1.
|
|
26
|
-
"@noble/hashes": "1.
|
|
27
|
-
"@scure/base": "1.2.
|
|
28
|
-
"@scure/bip32": "1.
|
|
25
|
+
"@noble/curves": "1.9.2",
|
|
26
|
+
"@noble/hashes": "1.8.0",
|
|
27
|
+
"@scure/base": "1.2.6",
|
|
28
|
+
"@scure/bip32": "1.7.0",
|
|
29
29
|
"@scure/bip39": "1.5.4",
|
|
30
30
|
"bech32": "2.0.0",
|
|
31
31
|
"bs58check": "4.0.0",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"jest": "^29.7.0",
|
|
39
39
|
"ts-jest": "^29.2.5",
|
|
40
40
|
"typescript": "^5.6.3",
|
|
41
|
-
"@talismn/
|
|
42
|
-
"@talismn/
|
|
41
|
+
"@talismn/tsconfig": "0.0.2",
|
|
42
|
+
"@talismn/eslint-config": "0.0.3"
|
|
43
43
|
},
|
|
44
44
|
"preconstruct": {
|
|
45
45
|
"entrypoints": [
|