Skip to main content

Module multibase

Module multibase 

Source
Expand description

Multibase encoding/decoding utilities

Multibase is a protocol for self-describing base encodings. The first character indicates the encoding used.

See: https://github.com/multiformats/multibase

Constants§

BASE58BTC_PREFIX
Multibase prefix for base58btc (Bitcoin alphabet)

Functions§

decode_base58btc
Decode a base58btc multibase string (must start with ‘z’)
decode_multikey
Decode a multikey string (multibase + multicodec encoded)
decode_multikey_with_codec
Decode a multikey string and return both codec and key bytes
encode_base58btc
Encode bytes as base58btc with multibase prefix ‘z’
encode_multikey
Encode key bytes with a multicodec prefix as a multibase (base58btc) string
validate_base58btc
Validate that a string is valid base58btc multibase (starts with ‘z’ and decodes correctly)