Expand description
Mina base58check encoding and decoding.
Implements the base58check scheme used by the Mina protocol: a single version byte followed by the payload, with a 4-byte double-SHA256 checksum appended before base58 encoding.
Modules§
- version
- Version bytes for Mina base58check encodings. Version bytes for Mina base58check encodings.
Enums§
- Decode
Error - Errors that can occur when decoding a base58check string.
Functions§
- checksum 🔒
- Double-SHA256 checksum of
data. - checksum_
verify 🔒 - Constant-time comparison of two 4-byte checksums.
- decode
- Decode a base58check string, returning
(version, payload). - decode_
raw - Decode a base58check string, verify the checksum, and return the raw bytes (without the trailing checksum but including any version bytes).
- decode_
version - Decode a base58check string and verify the version byte.
- encode
- Encode
payloadwith a leadingversionbyte in base58check. - encode_
raw - Encode raw bytes (which already contain any version/structure bytes) with an appended 4-byte double-SHA256 checksum.