| ▲ | Show HN: We put ZK attribute proofs inside x402 payment headers | |
| 2 points by aggre 6 hours ago | 2 comments | ||
Every x402 settlement in this repo carries a ZK proof bundle in PAYMENT-RESPONSE: issuer identity, payment settlement, and data integrity, independently verifiable. Live on Base Sepolia. (Recap: x402 is Coinbase's revival of HTTP 402. Server returns 402, client signs an EIP-3009 USDC auth on Base, retries with PAYMENT-SIGNATURE, facilitator settles. Spec: https://x402.org) I'm the CTO of FRAME00. We've been building Lemma, a document oracle that binds ZK attribute proofs to on-chain Merkle commitments. Three weeks ago I started asking whether the same proof bundle could ride inside an x402 round trip instead of a separate verification step. This repo is the answer. The gap x402 leaves: the server gets a wallet address and a tx hash. It doesn't know who authorized the payment, under what policy, or whether the data arrives intact. As agents become the payer, a wallet address is an anonymous primitive, not a principal. What this adds to the x402 flow:
The demo wraps Phase 1 in a free GET /article returning an X-Lemma-Attestation header pointing at /verify/:hash. Point @x402/fetch at any paid resource directly and Phase 1 is just standard 402.Server side is a drop-in for @x402/hono:
paymentMiddleware auto-attaches a hook that writes extensions.lemma into PAYMENT-RESPONSE. Route handlers don't change.Agent side uses stock @x402/fetch; no Lemma SDK on the client:
What this doesn't claim:
What is shipping next:
Both are on-axis with the thesis: payment is the trigger; verifiable trust rides on top.Repo: https://github.com/lemmaoracle/example-x402 x402 SDK: https://www.npmjs.com/package/@lemmaoracle/x402 Lemma SDK: https://www.npmjs.com/package/@lemmaoracle/sdk Questions on the circuit layer, BBS+ binding, or DID roadmap welcome. | ||
| ▲ | aggre 6 hours ago | parent | next [-] | |
One note on the MCP server we also shipped (github.com/lemmaoracle/lemma/tree/main/packages/mcp): x402 is already agent-callable at the protocol level, so no MCP wrapper is needed for payments. The MCP server exposes the read side of the same trust layer (query verified attributes, get schema, get circuit, get generator, get proof status) for agents in MCP-native environments (Claude Desktop, Cursor, etc.) that want to read from Lemma without a custom REST integration. Two surfaces, one trust layer: x402 : payment rail + ZK proof bundle in PAYMENT-RESPONSE MCP : read interface for MCP-native agents | ||
| ▲ | CyberSapper 4 hours ago | parent | prev [-] | |
[dead] | ||