Can we get any default address before running getnewaddress?

0

I am trying to develop some application using bitcoin (currently only in the regtest mode). I am aware that one can create a new address using

bitcoin-cli -regtest getnewaddress

RPC call, but I want to know whether bitcoind pre-generates a bitcoin wallet address when we install and run

bitcoind -regtest -daemon

fresh. If yes, how can I know this address?

Bajjubaba

Posted 2019-05-08T09:53:43.830

Reputation: 3

Possible duplicate of Can you list receiving addresses in bitcoin-cli?

RedGrittyBrick 2019-05-08T13:30:58.287

Answers

0

No.

The wallet actually always pregenerates keys (not addresses) and puts them in the keypool. A keys is fetched from the keypool and converted to an address only when an address is explicitly requested (via getnewaddress or from the GUI). An address is not pre-fetched by default.

Andrew Chow

Posted 2019-05-08T09:53:43.830

Reputation: 40 910

Thank you Andrew. Where can I find these pre-generated keys?Bajjubaba 2019-05-10T05:11:45.267

You can't without using getnewaddress. They are not shown to users as keys by themselves are not particularly useful.Andrew Chow 2019-05-10T05:23:36.050

Right. Thanks Andrew.Bajjubaba 2019-05-10T05:38:27.710