76trust / 100

Bridge Simulate

by chainhilt-x402 in Onchain & crypto

x402 APIPassing, checked 1 h ago

Compare bridge routes, best first: tokens, estimated and minimum target amounts, fees by token, duration, expiry and the approval each route needs. sourceAmount is exactly what leaves the wallet. Errors: 400 invalid input, 502 when no adapter returns a route.

POST
https://chainhilt.ai/api/v1/bridge/simulate
Price
$0.001
per call in USDC
Uptime
99.01%
last 30 days
Response time
897 ms
1.7 s slowest 5%
Last check
Passed
1 h ago, next any minute now

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed · Watch with other listings

How to call it

POST https://chainhilt.ai/api/v1/bridge/simulate

Each call costs $0.001 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://chainhilt.ai/api/v1/bridge/simulate
content-type: application/json

{
  "hyperCoreBalance": "perps",
  "senderAddress": "0xE4934BB19E0B97109033dBfDcCc6957E32F9Cc60",
  "sourceAmount": "10000000",
  "sourceChainId": 8453,
  "sourceToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "targetChainId": 999,
  "targetToken": "0xb88339CB7199b77E23DB6E890353E22632Ba630f",
  "targetType": "hyperCore"
}

Parameters

ParameterTypeRequiredDescription
excludedAdaptersarray of stringNoAdapter ids to skip, as listed by GET /bridge/adapters.
hyperCoreBalancestringNoHyperCore targets only. Defaults to perps. One of: perps, spot.
senderAddressstringNoOptional wallet that will send the bridge; lets providers quote for it.
sourceAmountstringYesExact base-unit amount that leaves the wallet. Every fee except native ones comes out of it.
sourceChainIdintegerYesEVM chain id the tokens leave from.
sourceTokenstringYesSource token; the zero address (or 0xEeee…EEeE) bridges the chain's native token.
targetChainIdintegerYesEVM chain id the tokens arrive on; HyperCore deliveries use HyperEVM's chain id. Both chains must be mainnets or both testnets.
targetTokenstringYesTarget token. It may differ from sourceToken, in which case the route swaps across tokens.
targetTypestringNoHyperEVM targets only. hyperCore credits the recipient's HyperCore USDC balance; hyperEvm delivers the token on HyperEVM. Defaults to hyperCore for HyperEVM USDC or when hyperCoreBalance is set, otherwise hyperEvm. One of: hyperCore, hyperEvm.

Example response

The provider's example. We can't check it without paying.

