Guide

Metadata

Every field on a chain class. Which ones may be missing and why. Where each decimals value was checked.

The fields

FieldTypeDescription
keyChainKeyCanonical class key
namestringDisplay name
symbolstringNative token symbol
decimalsnumber?Native currency decimal places
typeChainTypeBlockchain family
bip44number?BIP-44 / SLIP-0044 coin type
chainIdstring?EVM chain ID in hexadecimal
caip2string?CAIP-2 identifier
explorerstringBlock explorer base URL
rpcDefaultstring?Default public RPC endpoint

key is read off the class, chain.key and Bitcoin.key are the same string. type is the family the class belongs to: evm, utxo, solana, stellar, xrpl, move, ton, tron, octra, arweave or monero. EVM and Move set it for their subclasses, every other chain declares it itself.

Optional fields stay empty when the chain has no registered value. Octra has no BIP-44 coin type and no CAIP-2 namespace, so both are undefined rather than invented. eCash and Decred have a coin type but no CAIP-2 identifier. Only EVM chains carry a chainId, and only some chains ship a public RPC worth defaulting to. The tools print an absent coin type or CAIP-2 as none, because a value that simply vanishes reads as "not shown" and invites the caller to supply one from memory.

chainId and the reference in caip2 encode the same number twice, so a test checks them against each other. Linea shipped a testnet id against a mainnet CAIP-2 until that test existed.

Decimals

decimals is the exponent in 1 whole native unit = 10^decimals base units. It belongs to the currency, not the address family. eCash is the useful counterexample: XEC has two decimal places despite sharing Bitcoin's UTXO ancestry, and assuming eight for every UTXO chain would get XEC amounts badly wrong. Avalanche here means AVAX on the C-Chain; this metadata doesn't describe its X and P chains.

create("bitcoin").decimals; // 8
getChain("xec").decimals; // 2

This isn't a token's precision or a UI rounding preference, and an RPC may already return amounts in whole units. Every built-in chain declares decimals. Custom classes may leave it undefined, which means unknown, never a default of 18. 0 is a valid value for an indivisible currency. chains info and chains_lookup print unknown when the field is absent, --json omits it.

These references were checked on 2026-09-05. Tests pin the values independently of the classes, and no network request is needed at runtime or during tests.

ChainDecimalsReference
Ethereum, Base, Arbitrum, Optimism, Polygon, BNB Chain, Avalanche C-Chain, Fantom, Gnosis, Linea, zkSync, Scroll, Berachain18ethereum-lists/chains, nativeCurrency.decimals in eip155-{1,8453,42161,10,137,56,43114,250,100,59144,324,534352,80094}.json
Bitcoin8Bitcoin Core COIN, 100,000,000 satoshis
Litecoin8Litecoin COIN, 100,000,000
Pepecoin8Pepecoin COIN, 100,000,000; native PEP, not an ERC-20 token
eCash2eCash build documentation, 100 satoshis per XEC
Cardano6Cardano denominations, 1,000,000 lovelace per ADA
Solana9Solana account structure, 1,000,000,000 lamports per SOL
Stellar7Stellar asset precision, 10,000,000 stroops per XLM
XRP Ledger6XRP currency format, 1,000,000 drops per XRP
Aptos8AptosCoin initialization, decimals = 8
Sui9SUI module, 1,000,000,000 mist per SUI
TON9TON Core conversion, 1,000,000,000 nano units per TON
TRON6TRX denominations, 1,000,000 sun per TRX
Octra6Octranomics, 1,000,000 operational units per OCT
Arweave12Arweave debugging guide, 1,000,000,000,000 Winston per AR
Monero12Monero configuration, CRYPTONOTE_DISPLAY_DECIMAL_POINT = 12
Decred8Decred AtomsPerCoin, 100,000,000 atoms

Coin types

bip44 is the SLIP-0044 coin type, the number that goes into m/44'/coin'/…. All thirteen EVM chains repeat 60, Ethereum's, which is what wallets actually derive with. Decred is 42, not its legacy 20. Octra has none registered and the field says so instead of borrowing one. Deriving keys from it belongs in @agntn/keys, not here.

@agntn/chains·MIT license· A format check, not proof an address exists. Nothing on this site talks to a chain.