* @param {string} [passphrase=''] - Used as the PBKDF2 salt. Default: ""\r
* @returns {Promise<string>} Promise for seed as hexadecimal string\r
*/\r
- toBip39Seed (passphrase: string, format?: 'hex'): Promise<string>\r
+ toBip39Seed (passphrase: string, format: 'hex'): Promise<string>\r
toBip39Seed (passphrase: unknown, format?: 'hex'): Promise<string | Uint8Array<ArrayBuffer>> {\r
if (this.phrase == null) {\r
throw new Error('BIP-39 mnemonic phrase not found')\r
return crypto.subtle.deriveBits(algorithm, phraseKey, 512)\r
.then(seed => {\r
this.#bip39Seed = new Uint8Array(seed)\r
- return this.toBip39Seed(salt, format)\r
+ return this.toBip39Seed(salt, format as 'hex')\r
})\r
})\r
}\r