Input Settlement
Built with resource locks in mind, LI.FI intents support a variety of input settlement schemes. The Compact and Rhinestone both allow for first-fill flows and sponsored transactions, assuming the user has existing deposits.
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
The default output for settlement schemes is MandateOutput
:
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
The Compact Settler uses the StandardOrder
:
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
While intents are transferred as StandardOrder
structures, they are signed as a BatchClaim
with the following structure:
With the Mandate defined as:
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
- 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.