Skip to content

Releases: elm-cardano/bech32

v1.0.0 - 2024-12-15

15 Dec 12:55
1.0.0
2190d3c
Compare
Choose a tag to compare

Elm Package

elm-cardano/bech32 1.0.0

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