Master private keys for the wallet can be retrieved by using listdescriptors true and inspecting the output. There is also some ongoing work to make it easier to export these keys without having to interpret a descriptor.

Original answer from Aug 2021

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

There is currently an open pull request which allows the listdescriptors command to optionally return descriptors with private keys. This will be the method by which private keys can be exported from a descriptor wallet.

Note that only the master private key used in a descriptor will be allowed to be exported from descriptor wallets. This is because descriptor wallets will be using unhardened derivation for the child keys and there is a known issue where having the parent xpub and a child key derived with unhardened derivation will allow the parent xprv to be computed. So to be clear to users that what they are doing is potentially unsafe, we will only allow exporting the master private key (it is more obviously unsafe when you have the master private key as users are unlikely to know about this weakness and may think that giving out child keys and the parent xpub is safe).


Source link

By admin

Leave a Reply

Your email address will not be published. Required fields are marked *