Releases: elm-cardano/bech32
Releases · elm-cardano/bech32
v1.0.0 - 2024-12-15
Elm Package
Added
Bech32.Encode
-
{-| Encode a data payload as Bech32 using the given `prefix`. -} encode : { prefix : String, data : Bytes } -> Result EncodeFailure String
-
type EncodeFailure = UnexpectedCharacterInPrefix { culprit : Char } | PrefixTooShort { minimum : Int, currentLength : Int }
Bech32.Decode
-
{-| Decode a Bech32 string into its internal constituents. -} decode : String -> Result DecodeFailure { prefix : String, data : Bytes }
-
type DecodeFailure = DataPayloadTooShort { minimum : Int, currentLength : Int } | PrefixTooShort { minimum : Int, currentLength : Int } | UnexpectedCharacterInPayload { culprit : Char } | UnexpectedCharacterInPrefix { culprit : Char } | InvalidChecksum | MissingSeparator | InternalError WordsToBytesFailure
-
type WordsToBytesFailure = ExcessPadding | NonZeroPadding
Changed
N/A
Removed
N/A