Clarify devnet network ID in Agentic Payments x402 example#1591
Open
PrajwalGraj wants to merge 1 commit into
Open
Clarify devnet network ID in Agentic Payments x402 example#1591PrajwalGraj wants to merge 1 commit into
PrajwalGraj wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 5 Skipped Deployments
|
|
@PrajwalGraj is attempting to deploy a commit to the Solana Foundation Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
Comment on lines
+82
to
83
| "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", // Solana Devnet | ||
| new ExactSvmScheme() |
Contributor
There was a problem hiding this comment.
The first occurrence of the devnet ID includes a mainnet alternative comment for discoverability, but the second occurrence in the
x402ResourceServer.register() call omits it. A developer copying only the server-registration snippet would still encounter an unexplained ID.
Suggested change
| "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", // Solana Devnet | |
| new ExactSvmScheme() | |
| "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", // Solana Devnet – use "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp" for Mainnet (CAIP-2) | |
| new ExactSvmScheme() |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
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.
Problem
The Express x402 middleware example on
/docs/payments/agentic-paymentsusesnetwork: "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"with no indication that this is the Solana Devnet CAIP-2 chain ID (confirmed against https://namespaces.chainagnostic.org/solana/caip2 and Coinbase's x402 docs).Mainnet's ID is
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp. A developer copying this example to build a real paid endpoint could end up on either network without realizing the distinction, since neither value is explained.Summary of Changes
Kept devnet as the example value but added comments clarifying which network it is and what the mainnet CAIP-2 equivalent would be, so the choice is explicit instead of silent.
Fixes #
Change classification (SDLC §2)
security gates, or anything that changes who can do what
changes, dependency updates, monitoring/config)
Security checklist
(use Doppler /
NEXT_PUBLIC_*only for values safe to ship to thebrowser).
dangerouslySetInnerHTML/ unsanitized HTML on untrusted input.pnpm auditpasses (no new High/Critical advisories).
included below, and a second reviewer has been requested.
New dependencies: none
Threat-model note: n/a - Low-risk documentation-only change.