Post
Topic
Board Development & Technical Discussion
Merits 2 from 1 user
Re: Simple Program to Reveal Bitcoin address from Private Keys
by
ETFbitcoin
on 22/07/2019, 20:10:10 UTC
⭐ Merited by bones261 (2)
You can use a bash script to import multiple keys, first of all put all those keys on a text file and then you can run something like:

Code:
for a in $(cat keys.txt)
 do
  bitcoin-cli importprivkey $a
 done

By default, Bitcoin Core will rescan whole blockchain to find all transaction related to the imported private key. If OP insist use Bitcoin Core, i think skip scanning when import private key & perform scan after all private keys are imported is more efficient.

Code:
for a in $(cat keys.txt)
 do
  bitcoin-cli importprivkey $a "" false
 done

bitcoin-cli rescanblockchain