blockchain-0.0.3: Generic blockchain implementation.

Safe HaskellNone
LanguageHaskell2010

Data.Blockchain.Crypto

Synopsis

Documentation

data KeyPair Source #

KeyPairs are used to store and sign transactions. The PublicKey piece is used as the public address on the blockchain where funds can be sent to and from. The PrivateKey is used to sign transactions, which provides a guarantee that the transaction was initiated by the owner of the address.

Constructors

KeyPair 

generate :: IO KeyPair Source #

Generates a new KeyPair. The PublicKey can be shared openly, while the PrivateKey should be kept secret.

data Hash a Source #

Instances

Eq (Hash a) Source # 

Methods

(==) :: Hash a -> Hash a -> Bool #

(/=) :: Hash a -> Hash a -> Bool #

Ord (Hash a) Source # 

Methods

compare :: Hash a -> Hash a -> Ordering #

(<) :: Hash a -> Hash a -> Bool #

(<=) :: Hash a -> Hash a -> Bool #

(>) :: Hash a -> Hash a -> Bool #

(>=) :: Hash a -> Hash a -> Bool #

max :: Hash a -> Hash a -> Hash a #

min :: Hash a -> Hash a -> Hash a #

Show (Hash a) Source # 

Methods

showsPrec :: Int -> Hash a -> ShowS #

show :: Hash a -> String #

showList :: [Hash a] -> ShowS #

Monoid (Hash a) Source # 

Methods

mempty :: Hash a #

mappend :: Hash a -> Hash a -> Hash a #

mconcat :: [Hash a] -> Hash a #

Hashable (Hash a) Source # 

Methods

hashWithSalt :: Int -> Hash a -> Int #

hash :: Hash a -> Int #

ToJSON (Hash a) Source # 
FromJSON (Hash a) Source # 

hashTreeRoot :: forall a. ToHash a => [a] -> HashTreeRoot a Source #