@taquito/signer 25.0.0-beta.1 → 25.0.0
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.
|
@@ -16,7 +16,6 @@ exports.InMemorySigner = void 0;
|
|
|
16
16
|
exports.publicKeyFromString = publicKeyFromString;
|
|
17
17
|
const nacl_1 = require("@stablelib/nacl");
|
|
18
18
|
const utils_1 = require("@taquito/utils");
|
|
19
|
-
const typedarray_to_buffer_1 = require("typedarray-to-buffer");
|
|
20
19
|
const ed_key_1 = require("./ed-key");
|
|
21
20
|
const ec_key_1 = require("./ec-key");
|
|
22
21
|
const bip39 = require("@scure/bip39");
|
|
@@ -101,8 +100,9 @@ class InMemorySigner {
|
|
|
101
100
|
throw new errors_1.InvalidPassphraseError('No passphrase provided to decrypt encrypted key');
|
|
102
101
|
}
|
|
103
102
|
decrypt = (data) => {
|
|
104
|
-
|
|
105
|
-
const
|
|
103
|
+
// Noble rejects Buffer salts under jsdom/SSR realm boundaries. Normalize into this realm.
|
|
104
|
+
const salt = Uint8Array.from(data.subarray(0, 8));
|
|
105
|
+
const encryptedSk = data.subarray(8);
|
|
106
106
|
const encryptionKey = (0, pbkdf2_js_1.pbkdf2)(sha2_js_1.sha512, passphrase, salt, { c: 32768, dkLen: 32 });
|
|
107
107
|
// Zero nonce is safe here: Tezos encrypted key format uses a fresh random salt per
|
|
108
108
|
// encryption, producing a unique PBKDF2-derived key each time. The (key, nonce) pair
|
package/dist/lib/version.js
CHANGED
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VERSION = void 0;
|
|
4
4
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT!
|
|
5
5
|
exports.VERSION = {
|
|
6
|
-
"commitHash": "
|
|
7
|
-
"version": "25.0.0
|
|
6
|
+
"commitHash": "13f62cd47ea018312f100b660d0225604c757afa",
|
|
7
|
+
"version": "25.0.0"
|
|
8
8
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { openSecretBox } from '@stablelib/nacl';
|
|
2
2
|
import { b58DecodeAndCheckPrefix, PrefixV2, b58Encode, compareArrays, InvalidPublicKeyError, BLS12_381_DST, POP_DST, hex2buf, mergebuf, buf2hex } from '@taquito/utils';
|
|
3
|
-
import toBuffer from 'typedarray-to-buffer';
|
|
4
3
|
import { ed25519 as ed25519$1 } from '@noble/curves/ed25519';
|
|
5
4
|
import { secp256k1 } from '@noble/curves/secp256k1';
|
|
6
5
|
import { p256 } from '@noble/curves/nist.js';
|
|
@@ -4847,8 +4846,9 @@ class InMemorySigner {
|
|
|
4847
4846
|
throw new InvalidPassphraseError('No passphrase provided to decrypt encrypted key');
|
|
4848
4847
|
}
|
|
4849
4848
|
decrypt = (data) => {
|
|
4850
|
-
|
|
4851
|
-
const
|
|
4849
|
+
// Noble rejects Buffer salts under jsdom/SSR realm boundaries. Normalize into this realm.
|
|
4850
|
+
const salt = Uint8Array.from(data.subarray(0, 8));
|
|
4851
|
+
const encryptedSk = data.subarray(8);
|
|
4852
4852
|
const encryptionKey = pbkdf2(sha512, passphrase, salt, { c: 32768, dkLen: 32 });
|
|
4853
4853
|
// Zero nonce is safe here: Tezos encrypted key format uses a fresh random salt per
|
|
4854
4854
|
// encryption, producing a unique PBKDF2-derived key each time. The (key, nonce) pair
|
|
@@ -4950,8 +4950,8 @@ function publicKeyFromString(src) {
|
|
|
4950
4950
|
|
|
4951
4951
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT!
|
|
4952
4952
|
const VERSION = {
|
|
4953
|
-
"commitHash": "
|
|
4954
|
-
"version": "25.0.0
|
|
4953
|
+
"commitHash": "13f62cd47ea018312f100b660d0225604c757afa",
|
|
4954
|
+
"version": "25.0.0"
|
|
4955
4955
|
};
|
|
4956
4956
|
|
|
4957
4957
|
export { ecdsa as ECDSA, ed25519 as Ed25519, Hard, InMemorySigner, InvalidPassphraseError, Path, VERSION, generateSecretKey, publicKeyFromString };
|