Raw transaction construction
Terms used in this lesson
- Witness
- Signatures, scripts, or other data supplied to satisfy a Bitcoin output’s spending condition.
- Sighash
- The exact transaction digest and signature mode that determine which fields a Bitcoin signature authorizes.
- Transaction ID
- The identifier produced by hashing a Bitcoin transaction’s non-witness serialization.
- BIP143
- The Bitcoin Improvement Proposal that defines the version-zero SegWit transaction signature digest used by native P2WPKH and P2WSH spends.
- Outpoint
- A transaction ID plus output number that identifies one exact prior output.
- SegWit
- Segregated Witness: a Bitcoin upgrade that separates authorization data from the transaction identifier and introduces versioned witness programs.
- Taproot
- A Bitcoin output and spending design that can combine a public-key path with privately committed alternative scripts.
- Witness transaction ID
- An identifier that commits to a transaction including its witness data.
- P2WPKH
- Pay to Witness Public Key Hash: a native SegWit output for one public-key hash.
- Preimage
- The original secret data whose hash equals a previously committed value.
- DER
- Distinguished Encoding Rules: the structured byte encoding historically used for ECDSA signatures in Bitcoin Script.
- ECDSA
- Elliptic Curve Digital Signature Algorithm, the signature scheme used by pre-Taproot Bitcoin outputs.
Engineers serialize fields, compute sighashes, sign inputs, and inspect witnesses without relying solely on wallet abstractions.
Loading lesson visuals...
Learn the idea
Raw transaction construction means choosing and serializing every Bitcoin transaction field without delegating the complete job to a wallet. The engineer identifies prior outputs, builds version, inputs, outputs, sequence, witness, and locktime, computes each signature hash, signs, finalizes, and asks a node to validate before broadcast.
Freeze input facts
Record each outpoint, amount, scriptPubKey, confirmation state, key path, and spending type. Signature and fee calculation require correct prior-output data.
Inspect every idea above to open it.
Decoding proves structural parse only. Inputs, values, signatures, locks, fee, policy, and intent can still be wrong.
The questions unlock after every required learning activity
Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.