Exosphere.ATProto.Base58 (Exosphere v0.3.0)

Copy Markdown View Source

Minimal base58btc codec used for did:key and Multikey encoding.

Implements the Bitcoin/IPFS base58 alphabet (see Multibase prefix z). This is intentionally small and is not exposed as a top-level Elixir Base58 module to avoid namespace pollution for library consumers.

Summary

Functions

Decode a base58btc string to a binary. Returns {:ok, binary} or :error.

Encode a binary to base58btc.

Functions

decode(string)

@spec decode(String.t()) :: {:ok, binary()} | :error

Decode a base58btc string to a binary. Returns {:ok, binary} or :error.

encode(bytes)

@spec encode(binary()) :: String.t()

Encode a binary to base58btc.