Table of Contents

Base58Variant Enum

Definition

Namespace
Bodu.Text.Encoding
Assembly
Bodu.Text.Encoding.dll
Package
Bodu.Text.Encoding 1.3.0
Source
Base58Variant.cs

Identifies the Base58 alphabet used by Base58.

public enum Base58Variant : byte
Extension Methods

Fields

BitcoinFlickr = 0

The Bitcoin alphabet, where digits are sorted ascending followed by upper-case letters and then lower-case letters (omitting 0, O, I, l). This is the alphabet used by Bitcoin addresses, IPFS CIDs, Solana, and NEAR. Despite the member's name it is not Flickr's alphabet, which puts the lower-case letters first; use Flickr for Flickr short URLs.

Ripple = 1

The Ripple alphabet, a permutation of the Bitcoin alphabet used by the XRP ledger.

Flickr = 2

The Flickr alphabet, used by Flickr short photo URLs: digits sorted ascending followed by lower-case letters and then upper-case letters (omitting 0, O, I, l), which is the Bitcoin alphabet with its two blocks of letters in the opposite order.

Remarks

Base58 is a non-power-of-two radix that excludes visually ambiguous characters (zero, capital-O, capital-I, and lower-case L). Each variant differs only in the ordering of the 58 alphabet symbols, so the same bytes encode to different text in each.

byte[] payload = { 0x00, 0x01, 0x02 };

var bitcoin = Base58.Encode(payload);                          // "15T" - Bitcoin alphabet (default)
var flickr = Base58.Encode(payload, Base58Variant.Flickr);     // "15s" - lowercase-first alphabet
var ripple = Base58.Encode(payload, Base58Variant.Ripple);     // "rnT" - Ripple's reordering

Applies to

ProductVersions
.NET8, 10