Bitcoin Forum
December 15, 2024, 10:36:07 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: I can't get my private key  (Read 451 times)
This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic.
SamuelDL (OP)
Newbie
*
Offline Offline

Activity: 15
Merit: 13


View Profile
July 26, 2021, 10:59:42 AM
Merited by LoyceV (4), OmegaStarScream (3), vapourminer (2), ABCbits (2)
 #1

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.
OmegaStarScream
Staff
Legendary
*
Offline Offline

Activity: 3696
Merit: 6539



View Profile
July 26, 2021, 11:07:34 AM
Merited by SamuelDL (1)
 #2

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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
SamuelDL (OP)
Newbie
*
Offline Offline

Activity: 15
Merit: 13


View Profile
July 26, 2021, 11:27:17 AM
 #3

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 more
SamuelDL (OP)
Newbie
*
Offline Offline

Activity: 15
Merit: 13


View Profile
July 26, 2021, 11:52:25 AM
 #4

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.
I just did a test and when I deselect DescriptorWallet it shows me my private key but not when I select DescriptorWallet and even when I write '' dumpwallet '' it gives me the same error message: ''This type of wallet does not support this command (code -4)''


ABCbits
Legendary
*
Offline Offline

Activity: 3094
Merit: 8186


Crypto Swap Exchange


View Profile
July 26, 2021, 12:10:07 PM
Merited by SamuelDL (2), vapourminer (1), hosseinimr93 (1)
 #5

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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
SamuelDL (OP)
Newbie
*
Offline Offline

Activity: 15
Merit: 13


View Profile
July 26, 2021, 12:28:58 PM
 #6

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.
Is it better that I change the type of wallet to know my private key or I stay with this one ?
SamuelDL (OP)
Newbie
*
Offline Offline

Activity: 15
Merit: 13


View Profile
July 27, 2021, 08:48:42 AM
 #7

Thank you very much.
Easteregg69
Sr. Member
****
Offline Offline

Activity: 1579
Merit: 267



View Profile
July 27, 2021, 01:02:44 PM
 #8

Thank you very much.

How about putting the wallet.dat in core wallet and try? Latest version.

Throw some "shit" and see what sticks.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4363

<insert witty quote here>


View Profile
August 04, 2021, 01:21:47 AM
 #9

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:
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.

The following RPCs are disabled for Descriptor Wallets:

- importprivkey
- importpubkey
- importaddress
- importwallet
- dumpprivkey
- dumpwallet
- importmulti
- addmultisigaddress
- sethdseed
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.

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.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
SamuelDL (OP)
Newbie
*
Offline Offline

Activity: 15
Merit: 13


View Profile
August 05, 2021, 08:30:08 PM
 #10

Ok, Thank you.
nc50lc
Legendary
*
Offline Offline

Activity: 2632
Merit: 6513


Self-proclaimed Genius


View Profile
April 30, 2022, 04:31:38 AM
Merited by Isildur (official) (10), LoyceV (6), OmegaStarScream (5), ABCbits (4)
 #11

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 (or any alternative).

Steps:
  • First use the command: getaddressinfo <address> and take note of the result.
  • Export the parent descriptor (private) with the command: listdescriptors true.
  • Select the correct parent descriptor based from the address' script type (pkh, wpkh, sh),
    also check if it's a descriptor for receiving or change addresses ("internal": false = receiving | true = change); then take note of its xprv key.
  • Launch BIP39 tool (offline) and paste the xprv key as "BIP32 Root Key".
  • Select the correct derivation path as described in the descriptor, the derived addresses and private keys will be listed below the page.

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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!