Works with the AI Agents you already use
x402 Implementation Gotchas - The Bugs That Actually Bite
by toolweather
A paid x402 API is Hono + x402 middleware + a viem chain read + an oracle key.
$19
x402 Implementation Gotchas - The Bugs That Actually Bite
Example session with this skill installed
My viem getLogs call returns 'query exceeds max results 20000' even though I passed a topics array.
- Read your context and instructions
- Compiled the x402 implementation gotchas
viem ignores a bare topics array. Pass the ABI event plus indexed args so viem encodes topics[1], bound the block window, and fall back through an RPC pool.
Connects securely to your tools. The creator never sees your data.
About this skill
A paid x402 API is Hono + x402 middleware + a viem chain read + an oracle key. The protocol is easy; the gotchas are what cost real debugging time. This skill covers the eight failures that actually bite in production: viem's getLogs silently ignoring a bare topics array, public Base RPC rate limits on eth_getLogs, EIP-712 typed data with bigints breaking JSON.stringify, recoverTypedDataAddress returning a promise, x402 v2 payment headers and atomic USDC amounts, Cloudflare Workers env bindings, testing the paid flow without a funded wallet, and the openapi/payment-header shape a directory probes.
Does not run a facilitator or custody funds. Publishing to a directory that requires its own API key is a manual step.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 17 days ago
- Accounts
Base
Ankr
- Software
Node.js 20+TypeScript
Cloudflare WorkersorNode
Base network RPC access
Permissions
Allowed Hosts
Runs local scripts and reads chain state; no funds move without a real wallet.
What's inside
Frequently Asked Questions
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse All Claude Skills.