<p>Bitcoin Core does not currently support BIP 39 mnemonics nor the size of the BIP 32 seed produced by a BIP 39 mnemonic. BIP 39 produces 512 bit seeds, but Bitcoin Core currently only supports importing a 256 bit seed via <code>sethdseed</code>.</p>

CC BY-SA 4.0
2019-05-01T15:13:14.017Z
Great answer, but too bad `sethdseed` does not support 512 bit input seeds by allowing xpriv seeds to be imported directly.  Then something like the following could have been used:

**% echo "army van defense carry jealous true garbage claim echo media make crunch" | bx mnemonic-to-seed -p "" | bx hd-new**
`xprv9s21ZrQH143K3t4UZrNgeA3w861fwjYLaGwmPtQyPMmzshV2owVpfBSd2Q7YsHZ9j6i6ddYjb5PLtUdMZn8LhvuCVhGcQntq5rn7JVMqnie`
skaht
CC BY-SA 4.0
2019-05-01T04:07:40.960Z
2019-05-01T04:07:40.960Z
Ava Chow
<p>I could not find documentation on using a 12-word BIP39 Mnemonic to restore a wallet through bitcoin-cli.  It seems that importprivkey might be the right RPC call but when I provide the 12 words, it says "Invalid private key encoding"  I also tried the following formats which were generated by Ian Coleman's page from <a href="https://github.com/iancoleman/bip39" rel="nofollow noreferrer">https://github.com/iancoleman/bip39</a>:</p>

<p>BIP39 Seed<br>
BIP32 Root Key<br>
Account Extended Private Key<br>
BIP32 Extended Private Key</p>

<p>Perhaps the master seed mnemonic is useless if all you have is bitcoin-cli and the bitcoind to which it's attached.  Is that the case?</p>

<wallet-recovery><bitcoin-cli><mnemonic-seed>
Can a BIP39 12-word mnemonic be used to restore a wallet through bitcoin-cli?
Dave Scotese
# Can a BIP39 12-word mnemonic be used to restore a wallet through bitcoin-cli?

(Asked by: username_0 on 2019-05-01)

I could not find documentation on using a 12-word BIP39 Mnemonic to restore a wallet through bitcoin-cli. It seems that importprivkey might be the right RPC call but when I provide the 12 words, it says "Invalid private key encoding" I also tried the following formats which were generated by Ian Coleman's page from <https://github.com/iancoleman/bip39>:

BIP39 Seed  
BIP32 Root Key  
Account Extended Private Key  
BIP32 Extended Private Key

Perhaps the master seed mnemonic is useless if all you have is bitcoin-cli and the bitcoind to which it's attached. Is that the case?

**Tags:** wallet-recovery, bitcoin-cli, mnemonic-seed


---

## 1 answers

### Answer by username_1 on 2019-05-01. Score: 5

Bitcoin Core does not currently support BIP 39 mnemonics nor the size of the BIP 32 seed produced by a BIP 39 mnemonic. BIP 39 produces 512 bit seeds, but Bitcoin Core currently only supports importing a 256 bit seed via `sethdseed`.

> **Comments:**
> **username_2**: Great answer, but too bad `sethdseed` does not support 512 bit input seeds by allowing xpriv seeds to be imported directly.  Then something like the following could have been used:  **% echo "army van defense carry jealous true garbage claim echo media make crunch" | bx mnemonic-to-seed -p "" | bx hd-new** `xprv9s21ZrQH143K3t4UZrNgeA3w861fwjYLaGwmPtQyPMmzshV2owVpfBSd2Q7YsHZ9j6i6ddYjb5PLtUdMZn8LhvuCVhGcQntq5rn7JVMqnie`  

---

