web3-0.8.3.0: Ethereum API for Haskell

CopyrightAlexander Krupenkin 2016-2018
LicenseBSD3
Maintainermail@akru.me
Stabilityexperimental
Portabilityunportable
Safe HaskellNone
LanguageHaskell2010

Network.Ethereum.Web3

Contents

Description

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.

Synopsis

Base monad for any Ethereum node communication

data Web3 a Source #

Any communication with Ethereum node wrapped with Web3 monad

Instances
Monad Web3 Source # 
Instance details

Defined in Network.Ethereum.Api.Provider

Methods

(>>=) :: Web3 a -> (a -> Web3 b) -> Web3 b #

(>>) :: Web3 a -> Web3 b -> Web3 b #

return :: a -> Web3 a #

fail :: String -> Web3 a #

Functor Web3 Source # 
Instance details

Defined in Network.Ethereum.Api.Provider

Methods

fmap :: (a -> b) -> Web3 a -> Web3 b #

(<$) :: a -> Web3 b -> Web3 a #

Applicative Web3 Source # 
Instance details

Defined in Network.Ethereum.Api.Provider

Methods

pure :: a -> Web3 a #

(<*>) :: Web3 (a -> b) -> Web3 a -> Web3 b #

liftA2 :: (a -> b -> c) -> Web3 a -> Web3 b -> Web3 c #

(*>) :: Web3 a -> Web3 b -> Web3 b #

(<*) :: Web3 a -> Web3 b -> Web3 a #

MonadIO Web3 Source # 
Instance details

Defined in Network.Ethereum.Api.Provider

Methods

liftIO :: IO a -> Web3 a #

MonadThrow Web3 Source # 
Instance details

Defined in Network.Ethereum.Api.Provider

Methods

throwM :: Exception e => e -> Web3 a #

JsonRpc Web3 Source # 
Instance details

Defined in Network.Ethereum.Api.Provider

Methods

remote :: Remote Web3 a => MethodName -> a Source #

MonadState JsonRpcClient Web3 Source # 
Instance details

Defined in Network.Ethereum.Api.Provider

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

Web3 runner for default provider

Basic transaction sending

Basic event listening

data EventAction Source #

Event callback control response

Constructors

ContinueEvent

Continue to listen events

TerminateEvent

Terminate event listener

event :: DecodeEvent i ni e => Filter e -> (e -> ReaderT Change Web3 EventAction) -> Web3 (Async ()) Source #

Run 'event\'' one block at a time.

Primitive data types

Metric unit system