Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Field types

The type string on a contract template's fields and an action's params.

This one table is maintained by hand: the JSON Schema types these as plain string, so unlike the manifest field reference it cannot be generated. It tracks manifest_to_simf_type and prompt.rs in the reference wallet.

Types a covenant can take

These map onto a SimplicityHL primitive, so a value of one of these types can be wired into a .simf program through script.compile_params.

Type stringSimplicityHL typeWritten asNotes
u8u8decimal string
u16u16decimal stringliquid.u16 is an accepted alias
u32u32decimal string
u64u64decimal string
boolbool"true" / "false"u1 is an accepted alias
bytes32u25664 hex charsRaw 32 bytes, passed through unchanged
pubkeyu25664 hex chars32-byte x-only BIP340 key. Not byte-reversed
liquid.asset_idu25664 hex charsByte-reversed before it reaches the program — see below

liquid.asset_id is the only type that reverses. Asset IDs are displayed in the same backwards order as a txid, so the engine reverses them into natural byte order before handing them to SimplicityHL. That reversal is driven by the declared type and nothing else — the parameter's name is never consulted. A 32-byte asset ID declared as bytes32 reaches the covenant byte-swapped relative to a liquid.asset_id, and produces a different, silently wrong address. When a value is an asset ID, say so.

Declaring a type is not optional in practice. Without one the engine falls back to inferring from the name and then the value, refuses to treat anything as an asset ID, and skips the parameter entirely if it cannot decide — which surfaces much later as a covenant address that does not match.

Types only a param can take

Valid on an action param, but with no SimplicityHL mapping, so they cannot be compiled into a covenant. Use them for values the transaction builder consumes.

Type stringWritten asNotes
addressbech32 / blech32 stringA Liquid or Elements address, e.g. a payout destination

Any other string is accepted as a free-text param and prompted for as text. asset_id and u256 get a formatting hint at the prompt but no covenant mapping — prefer liquid.asset_id and bytes32, which do.

Where the values live

Field values are stored in the instance as strings, whatever their type: integers as decimal, byte types as hex. See Instance, state & constructors.