Skip to main content

Endpoint

POST /actions

Description

This is the unified entry point for creating cross-chain intents. An action groups related intents together and provides a single tracking ID. Each intent within an action can have its own execution mode and chain batches.

Request Body

{
  user: Address;                           // User wallet address
  chainAuthorizations?: ChainAuth7702[];   // Required for 7702 mode
  intents: Intent[];                       // Array of intents (min 1)
}

Execution Modes

non-7702:presign mode is not yet implemented. Only 7702 and non-7702:on-demand modes are currently functional.
EIP-7702 mode uses delegate contract for execution.
{
  mode: "7702",
  signatureType: string,
  signature: Hex,
  nbf: number,           // Not before timestamp
  exp: number,           // Expiration timestamp
  chainBatches: [{
    hash: Hex,
    chainId: number,
    tokenTransfers: TokenTransfer[],
    calls: Call[]
  }]
}

Schema Details

TokenTransfer

FieldTypeDescription
fromAddress | "solver"Sender address or “solver” for solver-funded
toAddressRecipient address
tokenAddressToken contract address
amountbigintAmount in wei

ChainAuthorization (7702 only)

FieldTypeRequiredDescription
addressAddressYesAddress being authorized
chainIdnumberYesChain ID
noncenumberYesAuthorization nonce
rHexYesECDSA signature R value
sHexYesECDSA signature S value
yParitynumberNoY parity (default: 0)

Response

Success Response (201)

{
  "actionId": "act_a1b2c3d4e5f6...",
  "intentIds": [
    "act_a1b2c3d4e5f6.../0",
    "act_a1b2c3d4e5f6.../1"
  ]
}
FieldTypeDescription
actionIdstringUnique action identifier
intentIdsstring[]Array of intent IDs (format: {actionId}/{index})

Error Responses

{
  "error": "schema validation failed",
  "issues": { /* Zod validation errors */ }
}
{
  "error": "chainAuthorizations required for 7702 intents"
}

Example Request

curl -X POST /actions \
  -H "Content-Type: application/json" \
  -d '{
    "user": "0x742d35Cc6634C0532925a3b844e4B7db0D6d8E5c",
    "chainAuthorizations": [{
      "address": "0x742d35Cc6634C0532925a3b844e4B7db0D6d8E5c",
      "chainId": 84532,
      "nonce": 1,
      "r": "0x...",
      "s": "0x...",
      "yParity": 0
    }],
    "intents": [{
      "mode": "7702",
      "signatureType": "eip712",
      "signature": "0x...",
      "nbf": 0,
      "exp": 1999999999,
      "chainBatches": [{
        "hash": "0x...",
        "chainId": 84532,
        "tokenTransfers": [{
          "from": "0x742d35Cc6634C0532925a3b844e4B7db0D6d8E5c",
          "to": "0xVenueAddress...",
          "token": "0xTokenAddress...",
          "amount": "1000000000000000000"
        }],
        "calls": [{
          "to": "0xTokenAddress...",
          "value": "0",
          "data": "0xa9059cbb..."
        }]
      }]
    }]
  }'

Workflow

  1. Create Action: Submit action with intents
  2. Track Progress: Use returned actionId and intentIds to monitor status
  3. Execute Steps: Call POST /actions/:actionId/intents/:intentIndex/steps/:stepIndex for each step

Next Steps

After creating an action: