base58_xmr

Module for base58-monero decoding/encoding.

class Base58XmrConst

Bases: object

Class container for Base58 Monero constants.

ALPHABET: str = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
BLOCK_DEC_MAX_BYTE_LEN: int = 8
BLOCK_ENC_MAX_BYTE_LEN: int = 11
BLOCK_ENC_BYTE_LENS: List[int] = [0, 2, 3, 5, 6, 7, 9, 10, 11]
class Base58XmrEncoder

Bases: object

Base58 Monero encoder class. It provides methods for encoding to Base58 format with Monero variation (encoding by blocks of 8-byte).

static Encode(data_bytes: bytes) str

Encode bytes into a Base58 string with Monero variation.

Parameters:

data_bytes (bytes) – Data bytes

Returns:

Encoded string

Return type:

str

class Base58XmrDecoder

Bases: object

Base58 Monero decoder class. It provides methods for decoding Base58 format with Monero variation (encoding by blocks of 8-byte).

static Decode(data_str: str) bytes

Decode bytes from a Base58 string with Monero variation.

Parameters:

data_str (str) – Data string

Returns:

Decoded bytes

Return type:

bytes