Overview
TheCommitIntent endpoint commits an intent to the Trails system, reserving the quote and preparing it for execution. This is a required step between getting a quote and executing the transaction.
Use Cases
- Lock in a quote before execution
- Prepare the intent for signing and execution
- Transition from quoted to committed state and preparing a deposit intent address
Request Parameters
Required Fields
- intent (Intent): The complete intent object returned from
QuoteIntent
Response
The response includes:- intentId (string): Unique identifier for the committed intent
Intent Lifecycle
CommitIntent step is crucial because it:
- Reserves the quoted rates
- Locks in the gas fee estimates
- Validates the intent parameters
Example
Important Notes
The intent object from
QuoteIntent should not be modified, otherwise the API will reject the commitment.Next Steps
After committing an intent:- Prepare the transaction signature using the provided intent details for the user to deposit into the intent address
- Execute the transaction with
ExecuteIntent - Monitor the transaction status with
WaitIntentReceipt
Authorizations
API Key for authenticating requests, get an access key at https://trails.build and request early access
Body
application/json
Response
Successful response