Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: InvokerGod on September 27, 2017, 10:12:45 AM



Title: Getting More Address from 1 Seed
Post by: InvokerGod on September 27, 2017, 10:12:45 AM
Dear Blockchain Gods,

Can anyone guide me how to get more Addresses, Like a few thousands or more, through 1 seed? Anyone has the coding or anyway to get it?


Title: Re: Getting More Address from 1 Seed
Post by: onnz423 on September 27, 2017, 10:23:39 AM
It is possible on electrum, however im not sure why do you need so many addresses from one seed :P
Would help alot if you told us what wallet you are using, at least the following would be the procedure for electrum.
Open up console from "View" -> "Show console".
Then write the following there.

Code:
wallet.storage.put('gap_limit', 50)
wallet.storage.write()

Replace the 50 with the amount of addresses that you want, but remember that many thousand addresses can and will make your electrum very slow.
After you are done entering the commands, restart electrum and you will have many addresses there. However if you ever restore the seed on some wallet, you'll only have 50 addresses or so on as far as i know.


Title: Re: Getting More Address from 1 Seed
Post by: InvokerGod on September 27, 2017, 10:43:09 AM
Thank you so much for your help onnz, really appreciate it


Title: Re: Getting More Address from 1 Seed
Post by: Thekool1s on September 27, 2017, 12:27:18 PM
Well if you don't want to use electrum and slow down the program, then Goto Blocktrial.com, register and request an API key(You will get it almost Instantly), Once you have the key, then just modify the code given below with your key and wallet you created on blocktrail. and save the file with .php , After that install xampp on your machine and, copy and paste the script in htcdoc folder. You need to download the Blocktrail sdk too, the instruction is provided on their website. Once you have the sdk and xampp ready, just run the server and visit.

localhost/yourScriptName.php and it should generate 1000 addresses for you. if you want more than just replace the number with something even higher. I made this script on the fly but it should work.

Code:

<?php
require 'vendor/autoload.php';
use 
Blocktrail\SDK\BlocktrailSDK;

$client = new BlocktrailSDK("Your API KEY""BTC"true /* testnet */);

$wallet $client->initWallet("Your Wallet Name"" Password");

$address $wallet->getNewAddress();

for (
$i=0$i 1000 $i++) { 
$address $wallet->getNewAddress();
echo "$address";
        echo 
"<br/>";
}

?>




Title: Re: Getting More Address from 1 Seed
Post by: mocacinno on September 27, 2017, 12:32:50 PM
I once wrote this snipplet in python, can't find the original link anymore tough (it must have been posted somewhere on bitcointalk) :

Code:
from bitcoin import *
childkey1 = bip32_ckd('xpub_my_electrum_xpub', 0)
for counter in range(1000):
        childkey2 = bip32_ckd(childkey1, counter)
        key = bip32_extract_key(childkey2)
        address = pubtoaddr(key)
        print address

python 2.7, pybitcointools installed (IIRC)


Title: Re: Getting More Address from 1 Seed
Post by: BTCBLOGGER on September 29, 2017, 10:12:47 AM
You can use this trick - https://www.youtube.com/watch?v=a-B2chNtPoo

1ACggpLdFH9twhePpTvLwacCYh93taQZMi please tip me if you like