Skip to content

Attest a settled call on Base

$0.05 per callUSDC via x402POST /api/attest

Writes an attestation on Base (Ethereum Attestation Service) binding a paid call to the bytes you received; returns its UID and base.easscan.org page.

Category: Routing & delegationTags: attestation eas provenance receipt audit base x402

Try in playground →

Details

It records the tool slug, response sha256, settlement transaction, payer, time and price, signed by this server's wallet. Give the sale's settlement transaction (PAYMENT-RESPONSE or Payment-Receipt header). Only the buyer can attest, paying from the same wallet with a signed EVM authorization; wallet-scoped routes (memory, usage) are excluded. The record is public, permanent and names the payer. One per sale (a repeat returns the existing UID); refused, and not charged on x402, when the transaction is not a sale of this server, the response was streamed or binary, or Base gas would exceed the tool's ceiling.

Parameters

NameTypeRequiredDescription
txstringyesSettlement 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. Up to 130 characters.

Example request

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

Watch a call get paid

RequestPOST /api/attest
402$0.05 USDC
SignPAYMENT-SIGNATURE
Settleon 11 chains
Answer200 OK
ReceiptAgent402-ReceiptEd25519

Example response

{
  "uid": "0x5b4d0c1e8f7a4c2d9e0b6a3f1c8d7e6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d",
  "attestationUrl": "https://base.easscan.org/attestation/view/0x5b4d0c1e8f7a4c2d9e0b6a3f1c8d7e6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d",
  "attestTx": "0x9c8b7a6f5e4d3c2b1a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b",
  "block": "50829611",
  "existing": false,
  "attester": "0xa11ce0000000000000000000000000000000a402",
  "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": "0xb0b0000000000000000000000000000000000b0b",
    "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"
  }
}
FieldTypeAlways presentIn the example
uidstringyes0x5b4d0c1e8f7a4c2d9e0b6a3f1c8d7e6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d
attestationUrlstringyeshttps://base.easscan.org/attestation/view/0x5b4d0c1e8f7a4c2d9e0b6a3f1c8d7e6b5...
attestTxstringyes0x9c8b7a6f5e4d3c2b1a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b
blockstringyes50829611
existingbooleanyesfalse
attesterstringyes0xa11ce0000000000000000000000000000000a402
chainstringyeseip155:8453
easstringyes0x4200000000000000000000000000000000000021
schemaUidstringyes0x2a4e6c8d0f1b3a5c7e9d1f3b5a7c9e1d3f5b7a9c1e3d5f7b9a1c3e5d7f9b1a3c
schemastringyesstring slug,bytes32 responseSha256,string settlementNetwork,string settlement...
dataobjectyes7 fields: slug, responseSha256, settlementNetwork, settlementTx and 3 more
verifyobjectyes3 fields: responseDigest, payment, attestation

From an MCP client

catalog.call {
  "slug": "attest",
  "params": {
    "tx": "0x2f1fecade9bd945e7817c11e5a34cafe6b349dd8c92a7587efed1de476bddfeb"
  }
}

Hosted connector (https://agent402.tools/mcp): paid in the call. Stdio package (npx -y agent402-mcp@0.18.0): pays from a wallet.

Errors and behavior

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?.({ maxAmountPerPayment: "$0.05" }); // refuse any quote above this tool's price
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.AGENT_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"
  }),
});

Get a wallet or run npx -y agent402-mcp@0.18.0 wallet new.

The quote (Python)

import base64, json, urllib.error, urllib.request

req = urllib.request.Request("https://agent402.tools/api/attest", method="POST", data="{\"tx\":\"0x2f1fecade9bd945e7817c11e5a34cafe6b349dd8c92a7587efed1de476bddfeb\"}".encode(), headers={"Content-Type": "application/json"})
try:
    urllib.request.urlopen(req)
except urllib.error.HTTPError as e:
    quote = json.loads(base64.b64decode(e.headers["PAYMENT-REQUIRED"]))
    print(e.code, [(a["network"], a["amount"]) for a in quote["accepts"]])  # the price, per chain, in base units

Related tools