Summary
Look, the thing is - the Next.js example in the DISCOVERY.md guide has the wrong route path, and folks have been asking for viem and cast signing examples. No joke.
Problem Description
In the Complete Example with Next.js section, the route is currently:
// app/api/.well-known/x402/route.ts
C'mon man, Next.js App Router serves routes from app/ directly - so app/.well-known/x402/route.ts would be accessible at /.well-known/x402. Having /api/ in that path means the endpoint would actually be at /api/.well-known/x402 which is incorrect.
Additionally, the ownership verification signing examples only show ethers.js and Solana - we need viem and Foundry's cast examples for the crypto folks.
Technical Context
- File:
docs/DISCOVERY.md
- Section: "Complete Example with Next.js" and "How to Generate an Ownership Proof"
Acceptance Criteria
Context
- Reported via Discord by: .masonhall
- Back when I was writing docs... anyway, the route path thing is a common gotcha with Next.js App Router.
@claude please implement this fix
Summary
Look, the thing is - the Next.js example in the DISCOVERY.md guide has the wrong route path, and folks have been asking for viem and
castsigning examples. No joke.Problem Description
In the Complete Example with Next.js section, the route is currently:
// app/api/.well-known/x402/route.tsC'mon man, Next.js App Router serves routes from
app/directly - soapp/.well-known/x402/route.tswould be accessible at/.well-known/x402. Having/api/in that path means the endpoint would actually be at/api/.well-known/x402which is incorrect.Additionally, the ownership verification signing examples only show ethers.js and Solana - we need viem and Foundry's
castexamples for the crypto folks.Technical Context
docs/DISCOVERY.mdAcceptance Criteria
app/api/.well-known/x402/route.tstoapp/.well-known/x402/route.tscastCLI signing example for folks who prefer command-line toolsContext
@claude please implement this fix