Bitcoin Forum
October 20, 2018, 04:33:16 PM *
News: Make sure you are not using versions of Bitcoin Core other than 0.17.0 [Torrent], 0.16.3, 0.15.2, or 0.14.3. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: How can I bulk import private keys from a pywallet dump to new wallet?  (Read 61 times)
Hashman501
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
December 14, 2017, 02:20:40 PM
 #1

Bitcoin Client Software and Version Number: Bitcoin Core 0.15.1
Operating System: Windows 7 64-bit
System Hardware Specs: i7 CPU with 16 GB RAM 1tb ssd.
Description of Problem: How can I bulk import private keys from a pywallet --dumpwallet command to a new wallet.


I have an old unencrypted wallet file from about 2012. When I use this file with bitcoin core it claims it is corrupted and salvagewallet failed.

I've successfully managed to dump the private keys from from the file using pywallet --dumpwallet to a txt file.... Now I have a ton of keys and am looking for a quick way to import them into a new wallet.
I have Bitcoin Core 0.15.1 is fully in sync with the network and working with a new wallet file.

Im sure I could do it manually, but it would be far too time consuming to complete by hand. Is there a batch import command or method I can get pywallet or Bitcoin core to import the keys?

Thanks

 
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1540053196
Hero Member
*
Offline Offline

Posts: 1540053196

View Profile Personal Message (Offline)

Ignore
1540053196
Reply with quote  #2

1540053196
Report to moderator
LoyceV
Legendary
*
Offline Offline

Activity: 1274
Merit: 2136


Self-made Legendary!


View Profile WWW
December 14, 2017, 03:03:31 PM
 #2

I think this is what you're looking for (edit to your needs):
The other file is a batch file to import the private keys, and gives you an option to run it after generating, the file looks like this:
Code:
"C:\Program Files\Bitcoin\daemon\bitcoind.exe" importprivkey L4mP3joYEhSv1ofdsWbz8xEmqCmYK9vGyi8mJmWWbh79Xx2NsS1M addr-1DfyaDvr-1 false
"C:\Program Files\Bitcoin\daemon\bitcoind.exe" importprivkey Ky2EGjWLhfKv1sWnPcuN4SHF2iALj6SfK7hoLWKx5T4zMqXg7aT9 addr-1DfyaDvr-2 false
"C:\Program Files\Bitcoin\daemon\bitcoind.exe" importprivkey KzrZ4DULdVWFqpF48pdJicFJfX5dqrhxBkqDnT4HRkCswdFy3Eo4 addr-1DfyaDvr-3 false
"C:\Program Files\Bitcoin\daemon\bitcoind.exe" importprivkey L2ELWXewr1PQnMwFDpfobHFqspyM6g1noM4uzkCMgoSZTSf3sQJF addr-1DfyaDvr-4 false

The "false" prevents a full rescan after every import, you'll need to rescan after the last import, so leave the last "false" out.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!