caelum0x 2b68bde5d5 Predikt: full Polymarket-style prediction market — web + mobile + on-chain + bots
Working tree is now the canonical repo. Off-chain play-money + trustless on-chain
(FPMM AMM + CLOB via UMA settlement), AI market factory, creator/social/distribution,
mobile shell + push, one-command demo + deploy-kit. Secrets excluded (see ENV-AND-KEYS.md).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 23:29:50 +03:00

1.0 KiB

Base58

Library to encode strings in Base58.

Custom Errors

Base58DecodingError()

error Base58DecodingError()

An unrecognized character or overflow was encountered during decoding.

Encoding / Decoding

encode(bytes)

function encode(bytes memory data)
    internal
    pure
    returns (string memory result)

Encodes data into a Base58 string.

encodeWord(bytes32)

function encodeWord(bytes32 data)
    internal
    pure
    returns (string memory result)

Encodes the data word into a Base58 string.

decode(string)

function decode(string memory encoded)
    internal
    pure
    returns (bytes memory result)

Decodes encoded, a Base58 string, into the original bytes.

decodeWord(string)

function decodeWord(string memory encoded)
    internal
    pure
    returns (bytes32 result)

Decodes encoded, a Base58 string, into the original word.