Safe Haskell | None |
---|---|
Language | Haskell2010 |
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.
Request | |
|
Instances
ToJSON Request Source # | |
Defined in Network.Tendermint.Client.Internal.RPCClient toEncoding :: Request -> Encoding toJSONList :: [Request] -> Value toEncodingList :: [Request] -> Encoding |
JSON-RPC response.
Response | |
|
Instances
Eq Response Source # | |
Show Response Source # | |
FromJSON Response Source # | |
Defined in Network.Tendermint.Client.Internal.RPCClient parseJSON :: Value -> Parser Response parseJSONList :: Value -> Parser [Response] | |
ToJSON Response Source # | |
Defined in Network.Tendermint.Client.Internal.RPCClient 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 parseJSON :: Value -> Parser RpcError parseJSONList :: Value -> Parser [RpcError] | |
ToJSON RpcError Source # | |
Defined in Network.Tendermint.Client.Internal.RPCClient toEncoding :: RpcError -> Encoding toJSONList :: [RpcError] -> Value toEncodingList :: [RpcError] -> Encoding |
data JsonRpcException Source #
Instances
Eq JsonRpcException Source # | |
Defined in Network.Tendermint.Client.Internal.RPCClient (==) :: JsonRpcException -> JsonRpcException -> Bool # (/=) :: JsonRpcException -> JsonRpcException -> Bool # | |
Show JsonRpcException Source # | |
Defined in Network.Tendermint.Client.Internal.RPCClient showsPrec :: Int -> JsonRpcException -> ShowS # show :: JsonRpcException -> String # showList :: [JsonRpcException] -> ShowS # | |
Exception JsonRpcException Source # | |
newtype MethodName Source #
Name of called method.
Instances
Eq MethodName Source # | |
Defined in Network.Tendermint.Client.Internal.RPCClient (==) :: MethodName -> MethodName -> Bool # (/=) :: MethodName -> MethodName -> Bool # | |
Show MethodName Source # | |
Defined in Network.Tendermint.Client.Internal.RPCClient showsPrec :: Int -> MethodName -> ShowS # show :: MethodName -> String # showList :: [MethodName] -> ShowS # | |
ToJSON MethodName Source # | |
Defined in Network.Tendermint.Client.Internal.RPCClient toJSON :: MethodName -> Value toEncoding :: MethodName -> Encoding toJSONList :: [MethodName] -> Value toEncodingList :: [MethodName] -> Encoding |
JSON-RPC client config
Config | |
|
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 #