From: Chris Duncan Date: Sat, 30 Aug 2025 05:00:29 +0000 (-0700) Subject: Fix BIP-39 seed overload. X-Git-Tag: v0.10.5~38^2~11 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=92551e7c11f84e19e42a752b0587aa88e622c8e4;p=libnemo.git Fix BIP-39 seed overload. --- 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') }) }) }