Repository navigation
x402 on every surface (API + MCP) + proof-of-work challenge - #232
Merged
Merged
Conversation
…proof-of-work challenge - lib/api-meter.js replaces the /api/v1 rateLimit: a valid crawl pass gets the premium hourly allowance (it met the meter as a stranger before); a stranger over 600/h gets the gateway's 402 x402 offer instead of a 429, and a payment sent with the request settles on the spot. - /mcp and /api/mcp POST get the same meter (they had none). - x402-gateway 0.12.0, challenge.work 17: the headless-Chrome swarm ran the one-line cookie script (402, same IP same second, 200); now each address pays a proof of work. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This was referenced Oct 21, 2026
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.
Why nobody pays (measured 2026-10-21): 0 rows in crawl_sales, ever. Buying works (checkout 303s to a CoinPay cs_ session; x402 offer valid), but every door is free:
Changes:
lib/api-meter.js(pass = premium allowance, over-limit stranger = gateway.sell 402 with the x402 offer, settles PAYMENT-SIGNATURE/X-PAYMENT), applied to /api/v1/* and MCP POST; x402-gateway 0.12.0 withchallenge.work: 17.bun test: 2542 pass, 0 fail.
🤖 Generated with Claude Code