Chains

Cardano

Shelley and stake addresses decoded under CIP-19 with their Bech32 checksum verified. Byron addresses decoded the way the ledger reads them, CRC-32 verified.
IDcardano18 / 36utxo · ADA
Chain / UTXO

Cardano

"cardano""ada""Cardano"

Symbol
ADA · 6 decimals
Coin type
1815
CAIP-2
cip34:1-76…4073
Checks
address · txid
fields set 5 / 9

Network

CAIP-2cip34:1-764824073
Magicnone
PoWnone
RPCnone
Explorercardanoscan.io

Access

Createcreate("cardano")
ResolvegetChain("ada")
CLIchains info ada
Tryplayground with a sample address

Address format

Shelley addr1… and stake stake1… addresses are read the same way: the Bech32 checksum under addr or stake, past the 90 characters BIP-173 allows because a base address is 103, then CIP-19's header. The network tag has to be mainnet's, the type has to fit the prefix, and the payload has to be what the type carries: two 28-byte credentials for a base address, one for an enterprise or reward address, one plus a pointer for a pointer address. A pointer has to carry the three coordinates the ledger reads, seven bits a byte, within their widths, with nothing left over.

Byron Ae2… and DdzFF… addresses are read the way the Byron ledger's decodeCrcProtected reads them: an array of two, tag 24 over the payload's byte string, then a CRC-32 that has to be the payload's. The payload has to be the array of three the ledger decodes, a 28-byte root, the attribute map and a type it knows, 0 for a verification key and 2 for a redeem key, with nothing after. The attributes are byte strings under small keys the ledger keeps unparsed unless it knows them, and key 2 is the network magic, which only a test network writes: the mainnet ledger reads any value there as a testnet address, so the address fails. That includes the Byron example in CIP-19, which carries the legacy testnet magic.

ts
import { getChain } from "@agntn/chains";

const chain = getChain("ada");
chain.assertAddress("addr1qx2fxv2umyhttkxyxp8x0dlpdt3k6cwng5pxj3jhsydzer3n0d3vllmyqwsx5wktcd8cc3sq835lu7drv2xwl2wywfgse35a3x"); // returned unchanged
chain.type; // "utxo"
chain.caip2; // "cip34:1-764824073"

Spellings

cardano, ada, Cardano. The key is cardano, the rest resolve through getChain.