How can I create new bitcoin address and control it with ledger nano public key?
I am developing an app and I need to create new bitcoin addresses for my customers. When I do this, I want to use xpub key my wallet.
I try this;
- I created a wallet using Electrum wallet app.
- I got my wallet's public key.
-
I derive new address programmatically. Like below;(using with NBitcoin)
ExtPubKey key = ExtPubKey.Parse("xpub...", Network.Main);
BitcoinAddress adress = key.Derive(userId).Derive(countOfAdress).PubKey.GetAddress(Network.Main);
Right Here, I came across something interesting. My created address same as in Electrum's Change Adress Tab. Since 6. address. When I created 7. address, I got new address from Electrum Change Addresses.
Now, Come to actual question?
How can I create new receice address and control all of them one place. I know HD wallets is do this. But I want to use Ledger Nano S wallet. I can get ledger xpub, But When one of my users tap the button and I create a new receive address for him/her, How can I see this address balance on my ledger/electrum wallet.
And last note, Electrum receive address gap limit 20, I was reading somewhere change address gap limit 6.
I hope, you are not confuse because I confused already :)
Thanks
http://ift.tt/2ku8D66
Comments
Post a Comment