Example response, 101 lines
{
  "errors": [
    {
      "adapter": "debridge",
      "message": "deBridge cannot deliver to HyperCore, only to HyperEVM: set targetType to hyperEvm"
    }
  ],
  "routes": [
    {
      "adapter": "across",
      "adapterName": "Across",
      "approval": {
        "spender": "0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64",
        "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
      },
      "estimatedDurationSeconds": 2,
      "estimatedTargetAmount": "9994056",
      "expiresAt": 1790870627,
      "fees": [
        {
          "amount": "5900",
          "kind": "bridge",
          "paidFrom": "input",
          "token": {
            "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
            "chainId": 8453,
            "decimals": 6,
            "symbol": "USDC"
          }
        }
      ],
      "hyperCoreBalance": "perps",
      "minTargetAmount": "9994056",
      "providerRef": "lh5r9-1790867234078-e436362840a7",
      "sourceAmount": "10000000",
      "sourceToken": {
        "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "chainId": 8453,
        "decimals": 6,
        "symbol": "USDC"
      },
      "targetToken": {
        "address": "0xb88339CB7199b77E23DB6E890353E22632Ba630f",
        "chainId": 999,
        "decimals": 6,
        "symbol": "USDC"
      },
      "targetType": "hyperCore"
    },
    {
      "adapter": "circleCctp",
      "adapterName": "Circle CCTP",
      "approval": {
        "spender": "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
        "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
      },
      "estimatedDurationSeconds": 8,
      "estimatedTargetAmount": "9751138",
      "fees": [
        {
          "amount": "247562",
          "kind": "forwarding",
          "paidFrom": "input",
          "token": {
            "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
            "chainId": 8453,
            "decimals": 6,
            "symbol": "USDC"
          }
        },
        {
          "amount": "1300",
          "kind": "protocol",
          "paidFrom": "input",
          "token": {
            "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
            "chainId": 8453,
            "decimals": 6,
            "symbol": "USDC"
          }
        }
      ],
      "hyperCoreBalance": "perps",
      "minTargetAmount": "9751138",
      "sourceAmount": "10000000",
      "sourceToken": {
        "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "chainId": 8453,
        "decimals": 6,
        "symbol": "USDC"
      },
      "targetToken": {
        "address": "0xb88339CB7199b77E23DB6E890353E22632Ba630f",
        "chainId": 999,
        "decimals": 6,
        "symbol": "USDC"
      },
      "targetType": "hyperCore"
    }
  ]
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.001.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://chainhilt.ai/api/v1/bridge/simulate' \
  -H 'content-type: application/json' \
  --data-raw '{"hyperCoreBalance":"perps","senderAddress":"0xE4934BB19E0B97109033dBfDcCc6957E32F9Cc60","sourceAmount":"10000000","sourceChainId":8453,"sourceToken":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","targetChainId":999,"targetToken":"0xb88339CB7199b77E23DB6E890353E22632Ba630f","targetType":"hyperCore"}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://chainhilt.ai/api/v1/bridge/simulate' \
  -H 'content-type: application/json' \
  --data-raw '{"hyperCoreBalance":"perps","senderAddress":"0xE4934BB19E0B97109033dBfDcCc6957E32F9Cc60","sourceAmount":"10000000","sourceChainId":8453,"sourceToken":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","targetChainId":999,"targetToken":"0xb88339CB7199b77E23DB6E890353E22632Ba630f","targetType":"hyperCore"}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.001 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.001" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.001 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fchainhilt.ai%2Fapi%2Fv1%2Fbridge%2Fsimulate&method=POST
const res = await pay("https://chainhilt.ai/api/v1/bridge/simulate", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "hyperCoreBalance": "perps",
    "senderAddress": "0xE4934BB19E0B97109033dBfDcCc6957E32F9Cc60",
    "sourceAmount": "10000000",
    "sourceChainId": 8453,
    "sourceToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "targetChainId": 999,
    "targetToken": "0xb88339CB7199b77E23DB6E890353E22632Ba630f",
    "targetType": "hyperCore"
  }),
});
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.001 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.001"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://chainhilt.ai/api/v1/bridge/simulate",
        json={
            "hyperCoreBalance": "perps",
            "senderAddress": "0xE4934BB19E0B97109033dBfDcCc6957E32F9Cc60",
            "sourceAmount": "10000000",
            "sourceChainId": 8453,
            "sourceToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
            "targetChainId": 999,
            "targetToken": "0xb88339CB7199b77E23DB6E890353E22632Ba630f",
            "targetType": "hyperCore",
        },
    )
    print(res.status_code, res.text)

Security scan

No findings

We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
1 h agoPassed402136 ms$0.001
12 h agoPassed402797 ms$0.001
26 h agoPassed402105 ms$0.001
3 days agoTimed out---
4 days agoPassed402606 ms$0.001
Show 10 older checks
5 days agoPassed4021.3 s$0.001
5 days agoPassed4021.2 s$0.001
6 days agoPassed402950 ms$0.001
6 days agoPassed402987 ms$0.001
6 days agoPassed4021.0 s$0.001
7 days agoPassed402979 ms$0.001
7 days agoPassed4021.7 s$0.001
7 days agoPassed402164 ms$0.001
8 days agoPassed402154 ms$0.001
8 days agoPassed402935 ms$0.001