- What’s the relationship between the first pkey/addr (the one with
hdkeypath: m/0'/0'/0and the third one
They are derived from the same parent key. Other than that, there is no relation.
Does the first key/addr is the master (key) who can recover all later keys generated in the wallet.
No. They are both child keys of the key at
m/0'/0'. The actual master private key (the key at
m) is not exportable. There is a HD seed (which is used to generate the master private key at
m), but this is only exportable through the
- I only backup the private key of
m/0'/0'/2, and removed the whole wallet (the .dat file). Is there a risk of this method? Since I only choose to use this key/addr to receive and store BTC.
Don’t do that, you will lose money. When you send Bitcoin, Bitcoin Core will generate new change addresses and send any change there. Those change addresses have different private keys. Without them, you will lose money.
Additionally, by reusing the same address, you are significantly hurting your privacy. By using the same address over and over, anyone you transact with will know how much money you have in your wallet and be able to see all of your incoming and outgoing transactions. This allows anyone to track your spending habits.
- I later create a new wallet and restore this
m/0'/0'/2key with command
importprivkey. and send some BTC to other people, and found it generate a CHANGE addr, so I also backup this new addr’s private key too. Since I mainly use this
m/0'/0'/2to store long term BTC, and will not use it to make a lot transactions. So I keep the privatekey of
m/0'/0'/2, and keep backups priv keys of change addresses it generated, then drop all wallet files. Is this method enough to restore all my balances in a futher day.
Bitcoin Core constantly generates new change addresses. The one time you forget means that you will lose money. If you accidentally request a new address and use it, you will lose money.
In general, backing up individual private keys is not recommended. You should back up the entire wallet.dat file itself. There is no need to export each key individually and back it up in that way. That is a surefire way to lose money at some point in the future.
- Can the private key of
m/0'/0'/2be used to recover the change addresses’ private keys? (What is the master seed of HD wallet, it is the private key of
No. The change addresses are unrelated. You would need to have the HD seed mentioned previously in order to derive them.