module ElectrsClient.RpcResponse
  ( RpcResponse (..),
  )
where

import ElectrsClient.Import.External

data RpcResponse a = RpcResponse
  { forall a. RpcResponse a -> Integer
id :: Integer,
    forall a. RpcResponse a -> Text
jsonrpc :: Text,
    forall a. RpcResponse a -> a
result :: a
  }
  deriving stock ((forall x. RpcResponse a -> Rep (RpcResponse a) x)
-> (forall x. Rep (RpcResponse a) x -> RpcResponse a)
-> Generic (RpcResponse a)
forall x. Rep (RpcResponse a) x -> RpcResponse a
forall x. RpcResponse a -> Rep (RpcResponse a) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall a x. Rep (RpcResponse a) x -> RpcResponse a
forall a x. RpcResponse a -> Rep (RpcResponse a) x
$cto :: forall a x. Rep (RpcResponse a) x -> RpcResponse a
$cfrom :: forall a x. RpcResponse a -> Rep (RpcResponse a) x
Generic, Int -> RpcResponse a -> ShowS
[RpcResponse a] -> ShowS
RpcResponse a -> String
(Int -> RpcResponse a -> ShowS)
-> (RpcResponse a -> String)
-> ([RpcResponse a] -> ShowS)
-> Show (RpcResponse a)
forall a. Show a => Int -> RpcResponse a -> ShowS
forall a. Show a => [RpcResponse a] -> ShowS
forall a. Show a => RpcResponse a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RpcResponse a] -> ShowS
$cshowList :: forall a. Show a => [RpcResponse a] -> ShowS
show :: RpcResponse a -> String
$cshow :: forall a. Show a => RpcResponse a -> String
showsPrec :: Int -> RpcResponse a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> RpcResponse a -> ShowS
Show)

instance FromJSON a => FromJSON (RpcResponse a)