[{"name":"Bech32.Decode","comment":" Decoding Bech32 strings to binary data. A Bech32 string consists of:\n\n  - The human-readable part (a.k.a prefix), which is intended to convey the type of data, or anything else that is relevant to the reader. This part MUST contain 1 to 83 US-ASCII characters, with each character having a value in the range [33-126].\n  - The separator, which is always \"1\". Note that \"1\" is allowed inside the human-readable part and the last one in the string is the separator.\n  - The data part, which is at least 6 characters long and only consists of alphanumeric characters excluding \"1\", \"b\", \"i\", and \"o\".\n\nThe 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.\n\nImportantly, 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.\n\n@docs decode, DecodeFailure, WordsToBytesFailure\n\n","unions":[{"name":"DecodeFailure","comment":" Failures that might occur when decoding a value.\n","args":[],"cases":[["DataPayloadTooShort",["{ minimum : Basics.Int, currentLength : Basics.Int }"]],["PrefixTooShort",["{ minimum : Basics.Int, currentLength : Basics.Int }"]],["UnexpectedCharacterInPayload",["{ culprit : Char.Char }"]],["UnexpectedCharacterInPrefix",["{ culprit : Char.Char }"]],["InvalidChecksum",[]],["MissingSeparator",[]],["InternalError",["Bech32.Decode.WordsToBytesFailure"]]]},{"name":"WordsToBytesFailure","comment":" Failure to decode words into bytes; should never occur in practice because Elm's `Bytes` are well-formed by construction\n","args":[],"cases":[["ExcessPadding",[]],["NonZeroPadding",[]]]}],"aliases":[],"values":[{"name":"decode","comment":" Decode a Bech32 string into its internal constituents. Note that we have the following property:\n\n    Result.andThen Bech32.decode (Bech32.encode { prefix, data }) == Ok({ prefix, data })\n\n","type":"String.String -> Result.Result Bech32.Decode.DecodeFailure { prefix : String.String, data : Bytes.Bytes }"}],"binops":[]},{"name":"Bech32.Encode","comment":" Encoding arbitrary binary data to Bech32. A Bech32 string consists of:\n\n  - The human-readable part (a.k.a prefix), which is intended to convey the type of data, or anything else that is relevant to the reader. This part MUST contain 1 to 83 US-ASCII characters, with each character having a value in the range [33-126].\n  - The separator, which is always \"1\". Note that \"1\" is allowed inside the human-readable part and the last one in the string is the separator.\n  - The data part, which is at least 6 characters long and only consists of alphanumeric characters excluding \"1\", \"b\", \"i\", and \"o\".\n\nThe 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.\n\nImportantly, 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.\n\n@docs encode, EncodeFailure\n\n","unions":[{"name":"EncodeFailure","comment":" Failures that might occur when encoding a value. Can be mostly ignored for well-known prefixes.\n\n  - `UnexpectedCharacterInPrefix`: triggered when the prefix contains characters outside of the unicode range [33; 126]. That is, when it contains characters other than:\n\n        !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\n\n","args":[],"cases":[["UnexpectedCharacterInPrefix",["{ culprit : Char.Char }"]],["PrefixTooShort",["{ minimum : Basics.Int, currentLength : Basics.Int }"]]]}],"aliases":[],"values":[{"name":"encode","comment":" Encode a data payload as Bech32 using the given `prefix`. Note that we have the following property:\n\n    Result.andThen Bech32.decode (Bech32.encode { prefix, data }) == Ok({ prefix, data })\n\n","type":"{ prefix : String.String, data : Bytes.Bytes } -> Result.Result Bech32.Encode.EncodeFailure String.String"}],"binops":[]}]