Description

The Intents API allows you to interact with the Ethereum blockchain by specifying a command in a user-friendly format. This API enables you to extract necessary information from the user's intent and generates transaction data accordingly. The API takes a request with recipient and command details and returns a response with relevant transaction information.

Base URL

The base URL for all API requests is:

[<https://intents-api.onrender.com/>](<https://intents-api.onrender.com/>)

Endpoints

POST <https://intents-api.onrender.com/intents>

Request

The request should be sent as a JSON object in the following format:

{
  "recipient": "0x03f142529a7B70305C07a50fAA44f6EBDADB4624",
  "command": "I want to send 0.0001 WETH to shlok28.eth",
  "chainId": "137"
}

Response

The API response will be a JSON object containing the extracted transaction information:

{
  "info": {
    "obj": {
      "toAddress": "shlok28.eth",
      "protocol": "Ethereum",
      "tokens": "ETH",
      "function": "transfer",
      "values": "10",
      "category": "native"
    },
    "txObject": {
      "to": "0x03f142529a7B70305C07a50fAA44f6EBDADB4624",
      "value": "0x8ac7230489e80000",
      "data": "0x"
    }
  }
}