diff --git a/package.json b/package.json index c088afe..45529db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mycrypto/wallets", - "version": "1.3.4", + "version": "1.3.5", "description": "Wallet abstractions to be used throughout the MyCrypto product suite.", "repository": "MyCryptoHQ/wallets", "author": "MyCrypto", diff --git a/src/implementations/deterministic/mnemonic-phrase.ts b/src/implementations/deterministic/mnemonic-phrase.ts index f462329..d725d80 100644 --- a/src/implementations/deterministic/mnemonic-phrase.ts +++ b/src/implementations/deterministic/mnemonic-phrase.ts @@ -33,8 +33,11 @@ export class MnemonicPhrase extends DeterministicWallet { return new PrivateKey(node.derivePath(index.toString(10)).privateKey); } - static create(passphrase?: string): MnemonicPhrase { - const entropy = crypto.randomBytes(MNEMONIC_ENTROPY_BYTES); + static create( + passphrase?: string, + entropyBytes: number = MNEMONIC_ENTROPY_BYTES + ): MnemonicPhrase { + const entropy = crypto.randomBytes(entropyBytes); const mnemonicPhrase = entropyToMnemonic(entropy); return new MnemonicPhrase(mnemonicPhrase, passphrase);