What transaction data can Kaspa scripts inspect using KIP-0017's new opcodes?
KIP-0017 defines twelve Input/Output Introspection Opcodes that let Kaspa scripts read details about the transaction being validated. Opcodes are single instructions — the building blocks of Kaspa's script engine. These new additions let a script query things like the transaction ID of a spent outpoint (OpOutpointTxId), an input's sequence field (OpTxInputSeq), the length or contents of a script public key on either an input or an output (OpTxInputSpkLen, OpTxInputSpkSubstr, OpTxOutputSpkLen, OpTxOutputSpkSubstr), and the payload length of the transaction (OpTxPayloadLen). For a developer building on Kaspa, this matters because richer introspection means spending conditions can reference real transaction structure directly inside the script — no off-chain data needed.