Bitcoin

bitcoind – How do I get the private key for an address in a descriptor wallet? How to dump private key?

You can retrieve your wallet’s master private key using: listdescriptors true And inspect the output: Work is also underway to make it easier to export these keys without having to interpret the descriptors.


Original answer August 2021

It is currently not possible to export private keys from a descriptor wallet.

There is currently a public pull request that allows: listdescriptors A command that optionally returns a descriptor containing the private key. This is how you can export your private keys from your descriptor wallet.

Only the master private key used in the descriptor can be exported from the descriptor wallet. This is because there is a known issue where Descriptor Wallet uses unenhanced derivation for child keys and the parent xpub and child keys derived with unenhanced derivation may result in calculating the parent xprv. Therefore, to make it clear to users that what they are doing is potentially insecure, we only allow export of the master private key (it is unlikely that users will be aware of this weakness, and it is even more insecure if you have a master private key with subkeys). and providing the parent xpub is safe).

Related Articles

Back to top button