| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Data.Base58String
Synopsis
- data Base58String
- b58String :: ByteString -> ByteString -> Base58String
- fromBinary :: Binary a => ByteString -> a -> Base58String
- toBinary :: Binary a => ByteString -> Base58String -> a
- fromBytes :: ByteString -> ByteString -> Base58String
- toBytes :: ByteString -> Base58String -> ByteString
- toText :: Base58String -> Text
- fromText :: ByteString -> Text -> Base58String
Documentation
data Base58String #
Represents a Base58 string. Guarantees that all characters it contains are valid base58 characters.
Instances
| Eq Base58String # | |
Defined in Data.Base58String | |
| Ord Base58String # | |
Defined in Data.Base58String Methods compare :: Base58String -> Base58String -> Ordering # (<) :: Base58String -> Base58String -> Bool # (<=) :: Base58String -> Base58String -> Bool # (>) :: Base58String -> Base58String -> Bool # (>=) :: Base58String -> Base58String -> Bool # max :: Base58String -> Base58String -> Base58String # min :: Base58String -> Base58String -> Base58String # | |
| Show Base58String # | |
Defined in Data.Base58String Methods showsPrec :: Int -> Base58String -> ShowS # show :: Base58String -> String # showList :: [Base58String] -> ShowS # | |
| ToJSON Base58String # | |
Defined in Data.Base58String.Bitcoin Methods toJSON :: Base58String -> Value # toEncoding :: Base58String -> Encoding # toJSONList :: [Base58String] -> Value # toEncodingList :: [Base58String] -> Encoding # | |
| FromJSON Base58String # | |
Defined in Data.Base58String.Bitcoin | |
Arguments
| :: ByteString | Our Base58 mapping table |
| -> ByteString | Our Base58 string |
| -> Base58String |
Smart constructor which validates that all the text are actually base-58 characters.
Arguments
| :: Binary a | |
| => ByteString | Our Base58 mapping table |
| -> a | Input object that is convertable to binary |
| -> Base58String | Base58 representation of binary data |
Converts a Binary to a Base58String value
Arguments
| :: Binary a | |
| => ByteString | Base58 mapping table |
| -> Base58String | Base58 representation |
| -> a | Converted object |
Converts a Base58String to a Binary value
Arguments
| :: ByteString | Our Base58 mapping table |
| -> ByteString | Raw binary bytes |
| -> Base58String | Base58 representation of raw binary bytes |
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.
Arguments
| :: ByteString | Base58 mapping table |
| -> Base58String | Base58 string we wish to get binary data from |
| -> ByteString | Raw binary representation |
Access to the raw bytes in a ByteString format.
toText :: Base58String -> Text #
Access to a Text representation of the Base58String
Arguments
| :: ByteString | Base58 mapping table |
| -> Text | Text representation |
| -> Base58String | Base58 classified representation |
Converts a Text representation to a Base58String