Updated: 7/28/2026

Transaction Structure

The fields of a Kaspa transaction, its inputs, and its outputs.

The fields of a Kaspa transaction as defined in rusty-kaspa (consensus/core/src/tx.rs).

Transaction

FieldTypeNotes
versionu16Transaction format version.
inputsarraySee Input.
outputsarraySee Output.
lock_timeu64Earliest point of inclusion: 0 = immediate; below 500 billion = minimum DAA score; 500 billion and above = minimum Unix timestamp (ms).
subnetwork_id20 bytesAll zeros for native transactions; a reserved subnetwork id marks coinbase transactions.
gasu64Reserved for subnetwork use; 0 for native transactions.
payloadbytesArbitrary data field. Empty pre-Crescendo; enabled for native transactions since the Crescendo hardfork.

Input

FieldTypeNotes
previous_outpointoutpointThe UTXO being spent: transaction_id (32 bytes) + index (u32) of the output in that transaction.
signature_scriptbytesUnlocking script - data pushes of signatures/data (and for P2SH, the redeem script).
sequenceu64Sequence number (relative lock-time semantics).
sig_op_countu8Number of signature operations, committed to for compute mass accounting.

Output

FieldTypeNotes
valueu64Amount in sompi.
script_public_keystructLocking script: version (u16) + script (bytes). Decoded from the recipient’s address.

Notes

  • The fee is not a field - it’s implicit: sum(input values) - sum(output values).
  • A transaction’s mass (compute / storage / transient, in grams) is calculated from these fields; RPC representations return it alongside the transaction. See Units.
  • The transaction ID is a hash over the transaction with the signature scripts and payload zeroed/excluded, so the ID is stable while signatures are added (this is what makes PSKT workflows possible). The transaction hash covers everything.
  • Signing: the default scheme is Schnorr over secp256k1, with a blake2b-256 sighash keyed with the domain TransactionSigningHash. ECDSA is also supported (see address versions).