Skip to content

OnixLabs.Core.Text.Base58FormatProvider

matthew edited this page May 27, 2026 · 1 revision

Base58FormatProvider Class

Represents a Base-58 format provider.

Namespace OnixLabs.Core.Text
Assembly OnixLabs.Core.dll (NuGet)
Inheritance object → Enumeration<Base58FormatProvider> → Base58FormatProvider
Implements IEquatable<Base58FormatProvider>, IComparable<Base58FormatProvider>, IComparable, IFormatProvider

Definition

public sealed class Base58FormatProvider : Enumeration<Base58FormatProvider>, IFormatProvider

Remarks

Base58FormatProvider is a smart enumeration that carries the alphabet used by Base58Codec to encode and decode Base-58 values. It derives from Enumeration<Base58FormatProvider> and implements IFormatProvider.

Three entries are declared, each representing a different real-world Base-58 alphabet variant: the Bitcoin alphabet (also used by Monero and IPFS), the Flickr alphabet, and the Ripple alphabet. Decoding fails if the input contains a character not present in the provider's alphabet.

Because the type derives from Enumeration<T>, all entries are also available through the inherited static query methods such as GetAll, FromName, and FromValue.

Fields

All fields are declared as public static readonly Base58FormatProvider.

Field Description
Bitcoin The Bitcoin Base-58 format provider. Also the format used by Monero and IPFS. Alphabet 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz.
Flickr The Flickr Base-58 format provider. Alphabet 123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ.
Ripple The Ripple Base-58 format provider. Alphabet rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz.

Bitcoin

public static readonly Base58FormatProvider Bitcoin;

The Bitcoin Base-58 format provider. This is also the same format used by Monero and IPFS. Alphabet 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz. This is the default provider used by Base58Codec.

Flickr

public static readonly Base58FormatProvider Flickr;

The Flickr Base-58 format provider. Alphabet 123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ. The Flickr alphabet reorders the Bitcoin alphabet, placing lowercase letters before uppercase.

Ripple

public static readonly Base58FormatProvider Ripple;

The Ripple Base-58 format provider. Alphabet rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz. Used by the Ripple cryptocurrency network.

Properties

Property Type Description
Alphabet string Gets the Base-58 alphabet associated with the current format provider.

Alphabet

public string Alphabet { get; }

Gets the alphabet of the current Base58FormatProvider instance.

Methods

Method Returns Description
GetFormat(Type?) object? Returns the current instance when formatType is typeof(Base58FormatProvider); otherwise, returns null.

GetFormat(Type?)

public object? GetFormat(Type? formatType)

Returns the current instance when formatType is typeof(Base58FormatProvider); otherwise, returns null. This is the IFormatProvider contract method that allows the format provider to be passed to any API that accepts IFormatProvider.

Parameter Type Description
formatType Type? The type of format object to obtain.

Returns — The current instance if formatType is typeof(Base58FormatProvider); otherwise, null.

See Also

ONIXLabs .NET Library


Clone this wiki locally