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 string | SimplicityHL type | Written as | Notes |
|---|---|---|---|
u8 | u8 | decimal string | |
u16 | u16 | decimal string | liquid.u16 is an accepted alias |
u32 | u32 | decimal string | |
u64 | u64 | decimal string | |
bool | bool | "true" / "false" | u1 is an accepted alias |
bytes32 | u256 | 64 hex chars | Raw 32 bytes, passed through unchanged |
pubkey | u256 | 64 hex chars | 32-byte x-only BIP340 key. Not byte-reversed |
liquid.asset_id | u256 | 64 hex chars | Byte-reversed before it reaches the program — see below |
liquid.asset_idis 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 asbytes32reaches the covenant byte-swapped relative to aliquid.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 string | Written as | Notes |
|---|---|---|
address | bech32 / blech32 string | A 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.