Chains
Monero
Mainnet standard addresses, subaddresses and integrated addresses. Monero's base58 goes in blocks, so treating it like a Bitcoin address would be wrong.
- create
- create("monero")
- family
- Monero · monero
- symbol
- XMR · 12 decimals
- bip44
- 128
- caip2
- monero:418015bb9ae982a1975da7d79277c270
- explorer
- xmrchain.net
Address format
Monero encodes base58 in blocks: every eight bytes become eleven digits and the final five bytes become seven, so a standard address or subaddress is 95 characters and an integrated address 106. The check reads each block, requires it to fit its byte width, and reads the network and type byte off the first one: 18 for a standard address (4…), 42 for a subaddress (8…), 19 for an integrated address (4…, 106 characters). Testnet and stagenet prefixes are rejected.
The Keccak checksum in the last four bytes and the two public keys aren't verified. Twelve decimals, 1,000,000,000,000 piconero per XMR.
import { getChain } from "@agntn/chains";
const chain = getChain("xmr");
chain.assertAddress("4AdUndXHHZ6cfufTMvppY6JwXNouMBzSkbLYfpAV5Usx3skxNgYeYTRj5UzqtReoS44qo9mtmXCqY45DJ852K5Jv2684Rge"); // returned unchanged
chain.type; // "monero"
chain.caip2; // "monero:418015bb9ae982a1975da7d79277c270"
Spellings
monero, xmr, Monero. The key is monero, the rest resolve through getChain.