Title: I can't get my private key Post by: SamuelDL on July 26, 2021, 10:59:42 AM Hello, on Bitcoin core 0.21.1, when I write the commands on the console to see my private key, I am told that the type of my wallet does not support this command. It is an encrypted wallet with passphrase. Can someone tell me how to get my private key ? Thank you.
Title: Re: I can't get my private key Post by: OmegaStarScream on July 26, 2021, 11:07:34 AM Do you mind posting the commands you've used? Is it a standard wallet? If so, all you should be using is the walletpassphrase command to unlock the wallet, then dumpprivkey afterward.
Title: Re: I can't get my private key Post by: SamuelDL on July 26, 2021, 11:27:17 AM Do you mind posting the commands you've used? Is it a standard wallet? If so, all you should be using is the walletpassphrase command to unlock the wallet, then dumpprivkey afterward. I have already written these commands and I am told that my wallet does not support this kind of commands. When I created it, I just encrypted it, wrote a passphrase and that's it. Nothing moreTitle: Re: I can't get my private key Post by: SamuelDL on July 26, 2021, 11:52:25 AM I am told that the type of my wallet does not support this command. Can you try it again and show us the exact error/warning message? then dumpprivkey afterward. Or use dumpwallet if you plan to get private key from many address. Title: Re: I can't get my private key Post by: ABCbits on July 26, 2021, 12:10:07 PM I tried creating to reproduce the problem (by enable "descriptor wallet" and "encrypt wallet" when creating new wallet) and managed to reproduce the problem. It happens because Bitcoin Core doesn't support such command for descriptor wallet according to https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md (https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md).
Title: Re: I can't get my private key Post by: SamuelDL on July 26, 2021, 12:28:58 PM I tried creating to reproduce the problem (by enable "descriptor wallet" and "encrypt wallet" when creating new wallet) and managed to reproduce the problem. It happens because Bitcoin Core doesn't support such command for descriptor wallet according to https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md (https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md). Is it better that I change the type of wallet to know my private key or I stay with this one ?Title: Re: I can't get my private key Post by: SamuelDL on July 27, 2021, 08:48:42 AM Thank you very much.
Title: Re: I can't get my private key Post by: Easteregg69 on July 27, 2021, 01:02:44 PM Thank you very much. How about putting the wallet.dat in core wallet and try? Latest version. Title: Re: I can't get my private key Post by: HCP on August 04, 2021, 01:21:47 AM If you read the release notes for 0.21.0, you'll see the descriptor wallets are regarded as "experimental" and should not be the "default" wallet type created: https://bitcoincore.org/en/releases/0.21.0/
Additionally, the import and export functionality for these types of wallets is different: Quote from: https://bitcoincore.org/en/releases/0.21.0/ As Legacy Wallets and Descriptor Wallets use different mechanisms for storing and importing scripts and keys the existing import RPCs have been disabled for descriptor wallets. New export RPCs for Descriptor Wallets have not yet been added. So, as you can see... there are no "Export" functions for descriptor wallets as yet. So you will not be able to export anything at this time.The following RPCs are disabled for Descriptor Wallets: - importprivkey - importpubkey - importaddress - importwallet - dumpprivkey - dumpwallet - importmulti - addmultisigaddress - sethdseed Note that v0.21.1 is just the update to support Taproot... so the 0.21.0 info regarding descriptor wallets should still hold true. Essentially, unless you explicitly need descriptor support (and you can only use it for importing at this time), I would suggest that you continue to use the "legacy" wallet option by making sure that the "descriptor wallet" option is not used during wallet creation. Title: Re: I can't get my private key Post by: SamuelDL on August 05, 2021, 08:30:08 PM Ok, Thank you.
Title: Re: I can't get my private key Post by: nc50lc on April 30, 2022, 04:31:38 AM Bumping this quite old thread to include a solution involving today's latest Bitcoin Core version (v23.0).
It's now possible to export the parent descriptor with xprv key by using the command: listdescriptors true. You can get your address' prvKey with the help of Iancoleman's BIP39 tool (https://github.com/iancoleman/bip39) (or any alternative). Steps:
If the address is not in the list: In getaddressinfo's result, look for "hdkeypath":" to see the index (last digit), since the tool will only show 20 by default; generate more rows if it's 20+. Also check if the path is correct. For Taproot descriptors, the suggested tool doesn't support it yet. |