compose.flow in a POST /compose request. This page is a reference for the wire format the service accepts. The authoritative schema ships with @lifi/composer-sdk; when a detail here conflicts with the SDK, the SDK wins — file an issue.
Top-level: Flow
FlowInput
A union of resource inputs and handle inputs. Schema: FlowInputSchema = Union(ResourceInputSchema, HandleInputSchema).
ResourceInput
Schemas:
ResourceInputSchema, ResourceSchema.
HandleInput
Schema:
HandleInputSchema, SolTypeSchema.
Call (node)
Schemas:
CallSchema, AppliedGuardSchema.
BindValue
bind entries are one of two shapes. Schema: BindValueSchema = Union(RefSchema, LiteralBindingSchema).
Ref
$ref is a dotpath with exactly one of three shapes — see References:
input.<name>context.<sender|executionAddress><nodeId>.<port>
RefSchema.
LiteralBinding
Schema:
LiteralBindingSchema.
AppliedGuard
Schema:
AppliedGuardSchema.
Resource
Schema:
ResourceSchema.
SolType
Literal union of supported Solidity scalar types: uint8, uint16, uint32, uint64, uint128, uint256, int128, int256, address, bool, bytes, bytes4, bytes32, string.
Schema: SolTypeSchema.
Worked example
Theswap-and-zap quickstart produces a Flow that, after builder.build(), serialises to:
See also
- Flow Structure — prose walkthrough of the same fields.
- References —
$refparsing rules. @lifi/compose-spec— SDK types that match this wire format.

