An address is not a wallet, and a HD wallet is only locally relevant to your storage and is not reflected at all in the public ledger.

Bitcoin works on a UTXO model where funds are paid to an output which can be spent by the owner of the private key for a given address. There is no direct links between any addresses and no hierarchical structure in the public ledger.

So if you pay to address 17fPG6yJujgzysrAozHM5FTEytBvWzF2gS, then the public ledger will only see the payment to that address, and nobody else will have any idea that address 1CGM9zBt885ccKg6j1aqbBESsdPju4aj2m is even part of the same wallet.

A wallet is simply a collection of key pairs, where each key pair has an address for its public part. BIP32 describes a method of deterministically generating addresses from a root seed, so that you may regenerate the addresses rather than have to store them individually.

To access the funds spent to 17fPG6yJujgzysrAozHM5FTEytBvWzF2gS, you need to regenerate the key pair for this address by using the same index you used to derive it in the first place.

Locally, a wallet software will be able to aggregate the funds from all of the addresses it generates, so it appears as though there is an aggregated total balance for the wallet, but in the public ledger, these UTXOs are scattered and uncorrelated. Only you will know your actual balance, and nobody can learn it from public information, although some of your addresses may become linked if you have to spend several of them in the same transaction.

Article First Published here