feat(supported): return CAIP-2 chain IDs for v2 protocol#1
Open
kbak wants to merge 1 commit intoinfra402:mainfrom
Open
feat(supported): return CAIP-2 chain IDs for v2 protocol#1kbak wants to merge 1 commit intoinfra402:mainfrom
kbak wants to merge 1 commit intoinfra402:mainfrom
Conversation
The /supported endpoint only returned v1-format entries with network names (e.g. "base", "solana"). V2 clients expect CAIP-2 chain IDs (e.g. "eip155:8453", "solana:mainnet"). Each provider now returns both a v1 entry (x402Version: 1, network name) and a v2 entry (x402Version: 2, CAIP-2 chain ID). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
kbak
added a commit
to kbak/infra402-facilitator
that referenced
this pull request
Feb 11, 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
/supportedendpoint only returned v1-format entries with network names (e.g."base","solana") andx402Version: 1"eip155:8453","solana:mainnet") withx402Version: 2Example response (before)
{"kinds": [{"x402Version": 1, "scheme": "exact", "network": "base"}]}Example response (after)
{"kinds": [ {"x402Version": 1, "scheme": "exact", "network": "base"}, {"x402Version": 2, "scheme": "exact", "network": "eip155:8453"} ]}Files changed
src/chain/evm.rs— add v2 entry insupported()src/chain/solana.rs— add v2 entry insupported()src/chain/aptos.rs— add v2 entry insupported()src/types.rs— addX402Version::V2variant with serde supportsrc/network.rs— add CAIP-2 format testTest plan
cargo test --lib— 143 tests passcargo clippy— no new warningsx402Versionserializes as2)Networkvariants produce valid CAIP-2 strings🤖 Generated with Claude Code