Encode a Bech32 string from a human-readable prefix and data payload.
Example
import Preludeimport Codec.Binary.Bech32import Data.Text.Encoding
First, prepare a human-readable prefix:
Right prefix = humanReadablePartFromText "example"Next, prepare a data payload:
messageToEncode = "Lorem ipsum dolor sit amet!"dataPart = dataPartFromBytes $ encodeUtf8 messageToEncode
Finally, produce a Bech32 string:
encode prefix dataPartRight "example1f3hhyetdyp5hqum4d5sxgmmvdaezqumfwssxzmt9wsss9un3cx"