From 92551e7c11f84e19e42a752b0587aa88e622c8e4 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Fri, 29 Aug 2025 22:00:29 -0700 Subject: [PATCH] Fix BIP-39 seed overload. --- src/lib/crypto/bip39.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/crypto/bip39.ts b/src/lib/crypto/bip39.ts index 1fae699..de98d46 100644 --- a/src/lib/crypto/bip39.ts +++ b/src/lib/crypto/bip39.ts @@ -192,7 +192,7 @@ export class Bip39 { * @param {string} [passphrase=''] - Used as the PBKDF2 salt. Default: "" * @returns {Promise} Promise for seed as hexadecimal string */ - toBip39Seed (passphrase: string, format?: 'hex'): Promise + toBip39Seed (passphrase: string, format: 'hex'): Promise toBip39Seed (passphrase: unknown, format?: 'hex'): Promise> { if (this.phrase == null) { throw new Error('BIP-39 mnemonic phrase not found') @@ -213,7 +213,7 @@ export class Bip39 { return crypto.subtle.deriveBits(algorithm, phraseKey, 512) .then(seed => { this.#bip39Seed = new Uint8Array(seed) - return this.toBip39Seed(salt, format) + return this.toBip39Seed(salt, format as 'hex') }) }) } -- 2.47.3