Skip to main content
You’re viewing an old version of the Arkade contracts documentation. Go to Your first contract for the current version.
Arkade Script is experimental. Do not fund contracts from it with real funds.
These are the built-in functions of Arkade Script. Most work only in covenants, the functions that compile to Arkade opcodes. A tapscript function can use only require with one optional hash check, one optional older or after, and one checkSig or checkMultisig. The compiler README has the full rules for each function.
require(condition, "message") fails the spend if the condition is false. Every spend path needs at least one require.

Signatures

A path that the operator accepts must be N-of-N, so a checkMultisig threshold in a tapscript function must equal the number of keys.

Hashes

Time

tx.locktime is the transaction’s nLockTime, not a clock. Use checkTime for time conditions in covenants.

Transaction

scriptPubKey is the witness program, for example the 32-byte key of a Taproot output, not the full script.

Assets

Contracts

Bytes and numbers

Integers are BigNums of up to 520 bytes in covenants. +, -, *, /, %, <<, and >> work on int.