Encodings
Base58 (Ripple)
Base58 with the XRP Ledger alphabet where account addresses start with r
Encoding / Base58
Base58 (Ripple)
Base58 shuffled so addresses start with r.
- Overhead
- +37% on random bytes
- Padding
- none
- Standard
- XRP Ledger address encoding
- Used by
- XRP Ledger
family 4 / 20
Sample
- Out
- pyGNbAREy6PZZckKw
- Back
- "hello world!"
rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz
Access
- Import
import { base58ripple } from "@agntn/encodings/base58" - CLI
encodings encode base58-ripple 'hello world!' - Tryplayground with the sample above
- Kinbase58, base58check, base58-flickr
The XRP Ledger shuffled the alphabet so that r is the zero digit. Version byte zero, address starts with r. Cute.
hex.encode(decode("base58-ripple", "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh").bytes);
// "00b5f762798a53d543a014caf8b297cff8f2f937e8bf32ba9f"
That's the ledger's genesis account. Version 0x00, then a 20-byte account ID, then bf32ba9f. Those last four bytes? The double SHA-256 of everything before them. Same checksum scheme as Bitcoin. This codec decodes the alphabet and leaves the checksum to you. So a typo here decodes without complaint.