In bitcoind I can generate addresses one by one. Is there a functionality that helps me generate 250 receiving-addresses for my wallet.dat at once?
-
Related question: How can I generate a large number of bitcoin addresses– Murch ♦Sep 12, 2013 at 14:40
-
I don't know how to do this in bitcoind, but you can easily create multiple addresses here: brainwallet.org/#chains. Also, I don't know what you're trying to achieve, but have you looked into HD wallets? en.bitcoin.it/wiki/BIP_0032– John HenrySep 12, 2013 at 20:31
-
I won't use a online service ever I think. I also don't store my briefcase at the mall.– TommekSep 13, 2013 at 6:46
-
@Tommek: Brainwallet.org isn't an online service. Keys are generated in your browser with Javascript and never touch the server. You could check the code and run it offline if you want. It isn't any more an "online service" than bitcoin-qt which you download from bitcoin.org.– Meni RosenfeldSep 13, 2013 at 10:31
2 Answers
Better use this software:
https://github.com/samr7/vanitygen
You can easy generate any amount of bitcoin's addresses:
# time for((i=0;i<250;i++));do ./vanitygen 125; done > 250_new_addressess.txt
real 0m9.437s
user 0m2.020s
sys 0m0.316s
# cat 250_new_addressess.txt
....
....
Address: 125r2fVnSXd6BtF66kTi83DuRzgzJmshPF
Privkey: 5JMqHqGccJjNz48izM6CEdDrTJ9P8DYRXQ96wcZhn86MWutECo1
Pattern: 125
Address: 125URJpbqr5eANYfLrhQVinQeexy2WfdhW
Privkey: 5Kh9eqyJQNzxCWMtfX1r6cPjAdmqJnZEceV8WmwRjYunHqTk7Hu
Pattern: 125
Address: 125wwU55kXQgDQYd8fQySNLQKS8AdRUote
Privkey: 5JZjn5sPnSqjbtBuXpuKcVDRa4bR5vxzWUZ9LCHsiscixBSyuGt
Pattern: 125
Address: 125N16rwWHgVWnAZYpz5XBvWptRhJ6iBKg
Privkey: 5KhX1Y1WjCu3dpHB2DPWt6f2mRFeMJCtkYZK66ApxTDM2iHMSM7
Pattern: 125
Address: 125HjL2QSCSUQHNExbMoSAUhHsz4GBuz3w
Privkey: 5JtMy31VbfK5xLtcwmALMjQj2WPMd6eLDe7tJR6T9bjwRwiimbW
Thereafter, import private keys one by one into the bitcoind:
# bitcoind importprivkey <bitcoinprivkey> [label] [rescan=true]
For example:
# cat 250_new_addressess.txt | grep "^Privkey" | awk '{print $2}' | while read i;do bitcoind importprivkey $i "250 new addresses"; done
Additionally,
If you doesn't looking for "named" address, like 1uckyboyPT44PWgA5bu4NtxFMuCN or something or have no resources to generate cool named bitcoin address.
Then you can easy get any amount of address just by bitcoind the same way:
$ time for((i=0;i<250;i++));do bitcoind getnewaddress "250";done
real 1m48.950s
user 0m0.612s
sys 0m0.432s
Its pretty fast.
The keypool tip did the trick, you only have to filter out the doublettes after generating more numbers. Thanks!
So I do this:
bitcoin-qt -keypool=10000
generate 1 new address in the client (this will take now some time) -> 10101 addresses can be exportet with pywallet
restart bitcoin-qt
bitcoin-qt -keypool=20000
generate 1 new address in the client -> 20102 addresses can be exportet with pywallet
and so on.