
Akashi Notari
io.github.self-realityv1.1.0Updated Oct 6, 2026
Proof of existence for files: anchor a SHA-256 hash on Base, look up proofs. Paid with x402.
Overview
Lets an assistant anchor a file's SHA-256 hash on Base for a USDC fee and look up existing proofs of existence.
- What it does
- Exposes two MCP tools over Streamable HTTP: find_proof, which takes a hash or a transaction hash and returns whether that hash is anchored plus its first proof, and anchor_hash, which takes a hash and optional filename and writes a proof on-chain (R12, R36, R37). The paid tool follows the x402 MCP transport: without payment it returns a PaymentRequired object, and after the client signs, the result carries the proof and settlement metadata (R39, R40). The same service is also reachable over plain HTTP endpoints for anchoring and proof lookup (R6, R8, R10).
- When to use it
- Use it when you need a verifiable, timestamped record that a specific file existed at a point in time, or when you want to check whether a given SHA-256 hash has already been anchored on Base. It suits agents that can pay small USDC amounts automatically over x402. It is not needed for ordinary file storage or content retrieval, since only hashes and optional filenames are recorded.
- Requirements
- Remote Streamable HTTP endpoint at no local install and no declared authentication. anchor_hash requires an x402-capable client with a funded Base wallet able to sign a USDC payment (R26, R23). find_proof is free. Self-hosting the worker needs Node.js with pnpm, a Cloudflare Workers deployment, a relayer wallet key with ETH for gas, a registry contract address, and preferably a keyed RPC endpoint (R62, R68, R71, R74, R87, R89).
Installation
In SourceWeft
- Open Akashi Notari in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.
Other MCP clients
Add this to your client's mcpServers config.
{
"mcpServers": {
"akashi-notari": {
"type": "http",
"url": "https://anchor.akashi-notari.com/mcp"
}
}
}README
Anchor Worker
Cloudflare Worker that sells anchors to agents over x402. An agent sends a SHA-256 file hash and a signed USDC payment in one HTTP request; the worker sends one transaction to VerifierRegistryUSDC, which takes the USDC and writes the proof. No facilitator is involved.
API Endpoints
POST /anchor→ paid. Writes the hash on-chain, returns the transaction hash and a certificate linkGET /proof?hash=<sha256 hex>→ free. Whether this hash is anchored, and its first proofGET /proof?tx=<transaction hash>→ free. The proof written by this transactionPOST /mcp→ MCP server (Streamable HTTP) with the toolsfind_proofandanchor_hashGET /openapi.json→ OpenAPI description; directories such as x402scan read it before they register/anchorGET /.well-known/x402→ x402 discovery document listing/anchorGET /.well-known/agent-registration.json→ ERC-8004 agent registration fileGET /llms.txt→ the service described for language modelsGET /→ service description and current priceGET /health→{ ok: true }
POST /anchor
Body: { "hash": "<sha256, 64 hex chars>", "filename": "<optional>" }. A 0x prefix and uppercase are accepted; the hash is stored lowercase without 0x, the same form the web app writes. The filename follows the web app's rules: lowercase a-z 0-9 - _ ., at most 128 characters.
Without a PAYMENT-SIGNATURE header the worker answers 402 with the terms in a PAYMENT-REQUIRED header (x402 v2, base64 JSON) and the same JSON in the body:
The amount is read from price() on the contract, so the quote and the contract always agree. With a valid payment the response is 200 and carries a PAYMENT-RESPONSE header:
Any x402 client works:
GET /proof
VerifierRegistryUSDC stores the first anchor of each hash, so a lookup by hash is one contract read (firstAnchor) and a log query on the one block it names. No search over the chain and no explorer key is needed.
proofsholds the first anchor of the hash onVerifierRegistryUSDC. Later anchors of the same hash exist as events and open with?tx=- The ETH
VerifierRegistrythe web app writes to stores nothing, so its proofs need an explorer API. When that search fails, the contract moves fromsearchedtounsearchedand the rest of the answer still stands.anchored: falsewith anunsearchedentry means "not found where we could look"
MCP
POST /mcp speaks MCP over Streamable HTTP, without sessions: every request stands alone, and GET returns 405.
find_proof{ hash }or{ tx }: free, the same answer asGET /proofanchor_hash{ hash, filename? }: paid, following the x402 MCP transport. Without a payment the result is a tool error whosestructuredContentis the x402PaymentRequiredobject. The client signs it and calls again with the payment inparams._meta["x402/payment"]; the result then carries the proof, and the settlement in_meta["x402/payment-response"]
server.json in this folder describes the server for the MCP registry.
Status Codes
400bad hash, filename or payment header. Checked before the payment is touched; nothing is charged402no payment, or the payment cannot be settled. The body'serroris an x402 error code such asinsufficient_funds409payment_already_used: this authorization already bought an anchor. Look it up with/proof503the worker has no contract address or relayer key
Notes
- The transaction either moves the USDC and emits the proof, or reverts and moves nothing
- The response has
status: "confirmed"with the full proof once the transaction is mined. If no RPC endpoint reports it within 30 seconds the response is still200, withstatus: "submitted", thetxHashand alookupURL. A payment that was broadcast is never reported as failed - The on-chain
submitteris the payer, not the relayer - If an authorization was already executed on the token (by a facilitator, or by someone who front-ran the relayer), the worker confirms the transfer to the contract in the token's logs and anchors it with
anchorPaid. It looks back 1,800 blocks - A canceled authorization buys nothing
- The official x402 client refuses payments above $1 unless its user raises the limit; keep the price at or below $1 for agents to pay without configuration
- Concurrent requests share one relayer key. A colliding nonce is retried three times; heavy traffic needs a queue
- Public RPC nodes and the keyless Blockscout API refuse or rate-limit requests from Cloudflare's shared addresses. In production set
RPC_URLto a keyed endpoint as a secret.LOGS_API_KEYis only needed to include the ETH contract's proofs in/proof?hash= - The recovery of an authorization executed on the token searches 1,800 blocks of token logs, which a free Alchemy key refuses (10 blocks). List a second endpoint in
RPC_URLor use a paid key to keep that path working - Rate limited to
RATE_LIMIT_PER_MINrequests per IP (default 60)
Environment Variables
RELAYER_PRIVATE_KEY: secret. The wallet that sends the transactions. It needs ETH for gas andsetRelayer(address, true)on the contractREGISTRY_ADDRESS: the deployedVerifierRegistryUSDCCHAIN_ID:8453(Base, default) or84532(Base Sepolia). These two have built-in defaults for everything belowRPC_URL: one or more RPC endpoints, comma-separated, tried in order. The default for Base is a list of public nodes; set a keyed endpoint (Alchemy, Infura) as a secret for production trafficRPC_ORIGIN: sent as theOriginheader on RPC calls, for a provider key restricted to an origin allowlistTOKEN_ADDRESS,TOKEN_NAME,TOKEN_VERSION,EXPLORER_URL: optional overrides.TOKEN_NAMEandTOKEN_VERSIONare the token's EIP-712 domainLEGACY_REGISTRY_ADDRESS: the ETHVerifierRegistry, included in lookupsLOGS_API_URL,LOGS_API_KEY,LOGS_FROM_BLOCK: Blockscout-compatible logs API that searches the ETH contract for/proof?hash=, and an optional API key for it. SetLOGS_API_URLempty to use the RPC nodeAGENT_REGISTRATIONS: JSON array for theregistrationsfield of the agent registration file, e.g.[{"agentId":22,"agentRegistry":"eip155:8453:0x…"}], set once the agent is registered on an ERC-8004 identity registryPUBLIC_URL: the worker's public origin, used in theresource.urlit advertisesCERTIFICATE_URL,CERTIFICATE_CHAIN: where certificate links pointRATE_LIMIT_PER_MIN: default 60
Local Development
Tests
The end-to-end script deploys a mock USDC and both registries to a local chain, then drives the worker by hand, through the official x402 client and over MCP.
Deployment
Source: workers/anchor/README.md at commit 24f490b
Tools
0Version history
1- v1.1.0LatestOct 6, 2026


