Chains

XRP Ledger

Classic r… addresses and X-addresses, read under the ledger's own base58 alphabet. Bitcoin's ordering would return wrong bytes instead of a rejection.
create
create("xrpl")
family
XRP Ledger · xrpl
symbol
XRP · 6 decimals
bip44
144
caip2
xrpl:0
explorer
livenet.xrpl.org

Address format

The XRP Ledger writes base58 over its own ordering of the same 58 characters, rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz, with r as zero. An address has to be decoded under those digits or the bytes come back wrong rather than rejected, which is worse.

A classic account is 25 Base58Check bytes under version 0x00, so it starts with r. An X-address folds a destination tag in: 35 bytes under the mainnet prefix 0x05 0x44, a flag byte of 0 or 1, and the tag bytes the flag doesn't use required to be zero, as XLS-5 says. The testnet prefix 0x04 0x93, which writes T…, is turned away. The checksum stays unchecked on both forms.

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

const chain = getChain("xrp");
chain.assertAddress("rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH"); // returned unchanged
chain.type; // "xrpl"
chain.caip2; // "xrpl:0"

Spellings

xrpl, xrp, ripple, XRP Ledger. The key is xrpl, the rest resolve through getChain.

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