PSBT Format¶
Technical details about Partially Signed Bitcoin Transactions (PSBTs) used in Theft Shield.
What is a PSBT?¶
A PSBT (BIP-174) is a standardized format for creating, signing, and finalizing Bitcoin transactions across multiple parties or devices.
Structure¶
Global Fields¶
| Key | Description |
|---|---|
PSBT_GLOBAL_UNSIGNED_TX |
The unsigned transaction |
PSBT_GLOBAL_XPUB |
Extended public keys |
PSBT_GLOBAL_VERSION |
PSBT version number |
Input Fields¶
| Key | Description |
|---|---|
PSBT_IN_NON_WITNESS_UTXO |
Full previous transaction (legacy) |
PSBT_IN_WITNESS_UTXO |
UTXO being spent (SegWit) |
PSBT_IN_PARTIAL_SIG |
Partial signatures |
PSBT_IN_SIGHASH_TYPE |
Signature hash type |
PSBT_IN_REDEEM_SCRIPT |
Redeem script (P2SH) |
PSBT_IN_WITNESS_SCRIPT |
Witness script (P2WSH) |
PSBT_IN_BIP32_DERIVATION |
Key derivation paths |
Output Fields¶
| Key | Description |
|---|---|
PSBT_OUT_REDEEM_SCRIPT |
Redeem script for output |
PSBT_OUT_WITNESS_SCRIPT |
Witness script for output |
PSBT_OUT_BIP32_DERIVATION |
Derivation for change outputs |
Theft Shield PSBTs¶
Structure¶
Vigil's Theft Shield PSBTs include:
PSBT {
Global:
- Unsigned transaction spending all monitored UTXOs
- Version: 2
Inputs (one per UTXO):
- Previous output reference
- Witness UTXO data
- BIP32 derivation path
- (Empty partial signatures - to be filled)
Outputs:
- Single output to safe address
- Amount: Total - fee
}
Signing Process¶
- Creator (Vigil) constructs PSBT
- Signer (Your hardware wallet) adds signatures
- Finalizer (Vigil) verifies completeness
- Extractor (Vigil) creates broadcastable transaction
Encoding Formats¶
Base64¶
Human-readable encoding:
Binary¶
Raw PSBT format:
Hex¶
Hexadecimal encoding:
Validation¶
Required Checks¶
Vigil validates PSBTs for:
- Signature Completeness
- All inputs have required signatures
-
Signature types are correct (SIGHASH_ALL)
-
Output Verification
- Output address matches safe address
-
Amount calculation is correct
-
Fee Verification
- Fee matches expected round budget
-
Fee rate is reasonable
-
UTXO Coverage
- All monitored UTXOs are included
- No unexpected inputs
Common PSBT Operations¶
Combining PSBTs¶
Merge multiple partially signed PSBTs:
Analyzing PSBT¶
Inspect PSBT contents:
Finalizing PSBT¶
Convert signed PSBT to transaction:
Security Considerations¶
What PSBTs Reveal¶
PSBTs contain: - ✅ Transaction structure (inputs, outputs) - ✅ Addresses involved - ✅ Amounts - ✅ Derivation paths (if included)
PSBTs do NOT contain: - ❌ Private keys - ❌ Seed phrases
PSBT Storage¶
Vigil stores signed PSBTs securely:
- Encrypted at rest
- Access-controlled
- Regular integrity checks
Next: Webhook Integration →