Sub topic 3
Signing Offline: Moving Transactions, Not Keys
This chapter assumes you understand public and private keys at a high level, that you know what a PSBT (Partially Signed Bitcoin Transaction) is, and that you have sent crypto from a wallet app before.
Signing offline: moving transactions, not keys
A cold wallet keeps its private keys on a machine that never touches a network. To spend, you move data between machines instead of moving keys. The online machine builds an unsigned transaction, the offline machine signs it, and the online machine broadcasts the result.
# Online machine: watch-only wallet, holds no private keys.
bitcoin-cli -rpcwallet=watchonly walletcreatefundedpsbt '[]' '[{"<destination_address>": 0.01}]'
# Offline machine: wallet with private keys signs the PSBT.
bitcoin-cli -rpcwallet=cold walletprocesspsbt "<psbt_string>"
# Online machine: finalize and broadcast.
bitcoin-cli finalizepsbt "<signed_psbt_string>"
bitcoin-cli sendrawtransaction "<final_hex>"Splitting funds between hot and cold storage
Keep a small spending balance in a hot wallet and move the rest to cold storage. Set a cap for the hot wallet, and a target balance to return to when you sweep the excess.
| Hot wallet balance | Action |
|---|---|
| At or below cap | Nothing moves |
| Above cap | Move the excess down to the target |
Multisignature: removing the single point of failure
A multisignature (multisig) wallet requires several keys to sign, such as 2 of 3. Losing one device does not lose the funds, and one stolen key cannot move them. The cost is more setup, more backups, and dependence on wallet software that supports multisig.
Habits that keep a good setup safe
- Check the receiving address on the signing device's screen before approving.
- Download wallet software only from official sources, and verify its signatures.
- Never type a seed phrase into a computer or phone.
- Test each new setup with a small amount first.
Planning for loss, death and mistakes
Write recovery instructions and store them apart from the seed backup. Test a restore with a small amount before you rely on it. Tell a trusted person how to access the plan, and keep backups in two locations that are protected from fire and flood.
Exercise
You have a 2-of-3 multisig wallet and lose one of the three devices. Can you still spend, and what should you do?
Show answer
Yes. The two remaining keys can sign. Then move the funds to a new wallet with fresh keys, because the lost device could be found and used by someone else.