{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE LambdaCase #-}

module Cardano.CLI.EraBased.Commands.Query
  ( QueryCmds (..)
  , QueryCommitteeMembersStateCmdArgs (..)
  , QueryLeadershipScheduleCmdArgs (..)
  , QueryProtocolParametersCmdArgs (..)
  , QueryTipCmdArgs (..)
  , QueryStakePoolsCmdArgs (..)
  , QueryStakeDistributionCmdArgs (..)
  , QueryStakeAddressInfoCmdArgs (..)
  , QueryUTxOCmdArgs (..)
  , QueryLedgerStateCmdArgs (..)
  , QueryProtocolStateCmdArgs (..)
  , QueryStakeSnapshotCmdArgs (..)
  , QueryKesPeriodInfoCmdArgs (..)
  , QueryPoolStateCmdArgs (..)
  , QueryTxMempoolCmdArgs (..)
  , QuerySlotNumberCmdArgs (..)
  , QueryRefScriptSizeCmdArgs (..)
  , QueryNoArgCmdArgs (..)
  , QueryDRepStateCmdArgs (..)
  , QueryDRepStakeDistributionCmdArgs (..)
  , QuerySPOStakeDistributionCmdArgs (..)
  , QueryTreasuryValueCmdArgs (..)
  , renderQueryCmds
  , IncludeStake (..)
  )
where

import qualified Cardano.Api.Network as Consensus
import           Cardano.Api.Shelley hiding (QueryInShelleyBasedEra (..))

import           Cardano.CLI.Types.Common
import           Cardano.CLI.Types.Key

import           Data.Set (Set)
import           Data.Text (Text)
import           Data.Time.Clock
import           GHC.Generics

data QueryCmds era
  = QueryLeadershipScheduleCmd !QueryLeadershipScheduleCmdArgs
  | QueryProtocolParametersCmd !QueryProtocolParametersCmdArgs
  | QueryTipCmd !QueryTipCmdArgs
  | QueryStakePoolsCmd !QueryStakePoolsCmdArgs
  | QueryStakeDistributionCmd !QueryStakeDistributionCmdArgs
  | QueryStakeAddressInfoCmd !QueryStakeAddressInfoCmdArgs
  | QueryUTxOCmd !QueryUTxOCmdArgs
  | QueryLedgerStateCmd !QueryLedgerStateCmdArgs
  | QueryProtocolStateCmd !QueryProtocolStateCmdArgs
  | QueryStakeSnapshotCmd !QueryStakeSnapshotCmdArgs
  | QueryKesPeriodInfoCmd !QueryKesPeriodInfoCmdArgs
  | QueryPoolStateCmd !QueryPoolStateCmdArgs
  | QueryTxMempoolCmd !QueryTxMempoolCmdArgs
  | QuerySlotNumberCmd !QuerySlotNumberCmdArgs
  | QueryRefScriptSizeCmd !QueryRefScriptSizeCmdArgs
  | QueryConstitutionCmd !(QueryNoArgCmdArgs era)
  | QueryGovStateCmd !(QueryNoArgCmdArgs era)
  | QueryDRepStateCmd !(QueryDRepStateCmdArgs era)
  | QueryDRepStakeDistributionCmd !(QueryDRepStakeDistributionCmdArgs era)
  | QuerySPOStakeDistributionCmd !(QuerySPOStakeDistributionCmdArgs era)
  | QueryCommitteeMembersStateCmd !(QueryCommitteeMembersStateCmdArgs era)
  | QueryTreasuryValueCmd !(QueryTreasuryValueCmdArgs era)
  deriving ((forall x. QueryCmds era -> Rep (QueryCmds era) x)
-> (forall x. Rep (QueryCmds era) x -> QueryCmds era)
-> Generic (QueryCmds era)
forall x. Rep (QueryCmds era) x -> QueryCmds era
forall x. QueryCmds era -> Rep (QueryCmds era) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall era x. Rep (QueryCmds era) x -> QueryCmds era
forall era x. QueryCmds era -> Rep (QueryCmds era) x
$cfrom :: forall era x. QueryCmds era -> Rep (QueryCmds era) x
from :: forall x. QueryCmds era -> Rep (QueryCmds era) x
$cto :: forall era x. Rep (QueryCmds era) x -> QueryCmds era
to :: forall x. Rep (QueryCmds era) x -> QueryCmds era
Generic, Int -> QueryCmds era -> ShowS
[QueryCmds era] -> ShowS
QueryCmds era -> String
(Int -> QueryCmds era -> ShowS)
-> (QueryCmds era -> String)
-> ([QueryCmds era] -> ShowS)
-> Show (QueryCmds era)
forall era. Int -> QueryCmds era -> ShowS
forall era. [QueryCmds era] -> ShowS
forall era. QueryCmds era -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall era. Int -> QueryCmds era -> ShowS
showsPrec :: Int -> QueryCmds era -> ShowS
$cshow :: forall era. QueryCmds era -> String
show :: QueryCmds era -> String
$cshowList :: forall era. [QueryCmds era] -> ShowS
showList :: [QueryCmds era] -> ShowS
Show)

data QueryLeadershipScheduleCmdArgs = QueryLeadershipScheduleCmdArgs
  { QueryLeadershipScheduleCmdArgs -> SocketPath
nodeSocketPath :: !SocketPath
  , QueryLeadershipScheduleCmdArgs -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , QueryLeadershipScheduleCmdArgs -> NetworkId
networkId :: !NetworkId
  , QueryLeadershipScheduleCmdArgs -> GenesisFile
genesisFp :: !GenesisFile
  , QueryLeadershipScheduleCmdArgs
-> VerificationKeyOrHashOrFile StakePoolKey
poolColdVerKeyFile :: !(VerificationKeyOrHashOrFile StakePoolKey)
  , QueryLeadershipScheduleCmdArgs -> SigningKeyFile 'In
vrkSkeyFp :: !(SigningKeyFile In)
  , QueryLeadershipScheduleCmdArgs -> EpochLeadershipSchedule
whichSchedule :: !EpochLeadershipSchedule
  , QueryLeadershipScheduleCmdArgs -> Target ChainPoint
target :: !(Consensus.Target ChainPoint)
  , QueryLeadershipScheduleCmdArgs -> Maybe OutputFormatJsonOrText
format :: Maybe OutputFormatJsonOrText
  , QueryLeadershipScheduleCmdArgs -> Maybe (File () 'Out)
mOutFile :: !(Maybe (File () Out))
  }
  deriving ((forall x.
 QueryLeadershipScheduleCmdArgs
 -> Rep QueryLeadershipScheduleCmdArgs x)
-> (forall x.
    Rep QueryLeadershipScheduleCmdArgs x
    -> QueryLeadershipScheduleCmdArgs)
-> Generic QueryLeadershipScheduleCmdArgs
forall x.
Rep QueryLeadershipScheduleCmdArgs x
-> QueryLeadershipScheduleCmdArgs
forall x.
QueryLeadershipScheduleCmdArgs
-> Rep QueryLeadershipScheduleCmdArgs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
QueryLeadershipScheduleCmdArgs
-> Rep QueryLeadershipScheduleCmdArgs x
from :: forall x.
QueryLeadershipScheduleCmdArgs
-> Rep QueryLeadershipScheduleCmdArgs x
$cto :: forall x.
Rep QueryLeadershipScheduleCmdArgs x
-> QueryLeadershipScheduleCmdArgs
to :: forall x.
Rep QueryLeadershipScheduleCmdArgs x
-> QueryLeadershipScheduleCmdArgs
Generic, Int -> QueryLeadershipScheduleCmdArgs -> ShowS
[QueryLeadershipScheduleCmdArgs] -> ShowS
QueryLeadershipScheduleCmdArgs -> String
(Int -> QueryLeadershipScheduleCmdArgs -> ShowS)
-> (QueryLeadershipScheduleCmdArgs -> String)
-> ([QueryLeadershipScheduleCmdArgs] -> ShowS)
-> Show QueryLeadershipScheduleCmdArgs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueryLeadershipScheduleCmdArgs -> ShowS
showsPrec :: Int -> QueryLeadershipScheduleCmdArgs -> ShowS
$cshow :: QueryLeadershipScheduleCmdArgs -> String
show :: QueryLeadershipScheduleCmdArgs -> String
$cshowList :: [QueryLeadershipScheduleCmdArgs] -> ShowS
showList :: [QueryLeadershipScheduleCmdArgs] -> ShowS
Show)

data QueryProtocolParametersCmdArgs = QueryProtocolParametersCmdArgs
  { QueryProtocolParametersCmdArgs -> SocketPath
nodeSocketPath :: !SocketPath
  , QueryProtocolParametersCmdArgs -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , QueryProtocolParametersCmdArgs -> NetworkId
networkId :: !NetworkId
  , QueryProtocolParametersCmdArgs -> Maybe (File () 'Out)
mOutFile :: !(Maybe (File () Out))
  }
  deriving ((forall x.
 QueryProtocolParametersCmdArgs
 -> Rep QueryProtocolParametersCmdArgs x)
-> (forall x.
    Rep QueryProtocolParametersCmdArgs x
    -> QueryProtocolParametersCmdArgs)
-> Generic QueryProtocolParametersCmdArgs
forall x.
Rep QueryProtocolParametersCmdArgs x
-> QueryProtocolParametersCmdArgs
forall x.
QueryProtocolParametersCmdArgs
-> Rep QueryProtocolParametersCmdArgs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
QueryProtocolParametersCmdArgs
-> Rep QueryProtocolParametersCmdArgs x
from :: forall x.
QueryProtocolParametersCmdArgs
-> Rep QueryProtocolParametersCmdArgs x
$cto :: forall x.
Rep QueryProtocolParametersCmdArgs x
-> QueryProtocolParametersCmdArgs
to :: forall x.
Rep QueryProtocolParametersCmdArgs x
-> QueryProtocolParametersCmdArgs
Generic, Int -> QueryProtocolParametersCmdArgs -> ShowS
[QueryProtocolParametersCmdArgs] -> ShowS
QueryProtocolParametersCmdArgs -> String
(Int -> QueryProtocolParametersCmdArgs -> ShowS)
-> (QueryProtocolParametersCmdArgs -> String)
-> ([QueryProtocolParametersCmdArgs] -> ShowS)
-> Show QueryProtocolParametersCmdArgs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueryProtocolParametersCmdArgs -> ShowS
showsPrec :: Int -> QueryProtocolParametersCmdArgs -> ShowS
$cshow :: QueryProtocolParametersCmdArgs -> String
show :: QueryProtocolParametersCmdArgs -> String
$cshowList :: [QueryProtocolParametersCmdArgs] -> ShowS
showList :: [QueryProtocolParametersCmdArgs] -> ShowS
Show)

data QueryTipCmdArgs = QueryTipCmdArgs
  { QueryTipCmdArgs -> SocketPath
nodeSocketPath :: !SocketPath
  , QueryTipCmdArgs -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , QueryTipCmdArgs -> NetworkId
networkId :: !NetworkId
  , QueryTipCmdArgs -> Target ChainPoint
target :: !(Consensus.Target ChainPoint)
  , QueryTipCmdArgs -> Maybe (File () 'Out)
mOutFile :: !(Maybe (File () Out))
  }
  deriving ((forall x. QueryTipCmdArgs -> Rep QueryTipCmdArgs x)
-> (forall x. Rep QueryTipCmdArgs x -> QueryTipCmdArgs)
-> Generic QueryTipCmdArgs
forall x. Rep QueryTipCmdArgs x -> QueryTipCmdArgs
forall x. QueryTipCmdArgs -> Rep QueryTipCmdArgs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. QueryTipCmdArgs -> Rep QueryTipCmdArgs x
from :: forall x. QueryTipCmdArgs -> Rep QueryTipCmdArgs x
$cto :: forall x. Rep QueryTipCmdArgs x -> QueryTipCmdArgs
to :: forall x. Rep QueryTipCmdArgs x -> QueryTipCmdArgs
Generic, Int -> QueryTipCmdArgs -> ShowS
[QueryTipCmdArgs] -> ShowS
QueryTipCmdArgs -> String
(Int -> QueryTipCmdArgs -> ShowS)
-> (QueryTipCmdArgs -> String)
-> ([QueryTipCmdArgs] -> ShowS)
-> Show QueryTipCmdArgs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueryTipCmdArgs -> ShowS
showsPrec :: Int -> QueryTipCmdArgs -> ShowS
$cshow :: QueryTipCmdArgs -> String
show :: QueryTipCmdArgs -> String
$cshowList :: [QueryTipCmdArgs] -> ShowS
showList :: [QueryTipCmdArgs] -> ShowS
Show)

data QueryStakePoolsCmdArgs = QueryStakePoolsCmdArgs
  { QueryStakePoolsCmdArgs -> SocketPath
nodeSocketPath :: !SocketPath
  , QueryStakePoolsCmdArgs -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , QueryStakePoolsCmdArgs -> NetworkId
networkId :: !NetworkId
  , QueryStakePoolsCmdArgs -> Target ChainPoint
target :: !(Consensus.Target ChainPoint)
  , QueryStakePoolsCmdArgs -> Maybe OutputFormatJsonOrText
format :: Maybe OutputFormatJsonOrText
  , QueryStakePoolsCmdArgs -> Maybe (File () 'Out)
mOutFile :: !(Maybe (File () Out))
  }
  deriving ((forall x. QueryStakePoolsCmdArgs -> Rep QueryStakePoolsCmdArgs x)
-> (forall x.
    Rep QueryStakePoolsCmdArgs x -> QueryStakePoolsCmdArgs)
-> Generic QueryStakePoolsCmdArgs
forall x. Rep QueryStakePoolsCmdArgs x -> QueryStakePoolsCmdArgs
forall x. QueryStakePoolsCmdArgs -> Rep QueryStakePoolsCmdArgs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. QueryStakePoolsCmdArgs -> Rep QueryStakePoolsCmdArgs x
from :: forall x. QueryStakePoolsCmdArgs -> Rep QueryStakePoolsCmdArgs x
$cto :: forall x. Rep QueryStakePoolsCmdArgs x -> QueryStakePoolsCmdArgs
to :: forall x. Rep QueryStakePoolsCmdArgs x -> QueryStakePoolsCmdArgs
Generic, Int -> QueryStakePoolsCmdArgs -> ShowS
[QueryStakePoolsCmdArgs] -> ShowS
QueryStakePoolsCmdArgs -> String
(Int -> QueryStakePoolsCmdArgs -> ShowS)
-> (QueryStakePoolsCmdArgs -> String)
-> ([QueryStakePoolsCmdArgs] -> ShowS)
-> Show QueryStakePoolsCmdArgs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueryStakePoolsCmdArgs -> ShowS
showsPrec :: Int -> QueryStakePoolsCmdArgs -> ShowS
$cshow :: QueryStakePoolsCmdArgs -> String
show :: QueryStakePoolsCmdArgs -> String
$cshowList :: [QueryStakePoolsCmdArgs] -> ShowS
showList :: [QueryStakePoolsCmdArgs] -> ShowS
Show)

data QueryStakeDistributionCmdArgs = QueryStakeDistributionCmdArgs
  { QueryStakeDistributionCmdArgs -> SocketPath
nodeSocketPath :: !SocketPath
  , QueryStakeDistributionCmdArgs -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , QueryStakeDistributionCmdArgs -> NetworkId
networkId :: !NetworkId
  , QueryStakeDistributionCmdArgs -> Target ChainPoint
target :: !(Consensus.Target ChainPoint)
  , QueryStakeDistributionCmdArgs -> Maybe OutputFormatJsonOrText
format :: Maybe OutputFormatJsonOrText
  , QueryStakeDistributionCmdArgs -> Maybe (File () 'Out)
mOutFile :: !(Maybe (File () Out))
  }
  deriving ((forall x.
 QueryStakeDistributionCmdArgs
 -> Rep QueryStakeDistributionCmdArgs x)
-> (forall x.
    Rep QueryStakeDistributionCmdArgs x
    -> QueryStakeDistributionCmdArgs)
-> Generic QueryStakeDistributionCmdArgs
forall x.
Rep QueryStakeDistributionCmdArgs x
-> QueryStakeDistributionCmdArgs
forall x.
QueryStakeDistributionCmdArgs
-> Rep QueryStakeDistributionCmdArgs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
QueryStakeDistributionCmdArgs
-> Rep QueryStakeDistributionCmdArgs x
from :: forall x.
QueryStakeDistributionCmdArgs
-> Rep QueryStakeDistributionCmdArgs x
$cto :: forall x.
Rep QueryStakeDistributionCmdArgs x
-> QueryStakeDistributionCmdArgs
to :: forall x.
Rep QueryStakeDistributionCmdArgs x
-> QueryStakeDistributionCmdArgs
Generic, Int -> QueryStakeDistributionCmdArgs -> ShowS
[QueryStakeDistributionCmdArgs] -> ShowS
QueryStakeDistributionCmdArgs -> String
(Int -> QueryStakeDistributionCmdArgs -> ShowS)
-> (QueryStakeDistributionCmdArgs -> String)
-> ([QueryStakeDistributionCmdArgs] -> ShowS)
-> Show QueryStakeDistributionCmdArgs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueryStakeDistributionCmdArgs -> ShowS
showsPrec :: Int -> QueryStakeDistributionCmdArgs -> ShowS
$cshow :: QueryStakeDistributionCmdArgs -> String
show :: QueryStakeDistributionCmdArgs -> String
$cshowList :: [QueryStakeDistributionCmdArgs] -> ShowS
showList :: [QueryStakeDistributionCmdArgs] -> ShowS
Show)

data QueryStakeAddressInfoCmdArgs = QueryStakeAddressInfoCmdArgs
  { QueryStakeAddressInfoCmdArgs -> SocketPath
nodeSocketPath :: !SocketPath
  , QueryStakeAddressInfoCmdArgs -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , QueryStakeAddressInfoCmdArgs -> StakeAddress
addr :: !StakeAddress
  , QueryStakeAddressInfoCmdArgs -> NetworkId
networkId :: !NetworkId
  , QueryStakeAddressInfoCmdArgs -> Target ChainPoint
target :: !(Consensus.Target ChainPoint)
  , QueryStakeAddressInfoCmdArgs -> Maybe (File () 'Out)
mOutFile :: !(Maybe (File () Out))
  }
  deriving ((forall x.
 QueryStakeAddressInfoCmdArgs -> Rep QueryStakeAddressInfoCmdArgs x)
-> (forall x.
    Rep QueryStakeAddressInfoCmdArgs x -> QueryStakeAddressInfoCmdArgs)
-> Generic QueryStakeAddressInfoCmdArgs
forall x.
Rep QueryStakeAddressInfoCmdArgs x -> QueryStakeAddressInfoCmdArgs
forall x.
QueryStakeAddressInfoCmdArgs -> Rep QueryStakeAddressInfoCmdArgs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
QueryStakeAddressInfoCmdArgs -> Rep QueryStakeAddressInfoCmdArgs x
from :: forall x.
QueryStakeAddressInfoCmdArgs -> Rep QueryStakeAddressInfoCmdArgs x
$cto :: forall x.
Rep QueryStakeAddressInfoCmdArgs x -> QueryStakeAddressInfoCmdArgs
to :: forall x.
Rep QueryStakeAddressInfoCmdArgs x -> QueryStakeAddressInfoCmdArgs
Generic, Int -> QueryStakeAddressInfoCmdArgs -> ShowS
[QueryStakeAddressInfoCmdArgs] -> ShowS
QueryStakeAddressInfoCmdArgs -> String
(Int -> QueryStakeAddressInfoCmdArgs -> ShowS)
-> (QueryStakeAddressInfoCmdArgs -> String)
-> ([QueryStakeAddressInfoCmdArgs] -> ShowS)
-> Show QueryStakeAddressInfoCmdArgs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueryStakeAddressInfoCmdArgs -> ShowS
showsPrec :: Int -> QueryStakeAddressInfoCmdArgs -> ShowS
$cshow :: QueryStakeAddressInfoCmdArgs -> String
show :: QueryStakeAddressInfoCmdArgs -> String
$cshowList :: [QueryStakeAddressInfoCmdArgs] -> ShowS
showList :: [QueryStakeAddressInfoCmdArgs] -> ShowS
Show)

data QueryUTxOCmdArgs = QueryUTxOCmdArgs
  { QueryUTxOCmdArgs -> SocketPath
nodeSocketPath :: !SocketPath
  , QueryUTxOCmdArgs -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , QueryUTxOCmdArgs -> QueryUTxOFilter
queryFilter :: !QueryUTxOFilter
  , QueryUTxOCmdArgs -> NetworkId
networkId :: !NetworkId
  , QueryUTxOCmdArgs -> Target ChainPoint
target :: !(Consensus.Target ChainPoint)
  , QueryUTxOCmdArgs -> Maybe OutputFormatJsonOrText
format :: Maybe OutputFormatJsonOrText
  , QueryUTxOCmdArgs -> Maybe (File () 'Out)
mOutFile :: !(Maybe (File () Out))
  }
  deriving ((forall x. QueryUTxOCmdArgs -> Rep QueryUTxOCmdArgs x)
-> (forall x. Rep QueryUTxOCmdArgs x -> QueryUTxOCmdArgs)
-> Generic QueryUTxOCmdArgs
forall x. Rep QueryUTxOCmdArgs x -> QueryUTxOCmdArgs
forall x. QueryUTxOCmdArgs -> Rep QueryUTxOCmdArgs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. QueryUTxOCmdArgs -> Rep QueryUTxOCmdArgs x
from :: forall x. QueryUTxOCmdArgs -> Rep QueryUTxOCmdArgs x
$cto :: forall x. Rep QueryUTxOCmdArgs x -> QueryUTxOCmdArgs
to :: forall x. Rep QueryUTxOCmdArgs x -> QueryUTxOCmdArgs
Generic, Int -> QueryUTxOCmdArgs -> ShowS
[QueryUTxOCmdArgs] -> ShowS
QueryUTxOCmdArgs -> String
(Int -> QueryUTxOCmdArgs -> ShowS)
-> (QueryUTxOCmdArgs -> String)
-> ([QueryUTxOCmdArgs] -> ShowS)
-> Show QueryUTxOCmdArgs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueryUTxOCmdArgs -> ShowS
showsPrec :: Int -> QueryUTxOCmdArgs -> ShowS
$cshow :: QueryUTxOCmdArgs -> String
show :: QueryUTxOCmdArgs -> String
$cshowList :: [QueryUTxOCmdArgs] -> ShowS
showList :: [QueryUTxOCmdArgs] -> ShowS
Show)

data QueryLedgerStateCmdArgs = QueryLedgerStateCmdArgs
  { QueryLedgerStateCmdArgs -> SocketPath
nodeSocketPath :: !SocketPath
  , QueryLedgerStateCmdArgs -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , QueryLedgerStateCmdArgs -> NetworkId
networkId :: !NetworkId
  , QueryLedgerStateCmdArgs -> Target ChainPoint
target :: !(Consensus.Target ChainPoint)
  , QueryLedgerStateCmdArgs -> Maybe (File () 'Out)
mOutFile :: !(Maybe (File () Out))
  }
  deriving ((forall x.
 QueryLedgerStateCmdArgs -> Rep QueryLedgerStateCmdArgs x)
-> (forall x.
    Rep QueryLedgerStateCmdArgs x -> QueryLedgerStateCmdArgs)
-> Generic QueryLedgerStateCmdArgs
forall x. Rep QueryLedgerStateCmdArgs x -> QueryLedgerStateCmdArgs
forall x. QueryLedgerStateCmdArgs -> Rep QueryLedgerStateCmdArgs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. QueryLedgerStateCmdArgs -> Rep QueryLedgerStateCmdArgs x
from :: forall x. QueryLedgerStateCmdArgs -> Rep QueryLedgerStateCmdArgs x
$cto :: forall x. Rep QueryLedgerStateCmdArgs x -> QueryLedgerStateCmdArgs
to :: forall x. Rep QueryLedgerStateCmdArgs x -> QueryLedgerStateCmdArgs
Generic, Int -> QueryLedgerStateCmdArgs -> ShowS
[QueryLedgerStateCmdArgs] -> ShowS
QueryLedgerStateCmdArgs -> String
(Int -> QueryLedgerStateCmdArgs -> ShowS)
-> (QueryLedgerStateCmdArgs -> String)
-> ([QueryLedgerStateCmdArgs] -> ShowS)
-> Show QueryLedgerStateCmdArgs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueryLedgerStateCmdArgs -> ShowS
showsPrec :: Int -> QueryLedgerStateCmdArgs -> ShowS
$cshow :: QueryLedgerStateCmdArgs -> String
show :: QueryLedgerStateCmdArgs -> String
$cshowList :: [QueryLedgerStateCmdArgs] -> ShowS
showList :: [QueryLedgerStateCmdArgs] -> ShowS
Show)

data QueryProtocolStateCmdArgs = QueryProtocolStateCmdArgs
  { QueryProtocolStateCmdArgs -> SocketPath
nodeSocketPath :: !SocketPath
  , QueryProtocolStateCmdArgs -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , QueryProtocolStateCmdArgs -> NetworkId
networkId :: !NetworkId
  , QueryProtocolStateCmdArgs -> Target ChainPoint
target :: !(Consensus.Target ChainPoint)
  , QueryProtocolStateCmdArgs -> Maybe (File () 'Out)
mOutFile :: !(Maybe (File () Out))
  }
  deriving ((forall x.
 QueryProtocolStateCmdArgs -> Rep QueryProtocolStateCmdArgs x)
-> (forall x.
    Rep QueryProtocolStateCmdArgs x -> QueryProtocolStateCmdArgs)
-> Generic QueryProtocolStateCmdArgs
forall x.
Rep QueryProtocolStateCmdArgs x -> QueryProtocolStateCmdArgs
forall x.
QueryProtocolStateCmdArgs -> Rep QueryProtocolStateCmdArgs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
QueryProtocolStateCmdArgs -> Rep QueryProtocolStateCmdArgs x
from :: forall x.
QueryProtocolStateCmdArgs -> Rep QueryProtocolStateCmdArgs x
$cto :: forall x.
Rep QueryProtocolStateCmdArgs x -> QueryProtocolStateCmdArgs
to :: forall x.
Rep QueryProtocolStateCmdArgs x -> QueryProtocolStateCmdArgs
Generic, Int -> QueryProtocolStateCmdArgs -> ShowS
[QueryProtocolStateCmdArgs] -> ShowS
QueryProtocolStateCmdArgs -> String
(Int -> QueryProtocolStateCmdArgs -> ShowS)
-> (QueryProtocolStateCmdArgs -> String)
-> ([QueryProtocolStateCmdArgs] -> ShowS)
-> Show QueryProtocolStateCmdArgs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueryProtocolStateCmdArgs -> ShowS
showsPrec :: Int -> QueryProtocolStateCmdArgs -> ShowS
$cshow :: QueryProtocolStateCmdArgs -> String
show :: QueryProtocolStateCmdArgs -> String
$cshowList :: [QueryProtocolStateCmdArgs] -> ShowS
showList :: [QueryProtocolStateCmdArgs] -> ShowS
Show)

data QueryStakeSnapshotCmdArgs = QueryStakeSnapshotCmdArgs
  { QueryStakeSnapshotCmdArgs -> SocketPath
nodeSocketPath :: !SocketPath
  , QueryStakeSnapshotCmdArgs -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , QueryStakeSnapshotCmdArgs -> NetworkId
networkId :: !NetworkId
  , QueryStakeSnapshotCmdArgs -> AllOrOnly (Hash StakePoolKey)
allOrOnlyPoolIds :: !(AllOrOnly (Hash StakePoolKey))
  , QueryStakeSnapshotCmdArgs -> Target ChainPoint
target :: !(Consensus.Target ChainPoint)
  , QueryStakeSnapshotCmdArgs -> Maybe (File () 'Out)
mOutFile :: !(Maybe (File () Out))
  }
  deriving ((forall x.
 QueryStakeSnapshotCmdArgs -> Rep QueryStakeSnapshotCmdArgs x)
-> (forall x.
    Rep QueryStakeSnapshotCmdArgs x -> QueryStakeSnapshotCmdArgs)
-> Generic QueryStakeSnapshotCmdArgs
forall x.
Rep QueryStakeSnapshotCmdArgs x -> QueryStakeSnapshotCmdArgs
forall x.
QueryStakeSnapshotCmdArgs -> Rep QueryStakeSnapshotCmdArgs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
QueryStakeSnapshotCmdArgs -> Rep QueryStakeSnapshotCmdArgs x
from :: forall x.
QueryStakeSnapshotCmdArgs -> Rep QueryStakeSnapshotCmdArgs x
$cto :: forall x.
Rep QueryStakeSnapshotCmdArgs x -> QueryStakeSnapshotCmdArgs
to :: forall x.
Rep QueryStakeSnapshotCmdArgs x -> QueryStakeSnapshotCmdArgs
Generic, Int -> QueryStakeSnapshotCmdArgs -> ShowS
[QueryStakeSnapshotCmdArgs] -> ShowS
QueryStakeSnapshotCmdArgs -> String
(Int -> QueryStakeSnapshotCmdArgs -> ShowS)
-> (QueryStakeSnapshotCmdArgs -> String)
-> ([QueryStakeSnapshotCmdArgs] -> ShowS)
-> Show QueryStakeSnapshotCmdArgs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueryStakeSnapshotCmdArgs -> ShowS
showsPrec :: Int -> QueryStakeSnapshotCmdArgs -> ShowS
$cshow :: QueryStakeSnapshotCmdArgs -> String
show :: QueryStakeSnapshotCmdArgs -> String
$cshowList :: [QueryStakeSnapshotCmdArgs] -> ShowS
showList :: [QueryStakeSnapshotCmdArgs] -> ShowS
Show)

data QueryKesPeriodInfoCmdArgs = QueryKesPeriodInfoCmdArgs
  { QueryKesPeriodInfoCmdArgs -> SocketPath
nodeSocketPath :: !SocketPath
  , QueryKesPeriodInfoCmdArgs -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , QueryKesPeriodInfoCmdArgs -> NetworkId
networkId :: !NetworkId
  , QueryKesPeriodInfoCmdArgs -> File () 'In
nodeOpCertFp :: !(File () In)
  -- ^ Node operational certificate
  , QueryKesPeriodInfoCmdArgs -> Target ChainPoint
target :: !(Consensus.Target ChainPoint)
  , QueryKesPeriodInfoCmdArgs -> Maybe (File () 'Out)
mOutFile :: !(Maybe (File () Out))
  }
  deriving ((forall x.
 QueryKesPeriodInfoCmdArgs -> Rep QueryKesPeriodInfoCmdArgs x)
-> (forall x.
    Rep QueryKesPeriodInfoCmdArgs x -> QueryKesPeriodInfoCmdArgs)
-> Generic QueryKesPeriodInfoCmdArgs
forall x.
Rep QueryKesPeriodInfoCmdArgs x -> QueryKesPeriodInfoCmdArgs
forall x.
QueryKesPeriodInfoCmdArgs -> Rep QueryKesPeriodInfoCmdArgs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
QueryKesPeriodInfoCmdArgs -> Rep QueryKesPeriodInfoCmdArgs x
from :: forall x.
QueryKesPeriodInfoCmdArgs -> Rep QueryKesPeriodInfoCmdArgs x
$cto :: forall x.
Rep QueryKesPeriodInfoCmdArgs x -> QueryKesPeriodInfoCmdArgs
to :: forall x.
Rep QueryKesPeriodInfoCmdArgs x -> QueryKesPeriodInfoCmdArgs
Generic, Int -> QueryKesPeriodInfoCmdArgs -> ShowS
[QueryKesPeriodInfoCmdArgs] -> ShowS
QueryKesPeriodInfoCmdArgs -> String
(Int -> QueryKesPeriodInfoCmdArgs -> ShowS)
-> (QueryKesPeriodInfoCmdArgs -> String)
-> ([QueryKesPeriodInfoCmdArgs] -> ShowS)
-> Show QueryKesPeriodInfoCmdArgs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueryKesPeriodInfoCmdArgs -> ShowS
showsPrec :: Int -> QueryKesPeriodInfoCmdArgs -> ShowS
$cshow :: QueryKesPeriodInfoCmdArgs -> String
show :: QueryKesPeriodInfoCmdArgs -> String
$cshowList :: [QueryKesPeriodInfoCmdArgs] -> ShowS
showList :: [QueryKesPeriodInfoCmdArgs] -> ShowS
Show)

data QueryPoolStateCmdArgs = QueryPoolStateCmdArgs
  { QueryPoolStateCmdArgs -> SocketPath
nodeSocketPath :: !SocketPath
  , QueryPoolStateCmdArgs -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , QueryPoolStateCmdArgs -> NetworkId
networkId :: !NetworkId
  , QueryPoolStateCmdArgs -> AllOrOnly (Hash StakePoolKey)
allOrOnlyPoolIds :: !(AllOrOnly (Hash StakePoolKey))
  , QueryPoolStateCmdArgs -> Target ChainPoint
target :: !(Consensus.Target ChainPoint)
  , QueryPoolStateCmdArgs -> Maybe (File () 'Out)
mOutFile :: !(Maybe (File () Out))
  }
  deriving ((forall x. QueryPoolStateCmdArgs -> Rep QueryPoolStateCmdArgs x)
-> (forall x. Rep QueryPoolStateCmdArgs x -> QueryPoolStateCmdArgs)
-> Generic QueryPoolStateCmdArgs
forall x. Rep QueryPoolStateCmdArgs x -> QueryPoolStateCmdArgs
forall x. QueryPoolStateCmdArgs -> Rep QueryPoolStateCmdArgs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. QueryPoolStateCmdArgs -> Rep QueryPoolStateCmdArgs x
from :: forall x. QueryPoolStateCmdArgs -> Rep QueryPoolStateCmdArgs x
$cto :: forall x. Rep QueryPoolStateCmdArgs x -> QueryPoolStateCmdArgs
to :: forall x. Rep QueryPoolStateCmdArgs x -> QueryPoolStateCmdArgs
Generic, Int -> QueryPoolStateCmdArgs -> ShowS
[QueryPoolStateCmdArgs] -> ShowS
QueryPoolStateCmdArgs -> String
(Int -> QueryPoolStateCmdArgs -> ShowS)
-> (QueryPoolStateCmdArgs -> String)
-> ([QueryPoolStateCmdArgs] -> ShowS)
-> Show QueryPoolStateCmdArgs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueryPoolStateCmdArgs -> ShowS
showsPrec :: Int -> QueryPoolStateCmdArgs -> ShowS
$cshow :: QueryPoolStateCmdArgs -> String
show :: QueryPoolStateCmdArgs -> String
$cshowList :: [QueryPoolStateCmdArgs] -> ShowS
showList :: [QueryPoolStateCmdArgs] -> ShowS
Show)

data QueryTxMempoolCmdArgs = QueryTxMempoolCmdArgs
  { QueryTxMempoolCmdArgs -> SocketPath
nodeSocketPath :: !SocketPath
  , QueryTxMempoolCmdArgs -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , QueryTxMempoolCmdArgs -> NetworkId
networkId :: !NetworkId
  , QueryTxMempoolCmdArgs -> TxMempoolQuery
query :: !TxMempoolQuery
  , QueryTxMempoolCmdArgs -> Maybe (File () 'Out)
mOutFile :: !(Maybe (File () Out))
  }
  deriving ((forall x. QueryTxMempoolCmdArgs -> Rep QueryTxMempoolCmdArgs x)
-> (forall x. Rep QueryTxMempoolCmdArgs x -> QueryTxMempoolCmdArgs)
-> Generic QueryTxMempoolCmdArgs
forall x. Rep QueryTxMempoolCmdArgs x -> QueryTxMempoolCmdArgs
forall x. QueryTxMempoolCmdArgs -> Rep QueryTxMempoolCmdArgs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. QueryTxMempoolCmdArgs -> Rep QueryTxMempoolCmdArgs x
from :: forall x. QueryTxMempoolCmdArgs -> Rep QueryTxMempoolCmdArgs x
$cto :: forall x. Rep QueryTxMempoolCmdArgs x -> QueryTxMempoolCmdArgs
to :: forall x. Rep QueryTxMempoolCmdArgs x -> QueryTxMempoolCmdArgs
Generic, Int -> QueryTxMempoolCmdArgs -> ShowS
[QueryTxMempoolCmdArgs] -> ShowS
QueryTxMempoolCmdArgs -> String
(Int -> QueryTxMempoolCmdArgs -> ShowS)
-> (QueryTxMempoolCmdArgs -> String)
-> ([QueryTxMempoolCmdArgs] -> ShowS)
-> Show QueryTxMempoolCmdArgs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueryTxMempoolCmdArgs -> ShowS
showsPrec :: Int -> QueryTxMempoolCmdArgs -> ShowS
$cshow :: QueryTxMempoolCmdArgs -> String
show :: QueryTxMempoolCmdArgs -> String
$cshowList :: [QueryTxMempoolCmdArgs] -> ShowS
showList :: [QueryTxMempoolCmdArgs] -> ShowS
Show)

data QuerySlotNumberCmdArgs = QuerySlotNumberCmdArgs
  { QuerySlotNumberCmdArgs -> SocketPath
nodeSocketPath :: !SocketPath
  , QuerySlotNumberCmdArgs -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , QuerySlotNumberCmdArgs -> NetworkId
networkId :: !NetworkId
  , QuerySlotNumberCmdArgs -> Target ChainPoint
target :: !(Consensus.Target ChainPoint)
  , QuerySlotNumberCmdArgs -> UTCTime
utcTime :: !UTCTime
  }
  deriving ((forall x. QuerySlotNumberCmdArgs -> Rep QuerySlotNumberCmdArgs x)
-> (forall x.
    Rep QuerySlotNumberCmdArgs x -> QuerySlotNumberCmdArgs)
-> Generic QuerySlotNumberCmdArgs
forall x. Rep QuerySlotNumberCmdArgs x -> QuerySlotNumberCmdArgs
forall x. QuerySlotNumberCmdArgs -> Rep QuerySlotNumberCmdArgs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. QuerySlotNumberCmdArgs -> Rep QuerySlotNumberCmdArgs x
from :: forall x. QuerySlotNumberCmdArgs -> Rep QuerySlotNumberCmdArgs x
$cto :: forall x. Rep QuerySlotNumberCmdArgs x -> QuerySlotNumberCmdArgs
to :: forall x. Rep QuerySlotNumberCmdArgs x -> QuerySlotNumberCmdArgs
Generic, Int -> QuerySlotNumberCmdArgs -> ShowS
[QuerySlotNumberCmdArgs] -> ShowS
QuerySlotNumberCmdArgs -> String
(Int -> QuerySlotNumberCmdArgs -> ShowS)
-> (QuerySlotNumberCmdArgs -> String)
-> ([QuerySlotNumberCmdArgs] -> ShowS)
-> Show QuerySlotNumberCmdArgs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QuerySlotNumberCmdArgs -> ShowS
showsPrec :: Int -> QuerySlotNumberCmdArgs -> ShowS
$cshow :: QuerySlotNumberCmdArgs -> String
show :: QuerySlotNumberCmdArgs -> String
$cshowList :: [QuerySlotNumberCmdArgs] -> ShowS
showList :: [QuerySlotNumberCmdArgs] -> ShowS
Show)

data QueryRefScriptSizeCmdArgs = QueryRefScriptSizeCmdArgs
  { QueryRefScriptSizeCmdArgs -> SocketPath
nodeSocketPath :: !SocketPath
  , QueryRefScriptSizeCmdArgs -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , QueryRefScriptSizeCmdArgs -> Set TxIn
transactionInputs :: !(Set TxIn)
  , QueryRefScriptSizeCmdArgs -> NetworkId
networkId :: !NetworkId
  , QueryRefScriptSizeCmdArgs -> Target ChainPoint
target :: !(Consensus.Target ChainPoint)
  , QueryRefScriptSizeCmdArgs -> Maybe OutputFormatJsonOrText
format :: Maybe OutputFormatJsonOrText
  , QueryRefScriptSizeCmdArgs -> Maybe (File () 'Out)
mOutFile :: !(Maybe (File () Out))
  }
  deriving ((forall x.
 QueryRefScriptSizeCmdArgs -> Rep QueryRefScriptSizeCmdArgs x)
-> (forall x.
    Rep QueryRefScriptSizeCmdArgs x -> QueryRefScriptSizeCmdArgs)
-> Generic QueryRefScriptSizeCmdArgs
forall x.
Rep QueryRefScriptSizeCmdArgs x -> QueryRefScriptSizeCmdArgs
forall x.
QueryRefScriptSizeCmdArgs -> Rep QueryRefScriptSizeCmdArgs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
QueryRefScriptSizeCmdArgs -> Rep QueryRefScriptSizeCmdArgs x
from :: forall x.
QueryRefScriptSizeCmdArgs -> Rep QueryRefScriptSizeCmdArgs x
$cto :: forall x.
Rep QueryRefScriptSizeCmdArgs x -> QueryRefScriptSizeCmdArgs
to :: forall x.
Rep QueryRefScriptSizeCmdArgs x -> QueryRefScriptSizeCmdArgs
Generic, Int -> QueryRefScriptSizeCmdArgs -> ShowS
[QueryRefScriptSizeCmdArgs] -> ShowS
QueryRefScriptSizeCmdArgs -> String
(Int -> QueryRefScriptSizeCmdArgs -> ShowS)
-> (QueryRefScriptSizeCmdArgs -> String)
-> ([QueryRefScriptSizeCmdArgs] -> ShowS)
-> Show QueryRefScriptSizeCmdArgs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueryRefScriptSizeCmdArgs -> ShowS
showsPrec :: Int -> QueryRefScriptSizeCmdArgs -> ShowS
$cshow :: QueryRefScriptSizeCmdArgs -> String
show :: QueryRefScriptSizeCmdArgs -> String
$cshowList :: [QueryRefScriptSizeCmdArgs] -> ShowS
showList :: [QueryRefScriptSizeCmdArgs] -> ShowS
Show)

data QueryNoArgCmdArgs era = QueryNoArgCmdArgs
  { forall era. QueryNoArgCmdArgs era -> ConwayEraOnwards era
eon :: !(ConwayEraOnwards era)
  , forall era. QueryNoArgCmdArgs era -> SocketPath
nodeSocketPath :: !SocketPath
  , forall era. QueryNoArgCmdArgs era -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , forall era. QueryNoArgCmdArgs era -> NetworkId
networkId :: !NetworkId
  , forall era. QueryNoArgCmdArgs era -> Target ChainPoint
target :: !(Consensus.Target ChainPoint)
  , forall era. QueryNoArgCmdArgs era -> Maybe (File () 'Out)
mOutFile :: !(Maybe (File () Out))
  }
  deriving Int -> QueryNoArgCmdArgs era -> ShowS
[QueryNoArgCmdArgs era] -> ShowS
QueryNoArgCmdArgs era -> String
(Int -> QueryNoArgCmdArgs era -> ShowS)
-> (QueryNoArgCmdArgs era -> String)
-> ([QueryNoArgCmdArgs era] -> ShowS)
-> Show (QueryNoArgCmdArgs era)
forall era. Int -> QueryNoArgCmdArgs era -> ShowS
forall era. [QueryNoArgCmdArgs era] -> ShowS
forall era. QueryNoArgCmdArgs era -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall era. Int -> QueryNoArgCmdArgs era -> ShowS
showsPrec :: Int -> QueryNoArgCmdArgs era -> ShowS
$cshow :: forall era. QueryNoArgCmdArgs era -> String
show :: QueryNoArgCmdArgs era -> String
$cshowList :: forall era. [QueryNoArgCmdArgs era] -> ShowS
showList :: [QueryNoArgCmdArgs era] -> ShowS
Show

data QueryDRepStateCmdArgs era = QueryDRepStateCmdArgs
  { forall era. QueryDRepStateCmdArgs era -> ConwayEraOnwards era
eon :: !(ConwayEraOnwards era)
  , forall era. QueryDRepStateCmdArgs era -> SocketPath
nodeSocketPath :: !SocketPath
  , forall era. QueryDRepStateCmdArgs era -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , forall era. QueryDRepStateCmdArgs era -> NetworkId
networkId :: !NetworkId
  , forall era. QueryDRepStateCmdArgs era -> AllOrOnly DRepHashSource
drepHashSources :: !(AllOrOnly DRepHashSource)
  , forall era. QueryDRepStateCmdArgs era -> IncludeStake
includeStake :: !IncludeStake
  , forall era. QueryDRepStateCmdArgs era -> Target ChainPoint
target :: !(Consensus.Target ChainPoint)
  , forall era. QueryDRepStateCmdArgs era -> Maybe (File () 'Out)
mOutFile :: !(Maybe (File () Out))
  }
  deriving Int -> QueryDRepStateCmdArgs era -> ShowS
[QueryDRepStateCmdArgs era] -> ShowS
QueryDRepStateCmdArgs era -> String
(Int -> QueryDRepStateCmdArgs era -> ShowS)
-> (QueryDRepStateCmdArgs era -> String)
-> ([QueryDRepStateCmdArgs era] -> ShowS)
-> Show (QueryDRepStateCmdArgs era)
forall era. Int -> QueryDRepStateCmdArgs era -> ShowS
forall era. [QueryDRepStateCmdArgs era] -> ShowS
forall era. QueryDRepStateCmdArgs era -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall era. Int -> QueryDRepStateCmdArgs era -> ShowS
showsPrec :: Int -> QueryDRepStateCmdArgs era -> ShowS
$cshow :: forall era. QueryDRepStateCmdArgs era -> String
show :: QueryDRepStateCmdArgs era -> String
$cshowList :: forall era. [QueryDRepStateCmdArgs era] -> ShowS
showList :: [QueryDRepStateCmdArgs era] -> ShowS
Show

data QueryDRepStakeDistributionCmdArgs era = QueryDRepStakeDistributionCmdArgs
  { forall era.
QueryDRepStakeDistributionCmdArgs era -> ConwayEraOnwards era
eon :: !(ConwayEraOnwards era)
  , forall era. QueryDRepStakeDistributionCmdArgs era -> SocketPath
nodeSocketPath :: !SocketPath
  , forall era.
QueryDRepStakeDistributionCmdArgs era -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , forall era. QueryDRepStakeDistributionCmdArgs era -> NetworkId
networkId :: !NetworkId
  , forall era.
QueryDRepStakeDistributionCmdArgs era -> AllOrOnly DRepHashSource
drepHashSources :: !(AllOrOnly DRepHashSource)
  , forall era.
QueryDRepStakeDistributionCmdArgs era -> Target ChainPoint
target :: !(Consensus.Target ChainPoint)
  , forall era.
QueryDRepStakeDistributionCmdArgs era -> Maybe (File () 'Out)
mOutFile :: !(Maybe (File () Out))
  }
  deriving Int -> QueryDRepStakeDistributionCmdArgs era -> ShowS
[QueryDRepStakeDistributionCmdArgs era] -> ShowS
QueryDRepStakeDistributionCmdArgs era -> String
(Int -> QueryDRepStakeDistributionCmdArgs era -> ShowS)
-> (QueryDRepStakeDistributionCmdArgs era -> String)
-> ([QueryDRepStakeDistributionCmdArgs era] -> ShowS)
-> Show (QueryDRepStakeDistributionCmdArgs era)
forall era. Int -> QueryDRepStakeDistributionCmdArgs era -> ShowS
forall era. [QueryDRepStakeDistributionCmdArgs era] -> ShowS
forall era. QueryDRepStakeDistributionCmdArgs era -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall era. Int -> QueryDRepStakeDistributionCmdArgs era -> ShowS
showsPrec :: Int -> QueryDRepStakeDistributionCmdArgs era -> ShowS
$cshow :: forall era. QueryDRepStakeDistributionCmdArgs era -> String
show :: QueryDRepStakeDistributionCmdArgs era -> String
$cshowList :: forall era. [QueryDRepStakeDistributionCmdArgs era] -> ShowS
showList :: [QueryDRepStakeDistributionCmdArgs era] -> ShowS
Show

data QuerySPOStakeDistributionCmdArgs era = QuerySPOStakeDistributionCmdArgs
  { forall era.
QuerySPOStakeDistributionCmdArgs era -> ConwayEraOnwards era
eon :: !(ConwayEraOnwards era)
  , forall era. QuerySPOStakeDistributionCmdArgs era -> SocketPath
nodeSocketPath :: !SocketPath
  , forall era.
QuerySPOStakeDistributionCmdArgs era -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , forall era. QuerySPOStakeDistributionCmdArgs era -> NetworkId
networkId :: !NetworkId
  , forall era.
QuerySPOStakeDistributionCmdArgs era -> AllOrOnly SPOHashSource
spoHashSources :: !(AllOrOnly SPOHashSource)
  , forall era.
QuerySPOStakeDistributionCmdArgs era -> Target ChainPoint
target :: !(Consensus.Target ChainPoint)
  , forall era.
QuerySPOStakeDistributionCmdArgs era -> Maybe (File () 'Out)
mOutFile :: !(Maybe (File () Out))
  }
  deriving Int -> QuerySPOStakeDistributionCmdArgs era -> ShowS
[QuerySPOStakeDistributionCmdArgs era] -> ShowS
QuerySPOStakeDistributionCmdArgs era -> String
(Int -> QuerySPOStakeDistributionCmdArgs era -> ShowS)
-> (QuerySPOStakeDistributionCmdArgs era -> String)
-> ([QuerySPOStakeDistributionCmdArgs era] -> ShowS)
-> Show (QuerySPOStakeDistributionCmdArgs era)
forall era. Int -> QuerySPOStakeDistributionCmdArgs era -> ShowS
forall era. [QuerySPOStakeDistributionCmdArgs era] -> ShowS
forall era. QuerySPOStakeDistributionCmdArgs era -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall era. Int -> QuerySPOStakeDistributionCmdArgs era -> ShowS
showsPrec :: Int -> QuerySPOStakeDistributionCmdArgs era -> ShowS
$cshow :: forall era. QuerySPOStakeDistributionCmdArgs era -> String
show :: QuerySPOStakeDistributionCmdArgs era -> String
$cshowList :: forall era. [QuerySPOStakeDistributionCmdArgs era] -> ShowS
showList :: [QuerySPOStakeDistributionCmdArgs era] -> ShowS
Show

data QueryCommitteeMembersStateCmdArgs era = QueryCommitteeMembersStateCmdArgs
  { forall era.
QueryCommitteeMembersStateCmdArgs era -> ConwayEraOnwards era
eon :: !(ConwayEraOnwards era)
  , forall era. QueryCommitteeMembersStateCmdArgs era -> SocketPath
nodeSocketPath :: !SocketPath
  , forall era.
QueryCommitteeMembersStateCmdArgs era -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , forall era. QueryCommitteeMembersStateCmdArgs era -> NetworkId
networkId :: !NetworkId
  , forall era.
QueryCommitteeMembersStateCmdArgs era
-> [VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey]
committeeColdKeys :: ![VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey]
  , forall era.
QueryCommitteeMembersStateCmdArgs era
-> [VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey]
committeeHotKeys :: ![VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey]
  , forall era. QueryCommitteeMembersStateCmdArgs era -> [MemberStatus]
memberStatuses :: ![MemberStatus]
  , forall era.
QueryCommitteeMembersStateCmdArgs era -> Target ChainPoint
target :: !(Consensus.Target ChainPoint)
  , forall era.
QueryCommitteeMembersStateCmdArgs era -> Maybe (File () 'Out)
mOutFile :: !(Maybe (File () Out))
  }
  deriving Int -> QueryCommitteeMembersStateCmdArgs era -> ShowS
[QueryCommitteeMembersStateCmdArgs era] -> ShowS
QueryCommitteeMembersStateCmdArgs era -> String
(Int -> QueryCommitteeMembersStateCmdArgs era -> ShowS)
-> (QueryCommitteeMembersStateCmdArgs era -> String)
-> ([QueryCommitteeMembersStateCmdArgs era] -> ShowS)
-> Show (QueryCommitteeMembersStateCmdArgs era)
forall era. Int -> QueryCommitteeMembersStateCmdArgs era -> ShowS
forall era. [QueryCommitteeMembersStateCmdArgs era] -> ShowS
forall era. QueryCommitteeMembersStateCmdArgs era -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall era. Int -> QueryCommitteeMembersStateCmdArgs era -> ShowS
showsPrec :: Int -> QueryCommitteeMembersStateCmdArgs era -> ShowS
$cshow :: forall era. QueryCommitteeMembersStateCmdArgs era -> String
show :: QueryCommitteeMembersStateCmdArgs era -> String
$cshowList :: forall era. [QueryCommitteeMembersStateCmdArgs era] -> ShowS
showList :: [QueryCommitteeMembersStateCmdArgs era] -> ShowS
Show

data QueryTreasuryValueCmdArgs era = QueryTreasuryValueCmdArgs
  { forall era. QueryTreasuryValueCmdArgs era -> ConwayEraOnwards era
eon :: !(ConwayEraOnwards era)
  , forall era. QueryTreasuryValueCmdArgs era -> SocketPath
nodeSocketPath :: !SocketPath
  , forall era. QueryTreasuryValueCmdArgs era -> ConsensusModeParams
consensusModeParams :: !ConsensusModeParams
  , forall era. QueryTreasuryValueCmdArgs era -> NetworkId
networkId :: !NetworkId
  , forall era. QueryTreasuryValueCmdArgs era -> Target ChainPoint
target :: !(Consensus.Target ChainPoint)
  , forall era. QueryTreasuryValueCmdArgs era -> Maybe (File () 'Out)
mOutFile :: !(Maybe (File () Out))
  }
  deriving Int -> QueryTreasuryValueCmdArgs era -> ShowS
[QueryTreasuryValueCmdArgs era] -> ShowS
QueryTreasuryValueCmdArgs era -> String
(Int -> QueryTreasuryValueCmdArgs era -> ShowS)
-> (QueryTreasuryValueCmdArgs era -> String)
-> ([QueryTreasuryValueCmdArgs era] -> ShowS)
-> Show (QueryTreasuryValueCmdArgs era)
forall era. Int -> QueryTreasuryValueCmdArgs era -> ShowS
forall era. [QueryTreasuryValueCmdArgs era] -> ShowS
forall era. QueryTreasuryValueCmdArgs era -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall era. Int -> QueryTreasuryValueCmdArgs era -> ShowS
showsPrec :: Int -> QueryTreasuryValueCmdArgs era -> ShowS
$cshow :: forall era. QueryTreasuryValueCmdArgs era -> String
show :: QueryTreasuryValueCmdArgs era -> String
$cshowList :: forall era. [QueryTreasuryValueCmdArgs era] -> ShowS
showList :: [QueryTreasuryValueCmdArgs era] -> ShowS
Show

renderQueryCmds :: QueryCmds era -> Text
renderQueryCmds :: forall era. QueryCmds era -> Text
renderQueryCmds = \case
  QueryLeadershipScheduleCmd{} ->
    Text
"query leadership-schedule"
  QueryProtocolParametersCmd{} ->
    Text
"query protocol-parameters "
  QueryTipCmd{} ->
    Text
"query tip"
  QueryStakePoolsCmd{} ->
    Text
"query stake-pools"
  QueryStakeDistributionCmd{} ->
    Text
"query stake-distribution"
  QueryStakeAddressInfoCmd{} ->
    Text
"query stake-address-info"
  QueryUTxOCmd{} ->
    Text
"query utxo"
  QueryLedgerStateCmd{} ->
    Text
"query ledger-state"
  QueryProtocolStateCmd{} ->
    Text
"query protocol-state"
  QueryStakeSnapshotCmd{} ->
    Text
"query stake-snapshot"
  QueryKesPeriodInfoCmd{} ->
    Text
"query kes-period-info"
  QueryPoolStateCmd{} ->
    Text
"query pool-state"
  QueryTxMempoolCmd (QueryTxMempoolCmdArgs SocketPath
_ ConsensusModeParams
_ NetworkId
_ TxMempoolQuery
q Maybe (File () 'Out)
_) ->
    Text
"query tx-mempool" Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
<> TxMempoolQuery -> Text
renderTxMempoolQuery TxMempoolQuery
q
  QuerySlotNumberCmd{} ->
    Text
"query slot-number"
  QueryRefScriptSizeCmd{} ->
    Text
"query ref-script-size"
  QueryConstitutionCmd{} ->
    Text
"constitution"
  QueryGovStateCmd{} ->
    Text
"gov-state"
  QueryDRepStateCmd{} ->
    Text
"drep-state"
  QueryDRepStakeDistributionCmd{} ->
    Text
"drep-stake-distribution"
  QuerySPOStakeDistributionCmd{} ->
    Text
"spo-stake-distribution"
  QueryCommitteeMembersStateCmd{} ->
    Text
"committee-state"
  QueryTreasuryValueCmd{} ->
    Text
"treasury"

renderTxMempoolQuery :: TxMempoolQuery -> Text
renderTxMempoolQuery :: TxMempoolQuery -> Text
renderTxMempoolQuery = \case
  TxMempoolQueryTxExists TxId
tx -> Text
"tx-exists " Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
<> TxId -> Text
forall a. SerialiseAsRawBytes a => a -> Text
serialiseToRawBytesHexText TxId
tx
  TxMempoolQuery
TxMempoolQueryNextTx -> Text
"next-tx"
  TxMempoolQuery
TxMempoolQueryInfo -> Text
"info"