Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A file backup would be the most comprehensive recovery option in the event of catastrophe. Since the file is so sensitive though, having multiple copies also increases your hack risks. Secure your backups!

Private Keys

It is not recommended dangerous to print or expose your private key, especially in a terminal or any other insecure environment. However, if you absolutely need to your private key(s). Be extremely cautious with these operations. Anyone with access to your private key(s) can control your Bitcoin funds associated with that address. We generally recommended you use hardware wallets or other secure methods for managing your private keys.

If you absolutely must retrieve your private key for a specific address - you must first determine the type of wallet you’re using:

Code Block
bitcoin-cli

...

 getwalletinfo
  • Examine the descriptors attribute in the result.

    • true = use the listdescriptors method.

    • false = use the dumpprivkey method.

The dumpprivkey command is deprecated and unusable for non-legacy wallets. Example:

Code Block
bitcoin-cli dumpprivkey "your_bitcoin_address"
  • Replace "your_bitcoin_address" with the actual address for which you want to retrieve the private key. This command will output the private key associated with that address.Be extremely cautious with this operation. Anyone with access to your private key can control your Bitcoin funds associated with that address. We generally recommended you use hardware wallets or other secure methods for managing your private keys.

  • Only works for legacy-type (non-descriptor) wallets.

The listdescriptors command works for non-legacy wallets (bech32, bech32m, and descriptors). It is a bit more complex to use than dumpprivkey, and prints out the all the keys in JSON format.

Code Block
bitcoin-cli listdescriptors true
  • Returns all descriptors and their private keys, including their derivation paths.

...

Related articles

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@10d56
showSpacefalse
sortmodified
typepage
reversetrue
labelscas bitcoind node hotwallet
cqllabel in ( "node" , "cas" , "bitcoind" , "hotwallet" ) and type = "page" and space = "ESD"

...

hiddentrue

...