web3-0.3.4.0: Ethereum API for Haskell

CopyrightAlexander Krupenkin 2016
LicenseBSD3
Maintainermail@akru.me
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Network.Ethereum.Web3.Types

Description

Common used types and instances.

Synopsis

Documentation

type Web3 = ReaderT Config (ExceptT Error IO) Source #

Any communication with Ethereum node wrapped with Web3 monad

data Config Source #

Ethereum node params

Constructors

Config 

Fields

Instances

data Error Source #

Some peace of error response

Constructors

JsonRpcFail RpcError

JSON-RPC communication error

ParserFail String

Error in parser state

UserFail String

Common head for user errors

Instances

Eq Error Source # 

Methods

(==) :: Error -> Error -> Bool #

(/=) :: Error -> Error -> Bool #

Show Error Source # 

Methods

showsPrec :: Int -> Error -> ShowS #

show :: Error -> String #

showList :: [Error] -> ShowS #

runWeb3 :: MonadIO m => Web3 a -> m (Either Error a) Source #

Run Web3 monad with default config

runWeb3' :: MonadIO m => Config -> Web3 a -> m (Either Error a) Source #

Run Web3 monad with given configuration

data CallMode Source #

The contract call mode describe used state: latest or pending

Constructors

Latest 
Pending 

type TxHash = Text Source #

Transaction hash text string

data Transaction Source #

Transaction information

Constructors

Transaction 

Fields

  • txHash :: TxHash

    DATA, 32 Bytes - hash of the transaction.

  • txNonce :: Text

    QUANTITY - the number of transactions made by the sender prior to this one.

  • txBlockHash :: Text

    DATA, 32 Bytes - hash of the block where this transaction was in. null when its pending.

  • txBlockNumber :: Text

    QUANTITY - block number where this transaction was in. null when its pending.

  • txTransactionIndex :: Text

    QUANTITY - integer of the transactions index position in the block. null when its pending.

  • txFrom :: Address

    DATA, 20 Bytes - address of the sender.

  • txTo :: Maybe Address

    DATA, 20 Bytes - address of the receiver. null when its a contract creation transaction.

  • txValue :: Text

    QUANTITY - value transferred in Wei.

  • txGasPrice :: Text

    QUANTITY - gas price provided by the sender in Wei.

  • txGas :: Text

    QUANTITY - gas provided by the sender.

  • txInput :: Text

    DATA - the data send along with the transaction.

data Block Source #

Block information

Constructors

Block 

Fields