I used to be below the impression that addresses are only a encoded
Sure, addresses are encoded (base58 or base32) to assist human readability. They embody a checksum to make sure safety in opposition to errors in tackle transcription and entry. A bitcoin tackle can signify the proprietor of a personal/ public key pair, or it will possibly signify some other script that may be represented by means of P2SH or P2WSH.
But when the general public key’s hashed, how does the pockets get the general public key from the tackle to create a transaction?
To create a transaction that spends your bitcoins, you want entry to the personal key. That’s as a result of nearly the entire transactions want to incorporate the signature of the personal key you maintain to be able to spend the funds that have been locked.
Nonetheless, you’ll be able to have a watch-only pockets in case you might be apprehensive of utilizing personal keys on a community linked gadget. A watch-only pockets means that you can watch what occurs to these chilly storage bitcoins with out exposing the personal keys to the net world. This consists of importing your grasp public key on the account stage that helps you create completely different addresses for that account. With the grasp public key on the account stage, you’ll be able to create receiving/change addresses as you’ve entry to the general public keys that will probably be used to create these addresses. The software program simply hashes the general public keys and encode them in the best way you want (P2WPKH or P2PKH).