Attest a settled call on Base
POST /api/attestWrite 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. Send POST /api/attest with the required field tx and pay $0.050 per call over x402 with USDC on an EVM chain (the paying wallet is the identity). It returns a JSON object with uid, attestationUrl, attestTx, block, existing and 7 more.
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. Only the buyer can attest a sale: this call must be paid with a signed EVM authorization from the same wallet, and sales of wallet-scoped routes (memory, usage) are never attestable. The record is public and permanent: it names the payer and the tool. 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.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tx | string | yes | Settlement 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 request
curl -i -X POST https://agent402.tools/api/attest \
-H "Content-Type: application/json" \
-d '{"tx":"0x2f1fecade9bd945e7817c11e5a34cafe6b349dd8c92a7587efed1de476bddfeb"}'
Without payment this returns HTTP 402 Payment Required with the exact price for attest; any x402 v2 or MPP client pays it and retries.
Example response
{
"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"
}
}
| Field | Type | Always present | In the example |
|---|---|---|---|
uid | string | yes | 0x5b4d0c1e8f7a4c2d9e0b6a3f1c8d7e6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d |
attestationUrl | string | yes | https://base.easscan.org/attestation/view/0x5b4d0c1e8f7a4c2d9e0b6a3f1c8d7e6b5... |
attestTx | string | yes | 0x9c8b7a6f5e4d3c2b1a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b |
block | string | yes | 50829611 |
existing | boolean | yes | false |
attester | string | yes | 0x77065d81e18ad403BCD6e9A0616b288e16744121 |
chain | string | yes | eip155:8453 |
eas | string | yes | 0x4200000000000000000000000000000000000021 |
schemaUid | string | yes | 0x2a4e6c8d0f1b3a5c7e9d1f3b5a7c9e1d3f5b7a9c1e3d5f7b9a1c3e5d7f9b1a3c |
schema | string | yes | string slug,bytes32 responseSha256,string settlementNetwork,string settlement... |
data | object | yes | 7 fields: slug, responseSha256, settlementNetwork, settlementTx, payer, servedAt |
verify | object | yes | 3 fields: responseDigest, payment, attestation |
From an MCP client
catalog.call {
"slug": "attest",
"params": {
"tx": "0x2f1fecade9bd945e7817c11e5a34cafe6b349dd8c92a7587efed1de476bddfeb"
}
}
The hosted connector at https://agent402.tools/mcp needs a payment for attest; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY (wallet only for this tool). Local install: npx -y agent402-mcp.
Errors and behavior
txis required. An input the tool rejects returns an HTTP 4xx whose body carrieserror,tool,expected,requiredandexample, so the caller can correct it.- A paid call that ends in any status of 400 or above is not charged over x402 or MPP: settlement is cancelled when the tool fails.
- Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier.
- Identity-bound: results are keyed to the wallet that signed the payment, so only EVM x402 payments are accepted; credits keys and Tempo are refused.
- A
GETorHEADto /api/attest returns the same 402 quote, so the price can be read without a body. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB is not replayed).
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();
client.setSpendControls?.(false); // keep your own spending ceiling in code
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"
}),
});
Related tools
Decide: tool plan for a task
POST /api/decideDescribe a job and get a call-ready plan: which tools, across this catalog and outside x402 sellers with a recently veri…
Decide: execute a plan
POST /api/decide/executeRun a decision's plan through Agent402: first-party steps run directly, third-party steps are bought from the seller and…
Route and execute
POST /api/route/executeDescribe a task (or name a slug) and the Smart Order Router resolves the best-matching tool and RUNS it in the same call…
Route and execute (max tier)
POST /api/route/execute-maxDescribe a task (or name a slug) and the Smart Order Router resolves the best-matching tool and RUNS it in the same call…
Route and execute (plus tier)
POST /api/route/execute-plusDescribe a task (or name a slug) and the Smart Order Router resolves the best-matching tool and RUNS it in the same call…
Route and execute (pro tier)
POST /api/route/execute-proDescribe a task (or name a slug) and the Smart Order Router resolves the best-matching tool and RUNS it in the same call…