Skip to content

Add Cardano namespace (cardano) with CAIP-2 profile - #206

Open
okwme wants to merge 1 commit into
ChainAgnostic:mainfrom
okwme:add-cardano-namespace
Open

Add Cardano namespace (cardano) with CAIP-2 profile#206
okwme wants to merge 1 commit into
ChainAgnostic:mainfrom
okwme:add-cardano-namespace

Conversation

@okwme

@okwme okwme commented Sep 14, 2026

Copy link
Copy Markdown

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>.

cardano:1-764824073    mainnet
cardano:0-1            preprod
cardano:0-2            preview

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-NetworkMagic with CAIP-2 integration as a stated goal, and cip34: strings are in real circulation (@dcspark/cip34-js on npm; x402's Cardano mechanism accepts them, with a source comment noting no registered CASA cardano namespace exists).

I propose cardano anyway, on three grounds:

  • CASA names a namespace after the ecosystem. cip34 names a document.
  • The two document-named namespaces, eip155 and bip122, 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.
  • CIP-34 is status Proposed, not Active, 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 to cip34 with 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 /genesis on all three networks, cross-checked against IntersectMBO/cardano-node's mainnet-shelley-genesis.json (networkMagic: 764824073, networkId: "Mainnet") and CIP-34's registry.json. The Mainnet→1 / Testnet→0 numeric mapping is from CIP-19's network tag table, corroborated by CIP-30 getNetworkId().

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-0 address cannot belong to a 1- chain), and to avoid test networks being identified as cardano: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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant