Overview

The /v1/instructions/intent endpoint enables users to express their desired outcome without specifying implementation details. Users define input tokens and target output tokens, and the system automatically determines the optimal execution path.

How It Works

The intent endpoint abstracts away complexity by:
  1. Accepting input positions - Specify source tokens (e.g., aUSDC on Optimism)
  2. Defining target positions - Specify desired output tokens (e.g., Morpho WETH re7 vault token)
  3. Automatic routing - The system finds the best path between tokens, handling:
    • Withdrawals from source protocols
    • Cross-chain bridging
    • Deposits into destination protocols

Request Structure

POST /v1/instructions/intent

Request Body

ParameterTypeDescription
slippagenumberSlippage tolerance (0-1, e.g., 0.003 for 0.3%)
receiverstringEVM address to receive the output
inputPositionsarraySource tokens with amounts
targetPositionsarrayTarget tokens with weights (must sum to 1)

Example Request

curl -X POST https://api.biconomy.io/v1/instructions/intent \
  -H "Content-Type: application/json" \
  -d '{
    "slippage": 0.003,
    "receiver": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "inputPositions": [
      {
        "chainToken": {
          "chainId": 8453,
          "tokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
        },
        "amount": "1000000"
      }
    ],
    "targetPositions": [
      {
        "chainToken": {
          "chainId": 8453,
          "tokenAddress": "0x4e65fE4DbA92790696d040ac24Aa414708F5c0AB"
        },
        "weight": 1
      }
    ]
  }'

Response

The endpoint returns MEE instructions that will be executed to fulfill the intent:
{
  "instructions": [
    {
      "calls": [...],
      "chainId": 8453,
      "isComposable": true
    }
  ]
}

Intent vs Direct Instructions

The Supertransaction API offers two approaches:
  1. Intent-based (this endpoint) - Specify what you want to achieve, system determines how
  2. Direct instructions - Explicitly specify each step to execute
The intent approach simplifies complex multi-chain operations by handling routing automatically.