Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Base58String
- data Base58String
- b58String :: ByteString -> Base58String
- fromBinary :: Binary a => a -> Base58String
- toBinary :: Binary a => Base58String -> a
- fromBytes :: ByteString -> Base58String
- toBytes :: Base58String -> ByteString
- toText :: Base58String -> Text
Documentation
data Base58String Source
Represents a Base58 string. Guarantees that all characters it contains are valid base58 characters.
b58String :: ByteString -> Base58String Source
Smart constructor which validates that all the text are actually base-58 characters.
fromBinary :: Binary a => a -> Base58String Source
Converts a Binary
to a Base58String
value
toBinary :: Binary a => Base58String -> a Source
Converts a Base58String
to a Binary
value
fromBytes :: ByteString -> Base58String Source
Reads a ByteString
as raw bytes and converts to base58 representation. We
cannot use the instance Binary of ByteString
because it provides
a leading length, which is not what we want when dealing with raw bytes.
toBytes :: Base58String -> ByteString Source
Access to the raw bytes in a ByteString
format.
toText :: Base58String -> Text Source
Access to a Text
representation of the Base58String