Skip to content

Intents

Saline Intent Cheat Sheet

ConceptPurposeConstructor / Syntax
RestrictionAssert a relation between two expressions (<, <=, ==, >=, >)Restriction(lhs, Relation.LE, rhs)
SignatureRequire a valid signature from pubkeySignature("nacl:0x…")
AllLogical AND – every child intent must holdAll([intent₁, intent₂, …])
AnyLogical M‑of‑N / OR – at least threshold children must holdAny(threshold, [intent₁, …])
TemporaryIntent valid only before (or after) a Unix timestampTemporary(expiry_ts, available_after, intent)
FiniteLimit an intent to a maximum number of usesFinite(max_uses, intent)

Expressions

ExpressionMeaning / Evaluates to
Lit(value)Literal constant (number, string, etc.)
Balance(token)Token balance of the host account
Receive(token)Amount of token received in the tx
Send(token)Amount of token sent in the tx
Arithmetic2(op, lhs, rhs)Arithmetic on two expressions (Add, Sub, Mul, Div)

Operator Shorthands (optional)

OperatorExpands toExample
&All([...])A & B & C
|Any(1,[...])A &#124; B
< <= > >=RestrictionSend(Token.BTC) >= 1
+ − * /Arithmetic2Send(Token.ETH) * 2