What new scripting operations does Kaspa's KIP-17 add?

KIP-17 proposes ten new opcodes for Kaspa's scripting language, adding string manipulation, bitwise logic, arithmetic, and zero-knowledge proof verification. In Kaspa's scripting system, opcodes are atomic instructions that define the rules a transaction must satisfy before it can be spent. The new additions include OpCat (join two byte strings), OpSubstr (extract a portion of a string), bitwise operators OpAnd, OpOr, OpXor, and OpInvert, arithmetic operators OpMul, OpDiv, and OpMod, and OpZkPrecompile for verifying zero-knowledge proofs. Each opcode also defines safe error conditions — for example, OpDiv returns an error on division by zero, and OpAnd errors when its two inputs are different lengths. For beginners, the takeaway is that a richer set of script operations means developers can write more sophisticated and trustworthy on-chain spending conditions in Kaspa.

Learn more ›