Add Cardano namespace (cardano) with CAIP-2 profile - #206
Open
okwme wants to merge 1 commit into
Open
Conversation
Adds a CAN for the cardano ecosystem with a CAIP-2 Blockchain ID profile. Drafted by the maintainers of FAR, an open cross-reference between CAIP-19, CoinGecko and ISO 24165 identifiers, which needs a CAIP-2 for this chain to name assets that exist on it. The authors do not represent the cardano ecosystem and offer this as a starting point for its community to correct, adopt or replace. Discussion: 0xcounting/FAR#1
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.
Adds a CAN for Cardano with a CAIP-2 Blockchain ID profile.
Who wrote this
I do not represent the Cardano ecosystem — not IOG, not Intersect, not the CIP editors. I maintain FAR, an open cross-reference between CAIP-19, CoinGecko and ISO 24165 identifiers, which needs a CAIP-2 for Cardano to name 84 assets. Offered as a starting point for Cardano's maintainers to correct, adopt or replace, and I would rather it carried their name.
Proposal
cardano:+ CIP-34's<network-id>-<network-magic>.Max length 13 chars, comfortably inside CAIP-2's 32 — no truncation needed, which the 64-hex genesis hash alternative would have required.
The namespace name is the part most worth arguing about
CIP-34 "Chain ID Registry" already defines
cip34:NetworkId-NetworkMagicwith CAIP-2 integration as a stated goal, andcip34:strings are in real circulation (@dcspark/cip34-json npm; x402's Cardano mechanism accepts them, with a source comment noting no registered CASAcardanonamespace exists).I propose
cardanoanyway, on three grounds:cip34names a document.eip155andbip122, bound cross-ecosystem families where no ecosystem name would be accurate. CIP-34's registry has no members outside Cardano, so that precedent does not transfer.Proposed, notActive, with its acceptance criteria unmet. A superseding CIP would leave the namespace naming a retired document.I have not buried the counter-argument: CAIP-2's own text says a namespace "describes an ecosystem or standard". The draft carries a Legacy section documenting
cip34:as an accepted input alias, and the profile can be renamed tocip34with no change to the reference format or test cases if the editors or the Cardano community prefer. Migration either way is a pure prefix swap.Verified live (2026-09-14)
Koios
/genesison all three networks, cross-checked againstIntersectMBO/cardano-node'smainnet-shelley-genesis.json(networkMagic: 764824073,networkId: "Mainnet") and CIP-34'sregistry.json. TheMainnet→1 /Testnet→0 numeric mapping is from CIP-19's network tag table, corroborated by CIP-30getNetworkId().Why the compound reference, given magic alone is unique
The magic does bear the uniqueness — the network id is 4 bits, and preprod and preview both use
0. I kept the compound for CIP-34 continuity, because it enables an address cross-check (a network-tag-0address cannot belong to a1-chain), and to avoid test networks being identified ascardano:1/cardano:2. The obvious editor objection — that a redundant component could yield two ids for one chain — is closed by specifying that both values come from the same Shelley genesis, so the reference is canonical rather than implementer-chosen.Flagged for a future CAIP-19 profile
A Cardano asset is policy id (28 bytes / 56 hex) + asset name (arbitrary ≤32 bytes, may be empty, need not be UTF-8). Neither is unique alone, and the concatenated form runs to 120 hex characters — over CAIP-19's 128-char reference limit once any separator is added, so an asset profile will need a defined split. CIP-14
asset1…fingerprints are a display aid and not reversible. ADA itself is not a native asset and has no policy id.discussions-to: 0xcounting/FAR#1