{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
module Cardano.CLI.EraBased.Query.Option
( pQueryCmds
, pQueryCmdsTopLevel
)
where
import Cardano.Api hiding (QueryInShelleyBasedEra (..))
import Cardano.Api qualified as MemberStatus (MemberStatus (..))
import Cardano.Api.Experimental
import Cardano.CLI.Environment (EnvCli (..))
import Cardano.CLI.EraBased.Common.Option
import Cardano.CLI.EraBased.Query.Command
import Cardano.CLI.Option.Flag
import Cardano.CLI.Parser
import Cardano.CLI.Read
import Cardano.CLI.Type.Common
import Cardano.CLI.Type.Key
import Data.Foldable
import Data.Function
import GHC.Exts (IsList (..))
import Options.Applicative hiding (help, str)
import Options.Applicative qualified as Opt
import Vary (Vary)
pQueryCmdsTopLevel :: IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryCmdsTopLevel :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryCmdsTopLevel EnvCli
envCli =
let parsers :: [Parser (QueryCmds era)]
parsers =
[ EnvCli -> Parser (QueryCmds era)
forall era. EnvCli -> Parser (QueryCmds era)
pProtocolParams EnvCli
envCli
, EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pTip EnvCli
envCli
, EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pStakePools EnvCli
envCli
, EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pStakeDistribution EnvCli
envCli
, EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pStakeAddressInfo EnvCli
envCli
, EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryEraHistoryCmd EnvCli
envCli
, EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pUTxO EnvCli
envCli
, EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pLedgerState EnvCli
envCli
, EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pProtocolState EnvCli
envCli
, EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pStakeSnapshot EnvCli
envCli
, EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pPoolParams EnvCli
envCli
, EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pLeadershipSchedule EnvCli
envCli
, EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pKesPeriodInfo EnvCli
envCli
, EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pPoolState EnvCli
envCli
, EnvCli -> Parser (QueryCmds era)
forall era. EnvCli -> Parser (QueryCmds era)
pTxMempool EnvCli
envCli
, EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pSlotNumber EnvCli
envCli
, EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryLedgerPeerSnapshot EnvCli
envCli
]
i :: InfoMod a
i =
String -> InfoMod a
forall a. String -> InfoMod a
Opt.progDesc (String -> InfoMod a) -> String -> InfoMod a
forall a b. (a -> b) -> a -> b
$
[String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Node query commands. Will query the local node whose Unix domain socket is "
, String
"obtained from the CARDANO_NODE_SOCKET_PATH environment variable."
]
in Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser (Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"query" (ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info ([Parser (QueryCmds era)] -> Parser (QueryCmds era)
forall (t :: * -> *) (f :: * -> *) a.
(Foldable t, Alternative f) =>
t (f a) -> f a
asum [Parser (QueryCmds era)]
parsers) InfoMod (QueryCmds era)
forall {a}. InfoMod a
i
pProtocolParams :: EnvCli -> Parser (QueryCmds era)
pProtocolParams :: forall era. EnvCli -> Parser (QueryCmds era)
pProtocolParams EnvCli
envCli =
Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser (Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"protocol-parameters" (ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. EnvCli -> Parser (QueryCmds era)
pQueryProtocolParametersCmd EnvCli
envCli) (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the node's current protocol parameters"
pTip :: IsEra era => EnvCli -> Parser (QueryCmds era)
pTip :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pTip EnvCli
envCli =
Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser (Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"tip" (ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryTipCmd EnvCli
envCli) (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the node's current tip (slot no, hash, block no)"
pStakePools :: IsEra era => EnvCli -> Parser (QueryCmds era)
pStakePools :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pStakePools EnvCli
envCli =
Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser (Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"stake-pools" (ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryStakePoolsCmd EnvCli
envCli) (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the node's current set of stake pool ids"
pStakeDistribution :: IsEra era => EnvCli -> Parser (QueryCmds era)
pStakeDistribution :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pStakeDistribution EnvCli
envCli =
Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser (Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"stake-distribution" (ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryStakeDistributionCmd EnvCli
envCli) (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the node's current aggregated stake distribution"
pStakeAddressInfo :: IsEra era => EnvCli -> Parser (QueryCmds era)
pStakeAddressInfo :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pStakeAddressInfo EnvCli
envCli =
Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser (Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"stake-address-info" (ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryStakeAddressInfoCmd EnvCli
envCli) (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc (String -> InfoMod (QueryCmds era))
-> String -> InfoMod (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
[String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Get the current delegations and reward accounts filtered by stake address."
]
pUTxO :: IsEra era => EnvCli -> Parser (QueryCmds era)
pUTxO :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pUTxO EnvCli
envCli =
Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser (Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"utxo" (ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryUTxOCmd EnvCli
envCli) (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc (String -> InfoMod (QueryCmds era))
-> String -> InfoMod (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
[String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Get a portion of the current UTxO: by tx in, by address or the whole."
]
pLedgerState :: IsEra era => EnvCli -> Parser (QueryCmds era)
pLedgerState :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pLedgerState EnvCli
envCli =
Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser (Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"ledger-state" (ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryLedgerStateCmd EnvCli
envCli) (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc (String -> InfoMod (QueryCmds era))
-> String -> InfoMod (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
[String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Dump the current ledger state of the node (Ledger.NewEpochState -- advanced command)"
]
pProtocolState :: IsEra era => EnvCli -> Parser (QueryCmds era)
pProtocolState :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pProtocolState EnvCli
envCli =
Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser (Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"protocol-state" (ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryProtocolStateCmd EnvCli
envCli) (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc (String -> InfoMod (QueryCmds era))
-> String -> InfoMod (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
[String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Dump the current protocol state of the node (Ledger.ChainDepState -- advanced command)"
]
pStakeSnapshot :: IsEra era => EnvCli -> Parser (QueryCmds era)
pStakeSnapshot :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pStakeSnapshot EnvCli
envCli =
Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser (Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"stake-snapshot" (ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryStakeSnapshotCmd EnvCli
envCli) (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc (String -> InfoMod (QueryCmds era))
-> String -> InfoMod (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
[String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Obtain the three stake snapshots for a pool, plus the total active stake (advanced command)"
]
pPoolParams :: IsEra era => EnvCli -> Parser (QueryCmds era)
pPoolParams :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pPoolParams EnvCli
envCli =
Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser (Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
[Mod CommandFields (QueryCmds era)]
-> Mod CommandFields (QueryCmds era)
forall a. Monoid a => [a] -> a
mconcat
[ Mod CommandFields (QueryCmds era)
forall (f :: * -> *) a. Mod f a
Opt.hidden
, String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"pool-params" (ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryPoolStateCmd EnvCli
envCli) (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc (String -> InfoMod (QueryCmds era))
-> String -> InfoMod (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
[String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"DEPRECATED. Use query pool-state instead. Dump the pool parameters "
, String
"(Ledger.NewEpochState.esLState._delegationState._pState._pParams -- advanced command)"
]
]
pLeadershipSchedule :: IsEra era => EnvCli -> Parser (QueryCmds era)
pLeadershipSchedule :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pLeadershipSchedule EnvCli
envCli =
Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser (Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"leadership-schedule" (ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pLeadershipScheduleCmd EnvCli
envCli) (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the slots the node is expected to mint a block in (advanced command)"
pKesPeriodInfo :: IsEra era => EnvCli -> Parser (QueryCmds era)
pKesPeriodInfo :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pKesPeriodInfo EnvCli
envCli =
Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser (Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"kes-period-info" (ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pKesPeriodInfoCmd EnvCli
envCli) (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get information about the current KES period and your node's operational certificate."
pPoolState :: IsEra era => EnvCli -> Parser (QueryCmds era)
pPoolState :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pPoolState EnvCli
envCli =
Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser (Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"pool-state" (ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryPoolStateCmd EnvCli
envCli) (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Dump the pool state"
pTxMempool :: EnvCli -> Parser (QueryCmds era)
pTxMempool :: forall era. EnvCli -> Parser (QueryCmds era)
pTxMempool EnvCli
envCli =
Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser (Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"tx-mempool" (ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. EnvCli -> Parser (QueryCmds era)
pQueryTxMempoolCmd EnvCli
envCli) (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Local Mempool info"
pSlotNumber :: IsEra era => EnvCli -> Parser (QueryCmds era)
pSlotNumber :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pSlotNumber EnvCli
envCli =
Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser (Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"slot-number" (ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQuerySlotNumberCmd EnvCli
envCli) (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Query slot number for UTC timestamp"
pQueryLedgerPeerSnapshot :: IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryLedgerPeerSnapshot :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryLedgerPeerSnapshot EnvCli
envCli =
Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser (Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"ledger-peer-snapshot" (ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryLedgerPeerSnapshotCmd EnvCli
envCli) (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc (String -> InfoMod (QueryCmds era))
-> String -> InfoMod (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
[String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Dump the current snapshot of big ledger peers. "
, String
"These are the largest pools that cumulatively hold "
, String
"90% of total stake."
]
pQueryCmds
:: IsEra era
=> EnvCli
-> Maybe (Parser (QueryCmds era))
pQueryCmds :: forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryCmds EnvCli
envCli =
String
-> InfoMod (QueryCmds era)
-> [Maybe (Parser (QueryCmds era))]
-> Maybe (Parser (QueryCmds era))
forall a.
String -> InfoMod a -> [Maybe (Parser a)] -> Maybe (Parser a)
subInfoParser
String
"query"
( String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc (String -> InfoMod (QueryCmds era))
-> String -> InfoMod (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
[String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Node query commands. Will query the local node whose Unix domain socket is "
, String
"obtained from the CARDANO_NODE_SOCKET_PATH environment variable."
]
)
[ EnvCli -> Maybe (Parser (QueryCmds era))
forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryGetCommitteeStateCmd EnvCli
envCli
, EnvCli -> Maybe (Parser (QueryCmds era))
forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryGetConstitutionCmd EnvCli
envCli
, EnvCli -> Maybe (Parser (QueryCmds era))
forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryDRepStateCmd EnvCli
envCli
, EnvCli -> Maybe (Parser (QueryCmds era))
forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryDRepStakeDistributionCmd EnvCli
envCli
, Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
Just (Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryEraHistoryCmd EnvCli
envCli
, EnvCli -> Maybe (Parser (QueryCmds era))
forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryFuturePParamsCmd EnvCli
envCli
, EnvCli -> Maybe (Parser (QueryCmds era))
forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryGetGovStateCmd EnvCli
envCli
, Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
Just
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (InfoMod (QueryCmds era) -> Parser (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (InfoMod (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"kes-period-info"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pKesPeriodInfoCmd EnvCli
envCli)
(InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get information about the current KES period and your node's operational certificate."
, Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
Just
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (InfoMod (QueryCmds era) -> Parser (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (InfoMod (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"leadership-schedule"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pLeadershipScheduleCmd EnvCli
envCli)
(InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the slots the node is expected to mint a block in (advanced command)"
, Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
Just
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (String -> Parser (QueryCmds era))
-> String
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (String -> Mod CommandFields (QueryCmds era))
-> String
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"ledger-peer-snapshot"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (String -> ParserInfo (QueryCmds era))
-> String
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryLedgerPeerSnapshotCmd EnvCli
envCli)
(InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> (String -> InfoMod (QueryCmds era))
-> String
-> ParserInfo (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc
(String -> Maybe (Parser (QueryCmds era)))
-> String -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ [String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Dump the current snapshot of ledger peers."
, String
"These are the largest pools that cumulatively hold "
, String
"90% of total stake."
]
,
Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
Just
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (String -> Parser (QueryCmds era))
-> String
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (String -> Mod CommandFields (QueryCmds era))
-> String
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"ledger-state"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (String -> ParserInfo (QueryCmds era))
-> String
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryLedgerStateCmd EnvCli
envCli)
(InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> (String -> InfoMod (QueryCmds era))
-> String
-> ParserInfo (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc
(String -> Maybe (Parser (QueryCmds era)))
-> String -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ [String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Dump the current ledger state of the node (Ledger.NewEpochState -- advanced command)"
]
, Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
Just
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> Mod CommandFields (QueryCmds era)
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era)
-> Maybe (Parser (QueryCmds era)))
-> Mod CommandFields (QueryCmds era)
-> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ [Mod CommandFields (QueryCmds era)]
-> Mod CommandFields (QueryCmds era)
forall a. Monoid a => [a] -> a
mconcat
[ Mod CommandFields (QueryCmds era)
forall (f :: * -> *) a. Mod f a
Opt.hidden
, String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"pool-params"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (String -> ParserInfo (QueryCmds era))
-> String
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryPoolStateCmd EnvCli
envCli)
(InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> (String -> InfoMod (QueryCmds era))
-> String
-> ParserInfo (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc
(String -> Mod CommandFields (QueryCmds era))
-> String -> Mod CommandFields (QueryCmds era)
forall a b. (a -> b) -> a -> b
$ [String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"DEPRECATED. Use query pool-state instead. Dump the pool parameters "
, String
"(Ledger.NewEpochState.esLState._delegationState._pState._pParams -- advanced command)"
]
]
, Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
Just
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (InfoMod (QueryCmds era) -> Parser (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (InfoMod (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"pool-state"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryPoolStateCmd EnvCli
envCli)
(InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Dump the pool state"
, EnvCli -> Maybe (Parser (QueryCmds era))
forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryProposalsCmd EnvCli
envCli
, Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
Just (Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$
Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser (Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"protocol-parameters" (ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. EnvCli -> Parser (QueryCmds era)
pQueryProtocolParametersCmd EnvCli
envCli) (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the node's current protocol parameters"
, Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
Just
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (String -> Parser (QueryCmds era))
-> String
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (String -> Mod CommandFields (QueryCmds era))
-> String
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"protocol-state"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (String -> ParserInfo (QueryCmds era))
-> String
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryProtocolStateCmd EnvCli
envCli)
(InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> (String -> InfoMod (QueryCmds era))
-> String
-> ParserInfo (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc
(String -> Maybe (Parser (QueryCmds era)))
-> String -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ [String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Dump the current protocol state of the node (Ledger.ChainDepState -- advanced command)"
]
, EnvCli -> Maybe (Parser (QueryCmds era))
forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryGetRatifyStateCmd EnvCli
envCli
, Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
Just
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (InfoMod (QueryCmds era) -> Parser (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (InfoMod (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"ref-script-size"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryRefScriptSizeCmd EnvCli
envCli)
(InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Calculate the reference input scripts size in bytes for provided transaction inputs."
, Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
Just
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (InfoMod (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"slot-number"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQuerySlotNumberCmd EnvCli
envCli)
(InfoMod (QueryCmds era) -> Parser (QueryCmds era))
-> InfoMod (QueryCmds era) -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Query slot number for UTC timestamp"
, EnvCli -> Maybe (Parser (QueryCmds era))
forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQuerySPOStakeDistributionCmd EnvCli
envCli
, Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
Just
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (String -> Parser (QueryCmds era))
-> String
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (String -> Mod CommandFields (QueryCmds era))
-> String
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"stake-address-info"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (String -> ParserInfo (QueryCmds era))
-> String
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryStakeAddressInfoCmd EnvCli
envCli)
(InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> (String -> InfoMod (QueryCmds era))
-> String
-> ParserInfo (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc
(String -> Maybe (Parser (QueryCmds era)))
-> String -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ [String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Get the current delegations and reward accounts filtered by stake address."
]
, Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
Just
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (InfoMod (QueryCmds era) -> Parser (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (InfoMod (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"stake-distribution"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryStakeDistributionCmd EnvCli
envCli)
(InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the node's current aggregated stake distribution"
, Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
Just
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (InfoMod (QueryCmds era) -> Parser (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (InfoMod (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"stake-pools"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryStakePoolsCmd EnvCli
envCli)
(InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the node's current set of stake pool ids"
, EnvCli -> Maybe (Parser (QueryCmds era))
forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryStakePoolDefaultVote EnvCli
envCli
, Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
Just
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (String -> Parser (QueryCmds era))
-> String
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (String -> Mod CommandFields (QueryCmds era))
-> String
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"stake-snapshot"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (String -> ParserInfo (QueryCmds era))
-> String
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryStakeSnapshotCmd EnvCli
envCli)
(InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> (String -> InfoMod (QueryCmds era))
-> String
-> ParserInfo (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc
(String -> Maybe (Parser (QueryCmds era)))
-> String -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ [String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Obtain the three stake snapshots for a pool, plus the total active stake (advanced command)"
]
, Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
Just
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (InfoMod (QueryCmds era) -> Parser (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (InfoMod (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"tip"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryTipCmd EnvCli
envCli)
(InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the node's current tip (slot no, hash, block no)"
, EnvCli -> Maybe (Parser (QueryCmds era))
forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryTreasuryValueCmd EnvCli
envCli
, Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
Just
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (InfoMod (QueryCmds era) -> Parser (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (InfoMod (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"tx-mempool"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. EnvCli -> Parser (QueryCmds era)
pQueryTxMempoolCmd EnvCli
envCli)
(InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Local Mempool info"
, Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
Just
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (String -> Parser (QueryCmds era))
-> String
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (String -> Mod CommandFields (QueryCmds era))
-> String
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"utxo"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (String -> ParserInfo (QueryCmds era))
-> String
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (QueryCmds era)
forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryUTxOCmd EnvCli
envCli)
(InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> (String -> InfoMod (QueryCmds era))
-> String
-> ParserInfo (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc
(String -> Maybe (Parser (QueryCmds era)))
-> String -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ [String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Get a portion of the current UTxO: by tx in, by address or the whole."
]
]
pQueryProtocolParametersCmd :: EnvCli -> Parser (QueryCmds era)
pQueryProtocolParametersCmd :: forall era. EnvCli -> Parser (QueryCmds era)
pQueryProtocolParametersCmd EnvCli
envCli =
(QueryProtocolParametersCmdArgs -> QueryCmds era)
-> Parser QueryProtocolParametersCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap QueryProtocolParametersCmdArgs -> QueryCmds era
forall era. QueryProtocolParametersCmdArgs -> QueryCmds era
QueryProtocolParametersCmd (Parser QueryProtocolParametersCmdArgs -> Parser (QueryCmds era))
-> Parser QueryProtocolParametersCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
LocalNodeConnectInfo
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryProtocolParametersCmdArgs
QueryProtocolParametersCmdArgs
(LocalNodeConnectInfo
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryProtocolParametersCmdArgs)
-> Parser LocalNodeConnectInfo
-> Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryProtocolParametersCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ( ConsensusModeParams
-> NetworkId -> SocketPath -> LocalNodeConnectInfo
LocalNodeConnectInfo
(ConsensusModeParams
-> NetworkId -> SocketPath -> LocalNodeConnectInfo)
-> Parser ConsensusModeParams
-> Parser (NetworkId -> SocketPath -> LocalNodeConnectInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser ConsensusModeParams
pConsensusModeParams
Parser (NetworkId -> SocketPath -> LocalNodeConnectInfo)
-> Parser NetworkId -> Parser (SocketPath -> LocalNodeConnectInfo)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> EnvCli -> Parser NetworkId
pNetworkId EnvCli
envCli
Parser (SocketPath -> LocalNodeConnectInfo)
-> Parser SocketPath -> Parser LocalNodeConnectInfo
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> EnvCli -> Parser SocketPath
pSocketPath EnvCli
envCli
)
Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryProtocolParametersCmdArgs)
-> Parser (Vary '[FormatJson, FormatYaml])
-> Parser (Maybe (File () 'Out) -> QueryProtocolParametersCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag (Vary '[FormatJson, FormatYaml])]
-> Parser (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"protocol-parameters"
[ Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatJson, FormatYaml])
-> (Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml]))
-> Flag (Vary '[FormatJson, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser (Maybe (File () 'Out) -> QueryProtocolParametersCmdArgs)
-> Parser (Maybe (File () 'Out))
-> Parser QueryProtocolParametersCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pQueryTipCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryTipCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryTipCmd EnvCli
envCli =
(QueryTipCmdArgs -> QueryCmds era)
-> Parser QueryTipCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap QueryTipCmdArgs -> QueryCmds era
forall era. QueryTipCmdArgs -> QueryCmds era
QueryTipCmd (Parser QueryTipCmdArgs -> Parser (QueryCmds era))
-> Parser QueryTipCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
QueryCommons
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryTipCmdArgs
QueryTipCmdArgs
(QueryCommons
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryTipCmdArgs)
-> Parser QueryCommons
-> Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryTipCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryTipCmdArgs)
-> Parser (Vary '[FormatJson, FormatYaml])
-> Parser (Maybe (File () 'Out) -> QueryTipCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag (Vary '[FormatJson, FormatYaml])]
-> Parser (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"tip"
[ Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatJson, FormatYaml])
-> (Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml]))
-> Flag (Vary '[FormatJson, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser (Maybe (File () 'Out) -> QueryTipCmdArgs)
-> Parser (Maybe (File () 'Out)) -> Parser QueryTipCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pQueryUTxOCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryUTxOCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryUTxOCmd EnvCli
envCli =
(QueryUTxOCmdArgs -> QueryCmds era)
-> Parser QueryUTxOCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap QueryUTxOCmdArgs -> QueryCmds era
forall era. QueryUTxOCmdArgs -> QueryCmds era
QueryUTxOCmd (Parser QueryUTxOCmdArgs -> Parser (QueryCmds era))
-> Parser QueryUTxOCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
QueryCommons
-> QueryUTxOFilter
-> Vary
'[FormatCborBin, FormatCborHex, FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryUTxOCmdArgs
QueryUTxOCmdArgs
(QueryCommons
-> QueryUTxOFilter
-> Vary
'[FormatCborBin, FormatCborHex, FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryUTxOCmdArgs)
-> Parser QueryCommons
-> Parser
(QueryUTxOFilter
-> Vary
'[FormatCborBin, FormatCborHex, FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryUTxOCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser
(QueryUTxOFilter
-> Vary
'[FormatCborBin, FormatCborHex, FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryUTxOCmdArgs)
-> Parser QueryUTxOFilter
-> Parser
(Vary
'[FormatCborBin, FormatCborHex, FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out) -> QueryUTxOCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser QueryUTxOFilter
pQueryUTxOFilter
Parser
(Vary
'[FormatCborBin, FormatCborHex, FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out) -> QueryUTxOCmdArgs)
-> Parser
(Vary
'[FormatCborBin, FormatCborHex, FormatJson, FormatText,
FormatYaml])
-> Parser (Maybe (File () 'Out) -> QueryUTxOCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag
(Vary
'[FormatCborBin, FormatCborHex, FormatJson, FormatText,
FormatYaml])]
-> Parser
(Vary
'[FormatCborBin, FormatCborHex, FormatJson, FormatText,
FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"utxo"
[ Flag
(Vary
'[FormatCborBin, FormatCborHex, FormatJson, FormatText,
FormatYaml])
forall (fs :: [*]). (FormatCborBin :| fs) => Flag (Vary fs)
flagFormatCborBin
, Flag
(Vary
'[FormatCborBin, FormatCborHex, FormatJson, FormatText,
FormatYaml])
forall (fs :: [*]). (FormatCborHex :| fs) => Flag (Vary fs)
flagFormatCborHex
, Flag
(Vary
'[FormatCborBin, FormatCborHex, FormatJson, FormatText,
FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag
(Vary
'[FormatCborBin, FormatCborHex, FormatJson, FormatText,
FormatYaml])
-> (Flag
(Vary
'[FormatCborBin, FormatCborHex, FormatJson, FormatText,
FormatYaml])
-> Flag
(Vary
'[FormatCborBin, FormatCborHex, FormatJson, FormatText,
FormatYaml]))
-> Flag
(Vary
'[FormatCborBin, FormatCborHex, FormatJson, FormatText,
FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag
(Vary
'[FormatCborBin, FormatCborHex, FormatJson, FormatText,
FormatYaml])
-> Flag
(Vary
'[FormatCborBin, FormatCborHex, FormatJson, FormatText,
FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag
(Vary
'[FormatCborBin, FormatCborHex, FormatJson, FormatText,
FormatYaml])
forall (fs :: [*]). (FormatText :| fs) => Flag (Vary fs)
flagFormatText
, Flag
(Vary
'[FormatCborBin, FormatCborHex, FormatJson, FormatText,
FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser (Maybe (File () 'Out) -> QueryUTxOCmdArgs)
-> Parser (Maybe (File () 'Out)) -> Parser QueryUTxOCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pQueryStakePoolsCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryStakePoolsCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryStakePoolsCmd EnvCli
envCli =
(QueryStakePoolsCmdArgs -> QueryCmds era)
-> Parser QueryStakePoolsCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap QueryStakePoolsCmdArgs -> QueryCmds era
forall era. QueryStakePoolsCmdArgs -> QueryCmds era
QueryStakePoolsCmd (Parser QueryStakePoolsCmdArgs -> Parser (QueryCmds era))
-> Parser QueryStakePoolsCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
QueryCommons
-> Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryStakePoolsCmdArgs
QueryStakePoolsCmdArgs
(QueryCommons
-> Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryStakePoolsCmdArgs)
-> Parser QueryCommons
-> Parser
(Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out) -> QueryStakePoolsCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser
(Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out) -> QueryStakePoolsCmdArgs)
-> Parser (Vary '[FormatJson, FormatText, FormatYaml])
-> Parser (Maybe (File () 'Out) -> QueryStakePoolsCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag (Vary '[FormatJson, FormatText, FormatYaml])]
-> Parser (Vary '[FormatJson, FormatText, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"stake-pools"
[ Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatJson, FormatText, FormatYaml])
-> (Flag (Vary '[FormatJson, FormatText, FormatYaml])
-> Flag (Vary '[FormatJson, FormatText, FormatYaml]))
-> Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatJson, FormatText, FormatYaml])
-> Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall (fs :: [*]). (FormatText :| fs) => Flag (Vary fs)
flagFormatText
, Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser (Maybe (File () 'Out) -> QueryStakePoolsCmdArgs)
-> Parser (Maybe (File () 'Out)) -> Parser QueryStakePoolsCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pQueryStakeDistributionCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryStakeDistributionCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryStakeDistributionCmd EnvCli
envCli =
(QueryStakeDistributionCmdArgs -> QueryCmds era)
-> Parser QueryStakeDistributionCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap QueryStakeDistributionCmdArgs -> QueryCmds era
forall era. QueryStakeDistributionCmdArgs -> QueryCmds era
QueryStakeDistributionCmd (Parser QueryStakeDistributionCmdArgs -> Parser (QueryCmds era))
-> Parser QueryStakeDistributionCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
QueryCommons
-> Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryStakeDistributionCmdArgs
QueryStakeDistributionCmdArgs
(QueryCommons
-> Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryStakeDistributionCmdArgs)
-> Parser QueryCommons
-> Parser
(Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out) -> QueryStakeDistributionCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser
(Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out) -> QueryStakeDistributionCmdArgs)
-> Parser (Vary '[FormatJson, FormatText, FormatYaml])
-> Parser (Maybe (File () 'Out) -> QueryStakeDistributionCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag (Vary '[FormatJson, FormatText, FormatYaml])]
-> Parser (Vary '[FormatJson, FormatText, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"stake-distribution"
[ Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatJson, FormatText, FormatYaml])
-> (Flag (Vary '[FormatJson, FormatText, FormatYaml])
-> Flag (Vary '[FormatJson, FormatText, FormatYaml]))
-> Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatJson, FormatText, FormatYaml])
-> Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall (fs :: [*]). (FormatText :| fs) => Flag (Vary fs)
flagFormatText
, Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser (Maybe (File () 'Out) -> QueryStakeDistributionCmdArgs)
-> Parser (Maybe (File () 'Out))
-> Parser QueryStakeDistributionCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pQueryStakeAddressInfoCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryStakeAddressInfoCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryStakeAddressInfoCmd EnvCli
envCli =
(QueryStakeAddressInfoCmdArgs -> QueryCmds era)
-> Parser QueryStakeAddressInfoCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap QueryStakeAddressInfoCmdArgs -> QueryCmds era
forall era. QueryStakeAddressInfoCmdArgs -> QueryCmds era
QueryStakeAddressInfoCmd (Parser QueryStakeAddressInfoCmdArgs -> Parser (QueryCmds era))
-> Parser QueryStakeAddressInfoCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
QueryCommons
-> StakeAddress
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryStakeAddressInfoCmdArgs
QueryStakeAddressInfoCmdArgs
(QueryCommons
-> StakeAddress
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryStakeAddressInfoCmdArgs)
-> Parser QueryCommons
-> Parser
(StakeAddress
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryStakeAddressInfoCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser
(StakeAddress
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryStakeAddressInfoCmdArgs)
-> Parser StakeAddress
-> Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryStakeAddressInfoCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser StakeAddress
pFilterByStakeAddress
Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryStakeAddressInfoCmdArgs)
-> Parser (Vary '[FormatJson, FormatYaml])
-> Parser (Maybe (File () 'Out) -> QueryStakeAddressInfoCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag (Vary '[FormatJson, FormatYaml])]
-> Parser (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"stake-address-info"
[ Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatJson, FormatYaml])
-> (Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml]))
-> Flag (Vary '[FormatJson, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser (Maybe (File () 'Out) -> QueryStakeAddressInfoCmdArgs)
-> Parser (Maybe (File () 'Out))
-> Parser QueryStakeAddressInfoCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pQueryLedgerStateCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryLedgerStateCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryLedgerStateCmd EnvCli
envCli =
(QueryLedgerStateCmdArgs -> QueryCmds era)
-> Parser QueryLedgerStateCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap QueryLedgerStateCmdArgs -> QueryCmds era
forall era. QueryLedgerStateCmdArgs -> QueryCmds era
QueryLedgerStateCmd (Parser QueryLedgerStateCmdArgs -> Parser (QueryCmds era))
-> Parser QueryLedgerStateCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
QueryCommons
-> Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryLedgerStateCmdArgs
QueryLedgerStateCmdArgs
(QueryCommons
-> Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryLedgerStateCmdArgs)
-> Parser QueryCommons
-> Parser
(Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out) -> QueryLedgerStateCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser
(Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out) -> QueryLedgerStateCmdArgs)
-> Parser (Vary '[FormatJson, FormatText, FormatYaml])
-> Parser (Maybe (File () 'Out) -> QueryLedgerStateCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag (Vary '[FormatJson, FormatText, FormatYaml])]
-> Parser (Vary '[FormatJson, FormatText, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"ledger-state"
[ Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatJson, FormatText, FormatYaml])
-> (Flag (Vary '[FormatJson, FormatText, FormatYaml])
-> Flag (Vary '[FormatJson, FormatText, FormatYaml]))
-> Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatJson, FormatText, FormatYaml])
-> Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall (fs :: [*]). (FormatText :| fs) => Flag (Vary fs)
flagFormatText
, Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser (Maybe (File () 'Out) -> QueryLedgerStateCmdArgs)
-> Parser (Maybe (File () 'Out)) -> Parser QueryLedgerStateCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pQueryLedgerPeerSnapshotCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryLedgerPeerSnapshotCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryLedgerPeerSnapshotCmd EnvCli
envCli =
(QueryLedgerPeerSnapshotCmdArgs -> QueryCmds era)
-> Parser QueryLedgerPeerSnapshotCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap QueryLedgerPeerSnapshotCmdArgs -> QueryCmds era
forall era. QueryLedgerPeerSnapshotCmdArgs -> QueryCmds era
QueryLedgerPeerSnapshotCmd (Parser QueryLedgerPeerSnapshotCmdArgs -> Parser (QueryCmds era))
-> Parser QueryLedgerPeerSnapshotCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
QueryCommons
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryLedgerPeerSnapshotCmdArgs
QueryLedgerPeerSnapshotCmdArgs
(QueryCommons
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryLedgerPeerSnapshotCmdArgs)
-> Parser QueryCommons
-> Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryLedgerPeerSnapshotCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryLedgerPeerSnapshotCmdArgs)
-> Parser (Vary '[FormatJson, FormatYaml])
-> Parser (Maybe (File () 'Out) -> QueryLedgerPeerSnapshotCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag (Vary '[FormatJson, FormatYaml])]
-> Parser (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"ledger-peer-snapshot"
[ Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatJson, FormatYaml])
-> (Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml]))
-> Flag (Vary '[FormatJson, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser (Maybe (File () 'Out) -> QueryLedgerPeerSnapshotCmdArgs)
-> Parser (Maybe (File () 'Out))
-> Parser QueryLedgerPeerSnapshotCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pQueryProtocolStateCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryProtocolStateCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryProtocolStateCmd EnvCli
envCli =
(QueryProtocolStateCmdArgs -> QueryCmds era)
-> Parser QueryProtocolStateCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap QueryProtocolStateCmdArgs -> QueryCmds era
forall era. QueryProtocolStateCmdArgs -> QueryCmds era
QueryProtocolStateCmd (Parser QueryProtocolStateCmdArgs -> Parser (QueryCmds era))
-> Parser QueryProtocolStateCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
QueryCommons
-> Vary '[FormatCborBin, FormatCborHex, FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryProtocolStateCmdArgs
QueryProtocolStateCmdArgs
(QueryCommons
-> Vary '[FormatCborBin, FormatCborHex, FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryProtocolStateCmdArgs)
-> Parser QueryCommons
-> Parser
(Vary '[FormatCborBin, FormatCborHex, FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryProtocolStateCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser
(Vary '[FormatCborBin, FormatCborHex, FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryProtocolStateCmdArgs)
-> Parser
(Vary '[FormatCborBin, FormatCborHex, FormatJson, FormatYaml])
-> Parser (Maybe (File () 'Out) -> QueryProtocolStateCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag
(Vary '[FormatCborBin, FormatCborHex, FormatJson, FormatYaml])]
-> Parser
(Vary '[FormatCborBin, FormatCborHex, FormatJson, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"protocol-state"
[ Flag (Vary '[FormatCborBin, FormatCborHex, FormatJson, FormatYaml])
forall (fs :: [*]). (FormatCborBin :| fs) => Flag (Vary fs)
flagFormatCborBin
, Flag (Vary '[FormatCborBin, FormatCborHex, FormatJson, FormatYaml])
forall (fs :: [*]). (FormatCborHex :| fs) => Flag (Vary fs)
flagFormatCborHex
, Flag (Vary '[FormatCborBin, FormatCborHex, FormatJson, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatCborBin, FormatCborHex, FormatJson, FormatYaml])
-> (Flag
(Vary '[FormatCborBin, FormatCborHex, FormatJson, FormatYaml])
-> Flag
(Vary '[FormatCborBin, FormatCborHex, FormatJson, FormatYaml]))
-> Flag
(Vary '[FormatCborBin, FormatCborHex, FormatJson, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatCborBin, FormatCborHex, FormatJson, FormatYaml])
-> Flag
(Vary '[FormatCborBin, FormatCborHex, FormatJson, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatCborBin, FormatCborHex, FormatJson, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser (Maybe (File () 'Out) -> QueryProtocolStateCmdArgs)
-> Parser (Maybe (File () 'Out))
-> Parser QueryProtocolStateCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pAllStakePoolsOrSome :: Parser (AllOrOnly (Hash StakePoolKey))
pAllStakePoolsOrSome :: Parser (AllOrOnly (Hash StakePoolKey))
pAllStakePoolsOrSome = Parser (AllOrOnly (Hash StakePoolKey))
pAll Parser (AllOrOnly (Hash StakePoolKey))
-> Parser (AllOrOnly (Hash StakePoolKey))
-> Parser (AllOrOnly (Hash StakePoolKey))
forall a. Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> Parser (AllOrOnly (Hash StakePoolKey))
pOnly
where
pAll :: Parser (AllOrOnly (Hash StakePoolKey))
pAll :: Parser (AllOrOnly (Hash StakePoolKey))
pAll =
AllOrOnly (Hash StakePoolKey)
-> Mod FlagFields (AllOrOnly (Hash StakePoolKey))
-> Parser (AllOrOnly (Hash StakePoolKey))
forall a. a -> Mod FlagFields a -> Parser a
Opt.flag' AllOrOnly (Hash StakePoolKey)
forall a. AllOrOnly a
All (Mod FlagFields (AllOrOnly (Hash StakePoolKey))
-> Parser (AllOrOnly (Hash StakePoolKey)))
-> Mod FlagFields (AllOrOnly (Hash StakePoolKey))
-> Parser (AllOrOnly (Hash StakePoolKey))
forall a b. (a -> b) -> a -> b
$
[Mod FlagFields (AllOrOnly (Hash StakePoolKey))]
-> Mod FlagFields (AllOrOnly (Hash StakePoolKey))
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod FlagFields (AllOrOnly (Hash StakePoolKey))
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"all-stake-pools"
, String -> Mod FlagFields (AllOrOnly (Hash StakePoolKey))
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"Query for all stake pools"
]
pOnly :: Parser (AllOrOnly (Hash StakePoolKey))
pOnly :: Parser (AllOrOnly (Hash StakePoolKey))
pOnly = [Hash StakePoolKey] -> AllOrOnly (Hash StakePoolKey)
forall a. [a] -> AllOrOnly a
Only ([Hash StakePoolKey] -> AllOrOnly (Hash StakePoolKey))
-> Parser [Hash StakePoolKey]
-> Parser (AllOrOnly (Hash StakePoolKey))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser (Hash StakePoolKey) -> Parser [Hash StakePoolKey]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
some (Maybe String -> Parser (Hash StakePoolKey)
pStakePoolVerificationKeyHash Maybe String
forall a. Maybe a
Nothing)
pQueryStakeSnapshotCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryStakeSnapshotCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryStakeSnapshotCmd EnvCli
envCli =
(QueryStakeSnapshotCmdArgs -> QueryCmds era)
-> Parser QueryStakeSnapshotCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap QueryStakeSnapshotCmdArgs -> QueryCmds era
forall era. QueryStakeSnapshotCmdArgs -> QueryCmds era
QueryStakeSnapshotCmd (Parser QueryStakeSnapshotCmdArgs -> Parser (QueryCmds era))
-> Parser QueryStakeSnapshotCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
QueryCommons
-> AllOrOnly (Hash StakePoolKey)
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryStakeSnapshotCmdArgs
QueryStakeSnapshotCmdArgs
(QueryCommons
-> AllOrOnly (Hash StakePoolKey)
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryStakeSnapshotCmdArgs)
-> Parser QueryCommons
-> Parser
(AllOrOnly (Hash StakePoolKey)
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryStakeSnapshotCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser
(AllOrOnly (Hash StakePoolKey)
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryStakeSnapshotCmdArgs)
-> Parser (AllOrOnly (Hash StakePoolKey))
-> Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryStakeSnapshotCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (AllOrOnly (Hash StakePoolKey))
pAllStakePoolsOrSome
Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryStakeSnapshotCmdArgs)
-> Parser (Vary '[FormatJson, FormatYaml])
-> Parser (Maybe (File () 'Out) -> QueryStakeSnapshotCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag (Vary '[FormatJson, FormatYaml])]
-> Parser (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"stake-snapshot"
[ Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatJson, FormatYaml])
-> (Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml]))
-> Flag (Vary '[FormatJson, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser (Maybe (File () 'Out) -> QueryStakeSnapshotCmdArgs)
-> Parser (Maybe (File () 'Out))
-> Parser QueryStakeSnapshotCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pQueryPoolStateCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryPoolStateCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryPoolStateCmd EnvCli
envCli =
(QueryPoolStateCmdArgs -> QueryCmds era)
-> Parser QueryPoolStateCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap QueryPoolStateCmdArgs -> QueryCmds era
forall era. QueryPoolStateCmdArgs -> QueryCmds era
QueryPoolStateCmd (Parser QueryPoolStateCmdArgs -> Parser (QueryCmds era))
-> Parser QueryPoolStateCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
QueryCommons
-> AllOrOnly (Hash StakePoolKey)
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryPoolStateCmdArgs
QueryPoolStateCmdArgs
(QueryCommons
-> AllOrOnly (Hash StakePoolKey)
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryPoolStateCmdArgs)
-> Parser QueryCommons
-> Parser
(AllOrOnly (Hash StakePoolKey)
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryPoolStateCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser
(AllOrOnly (Hash StakePoolKey)
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryPoolStateCmdArgs)
-> Parser (AllOrOnly (Hash StakePoolKey))
-> Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryPoolStateCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (AllOrOnly (Hash StakePoolKey))
pAllStakePoolsOrSome
Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryPoolStateCmdArgs)
-> Parser (Vary '[FormatJson, FormatYaml])
-> Parser (Maybe (File () 'Out) -> QueryPoolStateCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag (Vary '[FormatJson, FormatYaml])]
-> Parser (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"pool-state"
[ Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatJson, FormatYaml])
-> (Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml]))
-> Flag (Vary '[FormatJson, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser (Maybe (File () 'Out) -> QueryPoolStateCmdArgs)
-> Parser (Maybe (File () 'Out)) -> Parser QueryPoolStateCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pQueryTxMempoolCmd :: EnvCli -> Parser (QueryCmds era)
pQueryTxMempoolCmd :: forall era. EnvCli -> Parser (QueryCmds era)
pQueryTxMempoolCmd EnvCli
envCli =
(QueryTxMempoolCmdArgs -> QueryCmds era)
-> Parser QueryTxMempoolCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap QueryTxMempoolCmdArgs -> QueryCmds era
forall era. QueryTxMempoolCmdArgs -> QueryCmds era
QueryTxMempoolCmd (Parser QueryTxMempoolCmdArgs -> Parser (QueryCmds era))
-> Parser QueryTxMempoolCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
LocalNodeConnectInfo
-> TxMempoolQuery
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryTxMempoolCmdArgs
QueryTxMempoolCmdArgs
(LocalNodeConnectInfo
-> TxMempoolQuery
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryTxMempoolCmdArgs)
-> Parser LocalNodeConnectInfo
-> Parser
(TxMempoolQuery
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryTxMempoolCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ( ConsensusModeParams
-> NetworkId -> SocketPath -> LocalNodeConnectInfo
LocalNodeConnectInfo
(ConsensusModeParams
-> NetworkId -> SocketPath -> LocalNodeConnectInfo)
-> Parser ConsensusModeParams
-> Parser (NetworkId -> SocketPath -> LocalNodeConnectInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser ConsensusModeParams
pConsensusModeParams
Parser (NetworkId -> SocketPath -> LocalNodeConnectInfo)
-> Parser NetworkId -> Parser (SocketPath -> LocalNodeConnectInfo)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> EnvCli -> Parser NetworkId
pNetworkId EnvCli
envCli
Parser (SocketPath -> LocalNodeConnectInfo)
-> Parser SocketPath -> Parser LocalNodeConnectInfo
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> EnvCli -> Parser SocketPath
pSocketPath EnvCli
envCli
)
Parser
(TxMempoolQuery
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryTxMempoolCmdArgs)
-> Parser TxMempoolQuery
-> Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryTxMempoolCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser TxMempoolQuery
pTxMempoolQuery
Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryTxMempoolCmdArgs)
-> Parser (Vary '[FormatJson, FormatYaml])
-> Parser (Maybe (File () 'Out) -> QueryTxMempoolCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag (Vary '[FormatJson, FormatYaml])]
-> Parser (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"tx-mempool"
[ Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatJson, FormatYaml])
-> (Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml]))
-> Flag (Vary '[FormatJson, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser (Maybe (File () 'Out) -> QueryTxMempoolCmdArgs)
-> Parser (Maybe (File () 'Out)) -> Parser QueryTxMempoolCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
where
pTxMempoolQuery :: Parser TxMempoolQuery
pTxMempoolQuery :: Parser TxMempoolQuery
pTxMempoolQuery =
[Parser TxMempoolQuery] -> Parser TxMempoolQuery
forall (t :: * -> *) (f :: * -> *) a.
(Foldable t, Alternative f) =>
t (f a) -> f a
asum
[ Mod CommandFields TxMempoolQuery -> Parser TxMempoolQuery
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields TxMempoolQuery -> Parser TxMempoolQuery)
-> (InfoMod TxMempoolQuery -> Mod CommandFields TxMempoolQuery)
-> InfoMod TxMempoolQuery
-> Parser TxMempoolQuery
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo TxMempoolQuery -> Mod CommandFields TxMempoolQuery
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"info"
(ParserInfo TxMempoolQuery -> Mod CommandFields TxMempoolQuery)
-> (InfoMod TxMempoolQuery -> ParserInfo TxMempoolQuery)
-> InfoMod TxMempoolQuery
-> Mod CommandFields TxMempoolQuery
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser TxMempoolQuery
-> InfoMod TxMempoolQuery -> ParserInfo TxMempoolQuery
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (TxMempoolQuery -> Parser TxMempoolQuery
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure TxMempoolQuery
TxMempoolQueryInfo)
(InfoMod TxMempoolQuery -> Parser TxMempoolQuery)
-> InfoMod TxMempoolQuery -> Parser TxMempoolQuery
forall a b. (a -> b) -> a -> b
$ String -> InfoMod TxMempoolQuery
forall a. String -> InfoMod a
Opt.progDesc String
"Ask the node about the current mempool's capacity and sizes"
, Mod CommandFields TxMempoolQuery -> Parser TxMempoolQuery
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields TxMempoolQuery -> Parser TxMempoolQuery)
-> (InfoMod TxMempoolQuery -> Mod CommandFields TxMempoolQuery)
-> InfoMod TxMempoolQuery
-> Parser TxMempoolQuery
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo TxMempoolQuery -> Mod CommandFields TxMempoolQuery
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"next-tx"
(ParserInfo TxMempoolQuery -> Mod CommandFields TxMempoolQuery)
-> (InfoMod TxMempoolQuery -> ParserInfo TxMempoolQuery)
-> InfoMod TxMempoolQuery
-> Mod CommandFields TxMempoolQuery
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser TxMempoolQuery
-> InfoMod TxMempoolQuery -> ParserInfo TxMempoolQuery
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (TxMempoolQuery -> Parser TxMempoolQuery
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure TxMempoolQuery
TxMempoolQueryNextTx)
(InfoMod TxMempoolQuery -> Parser TxMempoolQuery)
-> InfoMod TxMempoolQuery -> Parser TxMempoolQuery
forall a b. (a -> b) -> a -> b
$ String -> InfoMod TxMempoolQuery
forall a. String -> InfoMod a
Opt.progDesc String
"Requests the next transaction from the mempool's current list"
, Mod CommandFields TxMempoolQuery -> Parser TxMempoolQuery
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields TxMempoolQuery -> Parser TxMempoolQuery)
-> (InfoMod TxMempoolQuery -> Mod CommandFields TxMempoolQuery)
-> InfoMod TxMempoolQuery
-> Parser TxMempoolQuery
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo TxMempoolQuery -> Mod CommandFields TxMempoolQuery
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"tx-exists"
(ParserInfo TxMempoolQuery -> Mod CommandFields TxMempoolQuery)
-> (InfoMod TxMempoolQuery -> ParserInfo TxMempoolQuery)
-> InfoMod TxMempoolQuery
-> Mod CommandFields TxMempoolQuery
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser TxMempoolQuery
-> InfoMod TxMempoolQuery -> ParserInfo TxMempoolQuery
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (TxId -> TxMempoolQuery
TxMempoolQueryTxExists (TxId -> TxMempoolQuery) -> Parser TxId -> Parser TxMempoolQuery
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ReadM TxId -> Mod ArgumentFields TxId -> Parser TxId
forall a. ReadM a -> Mod ArgumentFields a -> Parser a
argument (Parser TxId -> ReadM TxId
forall a. Parser a -> ReadM a
readerFromParsecParser Parser TxId
parseTxId) (String -> Mod ArgumentFields TxId
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
metavar String
"TX_ID"))
(InfoMod TxMempoolQuery -> Parser TxMempoolQuery)
-> InfoMod TxMempoolQuery -> Parser TxMempoolQuery
forall a b. (a -> b) -> a -> b
$ String -> InfoMod TxMempoolQuery
forall a. String -> InfoMod a
Opt.progDesc String
"Query if a particular transaction exists in the mempool"
]
pLeadershipScheduleCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pLeadershipScheduleCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pLeadershipScheduleCmd EnvCli
envCli =
(QueryLeadershipScheduleCmdArgs -> QueryCmds era)
-> Parser QueryLeadershipScheduleCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap QueryLeadershipScheduleCmdArgs -> QueryCmds era
forall era. QueryLeadershipScheduleCmdArgs -> QueryCmds era
QueryLeadershipScheduleCmd (Parser QueryLeadershipScheduleCmdArgs -> Parser (QueryCmds era))
-> Parser QueryLeadershipScheduleCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
QueryCommons
-> GenesisFile
-> StakePoolKeyHashSource
-> SigningKeyFile 'In
-> EpochLeadershipSchedule
-> Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryLeadershipScheduleCmdArgs
QueryLeadershipScheduleCmdArgs
(QueryCommons
-> GenesisFile
-> StakePoolKeyHashSource
-> SigningKeyFile 'In
-> EpochLeadershipSchedule
-> Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryLeadershipScheduleCmdArgs)
-> Parser QueryCommons
-> Parser
(GenesisFile
-> StakePoolKeyHashSource
-> SigningKeyFile 'In
-> EpochLeadershipSchedule
-> Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryLeadershipScheduleCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser
(GenesisFile
-> StakePoolKeyHashSource
-> SigningKeyFile 'In
-> EpochLeadershipSchedule
-> Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryLeadershipScheduleCmdArgs)
-> Parser GenesisFile
-> Parser
(StakePoolKeyHashSource
-> SigningKeyFile 'In
-> EpochLeadershipSchedule
-> Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryLeadershipScheduleCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String -> Parser GenesisFile
pGenesisFile String
"Shelley genesis filepath"
Parser
(StakePoolKeyHashSource
-> SigningKeyFile 'In
-> EpochLeadershipSchedule
-> Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryLeadershipScheduleCmdArgs)
-> Parser StakePoolKeyHashSource
-> Parser
(SigningKeyFile 'In
-> EpochLeadershipSchedule
-> Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryLeadershipScheduleCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Maybe String -> Parser StakePoolKeyHashSource
pStakePoolVerificationKeyOrHashOrFile Maybe String
forall a. Maybe a
Nothing
Parser
(SigningKeyFile 'In
-> EpochLeadershipSchedule
-> Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryLeadershipScheduleCmdArgs)
-> Parser (SigningKeyFile 'In)
-> Parser
(EpochLeadershipSchedule
-> Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryLeadershipScheduleCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (SigningKeyFile 'In)
pVrfSigningKeyFile
Parser
(EpochLeadershipSchedule
-> Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryLeadershipScheduleCmdArgs)
-> Parser EpochLeadershipSchedule
-> Parser
(Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out) -> QueryLeadershipScheduleCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser EpochLeadershipSchedule
pWhichLeadershipSchedule
Parser
(Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out) -> QueryLeadershipScheduleCmdArgs)
-> Parser (Vary '[FormatJson, FormatText, FormatYaml])
-> Parser (Maybe (File () 'Out) -> QueryLeadershipScheduleCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag (Vary '[FormatJson, FormatText, FormatYaml])]
-> Parser (Vary '[FormatJson, FormatText, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"leadership-schedule"
[ Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatJson, FormatText, FormatYaml])
-> (Flag (Vary '[FormatJson, FormatText, FormatYaml])
-> Flag (Vary '[FormatJson, FormatText, FormatYaml]))
-> Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatJson, FormatText, FormatYaml])
-> Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall (fs :: [*]). (FormatText :| fs) => Flag (Vary fs)
flagFormatText
, Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser (Maybe (File () 'Out) -> QueryLeadershipScheduleCmdArgs)
-> Parser (Maybe (File () 'Out))
-> Parser QueryLeadershipScheduleCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pKesPeriodInfoCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pKesPeriodInfoCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pKesPeriodInfoCmd EnvCli
envCli =
(QueryKesPeriodInfoCmdArgs -> QueryCmds era)
-> Parser QueryKesPeriodInfoCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap QueryKesPeriodInfoCmdArgs -> QueryCmds era
forall era. QueryKesPeriodInfoCmdArgs -> QueryCmds era
QueryKesPeriodInfoCmd (Parser QueryKesPeriodInfoCmdArgs -> Parser (QueryCmds era))
-> Parser QueryKesPeriodInfoCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
QueryCommons
-> File () 'In
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryKesPeriodInfoCmdArgs
QueryKesPeriodInfoCmdArgs
(QueryCommons
-> File () 'In
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryKesPeriodInfoCmdArgs)
-> Parser QueryCommons
-> Parser
(File () 'In
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryKesPeriodInfoCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser
(File () 'In
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryKesPeriodInfoCmdArgs)
-> Parser (File () 'In)
-> Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryKesPeriodInfoCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (File () 'In)
forall (direction :: FileDirection). Parser (File () direction)
pOperationalCertificateFile
Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryKesPeriodInfoCmdArgs)
-> Parser (Vary '[FormatJson, FormatYaml])
-> Parser (Maybe (File () 'Out) -> QueryKesPeriodInfoCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag (Vary '[FormatJson, FormatYaml])]
-> Parser (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"kes-period-info"
[ Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatJson, FormatYaml])
-> (Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml]))
-> Flag (Vary '[FormatJson, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser (Maybe (File () 'Out) -> QueryKesPeriodInfoCmdArgs)
-> Parser (Maybe (File () 'Out))
-> Parser QueryKesPeriodInfoCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pQuerySlotNumberCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQuerySlotNumberCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQuerySlotNumberCmd EnvCli
envCli =
(QuerySlotNumberCmdArgs -> QueryCmds era)
-> Parser QuerySlotNumberCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap QuerySlotNumberCmdArgs -> QueryCmds era
forall era. QuerySlotNumberCmdArgs -> QueryCmds era
QuerySlotNumberCmd (Parser QuerySlotNumberCmdArgs -> Parser (QueryCmds era))
-> Parser QuerySlotNumberCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
QueryCommons -> UTCTime -> QuerySlotNumberCmdArgs
QuerySlotNumberCmdArgs
(QueryCommons -> UTCTime -> QuerySlotNumberCmdArgs)
-> Parser QueryCommons
-> Parser (UTCTime -> QuerySlotNumberCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser (UTCTime -> QuerySlotNumberCmdArgs)
-> Parser UTCTime -> Parser QuerySlotNumberCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser UTCTime
pUtcTimestamp
where
pUtcTimestamp :: Parser UTCTime
pUtcTimestamp =
String -> UTCTime
convertTime
(String -> UTCTime) -> Parser String -> Parser UTCTime
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Mod ArgumentFields String -> Parser String
forall s. IsString s => Mod ArgumentFields s -> Parser s
Opt.strArgument (Mod ArgumentFields String -> Parser String)
-> ([Mod ArgumentFields String] -> Mod ArgumentFields String)
-> [Mod ArgumentFields String]
-> Parser String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Mod ArgumentFields String] -> Mod ArgumentFields String
forall a. Monoid a => [a] -> a
mconcat)
[ String -> Mod ArgumentFields String
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"TIMESTAMP"
, String -> Mod ArgumentFields String
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"UTC timestamp in YYYY-MM-DDThh:mm:ssZ format"
]
pQueryRefScriptSizeCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryRefScriptSizeCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryRefScriptSizeCmd EnvCli
envCli =
(QueryRefScriptSizeCmdArgs -> QueryCmds era)
-> Parser QueryRefScriptSizeCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap QueryRefScriptSizeCmdArgs -> QueryCmds era
forall era. QueryRefScriptSizeCmdArgs -> QueryCmds era
QueryRefScriptSizeCmd (Parser QueryRefScriptSizeCmdArgs -> Parser (QueryCmds era))
-> Parser QueryRefScriptSizeCmdArgs -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$
QueryCommons
-> Set TxIn
-> Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryRefScriptSizeCmdArgs
QueryRefScriptSizeCmdArgs
(QueryCommons
-> Set TxIn
-> Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryRefScriptSizeCmdArgs)
-> Parser QueryCommons
-> Parser
(Set TxIn
-> Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryRefScriptSizeCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser
(Set TxIn
-> Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out)
-> QueryRefScriptSizeCmdArgs)
-> Parser (Set TxIn)
-> Parser
(Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out) -> QueryRefScriptSizeCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ([Item (Set TxIn)] -> Set TxIn
[TxIn] -> Set TxIn
forall l. IsList l => [Item l] -> l
fromList ([TxIn] -> Set TxIn) -> Parser [TxIn] -> Parser (Set TxIn)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser TxIn -> Parser [TxIn]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
some Parser TxIn
pByTxIn)
Parser
(Vary '[FormatJson, FormatText, FormatYaml]
-> Maybe (File () 'Out) -> QueryRefScriptSizeCmdArgs)
-> Parser (Vary '[FormatJson, FormatText, FormatYaml])
-> Parser (Maybe (File () 'Out) -> QueryRefScriptSizeCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag (Vary '[FormatJson, FormatText, FormatYaml])]
-> Parser (Vary '[FormatJson, FormatText, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"reference-script-size"
[ Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatJson, FormatText, FormatYaml])
-> (Flag (Vary '[FormatJson, FormatText, FormatYaml])
-> Flag (Vary '[FormatJson, FormatText, FormatYaml]))
-> Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatJson, FormatText, FormatYaml])
-> Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall (fs :: [*]). (FormatText :| fs) => Flag (Vary fs)
flagFormatText
, Flag (Vary '[FormatJson, FormatText, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser (Maybe (File () 'Out) -> QueryRefScriptSizeCmdArgs)
-> Parser (Maybe (File () 'Out))
-> Parser QueryRefScriptSizeCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
where
pByTxIn :: Parser TxIn
pByTxIn :: Parser TxIn
pByTxIn =
ReadM TxIn -> Mod OptionFields TxIn -> Parser TxIn
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option (Parser TxIn -> ReadM TxIn
forall a. Parser a -> ReadM a
readerFromParsecParser Parser TxIn
parseTxIn) (Mod OptionFields TxIn -> Parser TxIn)
-> Mod OptionFields TxIn -> Parser TxIn
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields TxIn] -> Mod OptionFields TxIn
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields TxIn
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"tx-in"
, String -> Mod OptionFields TxIn
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"TX_IN"
, String -> Mod OptionFields TxIn
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"Transaction input (TxId#TxIx)."
]
pQueryGetConstitutionCmd
:: IsEra era
=> EnvCli
-> Maybe (Parser (QueryCmds era))
pQueryGetConstitutionCmd :: forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryGetConstitutionCmd EnvCli
envCli = do
Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (InfoMod (QueryCmds era) -> Parser (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (InfoMod (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"constitution"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (QueryNoArgCmdArgs era -> QueryCmds era
forall era. QueryNoArgCmdArgs era -> QueryCmds era
QueryConstitutionCmd (QueryNoArgCmdArgs era -> QueryCmds era)
-> Parser (QueryNoArgCmdArgs era) -> Parser (QueryCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> EnvCli -> String -> Parser (QueryNoArgCmdArgs era)
forall era.
IsEra era =>
EnvCli -> String -> Parser (QueryNoArgCmdArgs era)
pQueryNoArgCmdArgs EnvCli
envCli String
"constitution")
(InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the constitution"
pQueryGetGovStateCmd
:: IsEra era
=> EnvCli
-> Maybe (Parser (QueryCmds era))
pQueryGetGovStateCmd :: forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryGetGovStateCmd EnvCli
envCli = do
Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (InfoMod (QueryCmds era) -> Parser (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (InfoMod (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"gov-state"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (QueryNoArgCmdArgs era -> QueryCmds era
forall era. QueryNoArgCmdArgs era -> QueryCmds era
QueryGovStateCmd (QueryNoArgCmdArgs era -> QueryCmds era)
-> Parser (QueryNoArgCmdArgs era) -> Parser (QueryCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> EnvCli -> String -> Parser (QueryNoArgCmdArgs era)
forall era.
IsEra era =>
EnvCli -> String -> Parser (QueryNoArgCmdArgs era)
pQueryNoArgCmdArgs EnvCli
envCli String
"gov-state")
(InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the governance state"
pQueryGetRatifyStateCmd
:: IsEra era
=> EnvCli
-> Maybe (Parser (QueryCmds era))
pQueryGetRatifyStateCmd :: forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryGetRatifyStateCmd EnvCli
envCli = do
Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (InfoMod (QueryCmds era) -> Parser (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (InfoMod (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"ratify-state"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (QueryNoArgCmdArgs era -> QueryCmds era
forall era. QueryNoArgCmdArgs era -> QueryCmds era
QueryRatifyStateCmd (QueryNoArgCmdArgs era -> QueryCmds era)
-> Parser (QueryNoArgCmdArgs era) -> Parser (QueryCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> EnvCli -> String -> Parser (QueryNoArgCmdArgs era)
forall era.
IsEra era =>
EnvCli -> String -> Parser (QueryNoArgCmdArgs era)
pQueryNoArgCmdArgs EnvCli
envCli String
"ratify-state")
(InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the ratification state"
pQueryFuturePParamsCmd
:: IsEra era
=> EnvCli
-> Maybe (Parser (QueryCmds era))
pQueryFuturePParamsCmd :: forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryFuturePParamsCmd EnvCli
envCli = do
Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (InfoMod (QueryCmds era) -> Parser (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (InfoMod (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"future-pparams"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (QueryNoArgCmdArgs era -> QueryCmds era
forall era. QueryNoArgCmdArgs era -> QueryCmds era
QueryFuturePParamsCmd (QueryNoArgCmdArgs era -> QueryCmds era)
-> Parser (QueryNoArgCmdArgs era) -> Parser (QueryCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> EnvCli -> String -> Parser (QueryNoArgCmdArgs era)
forall era.
IsEra era =>
EnvCli -> String -> Parser (QueryNoArgCmdArgs era)
pQueryNoArgCmdArgs EnvCli
envCli String
"future-pparams")
(InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the protocol parameters that will apply at the next epoch"
pQueryDRepStateCmd
:: forall era
. IsEra era
=> EnvCli
-> Maybe (Parser (QueryCmds era))
pQueryDRepStateCmd :: forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryDRepStateCmd EnvCli
envCli = do
Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (InfoMod (QueryCmds era) -> Parser (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (InfoMod (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"drep-state"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (QueryDRepStateCmdArgs era -> QueryCmds era
forall era. QueryDRepStateCmdArgs era -> QueryCmds era
QueryDRepStateCmd (QueryDRepStateCmdArgs era -> QueryCmds era)
-> Parser (QueryDRepStateCmdArgs era) -> Parser (QueryCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Era era -> Parser (QueryDRepStateCmdArgs era)
pQueryDRepStateCmdArgs Era era
forall era. IsEra era => Era era
useEra)
(InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the DRep state."
where
pQueryDRepStateCmdArgs :: Era era -> Parser (QueryDRepStateCmdArgs era)
pQueryDRepStateCmdArgs :: Era era -> Parser (QueryDRepStateCmdArgs era)
pQueryDRepStateCmdArgs Era era
w =
ConwayEraOnwards era
-> QueryCommons
-> AllOrOnly DRepHashSource
-> IncludeStake
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryDRepStateCmdArgs era
forall era.
ConwayEraOnwards era
-> QueryCommons
-> AllOrOnly DRepHashSource
-> IncludeStake
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryDRepStateCmdArgs era
QueryDRepStateCmdArgs (Era era -> ConwayEraOnwards era
forall era. Era era -> ConwayEraOnwards era
forall a (f :: a -> *) (g :: a -> *) (era :: a).
Convert f g =>
f era -> g era
convert Era era
w)
(QueryCommons
-> AllOrOnly DRepHashSource
-> IncludeStake
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryDRepStateCmdArgs era)
-> Parser QueryCommons
-> Parser
(AllOrOnly DRepHashSource
-> IncludeStake
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryDRepStateCmdArgs era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser
(AllOrOnly DRepHashSource
-> IncludeStake
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryDRepStateCmdArgs era)
-> Parser (AllOrOnly DRepHashSource)
-> Parser
(IncludeStake
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryDRepStateCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (AllOrOnly DRepHashSource)
pAllOrOnlyDRepHashSource
Parser
(IncludeStake
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryDRepStateCmdArgs era)
-> Parser IncludeStake
-> Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryDRepStateCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> IncludeStake
-> IncludeStake
-> Mod FlagFields IncludeStake
-> Parser IncludeStake
forall a. a -> a -> Mod FlagFields a -> Parser a
Opt.flag
IncludeStake
NoStake
IncludeStake
WithStake
( [Mod FlagFields IncludeStake] -> Mod FlagFields IncludeStake
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod FlagFields IncludeStake
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"include-stake"
, String -> Mod FlagFields IncludeStake
forall (f :: * -> *) a. String -> Mod f a
Opt.help (String -> Mod FlagFields IncludeStake)
-> String -> Mod FlagFields IncludeStake
forall a b. (a -> b) -> a -> b
$
[String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Also return the stake associated with each DRep. "
, String
"The result is the same as with \"drep-stake-distribution\"; "
, String
"this is a convenience option to obtain all information concerning a DRep at once. "
, String
"This is a potentially expensive query, so it's OFF by default."
]
]
)
Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryDRepStateCmdArgs era)
-> Parser (Vary '[FormatJson, FormatYaml])
-> Parser (Maybe (File () 'Out) -> QueryDRepStateCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag (Vary '[FormatJson, FormatYaml])]
-> Parser (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"drep-state"
[ Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatJson, FormatYaml])
-> (Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml]))
-> Flag (Vary '[FormatJson, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser (Maybe (File () 'Out) -> QueryDRepStateCmdArgs era)
-> Parser (Maybe (File () 'Out))
-> Parser (QueryDRepStateCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pQueryDRepStakeDistributionCmd
:: forall era
. IsEra era
=> EnvCli
-> Maybe (Parser (QueryCmds era))
pQueryDRepStakeDistributionCmd :: forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryDRepStakeDistributionCmd EnvCli
envCli = do
Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (InfoMod (QueryCmds era) -> Parser (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (InfoMod (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"drep-stake-distribution"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (QueryDRepStakeDistributionCmdArgs era -> QueryCmds era
forall era. QueryDRepStakeDistributionCmdArgs era -> QueryCmds era
QueryDRepStakeDistributionCmd (QueryDRepStakeDistributionCmdArgs era -> QueryCmds era)
-> Parser (QueryDRepStakeDistributionCmdArgs era)
-> Parser (QueryCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Era era -> Parser (QueryDRepStakeDistributionCmdArgs era)
pQueryDRepStakeDistributionCmdArgs Era era
forall era. IsEra era => Era era
useEra)
(InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the DRep stake distribution."
where
pQueryDRepStakeDistributionCmdArgs
:: Era era -> Parser (QueryDRepStakeDistributionCmdArgs era)
pQueryDRepStakeDistributionCmdArgs :: Era era -> Parser (QueryDRepStakeDistributionCmdArgs era)
pQueryDRepStakeDistributionCmdArgs Era era
w =
ConwayEraOnwards era
-> QueryCommons
-> AllOrOnly DRepHashSource
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryDRepStakeDistributionCmdArgs era
forall era.
ConwayEraOnwards era
-> QueryCommons
-> AllOrOnly DRepHashSource
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryDRepStakeDistributionCmdArgs era
QueryDRepStakeDistributionCmdArgs (Era era -> ConwayEraOnwards era
forall era. Era era -> ConwayEraOnwards era
forall a (f :: a -> *) (g :: a -> *) (era :: a).
Convert f g =>
f era -> g era
convert Era era
w)
(QueryCommons
-> AllOrOnly DRepHashSource
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryDRepStakeDistributionCmdArgs era)
-> Parser QueryCommons
-> Parser
(AllOrOnly DRepHashSource
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryDRepStakeDistributionCmdArgs era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser
(AllOrOnly DRepHashSource
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryDRepStakeDistributionCmdArgs era)
-> Parser (AllOrOnly DRepHashSource)
-> Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryDRepStakeDistributionCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (AllOrOnly DRepHashSource)
pAllOrOnlyDRepHashSource
Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryDRepStakeDistributionCmdArgs era)
-> Parser (Vary '[FormatJson, FormatYaml])
-> Parser
(Maybe (File () 'Out) -> QueryDRepStakeDistributionCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag (Vary '[FormatJson, FormatYaml])]
-> Parser (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"drep-stake-distribution"
[ Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatJson, FormatYaml])
-> (Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml]))
-> Flag (Vary '[FormatJson, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser
(Maybe (File () 'Out) -> QueryDRepStakeDistributionCmdArgs era)
-> Parser (Maybe (File () 'Out))
-> Parser (QueryDRepStakeDistributionCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pQueryProposalsCmd
:: forall era
. IsEra era
=> EnvCli
-> Maybe (Parser (QueryCmds era))
pQueryProposalsCmd :: forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryProposalsCmd EnvCli
envCli = do
Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (String -> Parser (QueryCmds era))
-> String
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (String -> Mod CommandFields (QueryCmds era))
-> String
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"proposals"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (String -> ParserInfo (QueryCmds era))
-> String
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (QueryProposalsCmdArgs era -> QueryCmds era
forall era. QueryProposalsCmdArgs era -> QueryCmds era
QueryProposalsCmd (QueryProposalsCmdArgs era -> QueryCmds era)
-> Parser (QueryProposalsCmdArgs era) -> Parser (QueryCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser (QueryProposalsCmdArgs era)
pQueryProposalsCmdArgs)
(InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> (String -> InfoMod (QueryCmds era))
-> String
-> ParserInfo (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc
(String -> Maybe (Parser (QueryCmds era)))
-> String -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ [String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Get the governance proposals that are eligible for ratification. "
, String
"Proposals submitted during the current epoch are excluded, as they cannot be ratified until the next epoch. "
]
where
pQueryProposalsCmdArgs :: Parser (QueryProposalsCmdArgs era)
pQueryProposalsCmdArgs :: Parser (QueryProposalsCmdArgs era)
pQueryProposalsCmdArgs =
ConwayEraOnwards era
-> QueryCommons
-> AllOrOnly GovActionId
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryProposalsCmdArgs era
forall era.
ConwayEraOnwards era
-> QueryCommons
-> AllOrOnly GovActionId
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryProposalsCmdArgs era
QueryProposalsCmdArgs (Era era -> ConwayEraOnwards era
forall era. Era era -> ConwayEraOnwards era
forall a (f :: a -> *) (g :: a -> *) (era :: a).
Convert f g =>
f era -> g era
convert Era era
forall era. IsEra era => Era era
useEra)
(QueryCommons
-> AllOrOnly GovActionId
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryProposalsCmdArgs era)
-> Parser QueryCommons
-> Parser
(AllOrOnly GovActionId
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryProposalsCmdArgs era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser
(AllOrOnly GovActionId
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryProposalsCmdArgs era)
-> Parser (AllOrOnly GovActionId)
-> Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryProposalsCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (AllOrOnly GovActionId)
pAllOrOnlyGovActionIds
Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryProposalsCmdArgs era)
-> Parser (Vary '[FormatJson, FormatYaml])
-> Parser (Maybe (File () 'Out) -> QueryProposalsCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag (Vary '[FormatJson, FormatYaml])]
-> Parser (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"proposals"
[ Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatJson, FormatYaml])
-> (Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml]))
-> Flag (Vary '[FormatJson, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser (Maybe (File () 'Out) -> QueryProposalsCmdArgs era)
-> Parser (Maybe (File () 'Out))
-> Parser (QueryProposalsCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (File () 'Out) -> Parser (Maybe (File () 'Out))
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser (File () 'Out)
forall content. Parser (File content 'Out)
pOutputFile
pQuerySPOStakeDistributionCmd
:: forall era
. IsEra era
=> EnvCli
-> Maybe (Parser (QueryCmds era))
pQuerySPOStakeDistributionCmd :: forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQuerySPOStakeDistributionCmd EnvCli
envCli = do
Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (InfoMod (QueryCmds era) -> Parser (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (InfoMod (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"spo-stake-distribution"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (QuerySPOStakeDistributionCmdArgs era -> QueryCmds era
forall era. QuerySPOStakeDistributionCmdArgs era -> QueryCmds era
QuerySPOStakeDistributionCmd (QuerySPOStakeDistributionCmdArgs era -> QueryCmds era)
-> Parser (QuerySPOStakeDistributionCmdArgs era)
-> Parser (QueryCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Era era -> Parser (QuerySPOStakeDistributionCmdArgs era)
pQuerySPOStakeDistributionCmdArgs Era era
forall era. IsEra era => Era era
useEra)
(InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the SPO stake distribution."
where
pQuerySPOStakeDistributionCmdArgs
:: Era era -> Parser (QuerySPOStakeDistributionCmdArgs era)
pQuerySPOStakeDistributionCmdArgs :: Era era -> Parser (QuerySPOStakeDistributionCmdArgs era)
pQuerySPOStakeDistributionCmdArgs Era era
w =
ConwayEraOnwards era
-> QueryCommons
-> AllOrOnly SPOHashSource
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QuerySPOStakeDistributionCmdArgs era
forall era.
ConwayEraOnwards era
-> QueryCommons
-> AllOrOnly SPOHashSource
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QuerySPOStakeDistributionCmdArgs era
QuerySPOStakeDistributionCmdArgs (Era era -> ConwayEraOnwards era
forall era. Era era -> ConwayEraOnwards era
forall a (f :: a -> *) (g :: a -> *) (era :: a).
Convert f g =>
f era -> g era
convert Era era
w)
(QueryCommons
-> AllOrOnly SPOHashSource
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QuerySPOStakeDistributionCmdArgs era)
-> Parser QueryCommons
-> Parser
(AllOrOnly SPOHashSource
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QuerySPOStakeDistributionCmdArgs era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser
(AllOrOnly SPOHashSource
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QuerySPOStakeDistributionCmdArgs era)
-> Parser (AllOrOnly SPOHashSource)
-> Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QuerySPOStakeDistributionCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (AllOrOnly SPOHashSource)
pAllOrOnlySPOHashSource
Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QuerySPOStakeDistributionCmdArgs era)
-> Parser (Vary '[FormatJson, FormatYaml])
-> Parser
(Maybe (File () 'Out) -> QuerySPOStakeDistributionCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag (Vary '[FormatJson, FormatYaml])]
-> Parser (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"spo-stake-distribution"
[ Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatJson, FormatYaml])
-> (Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml]))
-> Flag (Vary '[FormatJson, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser
(Maybe (File () 'Out) -> QuerySPOStakeDistributionCmdArgs era)
-> Parser (Maybe (File () 'Out))
-> Parser (QuerySPOStakeDistributionCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pQueryGetCommitteeStateCmd
:: forall era
. IsEra era
=> EnvCli
-> Maybe (Parser (QueryCmds era))
pQueryGetCommitteeStateCmd :: forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryGetCommitteeStateCmd EnvCli
envCli = do
Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (InfoMod (QueryCmds era) -> Parser (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (InfoMod (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"committee-state"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (QueryCommitteeMembersStateCmdArgs era -> QueryCmds era
forall era. QueryCommitteeMembersStateCmdArgs era -> QueryCmds era
QueryCommitteeMembersStateCmd (QueryCommitteeMembersStateCmdArgs era -> QueryCmds era)
-> Parser (QueryCommitteeMembersStateCmdArgs era)
-> Parser (QueryCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Era era -> Parser (QueryCommitteeMembersStateCmdArgs era)
pQueryCommitteeMembersStateArgs Era era
forall era. IsEra era => Era era
useEra)
(InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the committee state"
where
pQueryCommitteeMembersStateArgs
:: Era era -> Parser (QueryCommitteeMembersStateCmdArgs era)
pQueryCommitteeMembersStateArgs :: Era era -> Parser (QueryCommitteeMembersStateCmdArgs era)
pQueryCommitteeMembersStateArgs Era era
w =
ConwayEraOnwards era
-> QueryCommons
-> [VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey]
-> [VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey]
-> [MemberStatus]
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryCommitteeMembersStateCmdArgs era
forall era.
ConwayEraOnwards era
-> QueryCommons
-> [VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey]
-> [VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey]
-> [MemberStatus]
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryCommitteeMembersStateCmdArgs era
QueryCommitteeMembersStateCmdArgs (Era era -> ConwayEraOnwards era
forall era. Era era -> ConwayEraOnwards era
forall a (f :: a -> *) (g :: a -> *) (era :: a).
Convert f g =>
f era -> g era
convert Era era
w)
(QueryCommons
-> [VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey]
-> [VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey]
-> [MemberStatus]
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryCommitteeMembersStateCmdArgs era)
-> Parser QueryCommons
-> Parser
([VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey]
-> [VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey]
-> [MemberStatus]
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryCommitteeMembersStateCmdArgs era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser
([VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey]
-> [VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey]
-> [MemberStatus]
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryCommitteeMembersStateCmdArgs era)
-> Parser
[VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey]
-> Parser
([VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey]
-> [MemberStatus]
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryCommitteeMembersStateCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey)
-> Parser
[VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many Parser (VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey)
pCommitteeColdVerificationKeyOrHashOrFileOrScriptHash
Parser
([VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey]
-> [MemberStatus]
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryCommitteeMembersStateCmdArgs era)
-> Parser [VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey]
-> Parser
([MemberStatus]
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryCommitteeMembersStateCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey)
-> Parser [VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many Parser (VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey)
pCommitteeHotKeyOrHashOrFileOrScriptHash
Parser
([MemberStatus]
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryCommitteeMembersStateCmdArgs era)
-> Parser [MemberStatus]
-> Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryCommitteeMembersStateCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser MemberStatus -> Parser [MemberStatus]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many Parser MemberStatus
pMemberStatus
Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryCommitteeMembersStateCmdArgs era)
-> Parser (Vary '[FormatJson, FormatYaml])
-> Parser
(Maybe (File () 'Out) -> QueryCommitteeMembersStateCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag (Vary '[FormatJson, FormatYaml])]
-> Parser (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"committee-state"
[ Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatJson, FormatYaml])
-> (Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml]))
-> Flag (Vary '[FormatJson, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser
(Maybe (File () 'Out) -> QueryCommitteeMembersStateCmdArgs era)
-> Parser (Maybe (File () 'Out))
-> Parser (QueryCommitteeMembersStateCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pCommitteeColdVerificationKeyOrHashOrFileOrScriptHash
:: Parser (VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey)
pCommitteeColdVerificationKeyOrHashOrFileOrScriptHash :: Parser (VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey)
pCommitteeColdVerificationKeyOrHashOrFileOrScriptHash =
[Parser (VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey)]
-> Parser
(VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey)
forall (t :: * -> *) (f :: * -> *) a.
(Foldable t, Alternative f) =>
t (f a) -> f a
asum
[ VerificationKeyOrHashOrFile CommitteeColdKey
-> VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey
forall keyrole.
VerificationKeyOrHashOrFile keyrole
-> VerificationKeyOrHashOrFileOrScriptHash keyrole
VkhfshKeyHashFile (VerificationKeyOrHashOrFile CommitteeColdKey
-> VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey)
-> Parser (VerificationKeyOrHashOrFile CommitteeColdKey)
-> Parser
(VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser (VerificationKeyOrHashOrFile CommitteeColdKey)
pCommitteeColdVerificationKeyOrHashOrFile
, ScriptHash
-> VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey
forall keyrole.
ScriptHash -> VerificationKeyOrHashOrFileOrScriptHash keyrole
VkhfshScriptHash
(ScriptHash
-> VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey)
-> Parser ScriptHash
-> Parser
(VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> String -> String -> Parser ScriptHash
pScriptHash
String
"cold-script-hash"
String
"Cold Native or Plutus script file hash (hex-encoded). Obtain it with \"cardano-cli hash script ...\"."
]
pCommitteeHotKeyOrHashOrFileOrScriptHash
:: Parser (VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey)
pCommitteeHotKeyOrHashOrFileOrScriptHash :: Parser (VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey)
pCommitteeHotKeyOrHashOrFileOrScriptHash =
[Parser (VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey)]
-> Parser (VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey)
forall (t :: * -> *) (f :: * -> *) a.
(Foldable t, Alternative f) =>
t (f a) -> f a
asum
[ VerificationKeyOrHashOrFile CommitteeHotKey
-> VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey
forall keyrole.
VerificationKeyOrHashOrFile keyrole
-> VerificationKeyOrHashOrFileOrScriptHash keyrole
VkhfshKeyHashFile (VerificationKeyOrHashOrFile CommitteeHotKey
-> VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey)
-> Parser (VerificationKeyOrHashOrFile CommitteeHotKey)
-> Parser (VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser (VerificationKeyOrHashOrFile CommitteeHotKey)
pCommitteeHotKeyOrHashOrFile
, ScriptHash
-> VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey
forall keyrole.
ScriptHash -> VerificationKeyOrHashOrFileOrScriptHash keyrole
VkhfshScriptHash
(ScriptHash
-> VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey)
-> Parser ScriptHash
-> Parser (VerificationKeyOrHashOrFileOrScriptHash CommitteeHotKey)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> String -> String -> Parser ScriptHash
pScriptHash
String
"hot-script-hash"
String
"Hot Native or Plutus script file hash (hex-encoded). Obtain it with \"cardano-cli hash script ...\"."
]
pMemberStatus :: Parser MemberStatus
pMemberStatus :: Parser MemberStatus
pMemberStatus =
[Parser MemberStatus] -> Parser MemberStatus
forall (t :: * -> *) (f :: * -> *) a.
(Foldable t, Alternative f) =>
t (f a) -> f a
asum
[ MemberStatus -> Mod FlagFields MemberStatus -> Parser MemberStatus
forall a. a -> Mod FlagFields a -> Parser a
Opt.flag' MemberStatus
MemberStatus.Active (Mod FlagFields MemberStatus -> Parser MemberStatus)
-> Mod FlagFields MemberStatus -> Parser MemberStatus
forall a b. (a -> b) -> a -> b
$
[Mod FlagFields MemberStatus] -> Mod FlagFields MemberStatus
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod FlagFields MemberStatus
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"active"
, String -> Mod FlagFields MemberStatus
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"Active committee members (members whose vote will count during ratification)"
]
, MemberStatus -> Mod FlagFields MemberStatus -> Parser MemberStatus
forall a. a -> Mod FlagFields a -> Parser a
Opt.flag' MemberStatus
MemberStatus.Expired (Mod FlagFields MemberStatus -> Parser MemberStatus)
-> Mod FlagFields MemberStatus -> Parser MemberStatus
forall a b. (a -> b) -> a -> b
$
[Mod FlagFields MemberStatus] -> Mod FlagFields MemberStatus
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod FlagFields MemberStatus
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"expired"
, String -> Mod FlagFields MemberStatus
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"Expired committee members"
]
, MemberStatus -> Mod FlagFields MemberStatus -> Parser MemberStatus
forall a. a -> Mod FlagFields a -> Parser a
Opt.flag' MemberStatus
MemberStatus.Unrecognized (Mod FlagFields MemberStatus -> Parser MemberStatus)
-> Mod FlagFields MemberStatus -> Parser MemberStatus
forall a b. (a -> b) -> a -> b
$
[Mod FlagFields MemberStatus] -> Mod FlagFields MemberStatus
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod FlagFields MemberStatus
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"unrecognized"
, String -> Mod FlagFields MemberStatus
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"Unrecognized committe members: a hot credential for an unknown cold credential"
]
]
pQueryTreasuryValueCmd
:: forall era
. IsEra era
=> EnvCli
-> Maybe (Parser (QueryCmds era))
pQueryTreasuryValueCmd :: forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryTreasuryValueCmd EnvCli
envCli = do
Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (InfoMod (QueryCmds era) -> Parser (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (InfoMod (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"treasury"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (QueryTreasuryValueCmdArgs era -> QueryCmds era
forall era. QueryTreasuryValueCmdArgs era -> QueryCmds era
QueryTreasuryValueCmd (QueryTreasuryValueCmdArgs era -> QueryCmds era)
-> Parser (QueryTreasuryValueCmdArgs era) -> Parser (QueryCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Era era -> Parser (QueryTreasuryValueCmdArgs era)
pQueryTreasuryValueArgs Era era
forall era. IsEra era => Era era
useEra)
(InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the treasury value"
where
pQueryTreasuryValueArgs
:: Era era -> Parser (QueryTreasuryValueCmdArgs era)
pQueryTreasuryValueArgs :: Era era -> Parser (QueryTreasuryValueCmdArgs era)
pQueryTreasuryValueArgs Era era
w =
ConwayEraOnwards era
-> QueryCommons
-> Maybe (File () 'Out)
-> QueryTreasuryValueCmdArgs era
forall era.
ConwayEraOnwards era
-> QueryCommons
-> Maybe (File () 'Out)
-> QueryTreasuryValueCmdArgs era
QueryTreasuryValueCmdArgs (Era era -> ConwayEraOnwards era
forall era. Era era -> ConwayEraOnwards era
forall a (f :: a -> *) (g :: a -> *) (era :: a).
Convert f g =>
f era -> g era
convert Era era
w)
(QueryCommons
-> Maybe (File () 'Out) -> QueryTreasuryValueCmdArgs era)
-> Parser QueryCommons
-> Parser (Maybe (File () 'Out) -> QueryTreasuryValueCmdArgs era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser (Maybe (File () 'Out) -> QueryTreasuryValueCmdArgs era)
-> Parser (Maybe (File () 'Out))
-> Parser (QueryTreasuryValueCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pQueryStakePoolDefaultVote
:: forall era
. IsEra era
=> EnvCli
-> Maybe (Parser (QueryCmds era))
pQueryStakePoolDefaultVote :: forall era. IsEra era => EnvCli -> Maybe (Parser (QueryCmds era))
pQueryStakePoolDefaultVote EnvCli
envCli = do
Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
(Parser (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> (InfoMod (QueryCmds era) -> Parser (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Maybe (Parser (QueryCmds era))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (InfoMod (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"stake-pool-default-vote"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> InfoMod (QueryCmds era)
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (QueryStakePoolDefaultVoteCmdArgs era -> QueryCmds era
forall era. QueryStakePoolDefaultVoteCmdArgs era -> QueryCmds era
QueryStakePoolDefaultVoteCmd (QueryStakePoolDefaultVoteCmdArgs era -> QueryCmds era)
-> Parser (QueryStakePoolDefaultVoteCmdArgs era)
-> Parser (QueryCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser (QueryStakePoolDefaultVoteCmdArgs era)
pQueryStakePoolDefaultVoteCmdArgs)
(InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era)))
-> InfoMod (QueryCmds era) -> Maybe (Parser (QueryCmds era))
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the stake pool default vote."
where
pQueryStakePoolDefaultVoteCmdArgs
:: Parser (QueryStakePoolDefaultVoteCmdArgs era)
pQueryStakePoolDefaultVoteCmdArgs :: Parser (QueryStakePoolDefaultVoteCmdArgs era)
pQueryStakePoolDefaultVoteCmdArgs =
ConwayEraOnwards era
-> QueryCommons
-> SPOHashSource
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryStakePoolDefaultVoteCmdArgs era
forall era.
ConwayEraOnwards era
-> QueryCommons
-> SPOHashSource
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryStakePoolDefaultVoteCmdArgs era
QueryStakePoolDefaultVoteCmdArgs (Era era -> ConwayEraOnwards era
forall era. Era era -> ConwayEraOnwards era
forall a (f :: a -> *) (g :: a -> *) (era :: a).
Convert f g =>
f era -> g era
convert Era era
forall era. IsEra era => Era era
useEra)
(QueryCommons
-> SPOHashSource
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryStakePoolDefaultVoteCmdArgs era)
-> Parser QueryCommons
-> Parser
(SPOHashSource
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryStakePoolDefaultVoteCmdArgs era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser
(SPOHashSource
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryStakePoolDefaultVoteCmdArgs era)
-> Parser SPOHashSource
-> Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryStakePoolDefaultVoteCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser SPOHashSource
pSPOHashSource
Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryStakePoolDefaultVoteCmdArgs era)
-> Parser (Vary '[FormatJson, FormatYaml])
-> Parser
(Maybe (File () 'Out) -> QueryStakePoolDefaultVoteCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag (Vary '[FormatJson, FormatYaml])]
-> Parser (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
"stake-pool-default-vote"
[ Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatJson, FormatYaml])
-> (Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml]))
-> Flag (Vary '[FormatJson, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser
(Maybe (File () 'Out) -> QueryStakePoolDefaultVoteCmdArgs era)
-> Parser (Maybe (File () 'Out))
-> Parser (QueryStakePoolDefaultVoteCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pQueryNoArgCmdArgs
:: forall era
. ()
=> IsEra era
=> EnvCli
-> String
-> Parser (QueryNoArgCmdArgs era)
pQueryNoArgCmdArgs :: forall era.
IsEra era =>
EnvCli -> String -> Parser (QueryNoArgCmdArgs era)
pQueryNoArgCmdArgs EnvCli
envCli String
name =
ConwayEraOnwards era
-> QueryCommons
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryNoArgCmdArgs era
forall era.
ConwayEraOnwards era
-> QueryCommons
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryNoArgCmdArgs era
QueryNoArgCmdArgs (Era era -> ConwayEraOnwards era
forall era. Era era -> ConwayEraOnwards era
forall a (f :: a -> *) (g :: a -> *) (era :: a).
Convert f g =>
f era -> g era
convert Era era
forall era. IsEra era => Era era
useEra)
(QueryCommons
-> Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out)
-> QueryNoArgCmdArgs era)
-> Parser QueryCommons
-> Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryNoArgCmdArgs era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser
(Vary '[FormatJson, FormatYaml]
-> Maybe (File () 'Out) -> QueryNoArgCmdArgs era)
-> Parser (Vary '[FormatJson, FormatYaml])
-> Parser (Maybe (File () 'Out) -> QueryNoArgCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String
-> [Flag (Vary '[FormatJson, FormatYaml])]
-> Parser (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags
String
name
[ Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatJson :| fs) => Flag (Vary fs)
flagFormatJson Flag (Vary '[FormatJson, FormatYaml])
-> (Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml]))
-> Flag (Vary '[FormatJson, FormatYaml])
forall a b. a -> (a -> b) -> b
& Flag (Vary '[FormatJson, FormatYaml])
-> Flag (Vary '[FormatJson, FormatYaml])
forall a. Flag a -> Flag a
setDefault
, Flag (Vary '[FormatJson, FormatYaml])
forall (fs :: [*]). (FormatYaml :| fs) => Flag (Vary fs)
flagFormatYaml
]
Parser (Maybe (File () 'Out) -> QueryNoArgCmdArgs era)
-> Parser (Maybe (File () 'Out)) -> Parser (QueryNoArgCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pQueryCommons
:: forall era
. IsEra era
=> EnvCli
-> Parser QueryCommons
pQueryCommons :: forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons EnvCli
envCli =
LocalNodeConnectInfo -> Target ChainPoint -> QueryCommons
QueryCommons
(LocalNodeConnectInfo -> Target ChainPoint -> QueryCommons)
-> Parser LocalNodeConnectInfo
-> Parser (Target ChainPoint -> QueryCommons)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ( ConsensusModeParams
-> NetworkId -> SocketPath -> LocalNodeConnectInfo
LocalNodeConnectInfo
(ConsensusModeParams
-> NetworkId -> SocketPath -> LocalNodeConnectInfo)
-> Parser ConsensusModeParams
-> Parser (NetworkId -> SocketPath -> LocalNodeConnectInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser ConsensusModeParams
pConsensusModeParams
Parser (NetworkId -> SocketPath -> LocalNodeConnectInfo)
-> Parser NetworkId -> Parser (SocketPath -> LocalNodeConnectInfo)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> EnvCli -> Parser NetworkId
pNetworkId EnvCli
envCli
Parser (SocketPath -> LocalNodeConnectInfo)
-> Parser SocketPath -> Parser LocalNodeConnectInfo
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> EnvCli -> Parser SocketPath
pSocketPath EnvCli
envCli
)
Parser (Target ChainPoint -> QueryCommons)
-> Parser (Target ChainPoint) -> Parser QueryCommons
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> forall era. IsEra era => Parser (Target ChainPoint)
pTarget @era
pQueryEraHistoryCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryEraHistoryCmd :: forall era. IsEra era => EnvCli -> Parser (QueryCmds era)
pQueryEraHistoryCmd EnvCli
envCli =
Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
(Mod CommandFields (QueryCmds era) -> Parser (QueryCmds era))
-> (String -> Mod CommandFields (QueryCmds era))
-> String
-> Parser (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar
String
"era-history"
(ParserInfo (QueryCmds era) -> Mod CommandFields (QueryCmds era))
-> (String -> ParserInfo (QueryCmds era))
-> String
-> Mod CommandFields (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Parser (QueryCmds era)
-> InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info
( QueryEraHistoryCmdArgs -> QueryCmds era
forall era. QueryEraHistoryCmdArgs -> QueryCmds era
QueryEraHistoryCmd
(QueryEraHistoryCmdArgs -> QueryCmds era)
-> Parser QueryEraHistoryCmdArgs -> Parser (QueryCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser QueryEraHistoryCmdArgs
pQueryEraHistoryCmdArgs
)
(InfoMod (QueryCmds era) -> ParserInfo (QueryCmds era))
-> (String -> InfoMod (QueryCmds era))
-> String
-> ParserInfo (QueryCmds era)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> InfoMod (QueryCmds era)
forall a. String -> InfoMod a
Opt.progDesc
(String -> Parser (QueryCmds era))
-> String -> Parser (QueryCmds era)
forall a b. (a -> b) -> a -> b
$ [String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Obtains the era history data. The era history contains information about when era transitions happened and can "
, String
"be used together with the start time to convert slot numbers to POSIX times offline (without connecting to the node). "
, String
"Converting slot numbers to POSIX times is useful, for example, when calculating the cost of executing a Plutus "
, String
"script. And being able to do it offline means that it can be calculated without access to a live node."
]
where
pQueryEraHistoryCmdArgs
:: Parser QueryEraHistoryCmdArgs
pQueryEraHistoryCmdArgs :: Parser QueryEraHistoryCmdArgs
pQueryEraHistoryCmdArgs =
QueryCommons -> Maybe (File () 'Out) -> QueryEraHistoryCmdArgs
QueryEraHistoryCmdArgs
(QueryCommons -> Maybe (File () 'Out) -> QueryEraHistoryCmdArgs)
-> Parser QueryCommons
-> Parser (Maybe (File () 'Out) -> QueryEraHistoryCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall era. IsEra era => EnvCli -> Parser QueryCommons
pQueryCommons @era EnvCli
envCli
Parser (Maybe (File () 'Out) -> QueryEraHistoryCmdArgs)
-> Parser (Maybe (File () 'Out)) -> Parser QueryEraHistoryCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pFormatQueryOutputFlags
:: String
-> [Flag (Vary fs)]
-> Parser (Vary fs)
pFormatQueryOutputFlags :: forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatQueryOutputFlags String
content =
String -> [Flag (Vary fs)] -> Parser (Vary fs)
forall (fs :: [*]). String -> [Flag (Vary fs)] -> Parser (Vary fs)
pFormatFlags (String -> [Flag (Vary fs)] -> Parser (Vary fs))
-> String -> [Flag (Vary fs)] -> Parser (Vary fs)
forall a b. (a -> b) -> a -> b
$ String
content String -> String -> String
forall a. Semigroup a => a -> a -> a
<> String
" query output"