| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Network.Tendermint.Client.Internal.RPCClient
Synopsis
- data Request = Request {
- requestMethod :: !MethodName
- requestId :: !Int
- requestParams :: !Value
- data Response = Response {
- responseId :: !Int
- responseResult :: !(Either RpcError Value)
- data RpcError = RpcError {}
- data JsonRpcException
- newtype MethodName = MethodName Text
- data Config = Config {
- cBaseHTTPRequest :: Request
- withRequest :: Request -> IO ()
- withResponse :: Response -> IO ()
- cHost :: ByteString
- cPort :: Int
- tlsEnabled :: Bool
- remoteWS :: (FromJSON output, ToJSON input) => Config -> MethodName -> input -> (output -> IO ()) -> IO ()
- remote :: (MonadIO m, MonadReader Config m, FromJSON output, ToJSON input) => MethodName -> input -> m output
Documentation
JSON-RPC request.
Constructors
| Request | |
Fields
| |
Instances
| ToJSON Request Source # | |
Defined in Network.Tendermint.Client.Internal.RPCClient Methods toEncoding :: Request -> Encoding toJSONList :: [Request] -> Value toEncodingList :: [Request] -> Encoding | |
JSON-RPC response.
Constructors
| Response | |
Fields
| |
Instances
| Eq Response Source # | |
| Show Response Source # | |
| FromJSON Response Source # | |
Defined in Network.Tendermint.Client.Internal.RPCClient | |
| ToJSON Response Source # | |
Defined in Network.Tendermint.Client.Internal.RPCClient Methods toEncoding :: Response -> Encoding toJSONList :: [Response] -> Value toEncodingList :: [Response] -> Encoding | |
JSON-RPC error message
Instances
| Eq RpcError Source # | |
| Show RpcError Source # | |
| FromJSON RpcError Source # | |
Defined in Network.Tendermint.Client.Internal.RPCClient | |
| ToJSON RpcError Source # | |
Defined in Network.Tendermint.Client.Internal.RPCClient Methods toEncoding :: RpcError -> Encoding toJSONList :: [RpcError] -> Value toEncodingList :: [RpcError] -> Encoding | |
data JsonRpcException Source #
Constructors
| ParsingException String | |
| CallException RpcError |
Instances
| Eq JsonRpcException Source # | |
Defined in Network.Tendermint.Client.Internal.RPCClient Methods (==) :: JsonRpcException -> JsonRpcException -> Bool # (/=) :: JsonRpcException -> JsonRpcException -> Bool # | |
| Show JsonRpcException Source # | |
Defined in Network.Tendermint.Client.Internal.RPCClient Methods showsPrec :: Int -> JsonRpcException -> ShowS # show :: JsonRpcException -> String # showList :: [JsonRpcException] -> ShowS # | |
| Exception JsonRpcException Source # | |
Defined in Network.Tendermint.Client.Internal.RPCClient Methods toException :: JsonRpcException -> SomeException # | |
newtype MethodName Source #
Name of called method.
Constructors
| MethodName Text |
Instances
| Eq MethodName Source # | |
Defined in Network.Tendermint.Client.Internal.RPCClient | |
| Show MethodName Source # | |
Defined in Network.Tendermint.Client.Internal.RPCClient Methods showsPrec :: Int -> MethodName -> ShowS # show :: MethodName -> String # showList :: [MethodName] -> ShowS # | |
| ToJSON MethodName Source # | |
Defined in Network.Tendermint.Client.Internal.RPCClient Methods toJSON :: MethodName -> Value toEncoding :: MethodName -> Encoding toJSONList :: [MethodName] -> Value toEncodingList :: [MethodName] -> Encoding | |
JSON-RPC client config
Constructors
| Config | |
Fields
| |
remoteWS :: (FromJSON output, ToJSON input) => Config -> MethodName -> input -> (output -> IO ()) -> IO () Source #
remote :: (MonadIO m, MonadReader Config m, FromJSON output, ToJSON input) => MethodName -> input -> m output Source #