0

I have a file: wallet.dat where should be saved one or more private keys of my old wallet linked to one/more public btc addresses. I also had more than a wallet, so I don't really know if there are some created address with an amount of money in that file or not. Of course, I don't want to download 500 gbs of transactions since 2009 using Qt-Coin and my idea was to extract private keys in order to import them on another wallet like blockchain.com. I managed to use some open source tool (wt_extract_keys.py https://github.com/akx/walletool) to extract private keys, one seemed to work but the format of private keys seems to be not compatible because blockchain.com requires a private key in a wif format and what I got is a very big private non-compressed key. So how can I get the private key/s with the right format this if it's possible? What do you suggest?

1 Answer 1

1

I would use the dumpwallet approach using Core, then use a script to remove everything but the WIF private keys and import them to Electrum which can import a list of private keys

9
  • I have bitcoin-core installed, but I can't find dumpwallet executable. I'm working on windows
    – Virgula
    Commented Jan 31, 2021 at 16:02
  • Once you run Core find the "console" menu item from which you can call dumpwallet
    – MCCCS
    Commented Jan 31, 2021 at 16:18
  • Ok I have found it, but I can't import the dumped wallet on electrum, maybe there are no valid addresses because if I try to type dumpprivkey it says: Invalid Bitcoin address (code -5). On electrum, I do: import btc addresses or private keys, then I select the file which contains a lot of strings (but I don't know if they represent valid addresses) and I cannot move forward after that: i.imgur.com/5JRM4qX.png
    – Virgula
    Commented Jan 31, 2021 at 16:27
  • OK, that file contains private keys. Private keys are all words that start with K, L or 5. You need to copy paste those and only those, not comments, not anything else to Electrum. You may also skip the private keys that have reserve=1, those are unused. I'm going to write a script that takes the output and filters the private keys and I'll post them here in ~48 hours, so if there are too many addresses without reserve=1, please wait one to two days
    – MCCCS
    Commented Jan 31, 2021 at 17:21
  • I could have coded it by myself but if you have already done the work and want to share it I'll appreciate, thank you.
    – Virgula
    Commented Jan 31, 2021 at 21:54

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.