6.1 Introduction
After understanding Bitcoin’s underlying mechanics, private keys, UTXOs, transactions, confirmations it’s now time to understand the real job of a Bitcoin wallet. A Bitcoin wallet is not:- A bank account
- A file storage system
- A record of balances
- Manage private keys securely
- Derive public keys and addresses
- Detect UTXOs belonging to those keys
- Build and sign transactions
- Monitor the blockchain for payments and confirmations
6.2 Core responsibilities of a Bitcoin wallet
-
Private Key Management
- Securely generate private keys (often via a mnemonic seed phrase).
- Encrypt private keys at rest.
- Make private keys available only when signing transactions.
- Never leak private keys to the network, servers, or logs.
-
Address Derivation and Management
- Use private keys to derive public keys.
- Create Bitcoin addresses based on public keys (Legacy, SegWit, Taproot).
- Generate new receiving addresses automatically.
- Rotate addresses after use to enhance privacy.
-
UTXO Tracking
- Monitor the Bitcoin blockchain (directly or via APIs like Bitnob).
- Identify which UTXOs belong to the wallet’s addresses.
- Update wallet balance by summing up all unspent UTXOs.
- Mark UTXOs as spent when building new transactions.
-
Transaction Construction and Signing
- Select UTXOs as inputs when sending bitcoin.
- Create transaction outputs (payment + change).
- Calculate and apply network fees.
- Sign the transaction locally using the private key.
- Ensure the transaction is properly structured and valid.
-
Broadcasting and Monitoring Transactions
- Broadcast signed transactions to the Bitcoin network.
- Track transaction status:
- Unconfirmed (in mempool)
- Confirmed (in blocks)
- Replaced (if RBF used)
- Update UI to reflect confirmations and finality.
- Handle dropped or reorganized transactions gracefully.
6.3 Important constraints
6.4 Flowchart: What a Bitcoin wallet really does
6.5 Product implications for PMs
Wallet UX must reflect wallet realities:- Onboarding must center around seed backup, not just “account creation.”
- Balances must update in real time based on UTXOs detected.
- Transaction history must reflect mempool status, confirmation depth, and reorg risks.
- Backup, security, privacy must be treated as first-class product features.
6.6 Real world example
Ifeanyi downloads a Bitcoin wallet app in Abuja. When he creates his “account”, what actually happens is:- His device generates a 12-word seed phrase.
- The app derives his master private key from the seed.
- The app derives his first few Bitcoin addresses.
- The app registers these addresses for monitoring.
- The app detects UTXOs at those addresses.
- Adds the UTXOs to his wallet.
- Calculates his “balance” by summing UTXO values.
- The app selects his UTXOs.
- Builds a transaction.
- Signs it using his private key.
- Broadcasts it to the Bitcoin network.
- Monitors confirmations.
6.7 Common misconceptions to avoid
6.8 Summary of module 6
Bitcoin wallets:- Securely manage private keys.
- Derive and rotate public addresses.
- Track UTXOs on the Bitcoin network.
- Build, sign, and broadcast transactions.
- Monitor blockchain confirmations.