Input Settlement
Currently, only one Input Settler is supported:
The Compact uses resource locks and supports first-fill flows. However, LI.FI intents also support escrow-like flows.
Default Output
Section titled “Default Output”The default output for settlement schemes is MandateOutput
:
struct MandateOutput { bytes32 oracle; bytes32 settler; uint256 chainId; bytes32 token; uint256 amount; bytes32 recipient; bytes call; bytes context;}
To verify if the encoded output description has been validated, send the hashed encoded payload to the appropriate local oracle along with relevant resolution details, such as the solver’s identity.
InputSettlerCompact
Section titled “InputSettlerCompact”The Compact Settler uses the StandardOrder
:
struct StandardOrder { address user; uint256 nonce; uint256 originChainId; uint32 expires; uint32 fillDeadline; address localOracle; uint256[2][] inputs; MandateOutput[] outputs;}
The CompactSettler supports two ways to resolve locks once outputs are available for verification by the validation layer:
There are two ways to finalize an intent:
finalise
: Can only be called by the solver. The caller can designate where to send assets and whether to make an external call.finaliseWithSignature
: Can be called by anyone with anAllowOpen
signature from the solver, containing the destination and call details.
Intent Registration
Section titled “Intent Registration”While intents are transferred as StandardOrder
structures, they are signed as a BatchClaim
with the following structure:
struct BatchCompact { address arbiter; address sponsor; uint256 nonce; uint256 expires; uint256[2][] idsAndAmounts; Mandate mandate;}
With the Mandate defined as:
struct Mandate { uint32 fillDeadline; address localOracle; MandateOutput[] outputs;}
Intents are EIP712-signed BatchClaim
s using The Compact’s domain separator.
Alternatively, intents can be registered on-chain. There are two ways to do this: either the sponsor (user) registers it, or someone pays for the entire claim and registers it on their behalf.
Integration Examples
Section titled “Integration Examples”- For a smart contract example of registering intents on behalf of someone else, see
RegisterIntentLib.sol
. - For a UI example of signing the Batch Compact, refer to the lintent.org demo.
- For a UI example of depositing and registering the intent, see the lintent.org demo.