0

I previously (months ago) generated a Signet address on a Bitcoin Core PR branch and obtained some Signet from the faucet to that address. How can I locate that private key in my file system if I know the Bitcoin address? How can I locate that private key if I have forgotten the Bitcoin address?

2
  • The private key is in your wallet.dat file. You can use dumpprivkey to get the key. Is that what you are asking? There isn't anything signet specific about this. Commented Jan 24, 2021 at 20:02
  • I guess I was getting confused about what persisted across different PR builds and across different chains (mainnet, testnet, signet, regtest). So there is a separate append only wallet.dat file for each of mainnet, testnet, signet, regtest that persists (not replaced or written over) regardless of what PR branch or Core version you are running. You can move from building one PR branch to another PR branch and you will still have access to the same wallet.dat file you had on the previous PR branch. Commented Jan 25, 2021 at 11:09

1 Answer 1

0

As Pieter says in the comment the private key is in the wallet.dat file and you can use:

./src/bitcoin-cli -signet dumpprivkey insert_signet_address

to get the private key for that signet address.

There are separate wallet.dat files for each chain (mainnet, testnet, signet, regtest) that persist across the different PR branches and different versions of Bitcoin Core you run. These aren't ever replaced or written over. If you have signet Bitcoin on one PR branch, then you build and run another PR branch you will still have access to that same signet Bitcoin that you had on the previous branch in the usual way.

Pieter added below:

Every chain has its own distinct default datadir, and everything in that datadir (including blocks, chainstate, peers.dat, onion addresses/keys, ban data, fee estimates, mempool dumps, ...) is shared between all codebases that use that chain.

1
  • 1
    Indeed, but this isn't unique to wallets either. Every chain has its own distinct default datadir, and everything in that datadir (including blocks, chainstate, peers.dat, onion addresses/keys, ban data, fee estimates, mempool dumps, ...) is shared between all codebases that use that chain. Commented Jan 25, 2021 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.