Agent402 / tools / attest

Attest a settled call on Base

$0.050 per call · USDC via x402 · POST /api/attest

Write an on-chain attestation (Ethereum Attestation Service on Base) that binds a call you paid for to the bytes you received: the tool slug, sha256 of the JSON response, the settlement chain and transaction, the payer, the time served and the price, signed by this server's wallet. Give it the settlement transaction from the PAYMENT-RESPONSE (or Payment-Receipt) header of any settled call; the attestation UID and its public page on base.easscan.org come back. Use it when an agent has to prove afterwards what data it acted on. The record is public and permanent: it names the payer and the tool, which the settlement transaction already exposes on chain. One attestation per sale (a repeat returns the existing UID); refused, uncharged, when the transaction is not a sale of this server, when the response was streamed or binary, or when Base gas would exceed the tool's own ceiling.

TRY IN PLAYGROUND →

Input

FieldTypeDescription
tx *stringSettlement transaction of a call you paid for, as carried in that response's PAYMENT-RESPONSE (x402) or Payment-Receipt (MPP) header: EVM hash, Solana or Stellar signature, or Algorand id.

Example output

{
  "uid": "0x5b4d0c1e8f7a4c2d9e0b6a3f1c8d7e6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d",
  "attestationUrl": "https://base.easscan.org/attestation/view/0x5b4d0c1e8f7a4c2d9e0b6a3f1c8d7e6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d",
  "attestTx": "0x9c8b7a6f5e4d3c2b1a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b",
  "block": "50829611",
  "existing": false,
  "attester": "0x77065d81e18ad403BCD6e9A0616b288e16744121",
  "chain": "eip155:8453",
  "eas": "0x4200000000000000000000000000000000000021",
  "schemaUid": "0x2a4e6c8d0f1b3a5c7e9d1f3b5a7c9e1d3f5b7a9c1e3d5f7b9a1c3e5d7f9b1a3c",
  "schema": "string slug,bytes32 responseSha256,string settlementNetwork,string settlementTx,string payer,uint64 servedAt,uint64 priceMicroUsd",
  "data": {
    "slug": "crypto-price",
    "responseSha256": "0x7d2a9b1c4e6f8a0b2c4d6e8f0a1b3c5d7e9f1a3b5c7d9e1f3a5b7c9d1e3f5a7b",
    "settlementNetwork": "eip155:8453",
    "settlementTx": "0x2f1fecade9bd945e7817c11e5a34cafe6b349dd8c92a7587efed1de476bddfeb",
    "payer": "0x902dcf34e53695bdea2ffb354b1a2e58bd598256",
    "servedAt": "2026-09-03T15:16:06.000Z",
    "priceUsd": 0.01
  },
  "verify": {
    "responseDigest": "sha256 over the exact JSON bytes you received for that call; compare with responseSha256",
    "payment": "follow settlementTx on eip155:8453: the payer paid this server's payTo",
    "attestation": "fetch the UID on https://base.easscan.org (or read EAS 0x4200000000000000000000000000000000000021 on Base): attester must be this server's wallet, schema must match"
  }
}

Try it - see the 402 challenge (free)

curl -i -X POST https://agent402.tools/api/attest \
  -H "Content-Type: application/json" \
  -d '{"tx":"0x2f1fecade9bd945e7817c11e5a34cafe6b349dd8c92a7587efed1de476bddfeb"}'

The response is HTTP 402 Payment Required with exact payment requirements. Any x402 v2 client pays automatically and retries:

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/attest", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "tx": "0x2f1fecade9bd945e7817c11e5a34cafe6b349dd8c92a7587efed1de476bddfeb"
  }),
});
Wallet-only. This tool reaches the network/browser/storage, so it is paid in USDC via x402 (no proof-of-work tier).

Related tools

AI agent action preflight

$0.010 · POST /api/action-gate

Deterministic preflight check for a proposed AI agent action - a tool call, payment, fetch, or write - before it execute…

try in playground →

Route and execute

$0.01 · POST /api/route/execute

Describe a task (or name a slug) and the Smart Order Router resolves the best-matching tool and RUNS it in the same call…

try in playground →

Route and execute (plus tier)

$0.05 · POST /api/route/execute-plus

Describe a task (or name a slug) and the Smart Order Router resolves the best-matching tool and RUNS it in the same call…

try in playground →