Copyright | Alexander Krupenkin 2016-2018 |
---|---|
License | BSD3 |
Maintainer | mail@akru.me |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Web3 service provider.
Synopsis
- newtype Web3 a = Web3 {
- unWeb3 :: StateT JsonRpcClient IO a
- data Web3Error
- = JsonRpcFail !String
- | ParserFail !String
- | UserFail !String
- data Provider = HttpProvider String
- runWeb3With :: MonadIO m => Manager -> Provider -> Web3 a -> m (Either Web3Error a)
- runWeb3' :: MonadIO m => Provider -> Web3 a -> m (Either Web3Error a)
- runWeb3 :: MonadIO m => Web3 a -> m (Either Web3Error a)
- forkWeb3 :: Web3 a -> Web3 (Async a)
Documentation
Any communication with Ethereum node wrapped with Web3
monad
Web3 | |
|
Instances
Monad Web3 Source # | |
Functor Web3 Source # | |
Applicative Web3 Source # | |
MonadIO Web3 Source # | |
Defined in Network.Ethereum.Api.Provider | |
MonadThrow Web3 Source # | |
Defined in Network.Ethereum.Api.Provider | |
JsonRpc Web3 Source # | |
Defined in Network.Ethereum.Api.Provider remote :: Remote Web3 a => MethodName -> a Source # | |
MonadState JsonRpcClient Web3 Source # | |
Defined in Network.Ethereum.Api.Provider get :: Web3 JsonRpcClient # put :: JsonRpcClient -> Web3 () # state :: (JsonRpcClient -> (a, JsonRpcClient)) -> Web3 a # |
Some peace of error response
JsonRpcFail !String | JSON-RPC communication error |
ParserFail !String | Error in parser state |
UserFail !String | Common head for user errors |
Instances
Eq Web3Error Source # | |
Show Web3Error Source # | |
Generic Web3Error Source # | |
Exception Web3Error Source # | |
Defined in Network.Ethereum.Api.Provider toException :: Web3Error -> SomeException # fromException :: SomeException -> Maybe Web3Error # displayException :: Web3Error -> String # | |
type Rep Web3Error Source # | |
Defined in Network.Ethereum.Api.Provider type Rep Web3Error = D1 (MetaData "Web3Error" "Network.Ethereum.Api.Provider" "web3-0.8.4.0-EXG2jODSFc0K4Z6hKmEh49" 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)))) |
Web3 Provider