I am creating a blank wallet with the intention of adding keys to the keypool but get an error keys can only be imported to the keypool when private keys are disabled

Why? It would be beneficial for users to be able to import their own private keys and get full functionality of the wallet with those keys. Is there any PR for this?

1 Answer 1


When you create the wallet that you are importing your keys into, presumably with something like bitcoin-cli -rpcwallet='mywallet' importmulti, it needs to be created in watchonly mode, meaning with private keys disabled. To do that, create the wallet with bitcoin-cli createwallet 'mywallet' true, where true is the argument for disable_private_keys, creating a wallet for watch-only (public) keys.

  • right, but obviously it would be useful to import private keys with an xprv, it seems there is no way to add private keys to the keypool other then importing individual keys. why can't we import an xprv just like we can import an xpub?
    – Fontaine
    Nov 18, 2019 at 3:47
  • Ah, I see. Looks like you can currently just import private keys in WIF. According to Pieter Wuille's comment in bitcoin.stackexchange.com/questions/87610/… it might in 0.19.0 , but I have not tested it yet. Nov 18, 2019 at 15:39
  • yea this is also helpful, testing now bitcoin.stackexchange.com/questions/88463/…
    – Fontaine
    Nov 19, 2019 at 0:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.