-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Tiny JSON-RPC client for Haskell Web3 library. -- -- Client library for Third Generation of Web. @package jsonrpc-tinyclient @version 1.0.0.0 -- | Tiny JSON-RPC 2.0 client. Functions for implementing the client side -- of JSON-RPC 2.0. See http://www.jsonrpc.org/specification. -- -- If you have monad with MonadIO, MonadThrow and -- MonadReader instances, it can be used as base for JSON-RPC -- calls. -- -- Example: -- --
--   newtype MyMonad a = ...
--   
--   instance JsonRpc MyMonad
--   
--   foo :: Mymonad Text
--   foo = remote "foo"
--   
-- -- Arguments of function are stored into params request array. -- -- Example: -- --
--   myMethod :: JsonRpc m => Int -> Bool -> m String
--   myMethod = remote "myMethod"
--   
module Network.JsonRpc.TinyClient -- | JSON-RPC call monad. class JsonRpcM m => JsonRpc m -- | Remote call of JSON-RPC method. remote :: (JsonRpc m, Remote m a) => MethodName -> a -- | Name of called method. type MethodName = Text -- | JSON-RPC client state vars. data JsonRpcClient JsonRpcHttpClient :: Manager -> String -> JsonRpcClient -- | HTTP connection manager. [jsonRpcManager] :: JsonRpcClient -> Manager -- | Remote server URI. [jsonRpcServer] :: JsonRpcClient -> String JsonRpcWsClient :: Connection -> JsonRpcClient -- | WebSocket connection. [jsonRpcWsConnection] :: JsonRpcClient -> Connection -- | Create default JsonRpcClient settings. defaultSettings :: MonadIO m => String -> m JsonRpcClient data JsonRpcException ParsingException :: String -> JsonRpcException CallException :: RpcError -> JsonRpcException -- | JSON-RPC error message data RpcError RpcError :: !Int -> !Text -> !Maybe Value -> RpcError [errCode] :: RpcError -> !Int [errMessage] :: RpcError -> !Text [errData] :: RpcError -> !Maybe Value instance GHC.Show.Show Network.JsonRpc.TinyClient.Request instance GHC.Classes.Eq Network.JsonRpc.TinyClient.Request instance GHC.Classes.Eq Network.JsonRpc.TinyClient.RpcError instance GHC.Show.Show Network.JsonRpc.TinyClient.Response instance GHC.Classes.Eq Network.JsonRpc.TinyClient.Response instance GHC.Classes.Eq Network.JsonRpc.TinyClient.JsonRpcException instance GHC.Show.Show Network.JsonRpc.TinyClient.JsonRpcException instance (Data.Aeson.Types.ToJSON.ToJSON a, Network.JsonRpc.TinyClient.Remote m b) => Network.JsonRpc.TinyClient.Remote m (a -> b) instance (Network.JsonRpc.TinyClient.JsonRpcM m, Data.Aeson.Types.FromJSON.FromJSON b) => Network.JsonRpc.TinyClient.Remote m (m b) instance GHC.Exception.Type.Exception Network.JsonRpc.TinyClient.JsonRpcException instance Data.Aeson.Types.FromJSON.FromJSON Network.JsonRpc.TinyClient.Response instance GHC.Show.Show Network.JsonRpc.TinyClient.RpcError instance Data.Aeson.Types.FromJSON.FromJSON Network.JsonRpc.TinyClient.RpcError instance Data.Aeson.Types.ToJSON.ToJSON Network.JsonRpc.TinyClient.Request instance GHC.Show.Show Network.JsonRpc.TinyClient.JsonRpcClient