StaticdecodeDecodes a Bech32 string into its human-readable prefix (HRP) and binary data.
Extracts the HRP and binary data from the Bech32 string. Additionally, it converts the binary data into a hexadecimal string for convenience.
The Bech32-encoded string to decode.
hrp: The decoded human-readable prefix.data: The decoded binary data as a Uint8Array.hex: The hexadecimal string representation of the binary data.StaticencodeEncodes binary data into a Bech32 string with a specified human-readable prefix (HRP).
The HRP provides context about the encoded data (e.g., address type). The binary data is converted into a Bech32-compliant string, which includes the HRP and checksum.
The human-readable prefix for the Bech32 string (e.g., 'addr').
The binary data to encode.
StaticencodeEncodes a hexadecimal string into a Bech32 string with a specified HRP.
Converts the hexadecimal string into binary data, then encodes it using the Bech32 format.
The human-readable prefix for the Bech32 string.
The hexadecimal string to encode.
A utility class for encoding and decoding data using the Bech32 encoding format.
This class provides methods for encoding binary data with a human-readable prefix (HRP) into a Bech32 string and for decoding Bech32 strings back into their HRP and binary data components.