Copyright | Alexander Krupenkin 2016 |
---|---|
License | BSD3 |
Maintainer | mail@akru.me |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
An Ethereum node offers a RPC interface. This interface gives Ðapp’s access to the Ethereum blockchain and functionality that the node provides, such as compiling smart contract code. It uses a subset of the JSON-RPC 2.0 specification (no support for notifications or named parameters) as serialisation protocol and is available over HTTP and IPC (unix domain sockets on linux/OSX and named pipe’s on Windows).
Web3 Haskell library currently use JSON-RPC over HTTP to access node functionality.
- type Web3 = ReaderT Config (ExceptT Error IO)
- data Config = Config {}
- data Error
- runWeb3' :: MonadIO m => Config -> Web3 a -> m (Either Error a)
- runWeb3 :: MonadIO m => Web3 a -> m (Either Error a)
- data EventAction
- class ABIEncoding a => Event a where
- class ABIEncoding a => Method a where
- nopay :: Wei
- class ABIEncoding a where
- newtype BytesN n = BytesN {}
- newtype BytesD = BytesD {}
- data Address
- module Network.Ethereum.Unit
Web3 monad & runners
type Web3 = ReaderT Config (ExceptT Error IO) Source #
Any communication with Ethereum node wrapped with Web3
monad
Ethereum node params
Some peace of error response
JsonRpcFail RpcError | JSON-RPC communication error |
ParserFail String | Error in parser state |
UserFail String | Common head for user errors |
runWeb3' :: MonadIO m => Config -> Web3 a -> m (Either Error a) Source #
Run Web3
monad with given configuration
Contract actions
data EventAction Source #
Event callback control response
ContinueEvent | Continue to listen events |
TerminateEvent | Terminate event listener |
class ABIEncoding a => Event a where Source #
Contract event listener
class ABIEncoding a => Method a where Source #
Contract method caller
ABI encoding & data types
class ABIEncoding a where Source #
Contract ABI data codec
Fixed length byte array
Dynamic length byte array
Ethereum account address
Ethereum unit conversion utils
module Network.Ethereum.Unit