web3-0.8.4.0: Ethereum API for Haskell

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

Network.Ethereum.Api.Provider

Description

Web3 service provider.

Synopsis

Documentation

newtype Web3 a Source #

Any communication with Ethereum node wrapped with Web3 monad

Constructors

Web3 
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

data Web3Error Source #

Some peace of error response

Constructors

JsonRpcFail !String

JSON-RPC communication error

ParserFail !String

Error in parser state

UserFail !String

Common head for user errors

data Provider Source #

Web3 Provider

Constructors

HttpProvider String 
Instances
Eq Provider Source # 
Instance details

Defined in Network.Ethereum.Api.Provider

Show Provider Source # 
Instance details

Defined in Network.Ethereum.Api.Provider

Generic Provider Source # 
Instance details

Defined in Network.Ethereum.Api.Provider

Associated Types

type Rep Provider :: Type -> Type #

Methods

from :: Provider -> Rep Provider x #

to :: Rep Provider x -> Provider #

Default Provider Source # 
Instance details

Defined in Network.Ethereum.Api.Provider

Methods

def :: Provider #

type Rep Provider Source # 
Instance details

Defined in Network.Ethereum.Api.Provider

type Rep Provider = D1 (MetaData "Provider" "Network.Ethereum.Api.Provider" "web3-0.8.4.0-EXG2jODSFc0K4Z6hKmEh49" False) (C1 (MetaCons "HttpProvider" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))

runWeb3With :: MonadIO m => Manager -> Provider -> Web3 a -> m (Either Web3Error a) Source #

Web3 monad runner, using the supplied Manager

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

Web3 monad runner

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

Web3 runner for default provider

forkWeb3 :: Web3 a -> Web3 (Async a) Source #

Fork Web3 with the same Provider and Manager