Repository navigation
Conversation
|
👀 We've notified the reward creators here. |
This branch has not been deployed
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.
/claim #3
Adds
examples/mastra-prepay-check/: a Mastra agent with onecreateTool(id: 'check402') that callsrunCheck402({ url })from@agent402-dev/ai-sdk-tools. One request without a payment header; nothing is signed or paid; no wallet, key or RPC is used. The agent's instructions say not to pay whenfixes > 0.src/index.ts: the tool, the agent and its instructions, and a CLI entry that takes the URL.--allow-localis opt-in because the tool refuses localhost by default.package.json+package-lock.json: exact versions (@mastra/core1.87.0,@agent402-dev/ai-sdk-tools0.1.0,@ai-sdk/openai-compatible3.0.100,zod4.6.7; Node 22.13+, which@mastra/corerequires).README.md: install, run, result fields, the local broken 402 case, and the versions used.Verified on 2026-12-05 with Node 24.15.0 and model
gemini-3.5-flashvia Google's OpenAI-compatible endpoint (LLM_BASE_URL/LLM_MODEL), from a cleannpm install:npm start -- https://agent402-check402.agent402-ebc.workers.dev/x402/check402->fixes: 0. The endpoint returned a valid x402 payment header with no fixes required. price: 0.01 USDC on Solana, 0.01 USDC on Base.PAYMENT-REQUIREDheader (--allow-local):fixes: 1. I will not pay this endpoint. The finding reported: HTTP 402 without a PAYMENT-REQUIRED header.tsc --noEmitonsrc(strict) passes.Not verified: the default
gpt-5-minionapi.openai.com(no OpenAI key available here), and no endpoint other than Google's OpenAI-compatible API was run. Nothing was paid in any run;runCheck402only reads the 402 answer.AI help: written with an AI assistant (Hermes); the diff was reviewed before submission.