Compare a Kaspa v0 transaction ID before and after signing

Kaspa's version-zero ID calculation omits input signature scripts. A signing coordinator can use a fixed transaction fixture to distinguish the ID from a digest of the signed bytes.

Change one field at a time

Construct a fresh version-zero transaction, derive its ID with the consensus implementation, then construct the signed version using the same inputs, outputs, lock time and payload. Compare the IDs after attaching the signature script. Repeat with a changed output amount: this time the ID should change.

v0 draft D → attach input signature script → signed S
id(D) = id(S) if only the signature script changed

Validate the signed artifact separately

An unchanged ID cannot verify signature correctness or prove that a node accepted the transaction. Keep the signed bytes for reproduction and use proper script validation before submission. Dispatch hashing by transaction version when supporting newer formats; this fixture tests version zero specifically.

Sources