Repository navigation
Conversation
Adds GET /.well-known/x402-verify — a read-only metadata endpoint that lets external indexers (like nullclear.dev) verify that an x402 gateway is live, what methods it accepts, and how settlement works. The badge includes: - x402 protocol version (1 or 2) - accepted payment methods (network, asset, label) - settlement flow (verify-then-settle via CoinPay) - optional payee address for transparency - ISO timestamp of badge generation CORS-enabled and cached for 5 minutes. No secrets, no keys, no payment logic — just metadata for discovery and verification. Relates to profullstack#19.
ralyodio
added a commit
that referenced
this pull request
Oct 28, 2026
Since 0.8 a stale or headless browser string is charged on every path, including /login, /signup, /oauth, /dashboard, /pay and /api/*. Every fleet site on ^0.13.1 answered an old Chrome or HeadlessChrome with 402 there, so an agent whose CoinPay OAuth token lapsed could not sign back in. APP_PATHS (exported, with isAppPath) lists those surfaces; handle() lets them through after `exempt`. Sites append their own with `appPaths`, or pass false. Also ports test/verify-badge.test.js from vitest (not a dependency) to node:test, which had main's CI red since #23. Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add a read-only
/.well-known/x402-verifyendpoint that returns JSON metadata about the gateway's x402 configuration, so external indexers (like nullclear.dev) can verify the endpoint is live and schema-valid.Why
Issue #19 asks for a way to index x402 endpoints and verify they're legitimate. Currently there's no standard metadata endpoint — indexers have to probe the 402 response to discover what methods are accepted, which is fragile and doesn't give them settlement flow details.
A well-known badge endpoint lets indexers:
How
Added two files:
src/verify-badge.js—buildVerificationBadge()builds the metadata object,verificationBadgeHandler()returns aResponsewith JSON + CORS + 5-min cache.test/verify-badge.test.js— 10 tests covering badge construction, CORS headers, cache headers, and body parsing.The badge is pure metadata — no secrets, no keys, no payment logic. It's safe to expose publicly and CORS-enabled so any indexer can fetch it cross-origin.
Relates to #19.