const Alphabet
Alphabet is the Bitcoin Base58 alphabet.
Package base58 ports the core of Bitcoin's Base58 codec (à la mr-tron/base58 and btcutil/base58) to a gno.land realm.
Package base58 ports the core of Bitcoin's Base58 codec (à la mr-tron/base58 and btcutil/base58) to a gno.land realm.
Base58 is a base conversion from base-256 (raw bytes) to base-58 using an alphabet that omits the visually ambiguous characters 0 (zero), O (capital o), I (capital i) and l (lower L). The conversion here is done with pure byte-slice math — the classic div/mod-by-58 carry loop — so it needs no math/big. Leading zero bytes map to leading '1' characters and back, exactly like the reference implementations.
Decode converts a Base58 string back to the original byte slice. It returns nil if the string contains a character outside the alphabet.
Algorithm: the mirror of Encode — treat the string as a big base-58 integer and convert it back to base-256 bytes with a carry loop. Each leading '1' becomes a leading zero byte.
Encode converts a byte slice to its Base58 string representation.
Algorithm: treat the input as a big base-256 integer and repeatedly convert it into base-58 digits via a carry loop, most-significant digit first. Each leading zero byte becomes a leading '1'.
IsValid reports whether every character of s belongs to the Base58 alphabet.
Render produces the gnoweb Markdown view.