Skip to content

v1.0.0 - 2024-12-15

Latest
Compare
Choose a tag to compare
@KtorZ KtorZ released this 15 Dec 12:55
· 2 commits to main since this release
1.0.0
2190d3c

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