Skip to main content
POST
/
intents
/
cost
Get Intent Cost
curl --request POST \
  --url https://v1.orchestrator.rhinestone.dev/intents/cost \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '{
  "destinationChainId": 8453,
  "tokenRequests": [
    {
      "tokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "1000000"
    }
  ],
  "account": {
    "address": "0x579d5631f76126991c00fb8fe5467fa9d49e5f6a",
    "accountType": "smartAccount",
    "setupOps": [
      {
        "to": "0x579d5631f76126991c00fb8fe5467fa9d49e5f6a",
        "data": "0x..."
      }
    ],
    "emissaryConfig": {
      "validatorAddress": "0x579d5631f76126991c00fb8fe5467fa9d49e5f6a",
      "emissaryAddress": "0x579d5631f76126991c00fb8fe5467fa9d49e5f6a",
      "emissaryEnable": {
        "allocatorSig": "0x...",
        "userSig": "0x..."
      },
      "settings": {
        "allocator": "0x579d5631f76126991c00fb8fe5467fa9d49e5f6a"
      }
    },
    "delegations": {}
  },
  "destinationExecutions": [
    {
      "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "value": "0",
      "data": "0xa9059cbb000000000000000000000000579d5631f76126991c00fb8fe5467fa9d49e5f6a00000000000000000000000000000000000000000000000000000000000f4240"
    }
  ],
  "destinationGasUnits": "100000",
  "accountAccessList": {
    "chainIds": [
      1
    ],
    "tokens": [
      "<string>"
    ],
    "chainTokens": {},
    "exclude": {
      "chainIds": [
        1
      ],
      "tokens": [
        "<string>"
      ],
      "chainTokens": {}
    }
  },
  "recipient": {
    "address": "0x579d5631f76126991c00fb8fe5467fa9d49e5f6a",
    "accountType": "smartAccount",
    "setupOps": [
      {
        "to": "0x579d5631f76126991c00fb8fe5467fa9d49e5f6a",
        "data": "0x..."
      }
    ],
    "emissaryConfig": {
      "validatorAddress": "0x579d5631f76126991c00fb8fe5467fa9d49e5f6a",
      "emissaryAddress": "0x579d5631f76126991c00fb8fe5467fa9d49e5f6a",
      "emissaryEnable": {
        "allocatorSig": "0x...",
        "userSig": "0x..."
      },
      "settings": {
        "allocator": "0x579d5631f76126991c00fb8fe5467fa9d49e5f6a"
      }
    },
    "delegations": {}
  },
  "options": {
    "topupCompact": true,
    "settlementLayers": [
      "ECO"
    ],
    "sponsorSettings": {
      "gasSponsored": true,
      "bridgeFeesSponsored": true,
      "swapFeesSponsored": true
    },
    "feeToken": "USDC"
  }
}'
{
  "hasFulfilledAll": true,
  "tokensSpent": {},
  "tokensReceived": [
    {
      "tokenAddress": "<string>",
      "amountSpent": 123,
      "targetAmount": 123,
      "fee": 123,
      "hasFulfilled": true
    }
  ],
  "sponsorFee": {
    "relayer": 0.0009,
    "protocol": 0
  }
}

Headers

x-api-key
string
required

Rhinestone API key

Body

application/json

Body

destinationChainId
number
required

The ID of the target blockchain

Required range: x >= 0
Example:

8453

tokenRequests
object[]
required

A list of token requested on the target chain

  • Option 1
  • Option 2
account
object
required

Account details

destinationExecutions
object[]

Execution calls on the target chain.

destinationGasUnits
integer

The gas limit for the target chain executions

Example:

"100000"

accountAccessList

Account access list specifying which chains and tokens an account may access

recipient
object

Account details

options
object

Intent options

Example:
{
"topupCompact": true,
"settlementLayers": ["ECO"],
"sponsorSettings": {
"gasSponsored": true,
"bridgeFeesSponsored": true,
"swapFeesSponsored": true
},
"feeToken": "USDC"
}

Response

200

  • Option 1
  • Option 2

Successfully retrieved the order path

hasFulfilledAll
boolean
required

Indicates that all tokens have been fulfilled

tokensSpent
object
required

Tokens spent in the transaction

tokensReceived
object[]
required

Tokens received in the transaction

sponsorFee
object
required

Transaction fees