-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Fast and safe representation of a Base-58 string
--   
--   Provides an interface for converting any object that has a
--   <a>Binary</a> instance to and from a base-58 Text representation.
@package base58string
@version 0.10.0

module Data.Base58String

-- | Represents a Base58 string. Guarantees that all characters it contains
--   are valid base58 characters.
data Base58String

-- | Smart constructor which validates that all the text are actually
--   base-58 characters.
b58String :: ByteString -> ByteString -> Base58String

-- | Converts a <a>Binary</a> to a <a>Base58String</a> value
fromBinary :: Binary a => ByteString -> a -> Base58String

-- | Converts a <a>Base58String</a> to a <a>Binary</a> value
toBinary :: Binary a => ByteString -> Base58String -> a

-- | Reads a <a>ByteString</a> as raw bytes and converts to base58
--   representation. We cannot use the instance Binary of <a>ByteString</a>
--   because it provides a leading length, which is not what we want when
--   dealing with raw bytes.
fromBytes :: ByteString -> ByteString -> Base58String

-- | Access to the raw bytes in a <a>ByteString</a> format.
toBytes :: ByteString -> Base58String -> ByteString

-- | Access to a <a>Text</a> representation of the <a>Base58String</a>
toText :: Base58String -> Text

-- | Converts a <a>Text</a> representation to a <a>Base58String</a>
fromText :: ByteString -> Text -> Base58String
instance GHC.Classes.Ord Data.Base58String.Base58String
instance GHC.Classes.Eq Data.Base58String.Base58String
instance GHC.Show.Show Data.Base58String.Base58String

module Data.Base58String.Bitcoin

-- | Represents a Base58 string. Guarantees that all characters it contains
--   are valid base58 characters.
data Base58String
b58String :: ByteString -> Base58String
fromBinary :: Binary a => a -> Base58String
toBinary :: Binary a => Base58String -> a
fromBytes :: ByteString -> Base58String
toBytes :: Base58String -> ByteString
fromText :: Text -> Base58String
toText :: Base58String -> Text
instance Data.Aeson.Types.FromJSON.FromJSON Data.Base58String.Base58String
instance Data.Aeson.Types.ToJSON.ToJSON Data.Base58String.Base58String
