The fields of a Kaspa transaction as defined in rusty-kaspa (consensus/core/src/tx.rs).
| Field | Type | Notes |
|---|
version | u16 | Transaction format version. |
inputs | array | See Input. |
outputs | array | See Output. |
lock_time | u64 | Earliest point of inclusion: 0 = immediate; below 500 billion = minimum DAA score; 500 billion and above = minimum Unix timestamp (ms). |
subnetwork_id | 20 bytes | All zeros for native transactions; a reserved subnetwork id marks coinbase transactions. |
gas | u64 | Reserved for subnetwork use; 0 for native transactions. |
payload | bytes | Arbitrary data field. Empty pre-Crescendo; enabled for native transactions since the Crescendo hardfork. |
| Field | Type | Notes |
|---|
previous_outpoint | outpoint | The UTXO being spent: transaction_id (32 bytes) + index (u32) of the output in that transaction. |
signature_script | bytes | Unlocking script - data pushes of signatures/data (and for P2SH, the redeem script). |
sequence | u64 | Sequence number (relative lock-time semantics). |
sig_op_count | u8 | Number of signature operations, committed to for compute mass accounting. |
| Field | Type | Notes |
|---|
value | u64 | Amount in sompi. |
script_public_key | struct | Locking script: version (u16) + script (bytes). Decoded from the recipientâs address. |
- 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).