Decoding Bech32 strings to binary data. A Bech32 string consists of:
The last 6 characters of the data-part are an actual checksum of the payload and the prefix, which ensures integrity of the whole string. It also provides bases for an error-detection algorithm, which isn't implemented yet as part of this library.
Importantly, the checksum and the error-detection are most optimal for strings of length smaller than 90 characters. Generating longer strings work, but decreases the efficiency of the checksum in detecting corrupted strings.
Failures that might occur when decoding a value.
Failure to decode words into bytes; should never occur in practice because Elm's Bytes are well-formed by construction
Decode a Bech32 string into its internal constituents. Note that we have the following property: