102

BIP 32 Watch-Only Wallets

Boot.dev Blog » Bitcoin » BIP 32 Watch-Only Wallets
Lane Wagner
Lane Wagner

Last published July 25, 2019

Subscribe to curated backend podcasts, videos and articles. All free.

Bitcoin improvement proposal 32 is, in my opinion, one of the most important BIPs we have. (Thanks Peter Wuille!) BIP 32 gave us Hierarchical Deterministic Wallets, which grant the ability to create a tree of keys from a single seed.

In the early days of Bitcoin, each time a user wanted to receive new coins, their wallet would randomly generate a new Bitcoin private key, along with the associated public key and address. For example (and don’t try to use these):

Private key: L57hXXKTCRgJRytYMVbhaxnsKpWZdzPzReKUghiYY6D6aQqQrM39

Address (public key hash): 1P3AzkwVv1jDJAhEBQby6873xwJvymzDRn

Each user’s wallet software contained lists of public and private key pairs. If the user’s computer breaks or became stolen, you will lose all the private keys. The user had to be fairly tech-savvy to know how to export and encrypt their keys for safekeeping. Even so, each time they received coins to a new address, they needed to re-back up the new private key.

HD wallets to the rescue 🔗

Following BIP 32, new wallets called HD wallets (Hierarchical Deterministic, not High Definition) made the backup process a lot easier and safer.

Instead of generating random private keys for each transaction, HD wallets generate one seed which is used to create a master private key. This master private key can be used to generate more “child” private keys for each transaction. Because the child keys are determined using the same pattern each time, the user doesn’t need to back up all of their private keys, only the one seed:

000102030405060708090a0b0c0d0e0f

However, since most wallets have also adopted BIP 39 you may be more familiar with a 12 or twenty-four-word encoding of your seed (again don’t use this example):

bubble cat run happy tree bird snow flake person orange yellow mother

Now, on a piece of paper or in a password manager like Boot.dev, users can back up their seed phrase. Then they know that all the Bitcoins that will ever be stored in their wallet are recoverable.

Watch only HD wallet 🔗

eye picture

A watch-only HD wallet is the same as a normal HD wallet except that it can’t spend coins, only store them. Watch-only wallets are perfect for users who want a wallet to receive new coins easily but don’t want to spend regularly from that wallet, similar to a savings account.

The seed (and associated private keys) are stored offline or under heavy encryption, while the extended public key is used in the online watch-only wallet.

A full watch-only wallet is much better and safer than using the same address again and again. This is because using new addresses enhances privacy.

Thanks for reading, good luck, and stay safe being your own bank!

Find a problem with this article?

Report an issue on GitHub