bitcoinjs / bip39

JavaScript implementation of Bitcoin BIP39: Mnemonic code for generating deterministic keys
ISC License
1.11k stars 447 forks source link

TypeError: Invalid entropy #73

Closed flute closed 6 years ago

flute commented 6 years ago

I'm try to get mnemonic with privateKey, get error: TypeError: Invalid entropy

privateKey like this: 0xbe03b2771ad49bac7dda1980687fdb1b5b4fce6a5ec7597923c3e3460687a576

my code like this:

const bip39 = require('bip39')
let mnemonic = bip39.entropyToMnemonic(String(privateKey))

is there any mistake i make?

dcousens commented 6 years ago

0x