Add Neo namespace and CAIP-2 profile#191
Open
erikzhang wants to merge 1 commit into
Open
Conversation
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
neonamespace documentation for blockchains implementing the Neo N3 protocol.Motivation
Neo N3 does not currently have a canonical CAIP-2 identifier, which limits interoperability with chain-agnostic wallets, SDKs, payment protocols, and other multi-chain infrastructure.
This proposal was discussed with the Neo community in neo-project/proposals#238. The discussion supported using
neoas the namespace and the existing Network Magic value as the CAIP-2 reference.Specification
The profile defines Neo chain IDs in the following form:
The reference is the Network Magic encoded as a canonical unsigned decimal string. It must:
^(0|[1-9][0-9]{0,9})$;uint32range0..4294967295;Clients can resolve the identifier through the standard Neo JSON-RPC
getversionmethod by readingresult.protocol.network.The profile includes identifiers for these well-known networks:
neo:860833102neo:894710606neo:91414437neo:735783775Because Network Magic is operator-selected and not globally allocated for private networks, the profile explicitly documents collision behavior and operator responsibilities. It also notes that a CAIP-2 identifier obtained from an RPC endpoint is not, by itself, proof of endpoint authenticity.
CAIP-10 account identifiers and CAIP-19 asset identifiers are intentionally left for follow-up proposals.
Verification
uint32Network Magic type is defined byProtocolSettings.Network.config.jsonandconfig.testnet.json.neo-go.getversionJSON-RPC documentation.uint32boundaries.Related discussion