feat(scan): migrate to agentcash-router, update integration prompt#686
Merged
feat(scan): migrate to agentcash-router, update integration prompt#686
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
zdql
reviewed
Mar 5, 2026
| { headers: corsHeaders } | ||
| ); | ||
| }; | ||
| export const POST = withCors( |
Contributor
Resolved conflicts: - package.json: kept @agentcash/router, updated @agentcash/discovery to 1.0.0 - integration-spec/page.tsx: kept HEAD "done when" criteria (includes registration step), took main's "ALL" wording - registry-register.ts: kept HEAD import paths (/x402/_lib/) - Deleted proxy.ts, api/send/route.ts, data/_lib/utils.ts (superseded by agentcash-router migration) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…o latest - Ported BigInt serialization fix from main's data/_lib/utils.ts into new x402/_lib/utils.ts - @agentcash/discovery 1.0.0 → ^1.1.0, @agentcash/router ^0.7.0 → ^1.0.1 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@agentcash/discovery@1.1.0 requires @x402/core@^2.5.0 which caused a dual-version conflict with the app's @x402/evm@2.3.0 types. Reverted discovery to 1.0.0 (same as main) and added pnpm overrides to pin all @x402/* packages to 2.3.0, preventing lockfile drift from pulling in breaking type changes unrelated to this PR. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Not used anywhere in the app — only present as an optional peer of @agentcash/router. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
zdql
approved these changes
Mar 12, 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.
Summary
/api/data/*route handlers fromx402-nextproxy middleware to@agentcash/routerfluent builder API/api/sendto the router with dynamic pricing (.paid((body) => body.amount.toString())) and dynamicpayTo(payment goes to the recipient address in the body).siwx()(wallet identity, no payment).paid()with static pricing via the router/openapi.jsonendpoint auto-generated from the route registry — no more manual spec patching.path()to dynamic-segment routes so OpenAPI paths render correctly ({address},{id})routes-barrel.ts) to ensure all routes register before discovery endpoints runwithCorswrapper instead of middlewaremppxtoserverExternalPackagesto fix Turbopack build with@agentcash/routerproxy.ts(old x402 middleware) andextensions.ts(only used by proxy)fetch_with_authfor register-origin (SIWX auth required)mppximportstempofromviem/chains, which was added in viem 2.47.0)Breaking changes
POST /api/sendnow expectsamount,address, andchainin the JSON request body instead of query parameters. Callers must update from?amount=1&address=0x...&chain=baseto{ "amount": 1, "address": "0x...", "chain": "base" }.