Skip to main content

Endpoint

POST /actions/:actionId/intents/:intentIndex/steps/:stepIndex

Path Parameters

ParameterTypeRequiredDescription
actionIdstringYesAction ID
intentIndexnumberYesIntent index (0-based)
stepIndexnumberYesStep index (0-based)
non-7702:presign mode is not yet implemented. Only 7702 and non-7702:on-demand modes are currently functional.

Request Body by Mode

For EIP-7702 intents, simply trigger execution:
{
  "action": "execute"
}
The solver executes the delegated calls using the stored authorization.

Response

Success Response (200)

{
  "status": "success",
  "transactionHash": "0x..."
}
FieldTypeDescription
statusstringStep status after execution
transactionHashstringTransaction hash (if applicable)

Already Processed (202)

If the step is not in created status:
{
  "status": "executing"
}

Execution Flow

7702 Mode

  1. Solver retrieves stored calls and authorization
  2. Broadcasts transaction with delegated execution
  3. Updates step status on confirmation

non-7702:on-demand Mode

When action: "execute" with a transaction hash:
  1. Verify Transaction: Check tx exists on-chain and succeeded
  2. Replay Prevention: Reject if hash already processed
  3. Update Balances: Credit user’s Spice balance from token transfers
  4. Execute Solver Transfers: Send tokens on destination chain(s)
  5. Auto-Advance: Automatically execute remaining steps (solver transfers)
When action: "register":
  1. Verify Transaction: Check tx exists and succeeded
  2. Store Reference: Save hash for tracking, no balance updates
  3. Status: Set to registered instead of success

Error Responses

400 Bad Request

{
  "error": "schema validation failed",
  "issues": { /* Validation details */ }
}
{
  "error": "Transaction already processed"
}
{
  "error": "Transaction failed or pending"
}

404 Not Found

{
  "error": "could not find intent",
  "actionId": "act_...",
  "intentIndex": 0,
  "stepIndex": 0
}

500 Internal Server Error

{
  "error": "error executing intent step",
  "actionId": "act_...",
  "intentIndex": 0,
  "stepIndex": 0,
  "message": "Error details..."
}

Example Requests

7702 Mode

curl -X POST /actions/act_abc123/intents/0/steps/0 \
  -H "Content-Type: application/json" \
  -d '{"action": "execute"}'

non-7702:on-demand Mode

# User sends their own transaction first, then:
curl -X POST /actions/act_abc123/intents/0/steps/0 \
  -H "Content-Type: application/json" \
  -d '{
    "action": "execute",
    "hash": "0x1234567890abcdef..."
  }'

Notes

  • Steps must be executed in order (0, 1, 2, …)
  • For non-7702:on-demand, the user is responsible for sending the source chain transaction
  • After a successful execute action, remaining steps (solver transfers on destination chains) are auto-executed