web3-provider-1.0.0.0: Node connection provider for Haskell Web3 library.
CopyrightAleksandr Krupenkin 2016-2021
LicenseApache-2.0
Maintainermail@akru.me
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Network.Web3.Provider

Description

Web3 service provider.

Synopsis

Documentation

newtype Web3 a Source #

Any communication with node wrapped with Web3 monad

Constructors

Web3 

Instances

Instances details
Monad Web3 Source # 
Instance details

Defined in Network.Web3.Provider

Methods

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

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

return :: a -> Web3 a #

Functor Web3 Source # 
Instance details

Defined in Network.Web3.Provider

Methods

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

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

MonadFail Web3 Source # 
Instance details

Defined in Network.Web3.Provider

Methods

fail :: String -> Web3 a #

Applicative Web3 Source # 
Instance details

Defined in Network.Web3.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.Web3.Provider

Methods

liftIO :: IO a -> Web3 a #

MonadThrow Web3 Source # 
Instance details

Defined in Network.Web3.Provider

Methods

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

JsonRpc Web3 Source # 
Instance details

Defined in Network.Web3.Provider

Methods

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

MonadState JsonRpcClient Web3 Source # 
Instance details

Defined in Network.Web3.Provider

data Web3Error Source #

Some peace of error response

Instances

Instances details
Eq Web3Error Source # 
Instance details

Defined in Network.Web3.Provider

Show Web3Error Source # 
Instance details

Defined in Network.Web3.Provider

Generic Web3Error Source # 
Instance details

Defined in Network.Web3.Provider

Associated Types

type Rep Web3Error :: Type -> Type #

Exception Web3Error Source # 
Instance details

Defined in Network.Web3.Provider

type Rep Web3Error Source # 
Instance details

Defined in Network.Web3.Provider

type Rep Web3Error = D1 ('MetaData "Web3Error" "Network.Web3.Provider" "web3-provider-1.0.0.0-B6rrvWWg5c7TgUyi2iNNA" 'False) (C1 ('MetaCons "JsonRpcFail" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)) :+: (C1 ('MetaCons "ParserFail" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)) :+: C1 ('MetaCons "UserFail" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String))))

data Provider Source #

Web3 Provider

Instances

Instances details
Eq Provider Source # 
Instance details

Defined in Network.Web3.Provider

Show Provider Source # 
Instance details

Defined in Network.Web3.Provider

Generic Provider Source # 
Instance details

Defined in Network.Web3.Provider

Associated Types

type Rep Provider :: Type -> Type #

Methods

from :: Provider -> Rep Provider x #

to :: Rep Provider x -> Provider #

Default Provider Source #

Default Provider URI

Instance details

Defined in Network.Web3.Provider

Methods

def :: Provider #

type Rep Provider Source # 
Instance details

Defined in Network.Web3.Provider

type Rep Provider = D1 ('MetaData "Provider" "Network.Web3.Provider" "web3-provider-1.0.0.0-B6rrvWWg5c7TgUyi2iNNA" 'False) (C1 ('MetaCons "HttpProvider" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: C1 ('MetaCons "WsProvider" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

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 Http provider

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

Fork Web3 with the same Provider and Manager

getConnection Source #

Arguments

:: String

Host

-> Int

Port

-> String

Path

-> IO Connection 

Returns a WebSocket Connection Instance