{"openapi":"3.0.3","info":{"title":"Composer API","description":"Composer provides a high-level interface for building EVM transaction flows. Submit declarative zap flow specifications and receive pre-simulated executable transaction payloads.","version":"1.0.0","contact":{"name":"LiFi Support","url":"https://support.li.fi"}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"x-lifi-api-key","in":"header"}},"schemas":{}},"paths":{"/addresses":{"get":{"summary":"Get Contract Addresses","tags":["Configuration"],"description":"Returns a mapping between each supported chainId and all relevant contract addresses for that chain. Currently all chains use the same addresses from the compiler metadata, including the virtual machine (VM) and arithmetic processor contracts.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":{"type":"object","properties":{"vm":{"type":"string","description":"Virtual machine contract address","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"arithmetic_processor":{"type":"string","description":"Arithmetic processor contract address","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"invariant_checker":{"type":"string","description":"Invariant checker contract address","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"proxy_factory":{"type":"string","description":"Proxy factory contract address","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"flashloan":{"description":"Flashloan runtime and lender adapters; absent when the proxy factory has no flashloan runtime","type":"object","properties":{"runtime":{"type":"string","description":"Flashloan runtime that every proxy of the proxy factory runs flights in","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"lenders":{"type":"object","additionalProperties":{"type":"object","properties":{"adapter":{"type":"string","description":"Flashloan adapter contract the proxy borrows through for this lender","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"provider":{"type":"string","description":"Lender contract the adapter borrows from on this chain","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"}},"required":["adapter","provider"],"additionalProperties":false},"description":"Adapter and lender contract per flashloan provider kind; a kind is absent when the chain has no lender of that kind"}},"required":["runtime","lenders"],"additionalProperties":false}},"required":["vm","arithmetic_processor","invariant_checker","proxy_factory"],"additionalProperties":false},"description":"Mapping of chainId to contract addresses for that chain"}},"required":["success","data"],"additionalProperties":false,"description":"Success - A mapping of chainId to contract addresses for each supported chain","example":{"success":true,"data":{"1":{"vm":"0x742d35Cc6634C0532925a3b8D431684742b7C2dC","arithmetic_processor":"0x8ba1f109551bD432803012645Hac136c","invariant_checker":"0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb","proxy_factory":"0x1234567890123456789012345678901234567890"},"137":{"vm":"0x742d35Cc6634C0532925a3b8D431684742b7C2dC","arithmetic_processor":"0x8ba1f109551bD432803012645Hac136c","invariant_checker":"0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb","proxy_factory":"0x1234567890123456789012345678901234567890"},"42161":{"vm":"0x742d35Cc6634C0532925a3b8D431684742b7C2dC","arithmetic_processor":"0x8ba1f109551bD432803012645Hac136c","invariant_checker":"0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb","proxy_factory":"0x1234567890123456789012345678901234567890"}}}}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["COMPILER_UNAVAILABLE"],"description":"Type of error that occurred"},"message":{"type":"string","description":"Human-readable error message"}},"required":["type","message"],"additionalProperties":false}],"type":"object"}},"required":["success","error"],"additionalProperties":false,"description":"Internal server error - Failed to retrieve contract addresses or no supported chains available","example":{"success":false,"error":{"type":"SERVER_ERROR","message":"Failed to retrieve contract addresses"}}}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false}},"required":["success","error"],"additionalProperties":false,"description":"Service unavailable - Compose routing snapshot is not initialized yet","example":{"success":false,"error":{"type":"SERVICE_UNAVAILABLE","message":"Compose routing not initialized","retryAfter":10}}}}}}}}},"/chains":{"get":{"summary":"Get Supported Chains","tags":["Configuration"],"description":"Returns the chains the composer supports, ascending by `chainId`. A chain is listed once the VM contract is confirmed deployed on it — the same condition `POST /compose`, `POST /compose/route` and `POST /simulate` validate against, so a chain missing from this list is rejected by those endpoints. The converse does not hold: a listed chain can still have no routing edge for a given token pair, which `POST /compose/route` reports as `no_route_error`. Enumerate the pairs that do route with `GET /compose/zap-packs`. `name` is a display label maintained by the deployment, so key on `chainId` and never on `name`.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"name":{"type":"string","minLength":1,"description":"Human-readable chain label, suitable for display. Operator-maintained rather than canonical branding, so treat it as a label and never as an identifier — key on `chainId`. Falls back to `Chain <id>` for a chain the deployment has no configured label for.","example":"Base"}},"required":["chainId","name"],"additionalProperties":false},"description":"Chains the composer supports, ascending by `chainId`. A chain is listed once the VM contract is confirmed deployed on it, which is the same condition every write endpoint validates against."}},"required":["success","data"],"additionalProperties":false,"description":"Success - The chains the composer supports","example":{"success":true,"data":[{"chainId":1,"name":"Ethereum"},{"chainId":137,"name":"Polygon"},{"chainId":8453,"name":"Base"},{"chainId":42161,"name":"Arbitrum"}]}}}}}}}},"/compose":{"post":{"summary":"Compile a Compose Flow","tags":["Compose"],"description":"Accepts a Flow JSON document, compiles it through the compose pipeline, and returns transaction calldata.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"flow":{"type":"object","properties":{"version":{"type":"number"},"id":{"type":"string"},"chainId":{"type":"number"},"inputs":{"type":"array","items":{"type":"object","additionalProperties":{}}},"nodes":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["version","id","chainId","inputs","nodes"],"additionalProperties":{},"description":"The compose Flow (`GET /compose/manifest` publishes its JSON schema). An optional `epilogue` names the post-graph forwards: `forwards[]` each move the proxy's whole balance of one resource to one address (a literal or `{ $ref: \"context.sender\" }`) and are measured into the response's `epilogue`; `remainder` moves every other proxy-held terminal resource. `run.sweepTo: X` is sugar for `epilogue: { remainder: X }`."},"run":{"type":"object","properties":{"inputs":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"kind":{"type":"string"}},"required":["kind"],"additionalProperties":{}}]}},"preconditions":{"description":"On-chain state the simulation should assume, applied as storage overrides before the program runs. Use it when the compiler cannot know a value statically — for example a second-leg flow whose input is read at runtime. These are assertions, not requirements: they never appear in the response `approvals` array, which is derived solely from the allowances the compiler concluded the program needs.","type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["Erc20Balance"]},"wallet":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"token":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"balance":{"type":"string","pattern":"^\\d+$"}},"required":["type","wallet","token","balance"]},{"type":"object","properties":{"type":{"type":"string","enum":["NativeBalance"]},"wallet":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"balance":{"type":"string","pattern":"^\\d+$"}},"required":["type","wallet","balance"]},{"type":"object","properties":{"type":{"type":"string","enum":["Erc20Allowance"]},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"spender":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"token":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"allowance":{"type":"string","pattern":"^\\d+$"}},"required":["type","owner","spender","token","allowance"]}],"type":"object"}},"signer":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"assumptions":{"type":"object","additionalProperties":{"type":"string","pattern":"^\\d+$"}},"referrer":{"type":"string"},"maxPriceImpactBps":{"type":"integer","minimum":0,"maximum":10000,"description":"Basis points (1bp = 0.01%). Integer in [0, 10000].","example":50},"checkOnChainAllowances":{"default":false,"type":"boolean"},"sweepTo":{"description":"Sugar for `flow.epilogue.remainder`: every proxy-held terminal resource the flow leaves behind is forwarded to this address (or `{ $ref: \"context.sender\" }`, the only ref admitted) after the graph runs. A request that also sets `flow.epilogue` is rejected with a 400 `validation_error` at `run.sweepTo`.","anyOf":[{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},{"type":"object","properties":{"$ref":{"type":"string","enum":["context.sender"]}},"required":["$ref"],"additionalProperties":false}]},"simulationPolicy":{"default":"strict","type":"string","enum":["strict","allow-revert"]},"simulateUserProgram":{"default":false,"description":"When true, after the structured simulation succeeds, also simulate the final user-facing transaction (post-deployAndExecute wrapping when applicable) through slot-finder. Reverts honour simulationPolicy: strict → 422, allow-revert → 206 with simulationRevert. Default false; no extra slot-finder call when omitted.","example":false,"type":"boolean"}},"required":["inputs","signer"],"additionalProperties":false}},"required":["flow","run"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["consumed"]},"consumedBy":{"type":"string","description":"The id of the flow node that spends this port."},"resource":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId"],"additionalProperties":false}]},"amount":{"type":"object","properties":{"estimate":{"description":"The amount this port is expected to carry. Absent when the compiler neither measured nor was quoted a value for the port.","type":"object","properties":{"basis":{"type":"string","enum":["simulated","quoted"],"description":"\"simulated\": measured by simulating the compiled program. \"quoted\": the prepared op's own quote, fetched before compilation."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false},"minimum":{"description":"The floor the transaction enforces on this port: it reverts below this value. Absent means no floor is known. There is no zero placeholder.","type":"object","properties":{"basis":{"type":"string","enum":["guard","op","input","declared"],"description":"\"guard\": a user-declared guard (e.g. slippage) emits an on-chain assertion at this floor. \"op\": the prepared op quoted this floor, or the routing edge encoded it into the call. \"input\": the floor is a flow input's bound amount or the floor its deposit asserts. \"declared\": the op declares its output deterministic and the estimate is echoed as the floor."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false}},"additionalProperties":false}},"required":["role","consumedBy","resource","amount"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["terminal"]},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"delivery":{"oneOf":[{"type":"object","properties":{"when":{"type":"string","enum":["now"]}},"required":["when"],"additionalProperties":false},{"type":"object","properties":{"when":{"type":"string","enum":["future"]},"etaSeconds":{"description":"Expected number of seconds before the deferred proceeds land. Present only when the protocol publishes an estimate; absence means no estimate is published, not an estimate of zero.","example":3600,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"provider":{"description":"Key of the external system that delivers the deferred proceeds. For `lifi.bridge` this is the LI.FI tool key, usable as the `bridge` parameter of LI.FI `/v1/status` together with the source transaction hash. Absent when the op does not name one.","example":"across","type":"string"},"trackingId":{"description":"The id the provider status endpoint takes. For `lifi-intents` this is the order id, the `onChainOrderId` of `GET https://order.li.fi/orders/status`. Absent when the provider does not know the id at compile time; for `lifi.bridge` the id is the source transaction hash.","example":"0x41f18ee79d82bf212d2a73ed61d6b5da6fc99fbfad1b6788980c9722e3350da3","type":"string"}},"required":["when"],"additionalProperties":false}],"description":"\"now\": delivered while the transaction lands, and a simulated estimate is the delivered amount. \"future\": delivered to `owner` only after the initiating transaction settles, so the caller must track settlement; the estimate is the initiating transaction's.","type":"object"},"resource":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId"],"additionalProperties":false}]},"amount":{"type":"object","properties":{"estimate":{"description":"The amount this port is expected to carry. Absent when the compiler neither measured nor was quoted a value for the port.","type":"object","properties":{"basis":{"type":"string","enum":["simulated","quoted"],"description":"\"simulated\": measured by simulating the compiled program. \"quoted\": the prepared op's own quote, fetched before compilation."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false},"minimum":{"description":"The floor the transaction enforces on this port: it reverts below this value. Absent means no floor is known. There is no zero placeholder.","type":"object","properties":{"basis":{"type":"string","enum":["guard","op","input","declared"],"description":"\"guard\": a user-declared guard (e.g. slippage) emits an on-chain assertion at this floor. \"op\": the prepared op quoted this floor, or the routing edge encoded it into the call. \"input\": the floor is a flow input's bound amount or the floor its deposit asserts. \"declared\": the op declares its output deterministic and the estimate is echoed as the floor."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false}},"additionalProperties":false}},"required":["role","owner","delivery","resource","amount"],"additionalProperties":false}],"type":"object"},"description":"Every linear resource output port of the flow, keyed `<nodeId>.<portName>`, including ports a later node spends, plus every resource input no node spends, keyed `input.<name>`. `role` is \"consumed\" (spent by `consumedBy`) or \"terminal\" (delivered to `owner`; filter on this to answer \"what do I receive\"). `amount.estimate` is the expected value, tagged \"simulated\" (measured) or \"quoted\" (the prepared op's quote). `amount.minimum` is the enforced floor, tagged \"guard\", \"op\", \"input\" or \"declared\"; \"guard\" only when a guard is strictly tighter than the op floor (\"op\" on a tie). A port behind pure ops carries the floor those ops pass on from upstream, tagged the same way; an unspent input carries its bound amount, tagged \"input\"; absent means no floor is known. A port declaring `omitIfZero` that simulated to zero is omitted."},"producedResources":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"availability":{"type":"string","enum":["now","future"]},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"simulated":{"type":"object","properties":{"amountOut":{"type":"string","pattern":"^\\d+$"},"amountOutMin":{"type":"string","pattern":"^\\d+$"}},"required":["amountOut"],"additionalProperties":false},"etaSeconds":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId","availability","owner"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"availability":{"type":"string","enum":["now","future"]},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"simulated":{"type":"object","properties":{"amountOut":{"type":"string","pattern":"^\\d+$"},"amountOutMin":{"type":"string","pattern":"^\\d+$"}},"required":["amountOut"],"additionalProperties":false},"etaSeconds":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId","availability","owner"],"additionalProperties":false}]},"deprecated":true,"description":"Deprecated: the pre-0.6.0 view of the terminal entries of `outputs`, served for composer-sdk 0.5.x clients. Read `outputs` instead. Removed once the server stops accepting 0.5.x clients."},"epilogue":{"type":"object","properties":{"forwards":{"readOnly":true,"description":"The flow's named forwards (`flow.epilogue.forwards`) in order, each with its simulated amount.","type":"array","items":{"type":"object","properties":{"resource":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId"],"additionalProperties":false}]},"to":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"type":"string","pattern":"^\\d+$","description":"The simulated balance the forward moved: the proxy's whole holding of `resource` after the graph ran."}},"required":["resource","to","amount"],"additionalProperties":false}},"remainder":{"description":"The resolved remainder destination (`flow.epilogue.remainder`, or the `run.sweepTo` sugar). Not measured: its only trace in `outputs` is a re-owned `owner` on the terminals it moved, which is indistinguishable from a terminal delivered to the same address by its node or by a named forward.","type":"string","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"}},"required":["forwards"],"additionalProperties":false,"description":"The flow's epilogue as executed: the post-graph forwards of proxy-held balances. Absent when the flow has no epilogue."},"producedHandles":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["uint256","uint128","uint64","uint32","uint16","uint8","address","bool","bytes32"]},"value":{"type":"string"},"units":{"type":"string","enum":["raw","wad","ray","bps","token-decimals"]}},"required":["type","value"],"additionalProperties":false}},"transactionRequest":{"description":"The main transaction executing the compiled program through the signer's own proxy; only that signer can send it. Absent when the compiled program is empty (e.g. a settle-only flow authored with funding: 'external') — nothing is executed on the signer's behalf and every required submission is an entry in `actions` (the escrow funding transfer is the `fundEscrow` action).","type":"object","properties":{"to":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"data":{"type":"string"},"value":{"type":"string"},"gasLimit":{"type":"string"}},"required":["to","chainId","data","value"],"additionalProperties":false},"userProxy":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"approvals":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"spender":{"type":"string"},"amount":{"type":"string"},"transactionRequest":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"to":{"type":"string"},"data":{"type":"string"},"value":{"type":"string","enum":["0"]}},"required":["chainId","to","data","value"],"additionalProperties":false}},"required":["token","spender","amount","transactionRequest"],"additionalProperties":false}},"actions":{"description":"The ordered to-do list: every transaction to submit and every payload to sign to realize this compose, in order (approvals, then the main execution, then per-node escrow funding transfers, then per-node typed data to sign), each tagged with who may perform it ('signer': only the flow's signer; 'anyone': credited by balance, any wallet). Narrow on `kind` before reading `transactionRequest`: a 'typedData' action is signed, never submitted. A `fundEscrow` or `signOrder` action names its settle node through `nodeId`, the key of `settlements`. This is the sole carrier of escrow-funding calldata and settlement typed data. The sibling `transactionRequest` and `approvals` fields remain projections of their respective entries. Present whenever at least one action is required, including a 206 partial response produced by the allow-revert simulation policy.","type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["transaction"]},"purpose":{"type":"string","enum":["approval","execute"]},"submitter":{"type":"string","enum":["signer","anyone"]},"transactionRequest":{"type":"object","properties":{"to":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"data":{"type":"string"},"value":{"type":"string"},"gasLimit":{"type":"string"}},"required":["to","chainId","data","value"],"additionalProperties":false}},"required":["kind","purpose","submitter","transactionRequest"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["transaction"]},"purpose":{"type":"string","enum":["fundEscrow"]},"submitter":{"type":"string","enum":["signer","anyone"]},"transactionRequest":{"type":"object","properties":{"to":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"data":{"type":"string"},"value":{"type":"string"},"gasLimit":{"type":"string"}},"required":["to","chainId","data","value"],"additionalProperties":false},"nodeId":{"type":"string"}},"required":["kind","purpose","submitter","transactionRequest","nodeId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["typedData"]},"purpose":{"type":"string","enum":["signOrder"]},"submitter":{"type":"string","enum":["signer"]},"nodeId":{"type":"string"},"typedData":{"type":"array","items":{}}},"required":["kind","purpose","submitter","nodeId","typedData"],"additionalProperties":false}],"type":"object"}},"priceImpact":{"type":"object","properties":{"inputValueUsd":{"type":"number"},"outputValueUsd":{"type":"number"},"impactBps":{"type":"number"},"unpricedInputs":{"readOnly":true,"type":"array","items":{"type":"string"}},"unpricedOutputs":{"readOnly":true,"type":"array","items":{"type":"string"}}},"required":["inputValueUsd","outputValueUsd","impactBps","unpricedInputs","unpricedOutputs"],"additionalProperties":false},"userProgramSimulation":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"returnData":{"type":"string"}},"required":["status","returnData"],"additionalProperties":false,"description":"Result of the optional user-program simulation, present only when the request opted in via run.simulateUserProgram and the simulation succeeded. The transactionRequest.gasLimit is unchanged whether or not this field is present (gas measurement is not currently exposed by slot-finder).","example":{"status":"ok","returnData":"0x"}},"settlements":{"description":"How each `continuation.settle` node settles, keyed by node id; the node's outputs are the `outputs` entries keyed `<nodeId>.outcomes.<i>`, one per entry of `config.outcomes`, whose `amount.minimum` is that outcome's committed floor (for a settle with one outcome, a caller below SDK 0.17, or one that sends no `x-lifi-composer-sdk` header, receives the deprecated key `<nodeId>.output` in place of `<nodeId>.outcomes.0`, and a caller whose `x-lifi-composer-sdk` header is not a version receives both keys with the same value). Absent when the flow has no settle node. `escrow` is present when the settlement provider registered an escrow: `chainId` + `address` identify the escrow, `token` + `amount` are the funding asset and the amount the escrow was sized from (the program moves the amount realised at execution, which can differ when an upstream op supplies the funding), `cap` is the most a fill may spend from the escrow (any balance above it stays there), `floor` is the least balance that arms a fill (a smaller one waits for expiry and is refunded), `owner` controls the escrow, `refund` receives the balance on expiry, and `expiresAtMs` is the effective expiry in epoch milliseconds: the settlement service's stored value, which can be earlier than the authored `validity.expiresAtMs`; `fill.validUntilMs` is never later than it, and a deposit after it is never filled and is refunded. A `fundEscrow` action with the same `nodeId` funds it; with an escrow and no such action, the main execution funds it, either by transfer or, when a `lifi.bridge` output funds the node, by bridging into it on the escrow's chain. `binding` is present only for an `exact` settle: the fill may run only `payload` (the call to `executionTarget` that grants `approvals` and then runs the leg's compiled `calldata`), and `payloadHash` is keccak256 of `payload`, the hash the escrow commits to. `continuation` is present when the provider hands the next leg back to the caller: re-submit `nextFlow` once `check` holds, before `validity.expiresAtMs`. An entry with none of these is `{}`. An entry carries nothing to submit or sign: that is in `actions`.","type":"object","additionalProperties":{"type":"object","properties":{"escrow":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"address":{"type":"string","format":"starts_with","pattern":"^0x.*"},"token":{"type":"string","format":"starts_with","pattern":"^0x.*"},"amount":{"type":"string"},"cap":{"type":"string"},"floor":{"type":"string"},"owner":{"type":"string","format":"starts_with","pattern":"^0x.*"},"refund":{"type":"string","format":"starts_with","pattern":"^0x.*"},"expiresAtMs":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["chainId","address","token","amount","cap","floor","owner","refund","expiresAtMs"],"additionalProperties":false},"binding":{"type":"object","properties":{"executionTarget":{"type":"string","format":"starts_with","pattern":"^0x.*"},"payload":{"type":"string","format":"starts_with","pattern":"^0x.*"},"payloadHash":{"type":"string","format":"starts_with","pattern":"^0x.*"},"calldata":{"type":"string","format":"starts_with","pattern":"^0x.*"},"approvals":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"token":{"type":"string","format":"starts_with","pattern":"^0x.*"},"spender":{"type":"string","format":"starts_with","pattern":"^0x.*"}},"required":["token","spender"],"additionalProperties":false}}},"required":["executionTarget","payload","payloadHash","calldata","approvals"],"additionalProperties":false}},"additionalProperties":false}},"fill":{"type":"object","properties":{"spends":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"input":{"type":"string","minLength":1},"token":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"amount":{"type":"string","pattern":"^\\d+$"},"nodeId":{"type":"string","minLength":1}},"required":["input","token","chainId","amount"],"additionalProperties":false}},"validUntilMs":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["spends"],"additionalProperties":false,"description":"The solver-extractable fill. `spends` is the amount the fill may spend of each funding input: the exact amount, or the pull cap of a non-exact deposit whose realised deposit is measured on-chain (NOT allowance-shaped, unlike `approvals`); a row's `nodeId` names the settle leg it funds; absent `validUntilMs` means no expiry."},"verificationByNode":{"description":"The C4 verification echo per committing flow node, present only when the compile committed a validation program. Keyed by the node that carried the commitment: the `continuation.settle` node on an authoring compile, the `continuation.commitment` node on a settlement re-submission.","type":"object","additionalProperties":{"type":"object","properties":{"validationProgramHash":{"type":"string","pattern":"^0x[0-9a-f]{64}$"},"paramsHash":{"type":"string","pattern":"^0x[0-9a-f]{64}$"},"assertedPredicate":{"readOnly":true,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20BalanceGte"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"owner":{"anyOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},{"type":"string","enum":["escrow","delivery"]}]},"minAmount":{"type":"string"}},"required":["kind","chainId","token","owner","minAmount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["nativeBalanceGte"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"owner":{"anyOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},{"type":"string","enum":["escrow","delivery"]}]},"minAmount":{"type":"string"}},"required":["kind","chainId","owner","minAmount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["call"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"to":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"signature":{"type":"string"},"args":{"readOnly":true,"type":"array","items":{"type":"string"}},"comparator":{"type":"string","enum":["gte","eq","lte"]},"threshold":{"type":"string"}},"required":["kind","chainId","to","signature","args","comparator","threshold"],"additionalProperties":false}],"type":"object"}}},"required":["validationProgramHash","paramsHash","assertedPredicate"],"additionalProperties":false}},"warnings":{"description":"Advisory findings in the order the compiler raised them. Absent when it raised none; never an empty array.","readOnly":true,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"}},"required":["kind","message"],"additionalProperties":false,"description":"An advisory finding the compiler raised without failing the compile. `kind` is an open set: tolerate unknown kinds. `path`, `port`, and `fix` locate and remedy the finding exactly as on a compile error."}}},"required":["outputs","producedHandles","userProxy","fill"],"additionalProperties":false}},"required":["success","data"],"additionalProperties":false}}}},"206":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["preparation_error"]},"message":{"type":"string"},"path":{"type":"string"},"failedOps":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"callId":{"type":"string"},"op":{"type":"string"},"kind":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["callId","op","kind","message"],"additionalProperties":false}},"succeededOps":{"readOnly":true,"type":"array","items":{"type":"string"}}},"required":["kind","message","failedOps","succeededOps"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["simulation_revert"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"object","properties":{"code":{"type":"number"},"rawErrorBytes":{"type":"string"},"decodeResult":{"type":"object","properties":{"errorCandidates":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"decodedErrorSignature":{"type":"string"},"decodedParams":{"readOnly":true,"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["decodedErrorSignature","decodedParams"],"additionalProperties":false}},"error":{"type":"string"}},"additionalProperties":false}},"required":["code","rawErrorBytes"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["no_route_error"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"object","properties":{"maxHops":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"searchTruncated":{"type":"boolean"}},"required":["maxHops","searchTruncated"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["delivery_error"]},"message":{"type":"string"},"path":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false},"details":{"type":"object","properties":{"reason":{"type":"string","enum":["floor_drift","eta_exceeds_expiry","quote_failed"]},"cause":{"type":"string"},"quoted":{"type":"object","properties":{"min":{"type":"string"},"expected":{"type":"string"},"etaSeconds":{"type":"number"}},"required":["min","expected"],"additionalProperties":false},"escrow":{"type":"object","properties":{"chainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"address":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"floor":{"type":"string"},"expiresAtMs":{"type":"number"}},"required":["chainId","address","floor","expiresAtMs"],"additionalProperties":false}},"required":["reason","quoted"],"additionalProperties":false}},"required":["kind","message","details"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}]},"data":{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["consumed"]},"consumedBy":{"type":"string","description":"The id of the flow node that spends this port."},"resource":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId"],"additionalProperties":false}]},"amount":{"type":"object","properties":{"estimate":{"description":"The amount this port is expected to carry. Absent when the compiler neither measured nor was quoted a value for the port.","type":"object","properties":{"basis":{"type":"string","enum":["simulated","quoted"],"description":"\"simulated\": measured by simulating the compiled program. \"quoted\": the prepared op's own quote, fetched before compilation."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false},"minimum":{"description":"The floor the transaction enforces on this port: it reverts below this value. Absent means no floor is known. There is no zero placeholder.","type":"object","properties":{"basis":{"type":"string","enum":["guard","op","input","declared"],"description":"\"guard\": a user-declared guard (e.g. slippage) emits an on-chain assertion at this floor. \"op\": the prepared op quoted this floor, or the routing edge encoded it into the call. \"input\": the floor is a flow input's bound amount or the floor its deposit asserts. \"declared\": the op declares its output deterministic and the estimate is echoed as the floor."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false}},"additionalProperties":false}},"required":["role","consumedBy","resource","amount"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["terminal"]},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"delivery":{"oneOf":[{"type":"object","properties":{"when":{"type":"string","enum":["now"]}},"required":["when"],"additionalProperties":false},{"type":"object","properties":{"when":{"type":"string","enum":["future"]},"etaSeconds":{"description":"Expected number of seconds before the deferred proceeds land. Present only when the protocol publishes an estimate; absence means no estimate is published, not an estimate of zero.","example":3600,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"provider":{"description":"Key of the external system that delivers the deferred proceeds. For `lifi.bridge` this is the LI.FI tool key, usable as the `bridge` parameter of LI.FI `/v1/status` together with the source transaction hash. Absent when the op does not name one.","example":"across","type":"string"},"trackingId":{"description":"The id the provider status endpoint takes. For `lifi-intents` this is the order id, the `onChainOrderId` of `GET https://order.li.fi/orders/status`. Absent when the provider does not know the id at compile time; for `lifi.bridge` the id is the source transaction hash.","example":"0x41f18ee79d82bf212d2a73ed61d6b5da6fc99fbfad1b6788980c9722e3350da3","type":"string"}},"required":["when"],"additionalProperties":false}],"description":"\"now\": delivered while the transaction lands, and a simulated estimate is the delivered amount. \"future\": delivered to `owner` only after the initiating transaction settles, so the caller must track settlement; the estimate is the initiating transaction's.","type":"object"},"resource":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId"],"additionalProperties":false}]},"amount":{"type":"object","properties":{"estimate":{"description":"The amount this port is expected to carry. Absent when the compiler neither measured nor was quoted a value for the port.","type":"object","properties":{"basis":{"type":"string","enum":["simulated","quoted"],"description":"\"simulated\": measured by simulating the compiled program. \"quoted\": the prepared op's own quote, fetched before compilation."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false},"minimum":{"description":"The floor the transaction enforces on this port: it reverts below this value. Absent means no floor is known. There is no zero placeholder.","type":"object","properties":{"basis":{"type":"string","enum":["guard","op","input","declared"],"description":"\"guard\": a user-declared guard (e.g. slippage) emits an on-chain assertion at this floor. \"op\": the prepared op quoted this floor, or the routing edge encoded it into the call. \"input\": the floor is a flow input's bound amount or the floor its deposit asserts. \"declared\": the op declares its output deterministic and the estimate is echoed as the floor."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false}},"additionalProperties":false}},"required":["role","owner","delivery","resource","amount"],"additionalProperties":false}],"type":"object"},"description":"Every linear resource output port of the flow, keyed `<nodeId>.<portName>`, including ports a later node spends, plus every resource input no node spends, keyed `input.<name>`. `role` is \"consumed\" (spent by `consumedBy`) or \"terminal\" (delivered to `owner`; filter on this to answer \"what do I receive\"). `amount.estimate` is the expected value, tagged \"simulated\" (measured) or \"quoted\" (the prepared op's quote). `amount.minimum` is the enforced floor, tagged \"guard\", \"op\", \"input\" or \"declared\"; \"guard\" only when a guard is strictly tighter than the op floor (\"op\" on a tie). A port behind pure ops carries the floor those ops pass on from upstream, tagged the same way; an unspent input carries its bound amount, tagged \"input\"; absent means no floor is known. A port declaring `omitIfZero` that simulated to zero is omitted."},"producedResources":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"availability":{"type":"string","enum":["now","future"]},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"simulated":{"type":"object","properties":{"amountOut":{"type":"string","pattern":"^\\d+$"},"amountOutMin":{"type":"string","pattern":"^\\d+$"}},"required":["amountOut"],"additionalProperties":false},"etaSeconds":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId","availability","owner"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"availability":{"type":"string","enum":["now","future"]},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"simulated":{"type":"object","properties":{"amountOut":{"type":"string","pattern":"^\\d+$"},"amountOutMin":{"type":"string","pattern":"^\\d+$"}},"required":["amountOut"],"additionalProperties":false},"etaSeconds":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId","availability","owner"],"additionalProperties":false}]},"deprecated":true,"description":"Deprecated: the pre-0.6.0 view of the terminal entries of `outputs`, served for composer-sdk 0.5.x clients. Read `outputs` instead. Removed once the server stops accepting 0.5.x clients."},"producedHandles":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["uint256","uint128","uint64","uint32","uint16","uint8","address","bool","bytes32"]},"value":{"type":"string"},"units":{"type":"string","enum":["raw","wad","ray","bps","token-decimals"]}},"required":["type","value"],"additionalProperties":false}},"transactionRequest":{"type":"object","properties":{"to":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"data":{"type":"string"},"value":{"type":"string"},"gasLimit":{"type":"string"}},"required":["to","chainId","data","value"],"additionalProperties":false},"userProxy":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"simulationRevert":{"type":"object","properties":{"code":{"type":"number"},"rawErrorBytes":{"type":"string"},"decodeResult":{"type":"object","properties":{"errorCandidates":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"decodedErrorSignature":{"type":"string"},"decodedParams":{"readOnly":true,"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["decodedErrorSignature","decodedParams"],"additionalProperties":false}},"error":{"type":"string"}},"additionalProperties":false}},"required":["code","rawErrorBytes"],"additionalProperties":false},"approvals":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"spender":{"type":"string"},"amount":{"type":"string"},"transactionRequest":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"to":{"type":"string"},"data":{"type":"string"},"value":{"type":"string","enum":["0"]}},"required":["chainId","to","data","value"],"additionalProperties":false}},"required":["token","spender","amount","transactionRequest"],"additionalProperties":false}},"actions":{"description":"The ordered to-do list: every transaction to submit and every payload to sign to realize this compose, in order (approvals, then the main execution, then per-node escrow funding transfers, then per-node typed data to sign), each tagged with who may perform it ('signer': only the flow's signer; 'anyone': credited by balance, any wallet). Narrow on `kind` before reading `transactionRequest`: a 'typedData' action is signed, never submitted. A `fundEscrow` or `signOrder` action names its settle node through `nodeId`, the key of `settlements`. This is the sole carrier of escrow-funding calldata and settlement typed data. The sibling `transactionRequest` and `approvals` fields remain projections of their respective entries. Present whenever at least one action is required, including a 206 partial response produced by the allow-revert simulation policy.","type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["transaction"]},"purpose":{"type":"string","enum":["approval","execute"]},"submitter":{"type":"string","enum":["signer","anyone"]},"transactionRequest":{"type":"object","properties":{"to":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"data":{"type":"string"},"value":{"type":"string"},"gasLimit":{"type":"string"}},"required":["to","chainId","data","value"],"additionalProperties":false}},"required":["kind","purpose","submitter","transactionRequest"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["transaction"]},"purpose":{"type":"string","enum":["fundEscrow"]},"submitter":{"type":"string","enum":["signer","anyone"]},"transactionRequest":{"type":"object","properties":{"to":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"data":{"type":"string"},"value":{"type":"string"},"gasLimit":{"type":"string"}},"required":["to","chainId","data","value"],"additionalProperties":false},"nodeId":{"type":"string"}},"required":["kind","purpose","submitter","transactionRequest","nodeId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["typedData"]},"purpose":{"type":"string","enum":["signOrder"]},"submitter":{"type":"string","enum":["signer"]},"nodeId":{"type":"string"},"typedData":{"type":"array","items":{}}},"required":["kind","purpose","submitter","nodeId","typedData"],"additionalProperties":false}],"type":"object"}},"userProgramSimulation":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"returnData":{"type":"string"}},"required":["status","returnData"],"additionalProperties":false,"description":"Result of the optional user-program simulation, present only when the request opted in via run.simulateUserProgram and the simulation succeeded. The transactionRequest.gasLimit is unchanged whether or not this field is present (gas measurement is not currently exposed by slot-finder).","example":{"status":"ok","returnData":"0x"}},"settlements":{"description":"How each `continuation.settle` node settles, keyed by node id; the node's outputs are the `outputs` entries keyed `<nodeId>.outcomes.<i>`, one per entry of `config.outcomes`, whose `amount.minimum` is that outcome's committed floor (for a settle with one outcome, a caller below SDK 0.17, or one that sends no `x-lifi-composer-sdk` header, receives the deprecated key `<nodeId>.output` in place of `<nodeId>.outcomes.0`, and a caller whose `x-lifi-composer-sdk` header is not a version receives both keys with the same value). Absent when the flow has no settle node. `escrow` is present when the settlement provider registered an escrow: `chainId` + `address` identify the escrow, `token` + `amount` are the funding asset and the amount the escrow was sized from (the program moves the amount realised at execution, which can differ when an upstream op supplies the funding), `cap` is the most a fill may spend from the escrow (any balance above it stays there), `floor` is the least balance that arms a fill (a smaller one waits for expiry and is refunded), `owner` controls the escrow, `refund` receives the balance on expiry, and `expiresAtMs` is the effective expiry in epoch milliseconds: the settlement service's stored value, which can be earlier than the authored `validity.expiresAtMs`; `fill.validUntilMs` is never later than it, and a deposit after it is never filled and is refunded. A `fundEscrow` action with the same `nodeId` funds it; with an escrow and no such action, the main execution funds it, either by transfer or, when a `lifi.bridge` output funds the node, by bridging into it on the escrow's chain. `binding` is present only for an `exact` settle: the fill may run only `payload` (the call to `executionTarget` that grants `approvals` and then runs the leg's compiled `calldata`), and `payloadHash` is keccak256 of `payload`, the hash the escrow commits to. `continuation` is present when the provider hands the next leg back to the caller: re-submit `nextFlow` once `check` holds, before `validity.expiresAtMs`. An entry with none of these is `{}`. An entry carries nothing to submit or sign: that is in `actions`.","type":"object","additionalProperties":{"type":"object","properties":{"escrow":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"address":{"type":"string","format":"starts_with","pattern":"^0x.*"},"token":{"type":"string","format":"starts_with","pattern":"^0x.*"},"amount":{"type":"string"},"cap":{"type":"string"},"floor":{"type":"string"},"owner":{"type":"string","format":"starts_with","pattern":"^0x.*"},"refund":{"type":"string","format":"starts_with","pattern":"^0x.*"},"expiresAtMs":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["chainId","address","token","amount","cap","floor","owner","refund","expiresAtMs"],"additionalProperties":false},"binding":{"type":"object","properties":{"executionTarget":{"type":"string","format":"starts_with","pattern":"^0x.*"},"payload":{"type":"string","format":"starts_with","pattern":"^0x.*"},"payloadHash":{"type":"string","format":"starts_with","pattern":"^0x.*"},"calldata":{"type":"string","format":"starts_with","pattern":"^0x.*"},"approvals":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"token":{"type":"string","format":"starts_with","pattern":"^0x.*"},"spender":{"type":"string","format":"starts_with","pattern":"^0x.*"}},"required":["token","spender"],"additionalProperties":false}}},"required":["executionTarget","payload","payloadHash","calldata","approvals"],"additionalProperties":false}},"additionalProperties":false}},"warnings":{"description":"Advisory findings in the order the compiler raised them. Absent when it raised none; never an empty array.","readOnly":true,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"}},"required":["kind","message"],"additionalProperties":false,"description":"An advisory finding the compiler raised without failing the compile. `kind` is an open set: tolerate unknown kinds. `path`, `port`, and `fix` locate and remedy the finding exactly as on a compile error."}}},"required":["outputs","producedHandles","transactionRequest","userProxy","simulationRevert"],"additionalProperties":false}},"required":["success","error","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"kind":{"type":"string","enum":["decode_error","validation_error","linearity_error","empty_program","continuation_error","chain_validation_error","sdk_outdated","server_outdated"]},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}},"required":["success","error"],"additionalProperties":false}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"type":{"type":"string","enum":["INSUFFICIENT_CREDITS"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["success","error"],"additionalProperties":false,"description":"The integration is billed per call and its prepaid credit balance cannot cover this call. Top up with `POST /credits/topup`. This is a plain JSON error, not an x402 challenge: do not pay it."}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["no_route_error"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"object","properties":{"maxHops":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"searchTruncated":{"type":"boolean"}},"required":["maxHops","searchTruncated"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["no_route_error"]},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}]}},"required":["success","error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["preparation_error"]},"message":{"type":"string"},"path":{"type":"string"},"failedOps":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"callId":{"type":"string"},"op":{"type":"string"},"kind":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["callId","op","kind","message"],"additionalProperties":false}},"succeededOps":{"readOnly":true,"type":"array","items":{"type":"string"}}},"required":["kind","message","failedOps","succeededOps"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["simulation_revert"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"object","properties":{"code":{"type":"number"},"rawErrorBytes":{"type":"string"},"decodeResult":{"type":"object","properties":{"errorCandidates":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"decodedErrorSignature":{"type":"string"},"decodedParams":{"readOnly":true,"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["decodedErrorSignature","decodedParams"],"additionalProperties":false}},"error":{"type":"string"}},"additionalProperties":false}},"required":["code","rawErrorBytes"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["delivery_error"]},"message":{"type":"string"},"path":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false},"details":{"type":"object","properties":{"reason":{"type":"string","enum":["floor_drift","eta_exceeds_expiry","quote_failed"]},"cause":{"type":"string"},"quoted":{"type":"object","properties":{"min":{"type":"string"},"expected":{"type":"string"},"etaSeconds":{"type":"number"}},"required":["min","expected"],"additionalProperties":false},"escrow":{"type":"object","properties":{"chainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"address":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"floor":{"type":"string"},"expiresAtMs":{"type":"number"}},"required":["chainId","address","floor","expiresAtMs"],"additionalProperties":false}},"required":["reason","quoted"],"additionalProperties":false}},"required":["kind","message","details"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["preparation_error","provider_error","resolution_rejected","simulation_setup_error","simulation_insufficient_funds","simulation_gas_limit","simulation_revert","subgraph_simulation_revert","guard_error","price_impact_exceeded","flashloan_unauthorized","delivery_error","unsupported_token","signer_screening_rejected","zero_output"]},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}]}},"required":["success","error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"kind":{"type":"string","enum":["resolve_error","lowering_error","simulation_error","compilation_error","verification_error","manifest_error"]},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}},"required":["success","error"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"kind":{"type":"string","enum":["simulation_rpc_error"]},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}},"required":["success","error"],"additionalProperties":false}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"kind":{"type":"string","enum":["resolution_error","deadline_exceeded","service_unavailable","verification_unavailable","deployment_check_unavailable"]},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}},"required":["success","error"],"additionalProperties":false}}}}}}},"/compose/manifest":{"get":{"summary":"Get Compose manifest","tags":["Compose"],"description":"Returns a versioned manifest describing all available operations, guards, and materialisers with exact JSON Schema, plus the deployment's route-planning bounds for POST /compose/route under `routing`.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"manifestVersion":{"type":"number"},"manifestHash":{"type":"string"},"flowSchema":{"type":"object","properties":{},"additionalProperties":{}},"operations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"inputs":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["resource"]},"name":{"type":"string"},"accepts":{"type":"string","enum":["erc20","native","any"]},"mode":{"type":"string","enum":["linear","copy"]},"optional":{"type":"boolean"}},"required":["kind","name","accepts","mode"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["handle"]},"name":{"type":"string"},"type":{"type":"string","enum":["uint8","uint16","uint32","uint64","uint128","uint256","int128","int256","address","bool","bytes","bytes4","bytes32","string"]},"mode":{"type":"string","enum":["linear","copy"]},"expose":{"type":"boolean"},"units":{"type":"string","enum":["raw","wad","ray","bps","token-decimals"]},"optional":{"type":"boolean"}},"required":["kind","name","type","mode"],"additionalProperties":false}],"type":"object"}},"outputs":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["resource_output"]},"name":{"type":"string"},"mode":{"type":"string","enum":["linear","copy"]},"availability":{"type":"string","enum":["now","future"]},"providesMinimum":{"type":"boolean"},"omitIfZero":{"type":"boolean"},"deliveryAddressInput":{"type":"string"},"countFrom":{"type":"string"}},"required":["kind","name","mode"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["handle"]},"name":{"type":"string"},"type":{"type":"string","enum":["uint8","uint16","uint32","uint64","uint128","uint256","int128","int256","address","bool","bytes","bytes4","bytes32","string"]},"mode":{"type":"string","enum":["linear","copy"]},"expose":{"type":"boolean"},"units":{"type":"string","enum":["raw","wad","ray","bps","token-decimals"]},"optional":{"type":"boolean"}},"required":["kind","name","type","mode"],"additionalProperties":false}],"type":"object"}},"configSchema":{}},"required":["id","inputs","outputs"],"additionalProperties":false}},"guards":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"description":{"type":"string"},"configSchema":{},"compatibility":{"type":"object","properties":{"selectors":{"type":"array","items":{"type":"object","properties":{"binding":{"type":"string"},"source":{"type":"string","enum":["inputs","outputs"]},"match":{"type":"object","properties":{"kind":{"anyOf":[{"type":"string","enum":["resource","resource_output","handle"]},{"type":"array","items":{"type":"string","enum":["resource","resource_output","handle"]}}]},"mode":{"type":"string","enum":["linear","copy"]},"type":{"type":"string","enum":["erc20","native","any"]}},"required":["kind"],"additionalProperties":false},"selection":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["config"]},"configKey":{"type":"string"},"cardinality":{"type":"string","enum":["one","many"]}},"required":["kind","configKey","cardinality"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["all_matching"]}},"required":["kind"],"additionalProperties":false}],"type":"object"}},"required":["binding","source","match","selection"],"additionalProperties":false}}},"required":["selectors"],"additionalProperties":false}},"required":["kind"],"additionalProperties":false}},"materialisers":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"description":{"type":"string"},"accepts":{"type":"string","enum":["resource","handle","any"]},"configSchema":{}},"required":["kind","accepts"],"additionalProperties":false}},"preconditions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"configSchema":{}},"required":["type"],"additionalProperties":false}},"routing":{"type":"object","properties":{"maxRouteHops":{"type":"integer","minimum":1,"maximum":9007199254740991},"swapHops":{"type":"string","enum":["head","none"]}},"required":["maxRouteHops","swapHops"],"additionalProperties":false}},"required":["manifestVersion","manifestHash","flowSchema","operations","guards","materialisers","routing"],"additionalProperties":false}},"required":["success","data"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"kind":{"type":"string"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}},"required":["success","error"],"additionalProperties":false}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"kind":{"type":"string"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}},"required":["success","error"],"additionalProperties":false}}}}}}},"/compose/zap-packs":{"get":{"summary":"Get Compose Zap Packs","tags":["Compose"],"description":"Retrieves available compose routing edges grouped by protocol.","parameters":[{"schema":{"description":"Comma-separated list of protocol names to filter by","example":"aave,morpho","type":"string"},"in":"query","name":"protocols","description":"Comma-separated list of protocol names to filter by"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"protocol":{"type":"string","description":"Protocol identifier","example":"aave"},"edges":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["enter-position","exit-position","wrap","unwrap","mint","burn"],"description":"Type of routing edge","example":"enter-position"},"recipient":{"description":"Recipient binding obligation. Required outputs are delivered externally and cannot be chained or swept.","example":"required","type":"string","enum":["required"]},"availability":{"description":"Output availability. 'future' means the output becomes available only after the initiating transaction settles. `POST /compose/route` reaches such an edge only when the request sets `allowAsyncRoutes: true`, and still prefers a synchronous edge whenever the pair has one; on the authoring path use `lifi.zapAsync` with a bound recipient.","example":"future","type":"string","enum":["future"]},"in":{"type":"object","properties":{"address":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453}},"required":["address","chainId"],"additionalProperties":false,"description":"Input token","example":{"address":"0x0000000000000000000000000000000000000000","chainId":1}},"inAmountMin":{"description":"Minimum amount of input token required","example":"1000","type":"string"},"inAmountMax":{"description":"Maximum amount of input token required","example":"1000","type":"string"},"out":{"type":"object","properties":{"address":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453}},"required":["address","chainId"],"additionalProperties":false,"description":"Output token","example":{"address":"0x0000000000000000000000000000000000000000","chainId":1}}},"required":["type","in","out"],"additionalProperties":false}}},"required":["protocol","edges"],"additionalProperties":false}}},"required":["success","data"],"additionalProperties":false,"description":"Success - An array of protocol groups with their routing edges"}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false}},"required":["success","error"],"additionalProperties":false,"description":"Compose routing not initialized"}}}}}}},"/compose/sweep":{"post":{"summary":"Sweep tokens from proxy","tags":["Compose"],"description":"Batch-withdraw tokens from a proxy contract. Constructs a compose flow with one core.transfer node per token and returns transaction calldata. An entry with `amount` withdraws exactly that amount and leaves the rest of the token in the proxy; an entry without one withdraws the whole balance.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"signer":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"tokens":{"minItems":1,"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"description":"Raw amount to withdraw. When set, exactly this amount is withdrawn and the rest of the token stays in the proxy. When omitted, the whole proxy balance is withdrawn.","type":"string","pattern":"^\\d+$"}},"required":["address"],"additionalProperties":false}},"receiver":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"simulationPolicy":{"default":"strict","type":"string","enum":["strict","allow-revert"]},"simulateUserProgram":{"default":false,"description":"When true, after the structured simulation succeeds, also simulate the final user-facing sweep transaction through slot-finder. Reverts honour simulationPolicy. Default false.","example":false,"type":"boolean"}},"required":["chainId","signer","tokens"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["consumed"]},"consumedBy":{"type":"string","description":"The id of the flow node that spends this port."},"resource":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId"],"additionalProperties":false}]},"amount":{"type":"object","properties":{"estimate":{"description":"The amount this port is expected to carry. Absent when the compiler neither measured nor was quoted a value for the port.","type":"object","properties":{"basis":{"type":"string","enum":["simulated","quoted"],"description":"\"simulated\": measured by simulating the compiled program. \"quoted\": the prepared op's own quote, fetched before compilation."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false},"minimum":{"description":"The floor the transaction enforces on this port: it reverts below this value. Absent means no floor is known. There is no zero placeholder.","type":"object","properties":{"basis":{"type":"string","enum":["guard","op","input","declared"],"description":"\"guard\": a user-declared guard (e.g. slippage) emits an on-chain assertion at this floor. \"op\": the prepared op quoted this floor, or the routing edge encoded it into the call. \"input\": the floor is a flow input's bound amount or the floor its deposit asserts. \"declared\": the op declares its output deterministic and the estimate is echoed as the floor."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false}},"additionalProperties":false}},"required":["role","consumedBy","resource","amount"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["terminal"]},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"delivery":{"oneOf":[{"type":"object","properties":{"when":{"type":"string","enum":["now"]}},"required":["when"],"additionalProperties":false},{"type":"object","properties":{"when":{"type":"string","enum":["future"]},"etaSeconds":{"description":"Expected number of seconds before the deferred proceeds land. Present only when the protocol publishes an estimate; absence means no estimate is published, not an estimate of zero.","example":3600,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"provider":{"description":"Key of the external system that delivers the deferred proceeds. For `lifi.bridge` this is the LI.FI tool key, usable as the `bridge` parameter of LI.FI `/v1/status` together with the source transaction hash. Absent when the op does not name one.","example":"across","type":"string"},"trackingId":{"description":"The id the provider status endpoint takes. For `lifi-intents` this is the order id, the `onChainOrderId` of `GET https://order.li.fi/orders/status`. Absent when the provider does not know the id at compile time; for `lifi.bridge` the id is the source transaction hash.","example":"0x41f18ee79d82bf212d2a73ed61d6b5da6fc99fbfad1b6788980c9722e3350da3","type":"string"}},"required":["when"],"additionalProperties":false}],"description":"\"now\": delivered while the transaction lands, and a simulated estimate is the delivered amount. \"future\": delivered to `owner` only after the initiating transaction settles, so the caller must track settlement; the estimate is the initiating transaction's.","type":"object"},"resource":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId"],"additionalProperties":false}]},"amount":{"type":"object","properties":{"estimate":{"description":"The amount this port is expected to carry. Absent when the compiler neither measured nor was quoted a value for the port.","type":"object","properties":{"basis":{"type":"string","enum":["simulated","quoted"],"description":"\"simulated\": measured by simulating the compiled program. \"quoted\": the prepared op's own quote, fetched before compilation."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false},"minimum":{"description":"The floor the transaction enforces on this port: it reverts below this value. Absent means no floor is known. There is no zero placeholder.","type":"object","properties":{"basis":{"type":"string","enum":["guard","op","input","declared"],"description":"\"guard\": a user-declared guard (e.g. slippage) emits an on-chain assertion at this floor. \"op\": the prepared op quoted this floor, or the routing edge encoded it into the call. \"input\": the floor is a flow input's bound amount or the floor its deposit asserts. \"declared\": the op declares its output deterministic and the estimate is echoed as the floor."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false}},"additionalProperties":false}},"required":["role","owner","delivery","resource","amount"],"additionalProperties":false}],"type":"object"},"description":"Every linear resource output port of the flow, keyed `<nodeId>.<portName>`, including ports a later node spends, plus every resource input no node spends, keyed `input.<name>`. `role` is \"consumed\" (spent by `consumedBy`) or \"terminal\" (delivered to `owner`; filter on this to answer \"what do I receive\"). `amount.estimate` is the expected value, tagged \"simulated\" (measured) or \"quoted\" (the prepared op's quote). `amount.minimum` is the enforced floor, tagged \"guard\", \"op\", \"input\" or \"declared\"; \"guard\" only when a guard is strictly tighter than the op floor (\"op\" on a tie). A port behind pure ops carries the floor those ops pass on from upstream, tagged the same way; an unspent input carries its bound amount, tagged \"input\"; absent means no floor is known. A port declaring `omitIfZero` that simulated to zero is omitted."},"producedResources":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"availability":{"type":"string","enum":["now","future"]},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"simulated":{"type":"object","properties":{"amountOut":{"type":"string","pattern":"^\\d+$"},"amountOutMin":{"type":"string","pattern":"^\\d+$"}},"required":["amountOut"],"additionalProperties":false},"etaSeconds":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId","availability","owner"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"availability":{"type":"string","enum":["now","future"]},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"simulated":{"type":"object","properties":{"amountOut":{"type":"string","pattern":"^\\d+$"},"amountOutMin":{"type":"string","pattern":"^\\d+$"}},"required":["amountOut"],"additionalProperties":false},"etaSeconds":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId","availability","owner"],"additionalProperties":false}]},"deprecated":true,"description":"Deprecated: the pre-0.6.0 view of the terminal entries of `outputs`, served for composer-sdk 0.5.x clients. Read `outputs` instead. Removed once the server stops accepting 0.5.x clients."},"epilogue":{"type":"object","properties":{"forwards":{"readOnly":true,"description":"The flow's named forwards (`flow.epilogue.forwards`) in order, each with its simulated amount.","type":"array","items":{"type":"object","properties":{"resource":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId"],"additionalProperties":false}]},"to":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"type":"string","pattern":"^\\d+$","description":"The simulated balance the forward moved: the proxy's whole holding of `resource` after the graph ran."}},"required":["resource","to","amount"],"additionalProperties":false}},"remainder":{"description":"The resolved remainder destination (`flow.epilogue.remainder`, or the `run.sweepTo` sugar). Not measured: its only trace in `outputs` is a re-owned `owner` on the terminals it moved, which is indistinguishable from a terminal delivered to the same address by its node or by a named forward.","type":"string","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"}},"required":["forwards"],"additionalProperties":false,"description":"The flow's epilogue as executed: the post-graph forwards of proxy-held balances. Absent when the flow has no epilogue."},"producedHandles":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["uint256","uint128","uint64","uint32","uint16","uint8","address","bool","bytes32"]},"value":{"type":"string"},"units":{"type":"string","enum":["raw","wad","ray","bps","token-decimals"]}},"required":["type","value"],"additionalProperties":false}},"transactionRequest":{"description":"The main transaction executing the compiled program through the signer's own proxy; only that signer can send it. Absent when the compiled program is empty (e.g. a settle-only flow authored with funding: 'external') — nothing is executed on the signer's behalf and every required submission is an entry in `actions` (the escrow funding transfer is the `fundEscrow` action).","type":"object","properties":{"to":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"data":{"type":"string"},"value":{"type":"string"},"gasLimit":{"type":"string"}},"required":["to","chainId","data","value"],"additionalProperties":false},"userProxy":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"approvals":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"spender":{"type":"string"},"amount":{"type":"string"},"transactionRequest":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"to":{"type":"string"},"data":{"type":"string"},"value":{"type":"string","enum":["0"]}},"required":["chainId","to","data","value"],"additionalProperties":false}},"required":["token","spender","amount","transactionRequest"],"additionalProperties":false}},"actions":{"description":"The ordered to-do list: every transaction to submit and every payload to sign to realize this compose, in order (approvals, then the main execution, then per-node escrow funding transfers, then per-node typed data to sign), each tagged with who may perform it ('signer': only the flow's signer; 'anyone': credited by balance, any wallet). Narrow on `kind` before reading `transactionRequest`: a 'typedData' action is signed, never submitted. A `fundEscrow` or `signOrder` action names its settle node through `nodeId`, the key of `settlements`. This is the sole carrier of escrow-funding calldata and settlement typed data. The sibling `transactionRequest` and `approvals` fields remain projections of their respective entries. Present whenever at least one action is required, including a 206 partial response produced by the allow-revert simulation policy.","type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["transaction"]},"purpose":{"type":"string","enum":["approval","execute"]},"submitter":{"type":"string","enum":["signer","anyone"]},"transactionRequest":{"type":"object","properties":{"to":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"data":{"type":"string"},"value":{"type":"string"},"gasLimit":{"type":"string"}},"required":["to","chainId","data","value"],"additionalProperties":false}},"required":["kind","purpose","submitter","transactionRequest"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["transaction"]},"purpose":{"type":"string","enum":["fundEscrow"]},"submitter":{"type":"string","enum":["signer","anyone"]},"transactionRequest":{"type":"object","properties":{"to":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"data":{"type":"string"},"value":{"type":"string"},"gasLimit":{"type":"string"}},"required":["to","chainId","data","value"],"additionalProperties":false},"nodeId":{"type":"string"}},"required":["kind","purpose","submitter","transactionRequest","nodeId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["typedData"]},"purpose":{"type":"string","enum":["signOrder"]},"submitter":{"type":"string","enum":["signer"]},"nodeId":{"type":"string"},"typedData":{"type":"array","items":{}}},"required":["kind","purpose","submitter","nodeId","typedData"],"additionalProperties":false}],"type":"object"}},"priceImpact":{"type":"object","properties":{"inputValueUsd":{"type":"number"},"outputValueUsd":{"type":"number"},"impactBps":{"type":"number"},"unpricedInputs":{"readOnly":true,"type":"array","items":{"type":"string"}},"unpricedOutputs":{"readOnly":true,"type":"array","items":{"type":"string"}}},"required":["inputValueUsd","outputValueUsd","impactBps","unpricedInputs","unpricedOutputs"],"additionalProperties":false},"userProgramSimulation":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"returnData":{"type":"string"}},"required":["status","returnData"],"additionalProperties":false,"description":"Result of the optional user-program simulation, present only when the request opted in via run.simulateUserProgram and the simulation succeeded. The transactionRequest.gasLimit is unchanged whether or not this field is present (gas measurement is not currently exposed by slot-finder).","example":{"status":"ok","returnData":"0x"}},"settlements":{"description":"How each `continuation.settle` node settles, keyed by node id; the node's outputs are the `outputs` entries keyed `<nodeId>.outcomes.<i>`, one per entry of `config.outcomes`, whose `amount.minimum` is that outcome's committed floor (for a settle with one outcome, a caller below SDK 0.17, or one that sends no `x-lifi-composer-sdk` header, receives the deprecated key `<nodeId>.output` in place of `<nodeId>.outcomes.0`, and a caller whose `x-lifi-composer-sdk` header is not a version receives both keys with the same value). Absent when the flow has no settle node. `escrow` is present when the settlement provider registered an escrow: `chainId` + `address` identify the escrow, `token` + `amount` are the funding asset and the amount the escrow was sized from (the program moves the amount realised at execution, which can differ when an upstream op supplies the funding), `cap` is the most a fill may spend from the escrow (any balance above it stays there), `floor` is the least balance that arms a fill (a smaller one waits for expiry and is refunded), `owner` controls the escrow, `refund` receives the balance on expiry, and `expiresAtMs` is the effective expiry in epoch milliseconds: the settlement service's stored value, which can be earlier than the authored `validity.expiresAtMs`; `fill.validUntilMs` is never later than it, and a deposit after it is never filled and is refunded. A `fundEscrow` action with the same `nodeId` funds it; with an escrow and no such action, the main execution funds it, either by transfer or, when a `lifi.bridge` output funds the node, by bridging into it on the escrow's chain. `binding` is present only for an `exact` settle: the fill may run only `payload` (the call to `executionTarget` that grants `approvals` and then runs the leg's compiled `calldata`), and `payloadHash` is keccak256 of `payload`, the hash the escrow commits to. `continuation` is present when the provider hands the next leg back to the caller: re-submit `nextFlow` once `check` holds, before `validity.expiresAtMs`. An entry with none of these is `{}`. An entry carries nothing to submit or sign: that is in `actions`.","type":"object","additionalProperties":{"type":"object","properties":{"escrow":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"address":{"type":"string","format":"starts_with","pattern":"^0x.*"},"token":{"type":"string","format":"starts_with","pattern":"^0x.*"},"amount":{"type":"string"},"cap":{"type":"string"},"floor":{"type":"string"},"owner":{"type":"string","format":"starts_with","pattern":"^0x.*"},"refund":{"type":"string","format":"starts_with","pattern":"^0x.*"},"expiresAtMs":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["chainId","address","token","amount","cap","floor","owner","refund","expiresAtMs"],"additionalProperties":false},"binding":{"type":"object","properties":{"executionTarget":{"type":"string","format":"starts_with","pattern":"^0x.*"},"payload":{"type":"string","format":"starts_with","pattern":"^0x.*"},"payloadHash":{"type":"string","format":"starts_with","pattern":"^0x.*"},"calldata":{"type":"string","format":"starts_with","pattern":"^0x.*"},"approvals":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"token":{"type":"string","format":"starts_with","pattern":"^0x.*"},"spender":{"type":"string","format":"starts_with","pattern":"^0x.*"}},"required":["token","spender"],"additionalProperties":false}}},"required":["executionTarget","payload","payloadHash","calldata","approvals"],"additionalProperties":false}},"additionalProperties":false}},"fill":{"type":"object","properties":{"spends":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"input":{"type":"string","minLength":1},"token":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"amount":{"type":"string","pattern":"^\\d+$"},"nodeId":{"type":"string","minLength":1}},"required":["input","token","chainId","amount"],"additionalProperties":false}},"validUntilMs":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["spends"],"additionalProperties":false,"description":"The solver-extractable fill. `spends` is the amount the fill may spend of each funding input: the exact amount, or the pull cap of a non-exact deposit whose realised deposit is measured on-chain (NOT allowance-shaped, unlike `approvals`); a row's `nodeId` names the settle leg it funds; absent `validUntilMs` means no expiry."},"verificationByNode":{"description":"The C4 verification echo per committing flow node, present only when the compile committed a validation program. Keyed by the node that carried the commitment: the `continuation.settle` node on an authoring compile, the `continuation.commitment` node on a settlement re-submission.","type":"object","additionalProperties":{"type":"object","properties":{"validationProgramHash":{"type":"string","pattern":"^0x[0-9a-f]{64}$"},"paramsHash":{"type":"string","pattern":"^0x[0-9a-f]{64}$"},"assertedPredicate":{"readOnly":true,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20BalanceGte"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"owner":{"anyOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},{"type":"string","enum":["escrow","delivery"]}]},"minAmount":{"type":"string"}},"required":["kind","chainId","token","owner","minAmount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["nativeBalanceGte"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"owner":{"anyOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},{"type":"string","enum":["escrow","delivery"]}]},"minAmount":{"type":"string"}},"required":["kind","chainId","owner","minAmount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["call"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"to":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"signature":{"type":"string"},"args":{"readOnly":true,"type":"array","items":{"type":"string"}},"comparator":{"type":"string","enum":["gte","eq","lte"]},"threshold":{"type":"string"}},"required":["kind","chainId","to","signature","args","comparator","threshold"],"additionalProperties":false}],"type":"object"}}},"required":["validationProgramHash","paramsHash","assertedPredicate"],"additionalProperties":false}},"warnings":{"description":"Advisory findings in the order the compiler raised them. Absent when it raised none; never an empty array.","readOnly":true,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"}},"required":["kind","message"],"additionalProperties":false,"description":"An advisory finding the compiler raised without failing the compile. `kind` is an open set: tolerate unknown kinds. `path`, `port`, and `fix` locate and remedy the finding exactly as on a compile error."}}},"required":["outputs","producedHandles","userProxy"],"additionalProperties":false}},"required":["success","data"],"additionalProperties":false}}}},"206":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["preparation_error"]},"message":{"type":"string"},"path":{"type":"string"},"failedOps":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"callId":{"type":"string"},"op":{"type":"string"},"kind":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["callId","op","kind","message"],"additionalProperties":false}},"succeededOps":{"readOnly":true,"type":"array","items":{"type":"string"}}},"required":["kind","message","failedOps","succeededOps"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["simulation_revert"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"object","properties":{"code":{"type":"number"},"rawErrorBytes":{"type":"string"},"decodeResult":{"type":"object","properties":{"errorCandidates":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"decodedErrorSignature":{"type":"string"},"decodedParams":{"readOnly":true,"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["decodedErrorSignature","decodedParams"],"additionalProperties":false}},"error":{"type":"string"}},"additionalProperties":false}},"required":["code","rawErrorBytes"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["no_route_error"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"object","properties":{"maxHops":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"searchTruncated":{"type":"boolean"}},"required":["maxHops","searchTruncated"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["delivery_error"]},"message":{"type":"string"},"path":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false},"details":{"type":"object","properties":{"reason":{"type":"string","enum":["floor_drift","eta_exceeds_expiry","quote_failed"]},"cause":{"type":"string"},"quoted":{"type":"object","properties":{"min":{"type":"string"},"expected":{"type":"string"},"etaSeconds":{"type":"number"}},"required":["min","expected"],"additionalProperties":false},"escrow":{"type":"object","properties":{"chainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"address":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"floor":{"type":"string"},"expiresAtMs":{"type":"number"}},"required":["chainId","address","floor","expiresAtMs"],"additionalProperties":false}},"required":["reason","quoted"],"additionalProperties":false}},"required":["kind","message","details"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}]},"data":{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["consumed"]},"consumedBy":{"type":"string","description":"The id of the flow node that spends this port."},"resource":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId"],"additionalProperties":false}]},"amount":{"type":"object","properties":{"estimate":{"description":"The amount this port is expected to carry. Absent when the compiler neither measured nor was quoted a value for the port.","type":"object","properties":{"basis":{"type":"string","enum":["simulated","quoted"],"description":"\"simulated\": measured by simulating the compiled program. \"quoted\": the prepared op's own quote, fetched before compilation."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false},"minimum":{"description":"The floor the transaction enforces on this port: it reverts below this value. Absent means no floor is known. There is no zero placeholder.","type":"object","properties":{"basis":{"type":"string","enum":["guard","op","input","declared"],"description":"\"guard\": a user-declared guard (e.g. slippage) emits an on-chain assertion at this floor. \"op\": the prepared op quoted this floor, or the routing edge encoded it into the call. \"input\": the floor is a flow input's bound amount or the floor its deposit asserts. \"declared\": the op declares its output deterministic and the estimate is echoed as the floor."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false}},"additionalProperties":false}},"required":["role","consumedBy","resource","amount"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["terminal"]},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"delivery":{"oneOf":[{"type":"object","properties":{"when":{"type":"string","enum":["now"]}},"required":["when"],"additionalProperties":false},{"type":"object","properties":{"when":{"type":"string","enum":["future"]},"etaSeconds":{"description":"Expected number of seconds before the deferred proceeds land. Present only when the protocol publishes an estimate; absence means no estimate is published, not an estimate of zero.","example":3600,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"provider":{"description":"Key of the external system that delivers the deferred proceeds. For `lifi.bridge` this is the LI.FI tool key, usable as the `bridge` parameter of LI.FI `/v1/status` together with the source transaction hash. Absent when the op does not name one.","example":"across","type":"string"},"trackingId":{"description":"The id the provider status endpoint takes. For `lifi-intents` this is the order id, the `onChainOrderId` of `GET https://order.li.fi/orders/status`. Absent when the provider does not know the id at compile time; for `lifi.bridge` the id is the source transaction hash.","example":"0x41f18ee79d82bf212d2a73ed61d6b5da6fc99fbfad1b6788980c9722e3350da3","type":"string"}},"required":["when"],"additionalProperties":false}],"description":"\"now\": delivered while the transaction lands, and a simulated estimate is the delivered amount. \"future\": delivered to `owner` only after the initiating transaction settles, so the caller must track settlement; the estimate is the initiating transaction's.","type":"object"},"resource":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId"],"additionalProperties":false}]},"amount":{"type":"object","properties":{"estimate":{"description":"The amount this port is expected to carry. Absent when the compiler neither measured nor was quoted a value for the port.","type":"object","properties":{"basis":{"type":"string","enum":["simulated","quoted"],"description":"\"simulated\": measured by simulating the compiled program. \"quoted\": the prepared op's own quote, fetched before compilation."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false},"minimum":{"description":"The floor the transaction enforces on this port: it reverts below this value. Absent means no floor is known. There is no zero placeholder.","type":"object","properties":{"basis":{"type":"string","enum":["guard","op","input","declared"],"description":"\"guard\": a user-declared guard (e.g. slippage) emits an on-chain assertion at this floor. \"op\": the prepared op quoted this floor, or the routing edge encoded it into the call. \"input\": the floor is a flow input's bound amount or the floor its deposit asserts. \"declared\": the op declares its output deterministic and the estimate is echoed as the floor."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false}},"additionalProperties":false}},"required":["role","owner","delivery","resource","amount"],"additionalProperties":false}],"type":"object"},"description":"Every linear resource output port of the flow, keyed `<nodeId>.<portName>`, including ports a later node spends, plus every resource input no node spends, keyed `input.<name>`. `role` is \"consumed\" (spent by `consumedBy`) or \"terminal\" (delivered to `owner`; filter on this to answer \"what do I receive\"). `amount.estimate` is the expected value, tagged \"simulated\" (measured) or \"quoted\" (the prepared op's quote). `amount.minimum` is the enforced floor, tagged \"guard\", \"op\", \"input\" or \"declared\"; \"guard\" only when a guard is strictly tighter than the op floor (\"op\" on a tie). A port behind pure ops carries the floor those ops pass on from upstream, tagged the same way; an unspent input carries its bound amount, tagged \"input\"; absent means no floor is known. A port declaring `omitIfZero` that simulated to zero is omitted."},"producedResources":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"availability":{"type":"string","enum":["now","future"]},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"simulated":{"type":"object","properties":{"amountOut":{"type":"string","pattern":"^\\d+$"},"amountOutMin":{"type":"string","pattern":"^\\d+$"}},"required":["amountOut"],"additionalProperties":false},"etaSeconds":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId","availability","owner"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"availability":{"type":"string","enum":["now","future"]},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"simulated":{"type":"object","properties":{"amountOut":{"type":"string","pattern":"^\\d+$"},"amountOutMin":{"type":"string","pattern":"^\\d+$"}},"required":["amountOut"],"additionalProperties":false},"etaSeconds":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId","availability","owner"],"additionalProperties":false}]},"deprecated":true,"description":"Deprecated: the pre-0.6.0 view of the terminal entries of `outputs`, served for composer-sdk 0.5.x clients. Read `outputs` instead. Removed once the server stops accepting 0.5.x clients."},"producedHandles":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["uint256","uint128","uint64","uint32","uint16","uint8","address","bool","bytes32"]},"value":{"type":"string"},"units":{"type":"string","enum":["raw","wad","ray","bps","token-decimals"]}},"required":["type","value"],"additionalProperties":false}},"transactionRequest":{"type":"object","properties":{"to":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"data":{"type":"string"},"value":{"type":"string"},"gasLimit":{"type":"string"}},"required":["to","chainId","data","value"],"additionalProperties":false},"userProxy":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"simulationRevert":{"type":"object","properties":{"code":{"type":"number"},"rawErrorBytes":{"type":"string"},"decodeResult":{"type":"object","properties":{"errorCandidates":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"decodedErrorSignature":{"type":"string"},"decodedParams":{"readOnly":true,"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["decodedErrorSignature","decodedParams"],"additionalProperties":false}},"error":{"type":"string"}},"additionalProperties":false}},"required":["code","rawErrorBytes"],"additionalProperties":false},"approvals":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"spender":{"type":"string"},"amount":{"type":"string"},"transactionRequest":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"to":{"type":"string"},"data":{"type":"string"},"value":{"type":"string","enum":["0"]}},"required":["chainId","to","data","value"],"additionalProperties":false}},"required":["token","spender","amount","transactionRequest"],"additionalProperties":false}},"actions":{"description":"The ordered to-do list: every transaction to submit and every payload to sign to realize this compose, in order (approvals, then the main execution, then per-node escrow funding transfers, then per-node typed data to sign), each tagged with who may perform it ('signer': only the flow's signer; 'anyone': credited by balance, any wallet). Narrow on `kind` before reading `transactionRequest`: a 'typedData' action is signed, never submitted. A `fundEscrow` or `signOrder` action names its settle node through `nodeId`, the key of `settlements`. This is the sole carrier of escrow-funding calldata and settlement typed data. The sibling `transactionRequest` and `approvals` fields remain projections of their respective entries. Present whenever at least one action is required, including a 206 partial response produced by the allow-revert simulation policy.","type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["transaction"]},"purpose":{"type":"string","enum":["approval","execute"]},"submitter":{"type":"string","enum":["signer","anyone"]},"transactionRequest":{"type":"object","properties":{"to":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"data":{"type":"string"},"value":{"type":"string"},"gasLimit":{"type":"string"}},"required":["to","chainId","data","value"],"additionalProperties":false}},"required":["kind","purpose","submitter","transactionRequest"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["transaction"]},"purpose":{"type":"string","enum":["fundEscrow"]},"submitter":{"type":"string","enum":["signer","anyone"]},"transactionRequest":{"type":"object","properties":{"to":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"data":{"type":"string"},"value":{"type":"string"},"gasLimit":{"type":"string"}},"required":["to","chainId","data","value"],"additionalProperties":false},"nodeId":{"type":"string"}},"required":["kind","purpose","submitter","transactionRequest","nodeId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["typedData"]},"purpose":{"type":"string","enum":["signOrder"]},"submitter":{"type":"string","enum":["signer"]},"nodeId":{"type":"string"},"typedData":{"type":"array","items":{}}},"required":["kind","purpose","submitter","nodeId","typedData"],"additionalProperties":false}],"type":"object"}},"userProgramSimulation":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"returnData":{"type":"string"}},"required":["status","returnData"],"additionalProperties":false,"description":"Result of the optional user-program simulation, present only when the request opted in via run.simulateUserProgram and the simulation succeeded. The transactionRequest.gasLimit is unchanged whether or not this field is present (gas measurement is not currently exposed by slot-finder).","example":{"status":"ok","returnData":"0x"}},"settlements":{"description":"How each `continuation.settle` node settles, keyed by node id; the node's outputs are the `outputs` entries keyed `<nodeId>.outcomes.<i>`, one per entry of `config.outcomes`, whose `amount.minimum` is that outcome's committed floor (for a settle with one outcome, a caller below SDK 0.17, or one that sends no `x-lifi-composer-sdk` header, receives the deprecated key `<nodeId>.output` in place of `<nodeId>.outcomes.0`, and a caller whose `x-lifi-composer-sdk` header is not a version receives both keys with the same value). Absent when the flow has no settle node. `escrow` is present when the settlement provider registered an escrow: `chainId` + `address` identify the escrow, `token` + `amount` are the funding asset and the amount the escrow was sized from (the program moves the amount realised at execution, which can differ when an upstream op supplies the funding), `cap` is the most a fill may spend from the escrow (any balance above it stays there), `floor` is the least balance that arms a fill (a smaller one waits for expiry and is refunded), `owner` controls the escrow, `refund` receives the balance on expiry, and `expiresAtMs` is the effective expiry in epoch milliseconds: the settlement service's stored value, which can be earlier than the authored `validity.expiresAtMs`; `fill.validUntilMs` is never later than it, and a deposit after it is never filled and is refunded. A `fundEscrow` action with the same `nodeId` funds it; with an escrow and no such action, the main execution funds it, either by transfer or, when a `lifi.bridge` output funds the node, by bridging into it on the escrow's chain. `binding` is present only for an `exact` settle: the fill may run only `payload` (the call to `executionTarget` that grants `approvals` and then runs the leg's compiled `calldata`), and `payloadHash` is keccak256 of `payload`, the hash the escrow commits to. `continuation` is present when the provider hands the next leg back to the caller: re-submit `nextFlow` once `check` holds, before `validity.expiresAtMs`. An entry with none of these is `{}`. An entry carries nothing to submit or sign: that is in `actions`.","type":"object","additionalProperties":{"type":"object","properties":{"escrow":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"address":{"type":"string","format":"starts_with","pattern":"^0x.*"},"token":{"type":"string","format":"starts_with","pattern":"^0x.*"},"amount":{"type":"string"},"cap":{"type":"string"},"floor":{"type":"string"},"owner":{"type":"string","format":"starts_with","pattern":"^0x.*"},"refund":{"type":"string","format":"starts_with","pattern":"^0x.*"},"expiresAtMs":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["chainId","address","token","amount","cap","floor","owner","refund","expiresAtMs"],"additionalProperties":false},"binding":{"type":"object","properties":{"executionTarget":{"type":"string","format":"starts_with","pattern":"^0x.*"},"payload":{"type":"string","format":"starts_with","pattern":"^0x.*"},"payloadHash":{"type":"string","format":"starts_with","pattern":"^0x.*"},"calldata":{"type":"string","format":"starts_with","pattern":"^0x.*"},"approvals":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"token":{"type":"string","format":"starts_with","pattern":"^0x.*"},"spender":{"type":"string","format":"starts_with","pattern":"^0x.*"}},"required":["token","spender"],"additionalProperties":false}}},"required":["executionTarget","payload","payloadHash","calldata","approvals"],"additionalProperties":false}},"additionalProperties":false}},"warnings":{"description":"Advisory findings in the order the compiler raised them. Absent when it raised none; never an empty array.","readOnly":true,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"}},"required":["kind","message"],"additionalProperties":false,"description":"An advisory finding the compiler raised without failing the compile. `kind` is an open set: tolerate unknown kinds. `path`, `port`, and `fix` locate and remedy the finding exactly as on a compile error."}}},"required":["outputs","producedHandles","transactionRequest","userProxy","simulationRevert"],"additionalProperties":false}},"required":["success","error","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"kind":{"type":"string","enum":["decode_error","validation_error","linearity_error","empty_program","continuation_error","chain_validation_error","sdk_outdated","server_outdated"]},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}},"required":["success","error"],"additionalProperties":false}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"type":{"type":"string","enum":["INSUFFICIENT_CREDITS"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["success","error"],"additionalProperties":false,"description":"The integration is billed per call and its prepaid credit balance cannot cover this call. Top up with `POST /credits/topup`. This is a plain JSON error, not an x402 challenge: do not pay it."}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["no_route_error"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"object","properties":{"maxHops":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"searchTruncated":{"type":"boolean"}},"required":["maxHops","searchTruncated"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["no_route_error"]},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}]}},"required":["success","error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["preparation_error"]},"message":{"type":"string"},"path":{"type":"string"},"failedOps":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"callId":{"type":"string"},"op":{"type":"string"},"kind":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["callId","op","kind","message"],"additionalProperties":false}},"succeededOps":{"readOnly":true,"type":"array","items":{"type":"string"}}},"required":["kind","message","failedOps","succeededOps"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["simulation_revert"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"object","properties":{"code":{"type":"number"},"rawErrorBytes":{"type":"string"},"decodeResult":{"type":"object","properties":{"errorCandidates":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"decodedErrorSignature":{"type":"string"},"decodedParams":{"readOnly":true,"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["decodedErrorSignature","decodedParams"],"additionalProperties":false}},"error":{"type":"string"}},"additionalProperties":false}},"required":["code","rawErrorBytes"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["delivery_error"]},"message":{"type":"string"},"path":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false},"details":{"type":"object","properties":{"reason":{"type":"string","enum":["floor_drift","eta_exceeds_expiry","quote_failed"]},"cause":{"type":"string"},"quoted":{"type":"object","properties":{"min":{"type":"string"},"expected":{"type":"string"},"etaSeconds":{"type":"number"}},"required":["min","expected"],"additionalProperties":false},"escrow":{"type":"object","properties":{"chainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"address":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"floor":{"type":"string"},"expiresAtMs":{"type":"number"}},"required":["chainId","address","floor","expiresAtMs"],"additionalProperties":false}},"required":["reason","quoted"],"additionalProperties":false}},"required":["kind","message","details"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["preparation_error","provider_error","resolution_rejected","simulation_setup_error","simulation_insufficient_funds","simulation_gas_limit","simulation_revert","subgraph_simulation_revert","guard_error","price_impact_exceeded","flashloan_unauthorized","delivery_error","unsupported_token","signer_screening_rejected","zero_output"]},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}]}},"required":["success","error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"kind":{"type":"string","enum":["resolve_error","lowering_error","simulation_error","compilation_error","verification_error","manifest_error"]},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}},"required":["success","error"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"kind":{"type":"string","enum":["simulation_rpc_error"]},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}},"required":["success","error"],"additionalProperties":false}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"kind":{"type":"string","enum":["resolution_error","deadline_exceeded","service_unavailable","verification_unavailable","deployment_check_unavailable"]},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}},"required":["success","error"],"additionalProperties":false}}}}}}},"/compose/route":{"post":{"summary":"Route via Compose (direct deposit + zap)","tags":["Compose"],"description":"Convenience endpoint that takes a simple from/to token pair, plans a route for it, builds a compose Flow with a directDeposit input, and returns transaction calldata. The route is the shortest admissible chain of routing-catalog edges up to an operator-set hop ceiling, and may begin with an aggregator swap when the catalog alone cannot connect the pair — in which case sweepTo is required, because the swap can leave an unspent input behind. Node ids are hop0, hop1, … with the terminal always zap, so outputs[\"zap.amountOut\"] is the terminal output at every route length and intermediate outputs carry role: \"consumed\". By default only synchronous routing edges are considered, so every terminal output has delivery.when: \"now\". Set allowAsyncRoutes: true to also accept a pair reachable only through an edge whose output is delivered after the initiating transaction settles; a synchronous route is still preferred at any length, so read outputs[*].delivery.when to tell which you got.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fromToken":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"toToken":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"amount":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["EXACT"]},"amount":{"type":"string","pattern":"^\\d+$"}},"required":["type","amount"]},{"type":"object","properties":{"type":{"type":"string","enum":["ALL"]},"simAmount":{"type":"string","pattern":"^\\d+$"}},"required":["type","simAmount"]}],"description":"Amount specification for the route. Use `{ type: 'EXACT', amount }` to spend a specific amount in the token's smallest unit, or `{ type: 'ALL', simAmount }` to spend the signer's entire balance with `simAmount` used for estimation. `ALL` is accepted on a route that begins with an aggregator swap, but the swap's input is pinned to the quoted amount derived from `simAmount`: a runtime balance below that pinned amount reverts, and a balance above it leaves the remainder as `unspentIn`, which may be most of the input and which `sweepTo` receives. `ALL` stays rejected for a native `fromToken`.","example":{"type":"EXACT","amount":"1000000"},"type":"object"},"signer":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"referrer":{"type":"string"},"slippageBps":{"default":100,"description":"End-to-end slippage tolerance: the floor is the simulated final output of the whole route, so a multi-hop route is not bounded hop by hop. When the route begins with an aggregator swap the same value is also the swap's own tolerance, which nests inside the end-to-end floor rather than compounding with it. Not applied when the selected route delivers its output asynchronously (`delivery.when: \"future\"` on the terminal output, reachable only with `allowAsyncRoutes: true`): the estimate is then the initiating transaction's estimate, not the delivered amount, so a floor on it would not be enforceable. Such a route reports `amount.minimum` only when its routing edge encodes one (`basis: \"op\"`).","type":"integer","minimum":0,"maximum":10000,"example":50},"maxPriceImpactBps":{"description":"Reject the route when its quoted price impact exceeds this many basis points. Omitted ⇒ the server's default of 500 bps applies; `0` disables the check.","type":"integer","minimum":0,"maximum":10000,"example":50},"checkOnChainAllowances":{"default":false,"type":"boolean"},"sweepTo":{"description":"Owner of every asset the route leaves behind; defaults to `signer` on a route with no aggregator swap. Bound as the named receiver instead of transferred afterwards whenever the output does not stay in the proxy - either the protocol mints to a named receiver (surfaced as `recipient: 'required'` by `GET /compose/zap-packs`), or the route is asynchronous and the output is delivered after settlement. Otherwise the planned flow carries it as `flow.epilogue.remainder`, and the response's `epilogue.remainder` echoes the resolved address. Required when the route includes an aggregator swap: such a route can leave an asset the caller did not plan for - the swap's unspent input - and this address receives it alongside the terminal output, so omitting it fails with a 400 `validation_error` naming `sweepTo`. Treat that 400 as \"add `sweepTo` and retry\", not as unroutable: a pair with no catalog edge that is reachable through a swap used to be a 404 `no_route_error` and is now planned. It must be an address or `{ $ref: 'context.sender' }` (which counts as explicit) - `{ $ref: 'context.executionAddress' }` is rejected for every kind of route.","example":"0xa1355a07f800ab1E4e9b319d549F05Af1cE1463b","anyOf":[{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},{"type":"object","properties":{"$ref":{"type":"string","enum":["context.sender"]}},"required":["$ref"],"additionalProperties":false}]},"simulationPolicy":{"default":"strict","type":"string","enum":["strict","allow-revert"]},"simulateUserProgram":{"default":false,"description":"When true, after the structured simulation succeeds, also simulate the final user-facing transaction through slot-finder. Reverts honour simulationPolicy. Default false.","example":false,"type":"boolean"},"allowAsyncRoutes":{"default":false,"description":"Accept a route whose output is delivered only after the initiating transaction settles (`delivery.when: \"future\"` on the terminal output). Such a route obliges the caller to track settlement rather than treat the transaction as completing the job, and carries no slippage floor, so it is opt-in. Default false: a pair reachable only asynchronously is rejected with `no_route_error`, and every terminal output carries `delivery.when: \"now\"`. It widens reach, it is not a preference: a synchronous route wins at any length, so a pair with both a one-hop asynchronous edge and a longer synchronous route is served synchronously. This flag constrains `delivery.when`, never the field's presence — `delivery` is present on every terminal output regardless.","example":false,"type":"boolean"}},"required":["fromToken","toToken","chainId","amount","signer"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["consumed"]},"consumedBy":{"type":"string","description":"The id of the flow node that spends this port."},"resource":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId"],"additionalProperties":false}]},"amount":{"type":"object","properties":{"estimate":{"description":"The amount this port is expected to carry. Absent when the compiler neither measured nor was quoted a value for the port.","type":"object","properties":{"basis":{"type":"string","enum":["simulated","quoted"],"description":"\"simulated\": measured by simulating the compiled program. \"quoted\": the prepared op's own quote, fetched before compilation."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false},"minimum":{"description":"The floor the transaction enforces on this port: it reverts below this value. Absent means no floor is known. There is no zero placeholder.","type":"object","properties":{"basis":{"type":"string","enum":["guard","op","input","declared"],"description":"\"guard\": a user-declared guard (e.g. slippage) emits an on-chain assertion at this floor. \"op\": the prepared op quoted this floor, or the routing edge encoded it into the call. \"input\": the floor is a flow input's bound amount or the floor its deposit asserts. \"declared\": the op declares its output deterministic and the estimate is echoed as the floor."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false}},"additionalProperties":false}},"required":["role","consumedBy","resource","amount"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["terminal"]},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"delivery":{"oneOf":[{"type":"object","properties":{"when":{"type":"string","enum":["now"]}},"required":["when"],"additionalProperties":false},{"type":"object","properties":{"when":{"type":"string","enum":["future"]},"etaSeconds":{"description":"Expected number of seconds before the deferred proceeds land. Present only when the protocol publishes an estimate; absence means no estimate is published, not an estimate of zero.","example":3600,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"provider":{"description":"Key of the external system that delivers the deferred proceeds. For `lifi.bridge` this is the LI.FI tool key, usable as the `bridge` parameter of LI.FI `/v1/status` together with the source transaction hash. Absent when the op does not name one.","example":"across","type":"string"},"trackingId":{"description":"The id the provider status endpoint takes. For `lifi-intents` this is the order id, the `onChainOrderId` of `GET https://order.li.fi/orders/status`. Absent when the provider does not know the id at compile time; for `lifi.bridge` the id is the source transaction hash.","example":"0x41f18ee79d82bf212d2a73ed61d6b5da6fc99fbfad1b6788980c9722e3350da3","type":"string"}},"required":["when"],"additionalProperties":false}],"description":"\"now\": delivered while the transaction lands, and a simulated estimate is the delivered amount. \"future\": delivered to `owner` only after the initiating transaction settles, so the caller must track settlement; the estimate is the initiating transaction's.","type":"object"},"resource":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId"],"additionalProperties":false}]},"amount":{"type":"object","properties":{"estimate":{"description":"The amount this port is expected to carry. Absent when the compiler neither measured nor was quoted a value for the port.","type":"object","properties":{"basis":{"type":"string","enum":["simulated","quoted"],"description":"\"simulated\": measured by simulating the compiled program. \"quoted\": the prepared op's own quote, fetched before compilation."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false},"minimum":{"description":"The floor the transaction enforces on this port: it reverts below this value. Absent means no floor is known. There is no zero placeholder.","type":"object","properties":{"basis":{"type":"string","enum":["guard","op","input","declared"],"description":"\"guard\": a user-declared guard (e.g. slippage) emits an on-chain assertion at this floor. \"op\": the prepared op quoted this floor, or the routing edge encoded it into the call. \"input\": the floor is a flow input's bound amount or the floor its deposit asserts. \"declared\": the op declares its output deterministic and the estimate is echoed as the floor."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false}},"additionalProperties":false}},"required":["role","owner","delivery","resource","amount"],"additionalProperties":false}],"type":"object"},"description":"Every linear resource output port of the flow, keyed `<nodeId>.<portName>`, including ports a later node spends, plus every resource input no node spends, keyed `input.<name>`. `role` is \"consumed\" (spent by `consumedBy`) or \"terminal\" (delivered to `owner`; filter on this to answer \"what do I receive\"). `amount.estimate` is the expected value, tagged \"simulated\" (measured) or \"quoted\" (the prepared op's quote). `amount.minimum` is the enforced floor, tagged \"guard\", \"op\", \"input\" or \"declared\"; \"guard\" only when a guard is strictly tighter than the op floor (\"op\" on a tie). A port behind pure ops carries the floor those ops pass on from upstream, tagged the same way; an unspent input carries its bound amount, tagged \"input\"; absent means no floor is known. A port declaring `omitIfZero` that simulated to zero is omitted."},"producedResources":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"availability":{"type":"string","enum":["now","future"]},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"simulated":{"type":"object","properties":{"amountOut":{"type":"string","pattern":"^\\d+$"},"amountOutMin":{"type":"string","pattern":"^\\d+$"}},"required":["amountOut"],"additionalProperties":false},"etaSeconds":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId","availability","owner"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"availability":{"type":"string","enum":["now","future"]},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"simulated":{"type":"object","properties":{"amountOut":{"type":"string","pattern":"^\\d+$"},"amountOutMin":{"type":"string","pattern":"^\\d+$"}},"required":["amountOut"],"additionalProperties":false},"etaSeconds":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId","availability","owner"],"additionalProperties":false}]},"deprecated":true,"description":"Deprecated: the pre-0.6.0 view of the terminal entries of `outputs`, served for composer-sdk 0.5.x clients. Read `outputs` instead. Removed once the server stops accepting 0.5.x clients."},"epilogue":{"type":"object","properties":{"forwards":{"readOnly":true,"description":"The flow's named forwards (`flow.epilogue.forwards`) in order, each with its simulated amount.","type":"array","items":{"type":"object","properties":{"resource":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId"],"additionalProperties":false}]},"to":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"type":"string","pattern":"^\\d+$","description":"The simulated balance the forward moved: the proxy's whole holding of `resource` after the graph ran."}},"required":["resource","to","amount"],"additionalProperties":false}},"remainder":{"description":"The resolved remainder destination (`flow.epilogue.remainder`, or the `run.sweepTo` sugar). Not measured: its only trace in `outputs` is a re-owned `owner` on the terminals it moved, which is indistinguishable from a terminal delivered to the same address by its node or by a named forward.","type":"string","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"}},"required":["forwards"],"additionalProperties":false,"description":"The flow's epilogue as executed: the post-graph forwards of proxy-held balances. Absent when the flow has no epilogue."},"producedHandles":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["uint256","uint128","uint64","uint32","uint16","uint8","address","bool","bytes32"]},"value":{"type":"string"},"units":{"type":"string","enum":["raw","wad","ray","bps","token-decimals"]}},"required":["type","value"],"additionalProperties":false}},"transactionRequest":{"description":"The main transaction executing the compiled program through the signer's own proxy; only that signer can send it. Absent when the compiled program is empty (e.g. a settle-only flow authored with funding: 'external') — nothing is executed on the signer's behalf and every required submission is an entry in `actions` (the escrow funding transfer is the `fundEscrow` action).","type":"object","properties":{"to":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"data":{"type":"string"},"value":{"type":"string"},"gasLimit":{"type":"string"}},"required":["to","chainId","data","value"],"additionalProperties":false},"userProxy":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"approvals":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"spender":{"type":"string"},"amount":{"type":"string"},"transactionRequest":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"to":{"type":"string"},"data":{"type":"string"},"value":{"type":"string","enum":["0"]}},"required":["chainId","to","data","value"],"additionalProperties":false}},"required":["token","spender","amount","transactionRequest"],"additionalProperties":false}},"actions":{"description":"The ordered to-do list: every transaction to submit and every payload to sign to realize this compose, in order (approvals, then the main execution, then per-node escrow funding transfers, then per-node typed data to sign), each tagged with who may perform it ('signer': only the flow's signer; 'anyone': credited by balance, any wallet). Narrow on `kind` before reading `transactionRequest`: a 'typedData' action is signed, never submitted. A `fundEscrow` or `signOrder` action names its settle node through `nodeId`, the key of `settlements`. This is the sole carrier of escrow-funding calldata and settlement typed data. The sibling `transactionRequest` and `approvals` fields remain projections of their respective entries. Present whenever at least one action is required, including a 206 partial response produced by the allow-revert simulation policy.","type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["transaction"]},"purpose":{"type":"string","enum":["approval","execute"]},"submitter":{"type":"string","enum":["signer","anyone"]},"transactionRequest":{"type":"object","properties":{"to":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"data":{"type":"string"},"value":{"type":"string"},"gasLimit":{"type":"string"}},"required":["to","chainId","data","value"],"additionalProperties":false}},"required":["kind","purpose","submitter","transactionRequest"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["transaction"]},"purpose":{"type":"string","enum":["fundEscrow"]},"submitter":{"type":"string","enum":["signer","anyone"]},"transactionRequest":{"type":"object","properties":{"to":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"data":{"type":"string"},"value":{"type":"string"},"gasLimit":{"type":"string"}},"required":["to","chainId","data","value"],"additionalProperties":false},"nodeId":{"type":"string"}},"required":["kind","purpose","submitter","transactionRequest","nodeId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["typedData"]},"purpose":{"type":"string","enum":["signOrder"]},"submitter":{"type":"string","enum":["signer"]},"nodeId":{"type":"string"},"typedData":{"type":"array","items":{}}},"required":["kind","purpose","submitter","nodeId","typedData"],"additionalProperties":false}],"type":"object"}},"priceImpact":{"type":"object","properties":{"inputValueUsd":{"type":"number"},"outputValueUsd":{"type":"number"},"impactBps":{"type":"number"},"unpricedInputs":{"readOnly":true,"type":"array","items":{"type":"string"}},"unpricedOutputs":{"readOnly":true,"type":"array","items":{"type":"string"}}},"required":["inputValueUsd","outputValueUsd","impactBps","unpricedInputs","unpricedOutputs"],"additionalProperties":false},"userProgramSimulation":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"returnData":{"type":"string"}},"required":["status","returnData"],"additionalProperties":false,"description":"Result of the optional user-program simulation, present only when the request opted in via run.simulateUserProgram and the simulation succeeded. The transactionRequest.gasLimit is unchanged whether or not this field is present (gas measurement is not currently exposed by slot-finder).","example":{"status":"ok","returnData":"0x"}},"settlements":{"description":"How each `continuation.settle` node settles, keyed by node id; the node's outputs are the `outputs` entries keyed `<nodeId>.outcomes.<i>`, one per entry of `config.outcomes`, whose `amount.minimum` is that outcome's committed floor (for a settle with one outcome, a caller below SDK 0.17, or one that sends no `x-lifi-composer-sdk` header, receives the deprecated key `<nodeId>.output` in place of `<nodeId>.outcomes.0`, and a caller whose `x-lifi-composer-sdk` header is not a version receives both keys with the same value). Absent when the flow has no settle node. `escrow` is present when the settlement provider registered an escrow: `chainId` + `address` identify the escrow, `token` + `amount` are the funding asset and the amount the escrow was sized from (the program moves the amount realised at execution, which can differ when an upstream op supplies the funding), `cap` is the most a fill may spend from the escrow (any balance above it stays there), `floor` is the least balance that arms a fill (a smaller one waits for expiry and is refunded), `owner` controls the escrow, `refund` receives the balance on expiry, and `expiresAtMs` is the effective expiry in epoch milliseconds: the settlement service's stored value, which can be earlier than the authored `validity.expiresAtMs`; `fill.validUntilMs` is never later than it, and a deposit after it is never filled and is refunded. A `fundEscrow` action with the same `nodeId` funds it; with an escrow and no such action, the main execution funds it, either by transfer or, when a `lifi.bridge` output funds the node, by bridging into it on the escrow's chain. `binding` is present only for an `exact` settle: the fill may run only `payload` (the call to `executionTarget` that grants `approvals` and then runs the leg's compiled `calldata`), and `payloadHash` is keccak256 of `payload`, the hash the escrow commits to. `continuation` is present when the provider hands the next leg back to the caller: re-submit `nextFlow` once `check` holds, before `validity.expiresAtMs`. An entry with none of these is `{}`. An entry carries nothing to submit or sign: that is in `actions`.","type":"object","additionalProperties":{"type":"object","properties":{"escrow":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"address":{"type":"string","format":"starts_with","pattern":"^0x.*"},"token":{"type":"string","format":"starts_with","pattern":"^0x.*"},"amount":{"type":"string"},"cap":{"type":"string"},"floor":{"type":"string"},"owner":{"type":"string","format":"starts_with","pattern":"^0x.*"},"refund":{"type":"string","format":"starts_with","pattern":"^0x.*"},"expiresAtMs":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["chainId","address","token","amount","cap","floor","owner","refund","expiresAtMs"],"additionalProperties":false},"binding":{"type":"object","properties":{"executionTarget":{"type":"string","format":"starts_with","pattern":"^0x.*"},"payload":{"type":"string","format":"starts_with","pattern":"^0x.*"},"payloadHash":{"type":"string","format":"starts_with","pattern":"^0x.*"},"calldata":{"type":"string","format":"starts_with","pattern":"^0x.*"},"approvals":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"token":{"type":"string","format":"starts_with","pattern":"^0x.*"},"spender":{"type":"string","format":"starts_with","pattern":"^0x.*"}},"required":["token","spender"],"additionalProperties":false}}},"required":["executionTarget","payload","payloadHash","calldata","approvals"],"additionalProperties":false}},"additionalProperties":false}},"fill":{"type":"object","properties":{"spends":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"input":{"type":"string","minLength":1},"token":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"amount":{"type":"string","pattern":"^\\d+$"},"nodeId":{"type":"string","minLength":1}},"required":["input","token","chainId","amount"],"additionalProperties":false}},"validUntilMs":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["spends"],"additionalProperties":false,"description":"The solver-extractable fill. `spends` is the amount the fill may spend of each funding input: the exact amount, or the pull cap of a non-exact deposit whose realised deposit is measured on-chain (NOT allowance-shaped, unlike `approvals`); a row's `nodeId` names the settle leg it funds; absent `validUntilMs` means no expiry."},"verificationByNode":{"description":"The C4 verification echo per committing flow node, present only when the compile committed a validation program. Keyed by the node that carried the commitment: the `continuation.settle` node on an authoring compile, the `continuation.commitment` node on a settlement re-submission.","type":"object","additionalProperties":{"type":"object","properties":{"validationProgramHash":{"type":"string","pattern":"^0x[0-9a-f]{64}$"},"paramsHash":{"type":"string","pattern":"^0x[0-9a-f]{64}$"},"assertedPredicate":{"readOnly":true,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20BalanceGte"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"owner":{"anyOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},{"type":"string","enum":["escrow","delivery"]}]},"minAmount":{"type":"string"}},"required":["kind","chainId","token","owner","minAmount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["nativeBalanceGte"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"owner":{"anyOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},{"type":"string","enum":["escrow","delivery"]}]},"minAmount":{"type":"string"}},"required":["kind","chainId","owner","minAmount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["call"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"to":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"signature":{"type":"string"},"args":{"readOnly":true,"type":"array","items":{"type":"string"}},"comparator":{"type":"string","enum":["gte","eq","lte"]},"threshold":{"type":"string"}},"required":["kind","chainId","to","signature","args","comparator","threshold"],"additionalProperties":false}],"type":"object"}}},"required":["validationProgramHash","paramsHash","assertedPredicate"],"additionalProperties":false}},"warnings":{"description":"Advisory findings in the order the compiler raised them. Absent when it raised none; never an empty array.","readOnly":true,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"}},"required":["kind","message"],"additionalProperties":false,"description":"An advisory finding the compiler raised without failing the compile. `kind` is an open set: tolerate unknown kinds. `path`, `port`, and `fix` locate and remedy the finding exactly as on a compile error."}}},"required":["outputs","producedHandles","userProxy"],"additionalProperties":false}},"required":["success","data"],"additionalProperties":false}}}},"206":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["preparation_error"]},"message":{"type":"string"},"path":{"type":"string"},"failedOps":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"callId":{"type":"string"},"op":{"type":"string"},"kind":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["callId","op","kind","message"],"additionalProperties":false}},"succeededOps":{"readOnly":true,"type":"array","items":{"type":"string"}}},"required":["kind","message","failedOps","succeededOps"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["simulation_revert"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"object","properties":{"code":{"type":"number"},"rawErrorBytes":{"type":"string"},"decodeResult":{"type":"object","properties":{"errorCandidates":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"decodedErrorSignature":{"type":"string"},"decodedParams":{"readOnly":true,"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["decodedErrorSignature","decodedParams"],"additionalProperties":false}},"error":{"type":"string"}},"additionalProperties":false}},"required":["code","rawErrorBytes"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["no_route_error"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"object","properties":{"maxHops":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"searchTruncated":{"type":"boolean"}},"required":["maxHops","searchTruncated"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["delivery_error"]},"message":{"type":"string"},"path":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false},"details":{"type":"object","properties":{"reason":{"type":"string","enum":["floor_drift","eta_exceeds_expiry","quote_failed"]},"cause":{"type":"string"},"quoted":{"type":"object","properties":{"min":{"type":"string"},"expected":{"type":"string"},"etaSeconds":{"type":"number"}},"required":["min","expected"],"additionalProperties":false},"escrow":{"type":"object","properties":{"chainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"address":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"floor":{"type":"string"},"expiresAtMs":{"type":"number"}},"required":["chainId","address","floor","expiresAtMs"],"additionalProperties":false}},"required":["reason","quoted"],"additionalProperties":false}},"required":["kind","message","details"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}]},"data":{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["consumed"]},"consumedBy":{"type":"string","description":"The id of the flow node that spends this port."},"resource":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId"],"additionalProperties":false}]},"amount":{"type":"object","properties":{"estimate":{"description":"The amount this port is expected to carry. Absent when the compiler neither measured nor was quoted a value for the port.","type":"object","properties":{"basis":{"type":"string","enum":["simulated","quoted"],"description":"\"simulated\": measured by simulating the compiled program. \"quoted\": the prepared op's own quote, fetched before compilation."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false},"minimum":{"description":"The floor the transaction enforces on this port: it reverts below this value. Absent means no floor is known. There is no zero placeholder.","type":"object","properties":{"basis":{"type":"string","enum":["guard","op","input","declared"],"description":"\"guard\": a user-declared guard (e.g. slippage) emits an on-chain assertion at this floor. \"op\": the prepared op quoted this floor, or the routing edge encoded it into the call. \"input\": the floor is a flow input's bound amount or the floor its deposit asserts. \"declared\": the op declares its output deterministic and the estimate is echoed as the floor."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false}},"additionalProperties":false}},"required":["role","consumedBy","resource","amount"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["terminal"]},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"delivery":{"oneOf":[{"type":"object","properties":{"when":{"type":"string","enum":["now"]}},"required":["when"],"additionalProperties":false},{"type":"object","properties":{"when":{"type":"string","enum":["future"]},"etaSeconds":{"description":"Expected number of seconds before the deferred proceeds land. Present only when the protocol publishes an estimate; absence means no estimate is published, not an estimate of zero.","example":3600,"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"provider":{"description":"Key of the external system that delivers the deferred proceeds. For `lifi.bridge` this is the LI.FI tool key, usable as the `bridge` parameter of LI.FI `/v1/status` together with the source transaction hash. Absent when the op does not name one.","example":"across","type":"string"},"trackingId":{"description":"The id the provider status endpoint takes. For `lifi-intents` this is the order id, the `onChainOrderId` of `GET https://order.li.fi/orders/status`. Absent when the provider does not know the id at compile time; for `lifi.bridge` the id is the source transaction hash.","example":"0x41f18ee79d82bf212d2a73ed61d6b5da6fc99fbfad1b6788980c9722e3350da3","type":"string"}},"required":["when"],"additionalProperties":false}],"description":"\"now\": delivered while the transaction lands, and a simulated estimate is the delivered amount. \"future\": delivered to `owner` only after the initiating transaction settles, so the caller must track settlement; the estimate is the initiating transaction's.","type":"object"},"resource":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId"],"additionalProperties":false}]},"amount":{"type":"object","properties":{"estimate":{"description":"The amount this port is expected to carry. Absent when the compiler neither measured nor was quoted a value for the port.","type":"object","properties":{"basis":{"type":"string","enum":["simulated","quoted"],"description":"\"simulated\": measured by simulating the compiled program. \"quoted\": the prepared op's own quote, fetched before compilation."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false},"minimum":{"description":"The floor the transaction enforces on this port: it reverts below this value. Absent means no floor is known. There is no zero placeholder.","type":"object","properties":{"basis":{"type":"string","enum":["guard","op","input","declared"],"description":"\"guard\": a user-declared guard (e.g. slippage) emits an on-chain assertion at this floor. \"op\": the prepared op quoted this floor, or the routing edge encoded it into the call. \"input\": the floor is a flow input's bound amount or the floor its deposit asserts. \"declared\": the op declares its output deterministic and the estimate is echoed as the floor."},"value":{"type":"string","pattern":"^\\d+$"}},"required":["basis","value"],"additionalProperties":false}},"additionalProperties":false}},"required":["role","owner","delivery","resource","amount"],"additionalProperties":false}],"type":"object"},"description":"Every linear resource output port of the flow, keyed `<nodeId>.<portName>`, including ports a later node spends, plus every resource input no node spends, keyed `input.<name>`. `role` is \"consumed\" (spent by `consumedBy`) or \"terminal\" (delivered to `owner`; filter on this to answer \"what do I receive\"). `amount.estimate` is the expected value, tagged \"simulated\" (measured) or \"quoted\" (the prepared op's quote). `amount.minimum` is the enforced floor, tagged \"guard\", \"op\", \"input\" or \"declared\"; \"guard\" only when a guard is strictly tighter than the op floor (\"op\" on a tie). A port behind pure ops carries the floor those ops pass on from upstream, tagged the same way; an unspent input carries its bound amount, tagged \"input\"; absent means no floor is known. A port declaring `omitIfZero` that simulated to zero is omitted."},"producedResources":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"availability":{"type":"string","enum":["now","future"]},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"simulated":{"type":"object","properties":{"amountOut":{"type":"string","pattern":"^\\d+$"},"amountOutMin":{"type":"string","pattern":"^\\d+$"}},"required":["amountOut"],"additionalProperties":false},"etaSeconds":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","token","chainId","availability","owner"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"availability":{"type":"string","enum":["now","future"]},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"simulated":{"type":"object","properties":{"amountOut":{"type":"string","pattern":"^\\d+$"},"amountOutMin":{"type":"string","pattern":"^\\d+$"}},"required":["amountOut"],"additionalProperties":false},"etaSeconds":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["kind","chainId","availability","owner"],"additionalProperties":false}]},"deprecated":true,"description":"Deprecated: the pre-0.6.0 view of the terminal entries of `outputs`, served for composer-sdk 0.5.x clients. Read `outputs` instead. Removed once the server stops accepting 0.5.x clients."},"producedHandles":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["uint256","uint128","uint64","uint32","uint16","uint8","address","bool","bytes32"]},"value":{"type":"string"},"units":{"type":"string","enum":["raw","wad","ray","bps","token-decimals"]}},"required":["type","value"],"additionalProperties":false}},"transactionRequest":{"type":"object","properties":{"to":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"data":{"type":"string"},"value":{"type":"string"},"gasLimit":{"type":"string"}},"required":["to","chainId","data","value"],"additionalProperties":false},"userProxy":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"simulationRevert":{"type":"object","properties":{"code":{"type":"number"},"rawErrorBytes":{"type":"string"},"decodeResult":{"type":"object","properties":{"errorCandidates":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"decodedErrorSignature":{"type":"string"},"decodedParams":{"readOnly":true,"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["decodedErrorSignature","decodedParams"],"additionalProperties":false}},"error":{"type":"string"}},"additionalProperties":false}},"required":["code","rawErrorBytes"],"additionalProperties":false},"approvals":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"spender":{"type":"string"},"amount":{"type":"string"},"transactionRequest":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"to":{"type":"string"},"data":{"type":"string"},"value":{"type":"string","enum":["0"]}},"required":["chainId","to","data","value"],"additionalProperties":false}},"required":["token","spender","amount","transactionRequest"],"additionalProperties":false}},"actions":{"description":"The ordered to-do list: every transaction to submit and every payload to sign to realize this compose, in order (approvals, then the main execution, then per-node escrow funding transfers, then per-node typed data to sign), each tagged with who may perform it ('signer': only the flow's signer; 'anyone': credited by balance, any wallet). Narrow on `kind` before reading `transactionRequest`: a 'typedData' action is signed, never submitted. A `fundEscrow` or `signOrder` action names its settle node through `nodeId`, the key of `settlements`. This is the sole carrier of escrow-funding calldata and settlement typed data. The sibling `transactionRequest` and `approvals` fields remain projections of their respective entries. Present whenever at least one action is required, including a 206 partial response produced by the allow-revert simulation policy.","type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["transaction"]},"purpose":{"type":"string","enum":["approval","execute"]},"submitter":{"type":"string","enum":["signer","anyone"]},"transactionRequest":{"type":"object","properties":{"to":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"data":{"type":"string"},"value":{"type":"string"},"gasLimit":{"type":"string"}},"required":["to","chainId","data","value"],"additionalProperties":false}},"required":["kind","purpose","submitter","transactionRequest"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["transaction"]},"purpose":{"type":"string","enum":["fundEscrow"]},"submitter":{"type":"string","enum":["signer","anyone"]},"transactionRequest":{"type":"object","properties":{"to":{"type":"string"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"data":{"type":"string"},"value":{"type":"string"},"gasLimit":{"type":"string"}},"required":["to","chainId","data","value"],"additionalProperties":false},"nodeId":{"type":"string"}},"required":["kind","purpose","submitter","transactionRequest","nodeId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["typedData"]},"purpose":{"type":"string","enum":["signOrder"]},"submitter":{"type":"string","enum":["signer"]},"nodeId":{"type":"string"},"typedData":{"type":"array","items":{}}},"required":["kind","purpose","submitter","nodeId","typedData"],"additionalProperties":false}],"type":"object"}},"userProgramSimulation":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"returnData":{"type":"string"}},"required":["status","returnData"],"additionalProperties":false,"description":"Result of the optional user-program simulation, present only when the request opted in via run.simulateUserProgram and the simulation succeeded. The transactionRequest.gasLimit is unchanged whether or not this field is present (gas measurement is not currently exposed by slot-finder).","example":{"status":"ok","returnData":"0x"}},"settlements":{"description":"How each `continuation.settle` node settles, keyed by node id; the node's outputs are the `outputs` entries keyed `<nodeId>.outcomes.<i>`, one per entry of `config.outcomes`, whose `amount.minimum` is that outcome's committed floor (for a settle with one outcome, a caller below SDK 0.17, or one that sends no `x-lifi-composer-sdk` header, receives the deprecated key `<nodeId>.output` in place of `<nodeId>.outcomes.0`, and a caller whose `x-lifi-composer-sdk` header is not a version receives both keys with the same value). Absent when the flow has no settle node. `escrow` is present when the settlement provider registered an escrow: `chainId` + `address` identify the escrow, `token` + `amount` are the funding asset and the amount the escrow was sized from (the program moves the amount realised at execution, which can differ when an upstream op supplies the funding), `cap` is the most a fill may spend from the escrow (any balance above it stays there), `floor` is the least balance that arms a fill (a smaller one waits for expiry and is refunded), `owner` controls the escrow, `refund` receives the balance on expiry, and `expiresAtMs` is the effective expiry in epoch milliseconds: the settlement service's stored value, which can be earlier than the authored `validity.expiresAtMs`; `fill.validUntilMs` is never later than it, and a deposit after it is never filled and is refunded. A `fundEscrow` action with the same `nodeId` funds it; with an escrow and no such action, the main execution funds it, either by transfer or, when a `lifi.bridge` output funds the node, by bridging into it on the escrow's chain. `binding` is present only for an `exact` settle: the fill may run only `payload` (the call to `executionTarget` that grants `approvals` and then runs the leg's compiled `calldata`), and `payloadHash` is keccak256 of `payload`, the hash the escrow commits to. `continuation` is present when the provider hands the next leg back to the caller: re-submit `nextFlow` once `check` holds, before `validity.expiresAtMs`. An entry with none of these is `{}`. An entry carries nothing to submit or sign: that is in `actions`.","type":"object","additionalProperties":{"type":"object","properties":{"escrow":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"address":{"type":"string","format":"starts_with","pattern":"^0x.*"},"token":{"type":"string","format":"starts_with","pattern":"^0x.*"},"amount":{"type":"string"},"cap":{"type":"string"},"floor":{"type":"string"},"owner":{"type":"string","format":"starts_with","pattern":"^0x.*"},"refund":{"type":"string","format":"starts_with","pattern":"^0x.*"},"expiresAtMs":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["chainId","address","token","amount","cap","floor","owner","refund","expiresAtMs"],"additionalProperties":false},"binding":{"type":"object","properties":{"executionTarget":{"type":"string","format":"starts_with","pattern":"^0x.*"},"payload":{"type":"string","format":"starts_with","pattern":"^0x.*"},"payloadHash":{"type":"string","format":"starts_with","pattern":"^0x.*"},"calldata":{"type":"string","format":"starts_with","pattern":"^0x.*"},"approvals":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"token":{"type":"string","format":"starts_with","pattern":"^0x.*"},"spender":{"type":"string","format":"starts_with","pattern":"^0x.*"}},"required":["token","spender"],"additionalProperties":false}}},"required":["executionTarget","payload","payloadHash","calldata","approvals"],"additionalProperties":false}},"additionalProperties":false}},"warnings":{"description":"Advisory findings in the order the compiler raised them. Absent when it raised none; never an empty array.","readOnly":true,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"}},"required":["kind","message"],"additionalProperties":false,"description":"An advisory finding the compiler raised without failing the compile. `kind` is an open set: tolerate unknown kinds. `path`, `port`, and `fix` locate and remedy the finding exactly as on a compile error."}}},"required":["outputs","producedHandles","transactionRequest","userProxy","simulationRevert"],"additionalProperties":false}},"required":["success","error","data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"kind":{"type":"string","enum":["decode_error","validation_error","linearity_error","empty_program","continuation_error","chain_validation_error","sdk_outdated","server_outdated"]},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}},"required":["success","error"],"additionalProperties":false}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"type":{"type":"string","enum":["INSUFFICIENT_CREDITS"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["success","error"],"additionalProperties":false,"description":"The integration is billed per call and its prepaid credit balance cannot cover this call. Top up with `POST /credits/topup`. This is a plain JSON error, not an x402 challenge: do not pay it."}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["no_route_error"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"object","properties":{"maxHops":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"searchTruncated":{"type":"boolean"}},"required":["maxHops","searchTruncated"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["no_route_error"]},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}]}},"required":["success","error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["preparation_error"]},"message":{"type":"string"},"path":{"type":"string"},"failedOps":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"callId":{"type":"string"},"op":{"type":"string"},"kind":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["callId","op","kind","message"],"additionalProperties":false}},"succeededOps":{"readOnly":true,"type":"array","items":{"type":"string"}}},"required":["kind","message","failedOps","succeededOps"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["simulation_revert"]},"message":{"type":"string"},"path":{"type":"string"},"details":{"type":"object","properties":{"code":{"type":"number"},"rawErrorBytes":{"type":"string"},"decodeResult":{"type":"object","properties":{"errorCandidates":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"decodedErrorSignature":{"type":"string"},"decodedParams":{"readOnly":true,"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["decodedErrorSignature","decodedParams"],"additionalProperties":false}},"error":{"type":"string"}},"additionalProperties":false}},"required":["code","rawErrorBytes"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["delivery_error"]},"message":{"type":"string"},"path":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false},"details":{"type":"object","properties":{"reason":{"type":"string","enum":["floor_drift","eta_exceeds_expiry","quote_failed"]},"cause":{"type":"string"},"quoted":{"type":"object","properties":{"min":{"type":"string"},"expected":{"type":"string"},"etaSeconds":{"type":"number"}},"required":["min","expected"],"additionalProperties":false},"escrow":{"type":"object","properties":{"chainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"address":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"floor":{"type":"string"},"expiresAtMs":{"type":"number"}},"required":["chainId","address","floor","expiresAtMs"],"additionalProperties":false}},"required":["reason","quoted"],"additionalProperties":false}},"required":["kind","message","details"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["preparation_error","provider_error","resolution_rejected","simulation_setup_error","simulation_insufficient_funds","simulation_gas_limit","simulation_revert","subgraph_simulation_revert","guard_error","price_impact_exceeded","flashloan_unauthorized","delivery_error","unsupported_token","signer_screening_rejected","zero_output"]},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}]}},"required":["success","error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"kind":{"type":"string","enum":["resolve_error","lowering_error","simulation_error","compilation_error","verification_error","manifest_error"]},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}},"required":["success","error"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"kind":{"type":"string","enum":["simulation_rpc_error"]},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}},"required":["success","error"],"additionalProperties":false}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"kind":{"type":"string","enum":["resolution_error","deadline_exceeded","service_unavailable","verification_unavailable","deployment_check_unavailable"]},"message":{"type":"string"},"path":{"type":"string"},"port":{"type":"string"},"fix":{"type":"string"},"shortfall":{"type":"object","properties":{"required":{"type":"string"},"available":{"type":"string"}},"required":["required","available"],"additionalProperties":false}},"required":["kind","message"],"additionalProperties":{}}},"required":["success","error"],"additionalProperties":false}}}}}}},"/supported-tokens":{"get":{"summary":"Get Supported Tokens","tags":["Tokens"],"description":"Returns a list of all tokens supported by the zap router. This endpoint aggregates tokens from all configured routing providers and returns them as an array of token objects containing address, chainId, and the routing sources that reach them.\n\nA token that could be priced also carries `decimals`, `priceUSD`, and `priceSource`; all three are absent together when no price was available.\n\nBy default, only tokens on enabled chains (those with deployed VM contracts) are returned. Use the `allowDisabledChains` query parameter to include tokens from disabled chains as well.","parameters":[{"schema":{"description":"Include tokens from disabled chains. When false (default), only tokens on enabled chains are returned.","example":"false","type":"string"},"in":"query","name":"allowDisabledChains","description":"Include tokens from disabled chains. When false (default), only tokens on enabled chains are returned."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"sources":{"type":"array","items":{"type":"string"}},"decimals":{"description":"Number of decimals of the token. Absent when the token could not be priced.","example":6,"type":"integer","minimum":0,"maximum":77},"priceUSD":{"description":"Price of one whole token in USD. Absent when the token could not be priced.","example":0.9998,"type":"number"},"priceSource":{"description":"Where the price came from: 'lifi' for LI.FI's token feed, 'composer' for a price the composer derived itself (vault share tokens). Absent when the token could not be priced.","example":"lifi","type":"string","enum":["lifi","composer"]}},"required":["address","chainId","sources"],"additionalProperties":false}}},"required":["success","data"],"additionalProperties":false,"description":"Success - An array of supported tokens with their addresses, chain IDs, and price when one could be resolved","example":{"success":true,"data":[{"address":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","chainId":1,"sources":["aave","morpho"],"decimals":6,"priceUSD":0.9998,"priceSource":"lifi"},{"address":"0x0000000000000000000000000000000000000000","chainId":1,"sources":["weth"],"decimals":18,"priceUSD":2752.8,"priceSource":"lifi"},{"address":"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599","chainId":1,"sources":["morpho"]}]}}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false}},"required":["success","error"],"additionalProperties":false,"description":"Service unavailable - compose routing is not initialised yet, so no token set can be derived","example":{"success":false,"error":{"type":"SERVICE_UNAVAILABLE","message":"Compose routing not initialized","retryAfter":10}}}}}}}}},"/intent-factory/status":{"get":{"summary":"Get Settlement Status","tags":["Compose"],"description":"Returns the settlement state of a continuation bundle, keyed by the escrow address and chain the compose response discloses. `status` is intent-factory's own lifecycle state, forwarded verbatim — this endpoint applies no mapping, buckets nothing, and estimates nothing. `expiresAt` is the instant after which the bundle stops executing and becomes refundable. Each transaction hash is null until the corresponding step happens, and `destinationTxHash` stays null for a same-chain bundle. Poll this endpoint rather than intent-factory directly; a `503` is transient and should be retried.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Chain the settlement escrow lives on.","example":1},"in":"query","name":"chainId","required":true,"description":"Chain the settlement escrow lives on."},{"schema":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"in":"query","name":"address","required":true,"description":"Ethereum address (0x-prefixed, 40 hex characters)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Chain the settlement escrow lives on.","example":1},"address":{"type":"string","description":"The settlement escrow address, echoed from intent-factory's own record rather than from the request and returned in EIP-55 checksum form. Lookup is case-insensitive.","example":"0x742D35Cc6634C0532925a3B844bC9e7595F7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"status":{"type":"string","enum":["AWAITING_FUNDS","READY","EXECUTING","COMPLETED","FAILED_RETRYABLE","FAILED_FINAL","EXPIRED","SIMULATION_FAILURE","AWAITING_REFUND","REFUNDED","REFUND_FAILED","SETTLING","SETTLEMENT_FAILED"],"description":"The bundle's settlement lifecycle state, forwarded verbatim from intent-factory. No mapping or normalisation is applied. `AWAITING_FUNDS → READY → EXECUTING → SETTLING → COMPLETED` is the happy path; `FAILED_RETRYABLE`, `FAILED_FINAL`, `SIMULATION_FAILURE` and `SETTLEMENT_FAILED` are failure branches; `EXPIRED → AWAITING_REFUND → REFUNDED | REFUND_FAILED` is the refund branch.","example":"EXECUTING"},"expiresAt":{"type":"string","description":"ISO-8601 instant after which the bundle can no longer execute and becomes refundable. Forwarded verbatim.","example":"2026-01-01T00:00:00.000Z"},"depositTxHash":{"nullable":true,"description":"The user's inbound funding transaction into the escrow, captured best-effort. Null until observed, and null for a native deposit or when the detector could not resolve it.","type":"string"},"sourceExecuteTxHash":{"nullable":true,"description":"The escrow's outbound execution transaction on the source chain. Null until the bundle executes.","type":"string"},"destinationTxHash":{"nullable":true,"description":"The destination-chain delivery transaction. Null until delivery, and null for a same-chain bundle that never bridges.","type":"string"},"refundTxHash":{"nullable":true,"description":"The on-chain proof of a refund. Null for every bundle that has not been refunded.","type":"string"}},"required":["chainId","address","status","expiresAt","depositTxHash","sourceExecuteTxHash","destinationTxHash","refundTxHash"],"additionalProperties":false}},"required":["success","data"],"additionalProperties":false,"description":"Success - The bundle settlement state"}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["BUNDLE_NOT_FOUND"],"description":"Type of error that occurred"},"message":{"type":"string","description":"Human-readable error message"}},"required":["type","message"],"additionalProperties":false}],"type":"object"}},"required":["success","error"],"additionalProperties":false,"description":"The chain and address do not form a valid bundle key"}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["BUNDLE_NOT_FOUND"],"description":"Type of error that occurred"},"message":{"type":"string","description":"Human-readable error message"}},"required":["type","message"],"additionalProperties":false}],"type":"object"}},"required":["success","error"],"additionalProperties":false,"description":"No bundle is registered for this chain and address"}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false}},"required":["success","error"],"additionalProperties":false,"description":"Settlement status could not be read"}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false}},"required":["success","error"],"additionalProperties":false,"description":"Settlement status is unavailable; retry after `Retry-After` seconds"}}}}}}},"/simulate":{"post":{"summary":"Simulate a raw transaction (balance deltas + gas)","tags":["Simulation"],"description":"Simulates a raw transaction at `from` by injecting the VM bytecode there (so the inner call carries `msg.sender == from`), funds `from` via `requirements`, and reports each watched balance before/after, the signed deltas, and the inner-call gas — in a single eth_call. `gasUsed` is the inner call execution gas only (excludes the 21000 base tx cost and calldata gas). Because contract code is injected at `from`, calldata that requires the caller to be an EOA (e.g. `extcodesize(msg.sender) == 0` or `msg.sender == tx.origin`) is not faithfully supported.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Positive integer identifying a chain","example":8453},"from":{"type":"string","description":"Sender of the simulated transaction. The VM bytecode is injected here so the inner call carries `msg.sender == from`.","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"to":{"type":"string","description":"Target contract of the raw transaction.","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"data":{"description":"Pre-encoded transaction calldata (0x-prefixed hex).","example":"0xa9059cbb0000000000000000000000002222222222222222222222222222222222222222000000000000000000000000000000000000000000000000000000003b9aca00","type":"string"},"value":{"default":"0","description":"Native value (wei) sent with the inner call.","type":"string","pattern":"^\\d+$"},"block":{"description":"Block number to simulate against. Omitted ⇒ the simulation runs at the chain head. When set, the simulation is pinned to this block and it is always echoed back as `block`/`timestamp`. Without it, `block`/`timestamp` report the chain head the simulation ran against unless `reportBlockContext` is false. Named tags (e.g. \"latest\") are not accepted.","example":21000000,"type":"integer","minimum":0,"maximum":9007199254740991},"reportBlockContext":{"default":true,"description":"Report the `block`/`timestamp` the simulation ran against. With `block` omitted, resolving them costs one extra `eth_getBlockByNumber` per request; set false to skip it, and the response then omits `block`/`timestamp`. Ignored when `block` is set: a pinned block is always reported.","type":"boolean"},"requirements":{"default":[],"description":"Funding instructions applied before simulation (balances, ERC-20 allowances, Permit2 allowances). Fund `from` here (max 40).","maxItems":40,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["Erc20Balance"]},"wallet":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"token":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"balance":{"type":"string","pattern":"^\\d+$"}},"required":["type","wallet","token","balance"]},{"type":"object","properties":{"type":{"type":"string","enum":["NativeBalance"]},"wallet":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"balance":{"type":"string","pattern":"^\\d+$"}},"required":["type","wallet","balance"]},{"type":"object","properties":{"type":{"type":"string","enum":["Erc20Allowance"]},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"spender":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"token":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"allowance":{"type":"string","pattern":"^\\d+$"}},"required":["type","owner","spender","token","allowance"]},{"type":"object","properties":{"type":{"type":"string","enum":["Permit2Allowance"]},"owner":{"type":"string","description":"Address whose tokens Permit2 pulls.","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"token":{"type":"string","description":"ERC-20 token Permit2 pulls.","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"spender":{"type":"string","description":"Address that calls `Permit2.transferFrom`.","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"type":"string","pattern":"^\\d+$","description":"Permit2 allowance amount, in the token base units."}},"required":["type","owner","token","spender","amount"],"description":"Seeds a Uniswap Permit2 `AllowanceTransfer` allowance: Permit2 `allowance[owner][token][spender]` (no expiry, live nonce kept) and the ERC-20 allowance `owner` → Permit2. It does not fund the owner balance; add an `Erc20Balance` for that. Only the canonical Permit2 address `0x000000000022D473030F116dDEE9F6B43aC78BA3` is supported."}],"type":"object"}},"trackedBalances":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"token":{"type":"string","description":"Token to watch (use the zero address for native balance).","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"owner":{"type":"string","description":"Account whose balance of `token` is watched.","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"}},"required":["token","owner"]},"description":"Balances to read before and after the transaction (1–40 pairs)."}},"required":["chainId","from","to","data","trackedBalances"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"block":{"description":"Block number the simulation executed against. Omitted when the request set `reportBlockContext: false` without a `block`.","example":21000000,"type":"integer","minimum":0,"maximum":9007199254740991},"timestamp":{"description":"Unix timestamp (seconds) of the simulation block. Omitted when `block` is.","example":1733400000,"type":"integer","minimum":0,"maximum":9007199254740991},"balancesBefore":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"type":"string","description":"Amount as a decimal string. For `deltas` this is signed (`after - before`).","example":"1000000000"}},"required":["token","owner","amount"],"additionalProperties":false}},"balancesAfter":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"type":"string","description":"Amount as a decimal string. For `deltas` this is signed (`after - before`).","example":"1000000000"}},"required":["token","owner","amount"],"additionalProperties":false}},"deltas":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"owner":{"type":"string","description":"Ethereum address (0x-prefixed, 40 hex characters)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f7B8d0","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"type":"string","description":"Amount as a decimal string. For `deltas` this is signed (`after - before`).","example":"1000000000"}},"required":["token","owner","amount"],"additionalProperties":false}},"gasUsed":{"type":"string","description":"Execution gas of the inner call only (excludes the 21000 base tx cost and calldata gas).","example":"38000"}},"required":["status","balancesBefore","balancesAfter","deltas","gasUsed"],"additionalProperties":false,"ref":"SimulateOk","description":"Simulation succeeded; balances are ordered to match the request `trackedBalances`."},{"type":"object","properties":{"status":{"type":"string","enum":["revert"]},"block":{"description":"Block number the simulation executed against. Omitted when the request set `reportBlockContext: false` without a `block`.","example":21000000,"type":"integer","minimum":0,"maximum":9007199254740991},"timestamp":{"description":"Unix timestamp (seconds) of the simulation block. Omitted when `block` is.","example":1733400000,"type":"integer","minimum":0,"maximum":9007199254740991},"revertReason":{"description":"Human-readable revert reason if available.","example":"ERC20: transfer amount exceeds balance","type":"string"},"code":{"description":"EVM error code (3 = execution reverted).","example":3,"type":"number"},"rawErrorBytes":{"description":"Raw revert data from the EVM.","type":"string"},"decodeResult":{"description":"Decoded error information (if available).","type":"object","properties":{"errorCandidates":{"type":"array","items":{"type":"object","properties":{"decodedErrorSignature":{"type":"string"},"decodedParams":{"type":"array","items":{"type":"string"}},"description":{"description":"Human-readable description of the error; present when the selector is in the backend's error registry.","type":"string"}},"required":["decodedErrorSignature","decodedParams"],"additionalProperties":false}},"error":{"type":"string"}},"additionalProperties":false}},"required":["status"],"additionalProperties":false,"ref":"SimulateRevert","description":"The transaction would revert on-chain."}],"description":"The simulation ran. `status: \"ok\"` with balances/gas, or `status: \"revert\"` when the transaction reverted on-chain.","type":"object"}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"type":{"type":"string","enum":["INSUFFICIENT_CREDITS"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"required":["success","error"],"additionalProperties":false,"description":"The integration is billed per call and its prepaid credit balance cannot cover this call. Top up with `POST /credits/topup`. This is a plain JSON error, not an x402 challenge: do not pay it."}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}},"required":["status","message"],"additionalProperties":false,"ref":"SimulateSetupError","description":"The request was well-formed but zap-backend could not set up the simulation (compiler, VM bytecode, funding, or block context) — a zap-backend-side failure."}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}},"required":["status","message"],"additionalProperties":false,"ref":"SimulateUpstreamError","description":"zap-backend is healthy but its upstream (slot-finder / the RPC node) could not execute the call: transport failure, timeout, or a node-level error such as rate limiting. Safe to retry."}}}}}}},"/credits":{"get":{"summary":"Credit balance and prices","tags":["Credits"],"description":"The caller's prepaid credit balance and the price of one successful call per billable endpoint, in micro-dollars (1 USD = 1000000 micros). Only integrations billed per call have credits.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"integrationId":{"type":"string"},"balanceMicros":{"type":"string","pattern":"^\\d+$","description":"An amount in micro-dollars (1 USD = 1,000,000), as a decimal string."},"pricesMicros":{"type":"object","additionalProperties":{"type":"string","pattern":"^\\d+$","description":"An amount in micro-dollars (1 USD = 1,000,000), as a decimal string."},"required":["compose","compose_route","compose_sweep","simulate"],"description":"The price of one successful call per billable endpoint."}},"required":["integrationId","balanceMicros","pricesMicros"],"additionalProperties":false}},"required":["success","data"],"additionalProperties":false,"description":"The caller’s credit balance and the price table."}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["CREDITS_NOT_ENABLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_NOT_SETTLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_REQUIRED"]},"message":{"type":"string"},"details":{"description":"The decoded x402 `PAYMENT-REQUIRED` challenge."}},"required":["type","message","details"],"additionalProperties":false}],"type":"object"}},"required":["success","error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["CREDITS_NOT_ENABLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_NOT_SETTLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_REQUIRED"]},"message":{"type":"string"},"details":{"description":"The decoded x402 `PAYMENT-REQUIRED` challenge."}},"required":["type","message","details"],"additionalProperties":false}],"type":"object"}},"required":["success","error"],"additionalProperties":false}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["CREDITS_NOT_ENABLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_NOT_SETTLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_REQUIRED"]},"message":{"type":"string"},"details":{"description":"The decoded x402 `PAYMENT-REQUIRED` challenge."}},"required":["type","message","details"],"additionalProperties":false}],"type":"object"}},"required":["success","error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["CREDITS_NOT_ENABLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_NOT_SETTLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_REQUIRED"]},"message":{"type":"string"},"details":{"description":"The decoded x402 `PAYMENT-REQUIRED` challenge."}},"required":["type","message","details"],"additionalProperties":false}],"type":"object"}},"required":["success","error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["CREDITS_NOT_ENABLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_NOT_SETTLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_REQUIRED"]},"message":{"type":"string"},"details":{"description":"The decoded x402 `PAYMENT-REQUIRED` challenge."}},"required":["type","message","details"],"additionalProperties":false}],"type":"object"}},"required":["success","error"],"additionalProperties":false}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["CREDITS_NOT_ENABLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_NOT_SETTLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_REQUIRED"]},"message":{"type":"string"},"details":{"description":"The decoded x402 `PAYMENT-REQUIRED` challenge."}},"required":["type","message","details"],"additionalProperties":false}],"type":"object"}},"required":["success","error"],"additionalProperties":false}}}}}}},"/credits/topup":{"post":{"summary":"Buy credits with x402 (USDC on Base)","tags":["Credits"],"description":"An x402 v2 payable resource. Without a `PAYMENT-SIGNATURE` header it answers 402 with a `PAYMENT-REQUIRED` header asking for `amountUsd` USDC on Base mainnet (`eip155:8453`); retry with the signed payment to settle it and credit the balance. A settlement whose transaction reverted answers 402 `PAYMENT_NOT_SETTLED` with no challenge: check GET /credits before paying again. The reply carries the settlement in `PAYMENT-RESPONSE`. Each successful call to POST /compose, /compose/route, /compose/sweep or /simulate then costs its listed price; calls that fail with 400 or more, and compile calls answering 206 (an allow-revert simulated revert), cost nothing.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amountUsd":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Whole US dollars of credit to buy, paid in USDC on Base. The accepted range is set by the server and named in the 400 when the amount is outside it.","example":10}},"required":["amountUsd"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"integrationId":{"type":"string"},"creditedMicros":{"type":"string","pattern":"^\\d+$","description":"Credit added by this payment; \"0\" when the settlement was already credited."},"balanceMicros":{"type":"string","pattern":"^\\d+$","description":"An amount in micro-dollars (1 USD = 1,000,000), as a decimal string."},"transaction":{"type":"string","description":"The settlement transaction hash."},"network":{"type":"string","description":"CAIP-2 network of the settlement."}},"required":["integrationId","creditedMicros","balanceMicros","transaction","network"],"additionalProperties":false}},"required":["success","data"],"additionalProperties":false,"description":"The payment settled and the balance was credited."}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["CREDITS_NOT_ENABLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_NOT_SETTLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_REQUIRED"]},"message":{"type":"string"},"details":{"description":"The decoded x402 `PAYMENT-REQUIRED` challenge."}},"required":["type","message","details"],"additionalProperties":false}],"type":"object"}},"required":["success","error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["CREDITS_NOT_ENABLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_NOT_SETTLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_REQUIRED"]},"message":{"type":"string"},"details":{"description":"The decoded x402 `PAYMENT-REQUIRED` challenge."}},"required":["type","message","details"],"additionalProperties":false}],"type":"object"}},"required":["success","error"],"additionalProperties":false}}}},"402":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["CREDITS_NOT_ENABLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_NOT_SETTLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_REQUIRED"]},"message":{"type":"string"},"details":{"description":"The decoded x402 `PAYMENT-REQUIRED` challenge."}},"required":["type","message","details"],"additionalProperties":false}],"type":"object"}},"required":["success","error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["CREDITS_NOT_ENABLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_NOT_SETTLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_REQUIRED"]},"message":{"type":"string"},"details":{"description":"The decoded x402 `PAYMENT-REQUIRED` challenge."}},"required":["type","message","details"],"additionalProperties":false}],"type":"object"}},"required":["success","error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["CREDITS_NOT_ENABLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_NOT_SETTLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_REQUIRED"]},"message":{"type":"string"},"details":{"description":"The decoded x402 `PAYMENT-REQUIRED` challenge."}},"required":["type","message","details"],"additionalProperties":false}],"type":"object"}},"required":["success","error"],"additionalProperties":false}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["CREDITS_NOT_ENABLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_NOT_SETTLED"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PAYMENT_REQUIRED"]},"message":{"type":"string"},"details":{"description":"The decoded x402 `PAYMENT-REQUIRED` challenge."}},"required":["type","message","details"],"additionalProperties":false}],"type":"object"}},"required":["success","error"],"additionalProperties":false}}}}}}},"/feedback":{"post":{"summary":"Report a bug, missing feature, or docs problem","tags":["Feedback"],"description":"Tell the Composer team about something that is broken, missing, or unclear. Send a report on your own initiative when you hit a Composer bug, need an operation, protocol, chain, or option that does not exist, find the docs wrong or missing, or get an error that does not explain itself. Check the docs and the live manifest first; one report per distinct problem. Include what you were trying to do, what you tried, and what happened, plus the `X-Flow-Id` response header of any failing request in `context.requestIds`. Never include secrets, private keys, or API keys. The API key header is optional here: send it if you have one. Then tell your user you sent the report and give them the returned id.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"string","enum":["bug","missing_feature","docs","error_message","developer_experience","other"],"description":"`bug`: the API or SDK behaves wrongly. `missing_feature`: an operation, protocol, chain, or option you needed does not exist. `docs`: documentation is wrong, missing, or unclear. `error_message`: an error did not explain what went wrong or how to fix it. `developer_experience`: anything that made integration harder than it should be. `other`: anything else."},"summary":{"type":"string","minLength":1,"maxLength":200,"description":"One line stating the problem.","example":"No operation to open a perpetual position on GMX v2"},"details":{"type":"string","minLength":1,"maxLength":8000,"description":"What you were trying to achieve, what you tried (operations, parameters), and what happened. Never include secrets, private keys, or API keys."},"severity":{"description":"`blocker`: you could not complete the task. `major`: you needed a workaround. `minor`: an annoyance.","type":"string","enum":["blocker","major","minor"]},"expected":{"description":"What you expected to happen.","type":"string","maxLength":2000},"actual":{"description":"What actually happened.","type":"string","maxLength":2000},"context":{"type":"object","properties":{"requestIds":{"description":"Values of the `X-Flow-Id` response header from earlier Composer API responses this report is about (for example a failing POST /compose). Lets the team find the exact request.","maxItems":10,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"endpoint":{"description":"The endpoint involved, e.g. `POST /compose`.","type":"string","maxLength":200},"errorCode":{"description":"The error `kind` or `type` from the response body, if there was one.","type":"string","maxLength":100},"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"sdkVersion":{"description":"The `@lifi/composer-sdk` version, if the SDK was used.","type":"string","maxLength":50}},"additionalProperties":{},"description":"Optional pointers that help reproduce the problem."},"reporter":{"type":"object","properties":{"agent":{"description":"The agent or tool sending the report, e.g. `claude-code`.","type":"string","maxLength":100},"model":{"description":"The model behind the agent, if known.","type":"string","maxLength":100}},"description":"Who is reporting. Do not include personal data."}},"required":["category","summary","details"]}}}},"security":[{},{"apiKey":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The feedback report id. Mention it to your user; the Composer team can look the report up by it."}},"required":["id"],"additionalProperties":false}},"required":["success","data"],"additionalProperties":false,"description":"The report was stored."}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"type":{"type":"string","enum":["UNAUTHORIZED","RATE_LIMITED","SERVICE_UNAVAILABLE","VALIDATION_ERROR","SERVER_ERROR","INSUFFICIENT_CREDITS"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details (structure varies by error type)"},"retryAfter":{"description":"Seconds the client should wait before retrying (RATE_LIMITED, SERVICE_UNAVAILABLE)","type":"number"}},"required":["type","message"],"additionalProperties":false}},"required":["success","error"],"additionalProperties":false,"description":"Receipt could not be confirmed. Retry at most once, later; do not loop."}}}}}}}},"servers":[{"url":"https://composer.li.quest","description":"Composer Production API"}],"security":[{"apiKey":[]}],"tags":[{"name":"Compose","description":"Flow composition endpoints"},{"name":"Routing","description":"Token routing endpoints"},{"name":"Tokens","description":"Token information endpoints"},{"name":"Zap Packs","description":"Protocol adapter (zap pack) discovery endpoints"},{"name":"Configuration","description":"Chain and contract configuration endpoints"},{"name":"Feedback","description":"Report bugs, missing features, and unclear docs to the Composer team"}],"externalDocs":{"description":"Composer documentation","url":"https://docs.li.fi/composer/overview"}}