I am using bitcore to generate the public and private keys. I am using 'getnewaddress' method to generate a public address and dumpprivkey to generate a private key. When I am calling the getnewaddress method it automatically generating a new public address. I want to explicitly send a seed to generate a new address. Could anyone tell me how to do that?
1 Answer
By "bitcore" I assume you mean Bitcoin Core as the commands you are using are Bitcoin Core commands. There are other things which are called "bitcore" which is confusing.
I want to explicitly send a seed to generate a new address. Could anyone tell me how to do that?
You cannot. Bitcoin Core does not allow you to seed the random number generators with custom values as that is a security vulnerability.
You can import a private key (which some may call a seed) which will then add that private key and its associated address to the wallet. That may be what you want to do.
In Bitcoin Core 0.17, there will be an option to set the HD wallet seed. Bitcoin Core generates private keys deterministically using BIP 32 which has its own seed value. In Bitcoin Core 0.17, a new feature has been added which will allow you to set the seed used by the wallet for key generation.
getnewaddress
, the wallet generates a privkey, and then derives the pubkey and bitcoin address from it (and then displays the bitcoin address to you). When using thedumpprivkey
command, the private key is simply displayed, not generated.