POST /intent//execute/
Execute a specific intent step and return the execution results.Endpoint
Description
This endpoint executes a specific step in an intent workflow. Each call performs one unit of work, triggering checks, sending transactions, and returning the execution results. This is an active execution endpoint that modifies state and performs side effects.Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
intentId | string | Yes | The unique intent identifier (signature of chainBatches) |
stepId | number | Yes | The step index [0, n) representing the chain batch array index |
Request Body
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
executeOptions.dryRun | boolean | No | If true, simulate execution without committing |
executeOptions.gasLimit | number | No | Gas limit for transaction execution |
How It Works
- Intent ID: The signature of the chainBatches (similar to Solana’s approach)
- Step ID: Integer representing the index of the chain batch in the array
- Execution: Calling this endpoint triggers the actual work for that step
- Unit of Work: Each call performs one discrete unit of work in the intent workflow
Response
Success Response (200)
Response Fields
| Field | Type | Description |
|---|---|---|
intentId | string | The intent identifier |
stepId | number | The executed step index |
status | string | Execution status |
transactionHash | string | Hash of the execution transaction (if applicable) |
chainId | number | Chain ID where the step was executed |
executionResults | object | Results of the step execution |
Step Status
| Status | Description |
|---|---|
pending | Step is waiting to be executed |
executing | Step is currently being executed |
success | Step executed successfully |
error | Step execution failed |
reverted | Step transaction reverted on-chain |
skipped | Step was skipped due to conditions |
Error Responses
400 Bad Request
404 Not Found
Note: The POST execution endpoint currently returns 500 for most failures. Use the GET status endpoint for 404 (not found) semantics.500 Internal Server Error
Example Request
Example Usage
Workflow Pattern
- Submit Intent: Use
POST /transaction/submitto create the intent - Execute Steps: Call
POST /intent/{id}/execute/{i}for each step i = 0, 1, 2, … - Check Results: Each response contains the execution results for that step
- Continue: Execute steps sequentially until the intent is complete
Notes
- Steps must be executed in order (0, 1, 2, …)
- Each step corresponds to a chain batch in the original array
- The endpoint performs actual execution with side effects (not idempotent)
- Failed steps may be retryable depending on the failure reason
- Intent data is persisted in the database for reliable execution tracking
- Use
dryRun: trueto simulate execution without committing changes
