What is PSBT?
PSBT simplifies workflows where multiple parties need to cooperate to produce a transaction. Common use cases include:- Hardware wallets
- Multi-signature setups
- Offline signing
- CoinJoin transactions
PSBT Workflow
The PSBT process involves several distinct roles:1
Creator
Proposes a transaction by constructing a PSBT with specific inputs and outputs, but no additional metadata.
2
Updater
Adds information about the UTXOs being spent and scripts/public keys involved:
3
Signer
Inspects the transaction and produces partial signatures for inputs they control:
4
Combiner (if needed)
Merges metadata from different PSBTs for the same transaction:
5
Finalizer
Converts partial signatures into final scriptSig and scriptWitness:
6
Extractor
Produces a valid network-format Bitcoin transaction:The
finalizepsbt command outputs the final transaction hex if all inputs are signed.Bitcoin Core PSBT RPCs
Creating PSBTs
createpsbt - Create a PSBT from inputs and outputs:Processing PSBTs
walletprocesspsbt - Add UTXO/key/script data and sign:utxoupdatepsbt only works for SegWit inputs where UTXO data is available.Analyzing PSBTs
decodepsbt - Display PSBT in human-readable JSON format:- Missing signatures
- Next required role
- Estimated fee and weight
- Input status
Combining PSBTs
combinepsbt - Merge multiple versions of the same PSBT:Finalizing PSBTs
finalizepsbt - Finalize and extract the transaction:hex- Final transaction hex (if complete)complete- Boolean indicating if all inputs are signed
Complete PSBT Example
Here’s a full workflow creating and signing a PSBT:1
Create and fund PSBT
2
Analyze the PSBT
3
Sign with wallet
4
Finalize and broadcast
PSBT for Offline Signing
PSBTs are essential for offline signing workflows:- Online wallet creates unsigned PSBT
- Transfer PSBT to offline wallet (via USB, QR code, etc.)
- Offline wallet signs the PSBT
- Transfer signed PSBT back to online wallet
- Online wallet broadcasts the transaction
Security Considerations
Advanced Features
Custom Signing
Sign only specific inputs:Sighash Types
Specify different signature hash types:ALL(default)NONESINGLEALL|ANYONECANPAY
Next Steps
Multi-signature
Use PSBTs for multi-signature transactions
Offline Signing
Sign transactions on an air-gapped machine