Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: morbius55 on April 18, 2021, 05:40:18 PM



Title: Default address?
Post by: morbius55 on April 18, 2021, 05:40:18 PM
What is the default address in a bitcoin core wallet and what determines it being the default? Cheers.


Title: Re: Default address?
Post by: DireWolfM14 on April 18, 2021, 06:30:38 PM
I'm not sure what you mean by "default address," are you reffering to the receiving address?  From what I've noticed Core issues receiving addresses in the order they're listed in the keystore.  The hdkeypath indicates their position, and Core will display the keys in that order.  For example:

First address to display: hdkeypath=m/0'/0'/0'
Second address to display: hdkeypath=m/0'/0'/1'
So on and so forth.

Each bitcoin core HD wallet has one private key (and an associated address) that's used as the HD seed, but if I'm not mistaken core avoids the use of this address as a receiving address.


Title: Re: Default address?
Post by: morbius55 on April 18, 2021, 07:00:45 PM
I'm not sure what you mean by "default address," are you reffering to the receiving address?  From what I've noticed Core issues receiving addresses in the order they're listed in the keystore.  The hdkeypath indicates their position, and Core will display the keys in that order.  For example:

First address to display: hdkeypath=m/0'/0'/0'
Second address to display: hdkeypath=m/0'/0'/1'
So on and so forth.

Each bitcoin core HD wallet has one private key (and an associated address) that's used as the HD seed, but if I'm not mistaken core avoids the use of this address as a receiving address.
This is in a older non HD wallet, don't know if that makes a difference?


Title: Re: Default address?
Post by: DannyHamilton on April 19, 2021, 12:57:51 AM
This is in a older non HD wallet, don't know if that makes a difference?

Prior to HD, Bitcoin Core did not have any concept of a "default" address.  Instead, it generated a set of brand new private keys completely at random whenever it needed more addresses.  It would store those keys and addresses in the wallet.dat file.