Skip to content
NAMI402

Appendix

Agent API

Every reading on this site is an HTTP endpoint an agent can pay for by itself. No signup, no keys: a 402, an on-chain payment, and a retry.

Basics

The loop

  1. 1. Call an endpoint normally. You get 402 with endpointId, requestId, ticket, the desk address and accepted prices.
  2. 2. Pay: payEth(endpointId, requestId) with the exact ETH amount, or approve + payToken(token, endpointId, requestId).
  3. 3. Repeat the identical request with header x-nami-payment: <ticket>. A paid ticket keeps working for 24 hours for that same request.

Chain: Robinhood Chain (4663). Desk: 0x9f122AfcdbF97aa033B3D4051B5e096db18c1AfE. Machine-readable index: GET /api/v1.

Example

curl + viem

curl -s "https://www.nami402.xyz/api/v1/scan/funder?address=0xYourTarget"
# → 402 { "requestId": "0x…", "endpointId": "0x…", "ticket": "eyJ…", "accepts": [...] }
import { createWalletClient, http, parseAbi } from "viem";

const challenge = await (await fetch(url)).json();          // 402 body
const eth = challenge.accepts.find((a) => a.symbol === "ETH");
const hash = await wallet.writeContract({
  address: challenge.desk,
  abi: parseAbi(["function payEth(bytes32 endpoint, bytes32 requestId) payable"]),
  functionName: "payEth",
  args: [challenge.endpointId, challenge.requestId],
  value: BigInt(eth.amount),
});
await publicClient.waitForTransactionReceipt({ hash });
const answer = await (await fetch(url, { headers: { "x-nami-payment": challenge.ticket } })).json();

Reference

Endpoints

POST /api/v1/ask

One answer from Nami's office. 12 free per hour, then paid.

body { "question": "…" }

endpointId 0x8d318199d992c58b62799891717206b37a44b52f9971238569c16ab46303d7ed

GET /api/v1/scan/wallet?address=0x…

Balance, age, activity, top counterparties and a watcher's verdict.

endpointId 0x9d08626d279d93bac53ad5140cb01d03e2776de6208a34437e972f6e0cdee3af

GET /api/v1/scan/funder?address=0x…

Who put the first gas in this wallet, and when.

endpointId 0x4085877ce9579271e34d11508f60ac8dadf2799904c010abfbb02397ee1cedbd

GET /api/v1/scan/hours?address=0x…

Hour-of-day fingerprint (UTC) from recent transactions.

endpointId 0xffb175bd8145a99c345365015e152f91925925853a24b6cfe637b6112558f53e

GET /api/v1/burner/watch?address=0x…

Does this wallet look disposable, and is it still linked to its source?

endpointId 0x751f548e0d3656f81c69109bded068ba03dbf7589b203f89b6c898bbe9de26a0

GET /api/v1/receipt/read?requestId=0x…

Look up any Desk receipt by its request id.

endpointId 0x266a4e8de13ef45aadd43509973323605963685300333b3ff3310e8f9938f1cb

GET /api/v1/pool/crowd

How many deposits you'd be hiding among, per denomination.

endpointId 0xfc9959a50c8bec0e0ccc8a67b7f17be5f5a9789d7b7ff736a54f309d967387b9

GET /api/v1/pool/check?nullifierHash=0x…

Is a pool note still unspent? Send only its nullifier hash.

endpointId 0xe17c55aea3df539961e59e44a426559fc4ae06171a17973b374c280981cb5b0b