Skip to content

Kaspa Script

Kaspa Script is the execution layer. Every covenant, every contract, and every Argent app eventually becomes a script that the node’s script engine runs when validating a spend.

You will not usually write it by hand. You will read it constantly, because it is where the layers above stop hiding things from you.

What makes it more than Bitcoin Script

Three capabilities matter, and everything above depends on them:

  • OP_CAT and OP_SUBSTR — concatenate and slice byte strings, which is what makes it possible to build and check structured data inside a script.
  • Transaction introspection — a script can inspect the transaction spending it: its inputs, its outputs, their values and their locking scripts. This is the primitive behind covenants, where an output constrains what the next transaction may look like.
  • KIP-20 covenant identities — consensus-backed identity for covenants, so a script can establish that it is talking to the covenant it thinks it is, rather than a lookalike. See KIP-20.

Without introspection there are no covenants. Without covenants there is no persistent state on a UTXO chain, so there is no Silverscript worth having and no Argent at all.

P2SH, in one paragraph

A contract is not deployed the way an EVM contract is. You hash the script, build a pay-to-script-hash address from that hash, and send coins to it. The script itself only appears on-chain when someone spends: they supply the script and the arguments that satisfy it, the node checks the hash matches, and then runs it. “Deploying” is just funding an address.