diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Governance/Actions/Command.hs b/cardano-cli/src/Cardano/CLI/EraBased/Governance/Actions/Command.hs index c8a6ba8f8f..b9c7e23171 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Governance/Actions/Command.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Governance/Actions/Command.hs @@ -158,7 +158,7 @@ data GovernanceActionViewCmdArgs era = GovernanceActionViewCmdArgs { eon :: !(ConwayEraOnwards era) , actionFile :: !(ProposalFile In) - , outFormat :: !(Vary [FormatJson, FormatYaml]) + , outputFormat :: !(Vary [FormatJson, FormatYaml]) , mOutFile :: !(Maybe (File () Out)) } deriving Show diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Governance/Actions/Run.hs b/cardano-cli/src/Cardano/CLI/EraBased/Governance/Actions/Run.hs index e2f02a22f1..aafa4b8953 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Governance/Actions/Run.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Governance/Actions/Run.hs @@ -64,8 +64,8 @@ runGovernanceActionViewCmd -> CIO e () runGovernanceActionViewCmd Cmd.GovernanceActionViewCmdArgs - { Cmd.outFormat - , Cmd.actionFile + { Cmd.actionFile + , Cmd.outputFormat , Cmd.mOutFile , Cmd.eon } = do @@ -73,7 +73,7 @@ runGovernanceActionViewCmd fromEitherIOCli $ readProposal eon (actionFile, Nothing) - void $ friendlyProposal outFormat mOutFile eon $ fst proposal + void $ friendlyProposal outputFormat mOutFile eon $ fst proposal runGovernanceActionInfoCmd :: forall era e diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Governance/Vote/Command.hs b/cardano-cli/src/Cardano/CLI/EraBased/Governance/Vote/Command.hs index 9eef00b569..71fe86d59f 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Governance/Vote/Command.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Governance/Vote/Command.hs @@ -45,8 +45,8 @@ data GovernanceVoteCreateCmdArgs era data GovernanceVoteViewCmdArgs era = GovernanceVoteViewCmdArgs { eon :: ConwayEraOnwards era - , outFormat :: !(Vary [FormatJson, FormatYaml]) , voteFile :: VoteFile In + , outputFormat :: !(Vary [FormatJson, FormatYaml]) , mOutFile :: Maybe (File () Out) } diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Governance/Vote/Option.hs b/cardano-cli/src/Cardano/CLI/EraBased/Governance/Vote/Option.hs index a0ffc5be94..1924881d48 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Governance/Vote/Option.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Governance/Vote/Option.hs @@ -91,10 +91,10 @@ pGovernanceVoteViewCmd era = do pGovernanceVoteViewCmdArgs :: ConwayEraOnwards era -> Parser (GovernanceVoteViewCmdArgs era) pGovernanceVoteViewCmdArgs cOnwards = GovernanceVoteViewCmdArgs cOnwards - <$> pFormatFlags + <$> pFileInDirection "vote-file" "Input filepath of the vote." + <*> pFormatFlags "governance vote view output" [ flagFormatJson & setDefault , flagFormatYaml ] - <*> pFileInDirection "vote-file" "Input filepath of the vote." <*> pMaybeOutputFile diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Governance/Vote/Run.hs b/cardano-cli/src/Cardano/CLI/EraBased/Governance/Vote/Run.hs index 51ae09e64a..920671a13a 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Governance/Vote/Run.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Governance/Vote/Run.hs @@ -103,8 +103,8 @@ runGovernanceVoteViewCmd runGovernanceVoteViewCmd Cmd.GovernanceVoteViewCmdArgs { eon - , outFormat , voteFile + , outputFormat , mOutFile } = do let sbe :: ShelleyBasedEra era = convert eon @@ -116,7 +116,7 @@ runGovernanceVoteViewCmd readVoteScriptWitness eon (voteFile, Nothing) let output = - outFormat + outputFormat & ( id . Vary.on (\FormatJson -> Json.encodeJson) . Vary.on (\FormatYaml -> Json.encodeYaml) @@ -124,4 +124,6 @@ runGovernanceVoteViewCmd ) $ unVotingProcedures voteProcedures - firstExceptT GovernanceVoteCmdWriteError $ newExceptT $ writeLazyByteStringOutput mOutFile output + firstExceptT GovernanceVoteCmdWriteError + . newExceptT + $ writeLazyByteStringOutput mOutFile output diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Query/Command.hs b/cardano-cli/src/Cardano/CLI/EraBased/Query/Command.hs index a4db3891f4..2ac53f30db 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Query/Command.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Query/Command.hs @@ -94,33 +94,35 @@ data QueryLeadershipScheduleCmdArgs = QueryLeadershipScheduleCmdArgs , poolColdVerKeyFile :: !StakePoolKeyHashSource , vrkSkeyFp :: !(SigningKeyFile In) , whichSchedule :: !EpochLeadershipSchedule - , format :: !(Vary [FormatJson, FormatText, FormatYaml]) + , outputFormat :: !(Vary [FormatJson, FormatText, FormatYaml]) , mOutFile :: !(Maybe (File () Out)) } deriving (Generic, Show) data QueryProtocolParametersCmdArgs = QueryProtocolParametersCmdArgs { nodeConnInfo :: !LocalNodeConnectInfo + , outputFormat :: !(Vary [FormatJson, FormatYaml]) , mOutFile :: !(Maybe (File () Out)) } deriving (Generic, Show) data QueryTipCmdArgs = QueryTipCmdArgs { commons :: !QueryCommons + , outputFormat :: !(Vary [FormatJson, FormatYaml]) , mOutFile :: !(Maybe (File () Out)) } deriving (Generic, Show) data QueryStakePoolsCmdArgs = QueryStakePoolsCmdArgs { commons :: !QueryCommons - , format :: !(Vary [FormatJson, FormatText]) + , outputFormat :: !(Vary [FormatJson, FormatText]) , mOutFile :: !(Maybe (File () Out)) } deriving (Generic, Show) data QueryStakeDistributionCmdArgs = QueryStakeDistributionCmdArgs { commons :: !QueryCommons - , format :: !(Vary [FormatJson, FormatText]) + , outputFormat :: !(Vary [FormatJson, FormatText]) , mOutFile :: !(Maybe (File () Out)) } deriving (Generic, Show) @@ -128,6 +130,7 @@ data QueryStakeDistributionCmdArgs = QueryStakeDistributionCmdArgs data QueryStakeAddressInfoCmdArgs = QueryStakeAddressInfoCmdArgs { commons :: !QueryCommons , addr :: !StakeAddress + , outputFormat :: !(Vary [FormatJson, FormatYaml]) , mOutFile :: !(Maybe (File () Out)) } deriving (Generic, Show) @@ -135,7 +138,7 @@ data QueryStakeAddressInfoCmdArgs = QueryStakeAddressInfoCmdArgs data QueryUTxOCmdArgs = QueryUTxOCmdArgs { commons :: !QueryCommons , queryFilter :: !QueryUTxOFilter - , format :: !(Vary [FormatCbor, FormatJson, FormatText]) + , outputFormat :: !(Vary [FormatCbor, FormatJson, FormatText]) , mOutFile :: !(Maybe (File () Out)) } deriving (Generic, Show) @@ -163,6 +166,7 @@ data QueryProtocolStateCmdArgs = QueryProtocolStateCmdArgs data QueryStakeSnapshotCmdArgs = QueryStakeSnapshotCmdArgs { commons :: !QueryCommons , allOrOnlyPoolIds :: !(AllOrOnly (Hash StakePoolKey)) + , outputFormat :: !(Vary [FormatJson, FormatYaml]) , mOutFile :: !(Maybe (File () Out)) } deriving (Generic, Show) @@ -171,6 +175,7 @@ data QueryKesPeriodInfoCmdArgs = QueryKesPeriodInfoCmdArgs { commons :: !QueryCommons , nodeOpCertFp :: !(File () In) -- ^ Node operational certificate + , outputFormat :: !(Vary [FormatJson, FormatYaml]) , mOutFile :: !(Maybe (File () Out)) } deriving (Generic, Show) @@ -178,6 +183,7 @@ data QueryKesPeriodInfoCmdArgs = QueryKesPeriodInfoCmdArgs data QueryPoolStateCmdArgs = QueryPoolStateCmdArgs { commons :: !QueryCommons , allOrOnlyPoolIds :: !(AllOrOnly (Hash StakePoolKey)) + , outputFormat :: !(Vary [FormatJson, FormatYaml]) , mOutFile :: !(Maybe (File () Out)) } deriving (Generic, Show) @@ -185,6 +191,7 @@ data QueryPoolStateCmdArgs = QueryPoolStateCmdArgs data QueryTxMempoolCmdArgs = QueryTxMempoolCmdArgs { nodeConnInfo :: !LocalNodeConnectInfo , query :: !TxMempoolQuery + , outputFormat :: !(Vary [FormatJson, FormatYaml]) , mOutFile :: !(Maybe (File () Out)) } deriving (Generic, Show) @@ -198,7 +205,7 @@ data QuerySlotNumberCmdArgs = QuerySlotNumberCmdArgs data QueryRefScriptSizeCmdArgs = QueryRefScriptSizeCmdArgs { commons :: !QueryCommons , transactionInputs :: !(Set TxIn) - , format :: !(Vary [FormatJson, FormatText]) + , outputFormat :: !(Vary [FormatJson, FormatText]) , mOutFile :: !(Maybe (File () Out)) } deriving (Generic, Show) @@ -239,6 +246,7 @@ data QuerySPOStakeDistributionCmdArgs era = QuerySPOStakeDistributionCmdArgs { eon :: !(ConwayEraOnwards era) , commons :: !QueryCommons , spoHashSources :: !(AllOrOnly SPOHashSource) + , outputFormat :: !(Vary [FormatJson, FormatYaml]) , mOutFile :: !(Maybe (File () Out)) } deriving Show @@ -264,6 +272,7 @@ data QueryStakePoolDefaultVoteCmdArgs era = QueryStakePoolDefaultVoteCmdArgs { eon :: !(ConwayEraOnwards era) , commons :: !QueryCommons , spoHashSources :: !SPOHashSource + , outputFormat :: !(Vary [FormatJson, FormatYaml]) , mOutFile :: !(Maybe (File () Out)) } deriving Show @@ -302,7 +311,7 @@ renderQueryCmds = \case "query kes-period-info" QueryPoolStateCmd{} -> "query pool-state" - QueryTxMempoolCmd (QueryTxMempoolCmdArgs _ q _) -> + QueryTxMempoolCmd (QueryTxMempoolCmdArgs _ q _ _) -> "query tx-mempool" <> renderTxMempoolQuery q QuerySlotNumberCmd{} -> "query slot-number" diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Query/Option.hs b/cardano-cli/src/Cardano/CLI/EraBased/Query/Option.hs index 674c56dc0c..f543019691 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Query/Option.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Query/Option.hs @@ -355,6 +355,11 @@ pQueryProtocolParametersCmd envCli = <*> pNetworkId envCli <*> pSocketPath envCli ) + <*> pFormatFlags + "protocol-parameters query output" + [ flagFormatJson & setDefault + , flagFormatYaml + ] <*> pMaybeOutputFile pQueryTipCmd :: ShelleyBasedEra era -> EnvCli -> Parser (QueryCmds era) @@ -362,6 +367,11 @@ pQueryTipCmd era envCli = fmap QueryTipCmd $ QueryTipCmdArgs <$> pQueryCommons era envCli + <*> pFormatFlags + "tip query output" + [ flagFormatJson & setDefault + , flagFormatYaml + ] <*> pMaybeOutputFile pQueryUTxOCmd :: ShelleyBasedEra era -> EnvCli -> Parser (QueryCmds era) @@ -408,6 +418,11 @@ pQueryStakeAddressInfoCmd era envCli = QueryStakeAddressInfoCmdArgs <$> pQueryCommons era envCli <*> pFilterByStakeAddress + <*> pFormatFlags + "stake-address-info query output" + [ flagFormatJson & setDefault + , flagFormatYaml + ] <*> pMaybeOutputFile pQueryLedgerStateCmd :: ShelleyBasedEra era -> EnvCli -> Parser (QueryCmds era) @@ -428,7 +443,7 @@ pQueryLedgerPeerSnapshotCmd era envCli = QueryLedgerPeerSnapshotCmdArgs <$> pQueryCommons era envCli <*> pFormatFlags - "ledger-peer-snapshot output" + "ledger-peer-snapshot query output" [ flagFormatJson & setDefault , flagFormatYaml ] @@ -460,6 +475,11 @@ pQueryStakeSnapshotCmd era envCli = QueryStakeSnapshotCmdArgs <$> pQueryCommons era envCli <*> pAllStakePoolsOrSome + <*> pFormatFlags + "stake-snapshot query output" + [ flagFormatJson & setDefault + , flagFormatYaml + ] <*> pMaybeOutputFile pQueryPoolStateCmd :: ShelleyBasedEra era -> EnvCli -> Parser (QueryCmds era) @@ -468,6 +488,11 @@ pQueryPoolStateCmd era envCli = QueryPoolStateCmdArgs <$> pQueryCommons era envCli <*> pAllStakePoolsOrSome + <*> pFormatFlags + "pool-state query output" + [ flagFormatJson & setDefault + , flagFormatYaml + ] <*> pMaybeOutputFile pQueryTxMempoolCmd :: EnvCli -> Parser (QueryCmds era) @@ -480,6 +505,11 @@ pQueryTxMempoolCmd envCli = <*> pSocketPath envCli ) <*> pTxMempoolQuery + <*> pFormatFlags + "tx-mempool query output" + [ flagFormatJson & setDefault + , flagFormatYaml + ] <*> pMaybeOutputFile where pTxMempoolQuery :: Parser TxMempoolQuery @@ -522,6 +552,11 @@ pKesPeriodInfoCmd era envCli = QueryKesPeriodInfoCmdArgs <$> pQueryCommons era envCli <*> pOperationalCertificateFile + <*> pFormatFlags + "kes-period-info query output" + [ flagFormatJson & setDefault + , flagFormatYaml + ] <*> pMaybeOutputFile pQuerySlotNumberCmd :: ShelleyBasedEra era -> EnvCli -> Parser (QueryCmds era) @@ -715,6 +750,11 @@ pQuerySPOStakeDistributionCmd era envCli = do QuerySPOStakeDistributionCmdArgs w <$> pQueryCommons era envCli <*> pAllOrOnlySPOHashSource + <*> pFormatFlags + "spo-stake-distribution query output" + [ flagFormatJson & setDefault + , flagFormatYaml + ] <*> pMaybeOutputFile pQueryGetCommitteeStateCmd @@ -821,6 +861,11 @@ pQueryStakePoolDefaultVote era envCli = do QueryStakePoolDefaultVoteCmdArgs w <$> pQueryCommons era envCli <*> pSPOHashSource + <*> pFormatFlags + "stake-pool-default-vote query output" + [ flagFormatJson & setDefault + , flagFormatYaml + ] <*> pMaybeOutputFile pQueryNoArgCmdArgs diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Query/Run.hs b/cardano-cli/src/Cardano/CLI/EraBased/Query/Run.hs index 41009e80d0..7598a4f756 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Query/Run.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Query/Run.hs @@ -67,13 +67,12 @@ import Cardano.Ledger.Api.State.Query qualified as L import Cardano.Slotting.EpochInfo (EpochInfo (..), epochInfoSlotToUTCTime, hoistEpochInfo) import Cardano.Slotting.Time (RelativeTime (..), toRelativeTime) -import Control.Monad (forM, forM_, join) +import Control.Monad (forM, join) import Data.Aeson as Aeson import Data.Aeson qualified as A import Data.Aeson.Encode.Pretty qualified as Aeson import Data.Bifunctor (Bifunctor (..)) import Data.ByteString.Base16.Lazy qualified as Base16 -import Data.ByteString.Char8 qualified as C8 import Data.ByteString.Lazy qualified as BS import Data.ByteString.Lazy.Char8 qualified as LBS import Data.Coerce (coerce) @@ -141,26 +140,31 @@ runQueryProtocolParametersCmd runQueryProtocolParametersCmd Cmd.QueryProtocolParametersCmdArgs { Cmd.nodeConnInfo + , Cmd.outputFormat , Cmd.mOutFile } = do AnyCardanoEra era <- firstExceptT QueryCmdAcquireFailure $ determineEra nodeConnInfo sbe <- forEraInEon @ShelleyBasedEra era (left QueryCmdByronEra) pure + let qInMode = QueryInEra $ QueryInShelleyBasedEra sbe Api.QueryProtocolParameters - pp <- + + pparams <- executeQueryAnyMode nodeConnInfo qInMode & modifyError QueryCmdConvenienceError - writeProtocolParameters sbe mOutFile pp - where - writeProtocolParameters - :: ShelleyBasedEra era - -> Maybe (File () Out) - -> L.PParams (ShelleyLedgerEra era) - -> ExceptT QueryCmdError IO () - writeProtocolParameters sbe mOutFile' pparams = - firstExceptT QueryCmdWriteFileError . newExceptT $ - writeLazyByteStringOutput mOutFile' $ - shelleyBasedEraConstraints sbe $ - Aeson.encodePretty pparams + + let output = + shelleyBasedEraConstraints sbe + $ outputFormat + & ( id + . Vary.on (\FormatJson -> Json.encodeJson) + . Vary.on (\FormatYaml -> Json.encodeYaml) + $ Vary.exhaustiveCase + ) + $ pparams + + firstExceptT QueryCmdWriteFileError + . newExceptT + $ writeLazyByteStringOutput mOutFile output -- | Calculate the percentage sync rendered as text: @min 1 (tipTime/nowTime)@ percentage @@ -208,6 +212,7 @@ runQueryTipCmd { Cmd.nodeConnInfo , Cmd.target } + , Cmd.outputFormat , Cmd.mOutFile } ) = do @@ -288,9 +293,18 @@ runQueryTipCmd , O.mSyncProgress = mSyncProgress } - firstExceptT QueryCmdWriteFileError . newExceptT $ - writeLazyByteStringOutput mOutFile $ - Aeson.encodePretty localStateOutput + let output = + outputFormat + & ( id + . Vary.on (\FormatJson -> Json.encodeJson) + . Vary.on (\FormatYaml -> Json.encodeYaml) + $ Vary.exhaustiveCase + ) + $ localStateOutput + + firstExceptT QueryCmdWriteFileError + . newExceptT + $ writeLazyByteStringOutput mOutFile output -- | Query the UTxO, filtered by a given set of addresses, from a Shelley node -- via the local state query protocol. @@ -306,7 +320,7 @@ runQueryUTxOCmd , Cmd.target } , Cmd.queryFilter - , Cmd.format + , Cmd.outputFormat , Cmd.mOutFile } ) = do @@ -322,7 +336,7 @@ runQueryUTxOCmd utxo <- easyRunQuery (queryUtxo sbe queryFilter) pure $ do - writeFilteredUTxOs sbe format mOutFile utxo + writeFilteredUTxOs sbe outputFormat mOutFile utxo ) & onLeft (left . QueryCmdAcquireFailure) & onLeft left @@ -339,6 +353,7 @@ runQueryKesPeriodInfoCmd , Cmd.target } , Cmd.nodeOpCertFp + , Cmd.outputFormat , Cmd.mOutFile } = do opCert <- @@ -387,15 +402,18 @@ runQueryKesPeriodInfoCmd renderOpCertNodeAndOnDiskCounterInformation (unFile nodeOpCertFp) counterInformation let qKesInfoOutput = createQueryKesPeriodInfoOutput opCertIntervalInformation counterInformation eInfo gParams - kesPeriodInfoJSON = Aeson.encodePretty qKesInfoOutput - - liftIO $ LBS.putStrLn kesPeriodInfoJSON - forM_ - mOutFile - ( \(File oFp) -> - handleIOExceptT (QueryCmdWriteFileError . FileIOError oFp) $ - LBS.writeFile oFp kesPeriodInfoJSON - ) + output = + outputFormat + & ( id + . Vary.on (\FormatJson -> Json.encodeJson) + . Vary.on (\FormatYaml -> Json.encodeYaml) + $ Vary.exhaustiveCase + ) + $ qKesInfoOutput + + firstExceptT QueryCmdWriteFileError + . newExceptT + $ writeLazyByteStringOutput mOutFile output ) & onLeft (left . QueryCmdAcquireFailure) & onLeft left @@ -634,6 +652,7 @@ runQueryPoolStateCmd , Cmd.target } , Cmd.allOrOnlyPoolIds + , Cmd.outputFormat , Cmd.mOutFile } = do join $ @@ -653,7 +672,7 @@ runQueryPoolStateCmd result <- easyRunQuery (queryPoolState beo poolFilter) - pure $ shelleyBasedEraConstraints sbe (writePoolState mOutFile) result + pure $ shelleyBasedEraConstraints sbe (writePoolState outputFormat mOutFile) result ) & onLeft (left . QueryCmdAcquireFailure) & onLeft left @@ -667,6 +686,7 @@ runQueryTxMempoolCmd Cmd.QueryTxMempoolCmdArgs { Cmd.nodeConnInfo , Cmd.query + , Cmd.outputFormat , Cmd.mOutFile } = do localQuery <- case query of @@ -679,9 +699,19 @@ runQueryTxMempoolCmd TxMempoolQueryInfo -> pure LocalTxMonitoringMempoolInformation result <- liftIO $ queryTxMonitoringLocal nodeConnInfo localQuery - firstExceptT QueryCmdWriteFileError . newExceptT $ - writeLazyByteStringOutput mOutFile $ - Aeson.encodePretty result + + let output = + outputFormat + & ( id + . Vary.on (\FormatJson -> Json.encodeJson) + . Vary.on (\FormatYaml -> Json.encodeYaml) + $ Vary.exhaustiveCase + ) + $ result + + firstExceptT QueryCmdWriteFileError + . newExceptT + $ writeLazyByteStringOutput mOutFile output runQuerySlotNumberCmd :: () @@ -711,7 +741,7 @@ runQueryRefScriptSizeCmd , Cmd.target } , Cmd.transactionInputs - , Cmd.format + , Cmd.outputFormat , Cmd.mOutFile } = do join $ @@ -728,7 +758,7 @@ runQueryRefScriptSizeCmd utxo <- easyRunQuery (queryUtxo sbe $ QueryUTxOByTxIn transactionInputs) pure $ - writeFormattedOutput format mOutFile $ + writeFormattedOutput outputFormat mOutFile $ RefInputScriptSize $ getReferenceInputsSizeForTxIds beo (toLedgerUTxO sbe utxo) transactionInputs ) @@ -757,6 +787,7 @@ runQueryStakeSnapshotCmd , Cmd.target } , Cmd.allOrOnlyPoolIds + , Cmd.outputFormat , Cmd.mOutFile } = do join $ @@ -776,7 +807,7 @@ runQueryStakeSnapshotCmd result <- easyRunQuery (queryStakeSnapshot beo poolFilter) - pure $ shelleyBasedEraConstraints sbe (writeStakeSnapshots mOutFile) result + pure $ shelleyBasedEraConstraints sbe (writeStakeSnapshots outputFormat mOutFile) result ) & onLeft (left . QueryCmdAcquireFailure) & onLeft left @@ -796,11 +827,7 @@ runQueryLedgerStateCmd , Cmd.mOutFile } ) = do - writeOutputContents <- case mOutFile of - Nothing -> pure LBS.putStr - Just (File fpath) -> pure $ LBS.writeFile fpath - - contents <- + output <- join $ lift ( executeLocalStateQueryExpr nodeConnInfo target $ runExceptT $ do @@ -824,7 +851,9 @@ runQueryLedgerStateCmd & onLeft (left . QueryCmdAcquireFailure) & onLeft left - liftIO $ writeOutputContents contents + firstExceptT QueryCmdWriteFileError + . newExceptT + $ writeLazyByteStringOutput mOutFile output ledgerStateAsJsonByteString :: IsShelleyBasedEra era @@ -883,7 +912,7 @@ runQueryLedgerPeerSnapshot Left (bs :: LBS.ByteString) -> do firstExceptT QueryCmdHelpersError $ pPrintCBOR bs Right (snapshot :: LedgerPeerSnapshot) -> do - let outputContents = + let output = outputFormat & ( id . Vary.on (\FormatJson -> Json.encodeJson) @@ -892,12 +921,9 @@ runQueryLedgerPeerSnapshot ) $ snapshot - let writeOutputContents = - case mOutFile of - Nothing -> liftIO . LBS.putStrLn - Just (File outFile) -> liftIO . LBS.writeFile outFile - - writeOutputContents outputContents + firstExceptT QueryCmdWriteFileError + . newExceptT + $ writeLazyByteStringOutput mOutFile output runQueryProtocolStateCmd :: () @@ -942,6 +968,7 @@ runQueryStakeAddressInfoCmd { Cmd.nodeConnInfo , Cmd.target } + , Cmd.outputFormat , Cmd.mOutFile } = do AnyCardanoEra era <- @@ -953,7 +980,7 @@ runQueryStakeAddressInfoCmd said <- callQueryStakeAddressInfoCmd cmd - writeStakeAddressInfo sbe said mOutFile + writeStakeAddressInfo sbe said outputFormat mOutFile -- | Container for data returned by 'callQueryStakeAddressInfoCmd' where: data StakeAddressInfoData = StakeAddressInfoData @@ -1035,6 +1062,7 @@ callQueryStakeAddressInfoCmd writeStakeAddressInfo :: ShelleyBasedEra era -> StakeAddressInfoData + -> Vary [FormatJson, FormatYaml] -> Maybe (File () Out) -> ExceptT QueryCmdError IO () writeStakeAddressInfo @@ -1046,9 +1074,20 @@ writeStakeAddressInfo , delegatees = voteDelegatees } ) - mOutFile = - firstExceptT QueryCmdWriteFileError . newExceptT $ - writeLazyByteStringOutput mOutFile (Aeson.encodePretty $ jsonInfo sbe) + outputFormat + mOutFile = do + let output = + outputFormat + & ( id + . Vary.on (\FormatJson -> Json.encodeJson) + . Vary.on (\FormatYaml -> Json.encodeYaml) + $ Vary.exhaustiveCase + ) + $ jsonInfo sbe + + firstExceptT QueryCmdWriteFileError + . newExceptT + $ writeLazyByteStringOutput mOutFile output where jsonInfo :: ShelleyBasedEra era -> [Aeson.Value] jsonInfo = @@ -1106,16 +1145,27 @@ writeStakeAddressInfo writeStakeSnapshots :: forall era - . Maybe (File () Out) + . Vary [FormatJson, FormatYaml] + -> Maybe (File () Out) -> SerialisedStakeSnapshots era -> ExceptT QueryCmdError IO () -writeStakeSnapshots mOutFile qState = do +writeStakeSnapshots outputFormat mOutFile qState = do StakeSnapshot snapshot <- pure (decodeStakeSnapshot qState) & onLeft (left . QueryCmdStakeSnapshotDecodeError) - -- Calculate the three pool and active stake values for the given pool - liftIO . maybe LBS.putStrLn (LBS.writeFile . unFile) mOutFile $ Aeson.encodePretty snapshot + let output = + outputFormat + & ( id + . Vary.on (\FormatJson -> Json.encodeJson) + . Vary.on (\FormatYaml -> Json.encodeYaml) + $ Vary.exhaustiveCase + ) + $ snapshot + + firstExceptT QueryCmdWriteFileError + . newExceptT + $ writeLazyByteStringOutput mOutFile output -- | This function obtains the pool parameters, equivalent to the following jq query on the output of query ledger-state -- .nesEs.esLState.lsDPState.dpsPState.psStakePoolParams. @@ -1124,10 +1174,11 @@ writePoolState . () => ShelleyLedgerEra era ~ ledgerera => L.Era ledgerera - => Maybe (File () Out) + => Vary [FormatJson, FormatYaml] + -> Maybe (File () Out) -> SerialisedPoolState era -> ExceptT QueryCmdError IO () -writePoolState mOutFile serialisedCurrentEpochState = do +writePoolState outputFormat mOutFile serialisedCurrentEpochState = do PoolState poolState <- pure (decodePoolState serialisedCurrentEpochState) & onLeft (left . QueryCmdPoolStateDecodeError) @@ -1153,9 +1204,18 @@ writePoolState mOutFile serialisedCurrentEpochState = do ) ) - firstExceptT QueryCmdWriteFileError . newExceptT $ - writeLazyByteStringOutput mOutFile $ - Aeson.encodePretty poolStates + let output = + outputFormat + & ( id + . Vary.on (\FormatJson -> Json.encodeJson) + . Vary.on (\FormatYaml -> Json.encodeYaml) + $ Vary.exhaustiveCase + ) + $ poolStates + + firstExceptT QueryCmdWriteFileError + . newExceptT + $ writeLazyByteStringOutput mOutFile output writeProtocolState :: ShelleyBasedEra era @@ -1204,18 +1264,20 @@ writeFilteredUTxOs -> Maybe (File () Out) -> UTxO era -> ExceptT QueryCmdError IO () -writeFilteredUTxOs sbe format mOutFile utxo = - shelleyBasedEraConstraints sbe - $ firstExceptT QueryCmdWriteFileError - . newExceptT - . writeLazyByteStringOutput mOutFile - $ format - & ( id - . Vary.on (\FormatCbor -> Base16.encode . CBOR.serialize $ toLedgerUTxO sbe utxo) - . Vary.on (\FormatJson -> Json.encodeJson utxo) - . Vary.on (\FormatText -> strictTextToLazyBytestring $ filteredUTxOsToText sbe utxo) - $ Vary.exhaustiveCase - ) +writeFilteredUTxOs sbe format mOutFile utxo = do + let output = + shelleyBasedEraConstraints sbe $ + format + & ( id + . Vary.on (\FormatCbor -> Base16.encode . CBOR.serialize $ toLedgerUTxO sbe utxo) + . Vary.on (\FormatJson -> Json.encodeJson utxo) + . Vary.on (\FormatText -> strictTextToLazyBytestring $ filteredUTxOsToText sbe utxo) + $ Vary.exhaustiveCase + ) + + firstExceptT QueryCmdWriteFileError + . newExceptT + $ writeLazyByteStringOutput mOutFile output filteredUTxOsToText :: Api.ShelleyBasedEra era -> UTxO era -> Text filteredUTxOsToText sbe (UTxO utxo) = do @@ -1311,7 +1373,7 @@ runQueryStakePoolsCmd { Cmd.nodeConnInfo , Cmd.target } - , Cmd.format + , Cmd.outputFormat , Cmd.mOutFile } = do join $ @@ -1325,7 +1387,7 @@ runQueryStakePoolsCmd poolIds <- easyRunQuery (queryStakePools sbe) - pure $ writeStakePools format mOutFile poolIds + pure $ writeStakePools outputFormat mOutFile poolIds ) & onLeft (left . QueryCmdAcquireFailure) & onLeft left @@ -1336,17 +1398,19 @@ writeStakePools -> Maybe (File () Out) -> Set PoolId -> ExceptT QueryCmdError IO () -writeStakePools format mOutFile stakePools = - firstExceptT QueryCmdWriteFileError . newExceptT $ - writeLazyByteStringOutput mOutFile toWrite +writeStakePools format mOutFile stakePools = do + let output = + format + & ( id + . Vary.on (\FormatJson -> writeJson) + . Vary.on (\FormatText -> writeText) + $ Vary.exhaustiveCase + ) + + firstExceptT QueryCmdWriteFileError + . newExceptT + $ writeLazyByteStringOutput mOutFile output where - toWrite :: LBS.ByteString = - format - & ( id - . Vary.on (\FormatJson -> writeJson) - . Vary.on (\FormatText -> writeText) - $ Vary.exhaustiveCase - ) writeJson = Aeson.encodePretty stakePools writeText = @@ -1362,17 +1426,18 @@ writeFormattedOutput -> Maybe (File b Out) -> a -> t m () -writeFormattedOutput format mOutFile value = - modifyError QueryCmdWriteFileError . hoistIOEither $ - writeLazyByteStringOutput mOutFile toWrite - where - toWrite :: LBS.ByteString = - format - & ( id - . Vary.on (\FormatJson -> Json.encodeJson value) - . Vary.on (\FormatText -> fromString . docToString $ pretty value) - $ Vary.exhaustiveCase - ) +writeFormattedOutput format mOutFile value = do + let output = + format + & ( id + . Vary.on (\FormatJson -> Json.encodeJson value) + . Vary.on (\FormatText -> fromString . docToString $ pretty value) + $ Vary.exhaustiveCase + ) + + modifyError QueryCmdWriteFileError + . hoistIOEither + $ writeLazyByteStringOutput mOutFile output runQueryStakeDistributionCmd :: () @@ -1385,7 +1450,7 @@ runQueryStakeDistributionCmd { Cmd.nodeConnInfo , Cmd.target } - , Cmd.format + , Cmd.outputFormat , Cmd.mOutFile } = do join $ @@ -1400,7 +1465,7 @@ runQueryStakeDistributionCmd result <- easyRunQuery (queryStakeDistribution sbe) pure $ do - writeStakeDistribution format mOutFile result + writeStakeDistribution outputFormat mOutFile result ) & onLeft (left . QueryCmdAcquireFailure) & onLeft left @@ -1410,17 +1475,19 @@ writeStakeDistribution -> Maybe (File () Out) -> Map PoolId Rational -> ExceptT QueryCmdError IO () -writeStakeDistribution format mOutFile stakeDistrib = - firstExceptT QueryCmdWriteFileError . newExceptT $ - writeLazyByteStringOutput mOutFile toWrite +writeStakeDistribution format mOutFile stakeDistrib = do + let output = + format + & ( id + . Vary.on (\FormatJson -> Json.encodeJson stakeDistrib) + . Vary.on (\FormatText -> strictTextToLazyBytestring stakeDistributionText) + $ Vary.exhaustiveCase + ) + + firstExceptT QueryCmdWriteFileError + . newExceptT + $ writeLazyByteStringOutput mOutFile output where - toWrite :: LBS.ByteString = - format - & ( id - . Vary.on (\FormatJson -> Json.encodeJson stakeDistrib) - . Vary.on (\FormatText -> strictTextToLazyBytestring stakeDistributionText) - $ Vary.exhaustiveCase - ) stakeDistributionText = Text.unlines $ [ title @@ -1453,7 +1520,7 @@ runQueryLeadershipScheduleCmd , Cmd.poolColdVerKeyFile , Cmd.vrkSkeyFp , Cmd.whichSchedule - , Cmd.format + , Cmd.outputFormat , Cmd.mOutFile } = do poolid <- getHashFromStakePoolKeyHashSource poolColdVerKeyFile @@ -1533,19 +1600,20 @@ runQueryLeadershipScheduleCmd & onLeft (left . QueryCmdAcquireFailure) & onLeft left where - writeSchedule mOutFile' eInfo shelleyGenesis schedule = - firstExceptT QueryCmdWriteFileError . newExceptT $ - writeLazyByteStringOutput mOutFile' toWrite - where - start = SystemStart $ sgSystemStart shelleyGenesis - toWrite = - format - & ( id - . Vary.on (\FormatJson -> Json.encodeJson $ leadershipScheduleToJson schedule eInfo start) - . Vary.on (\FormatText -> strictTextToLazyBytestring $ leadershipScheduleToText schedule eInfo start) - . Vary.on (\FormatYaml -> Json.encodeYaml $ leadershipScheduleToJson schedule eInfo start) - $ Vary.exhaustiveCase - ) + writeSchedule mOutFile' eInfo shelleyGenesis schedule = do + let start = SystemStart $ sgSystemStart shelleyGenesis + output = + outputFormat + & ( id + . Vary.on (\FormatJson -> Json.encodeJson $ leadershipScheduleToJson schedule eInfo start) + . Vary.on (\FormatText -> strictTextToLazyBytestring $ leadershipScheduleToText schedule eInfo start) + . Vary.on (\FormatYaml -> Json.encodeYaml $ leadershipScheduleToJson schedule eInfo start) + $ Vary.exhaustiveCase + ) + + firstExceptT QueryCmdWriteFileError + . newExceptT + $ writeLazyByteStringOutput mOutFile' output leadershipScheduleToText :: Set SlotNo @@ -1754,6 +1822,7 @@ runQuerySPOStakeDistribution , Cmd.target } , Cmd.spoHashSources = spoHashSources' + , Cmd.outputFormat , Cmd.mOutFile } = conwayEraOnwardsConstraints eon $ do let spoFromSource = firstExceptT QueryCmdSPOKeyError . readSPOCredential @@ -1791,6 +1860,7 @@ runQuerySPOStakeDistribution Cmd.QueryStakeAddressInfoCmdArgs { Cmd.commons = commons , addr + , outputFormat , mOutFile -- unused anyway. TODO tighten this by removing the field. } @@ -1863,14 +1933,12 @@ runQueryTreasuryValue } = conwayEraOnwardsConstraints eon $ do L.AccountState (L.Coin treasury) _reserves <- runQuery nodeConnInfo target $ queryAccountState eon - let treasuryString = show treasury - case mOutFile of - Nothing -> - liftIO $ putStrLn treasuryString - Just outFile -> - firstExceptT QueryCmdWriteFileError . ExceptT $ - writeLazyByteStringFile outFile $ - LBS.pack treasuryString + + let output = LBS.pack $ show treasury + + firstExceptT QueryCmdWriteFileError + . newExceptT + $ writeLazyByteStringOutput mOutFile output runQueryProposals :: Cmd.QueryProposalsCmdArgs era @@ -1912,13 +1980,13 @@ runQueryEraHistoryCmd lift queryEraHistory & onLeft (left . QueryCmdUnsupportedNtcVersion) ) & onLeft (left . QueryCmdAcquireFailure) - & onLeft - left - firstExceptT - QueryCmdWriteFileError + & onLeft left + + let output = textEnvelopeToJSON Nothing eraHistory + + firstExceptT QueryCmdWriteFileError . newExceptT - $ writeLazyByteStringOutput mOutFile - $ textEnvelopeToJSON Nothing eraHistory + $ writeLazyByteStringOutput mOutFile output runQueryStakePoolDefaultVote :: Cmd.QueryStakePoolDefaultVoteCmdArgs era @@ -1932,6 +2000,7 @@ runQueryStakePoolDefaultVote , Cmd.target } , Cmd.spoHashSources + , Cmd.outputFormat , Cmd.mOutFile } = conwayEraOnwardsConstraints eon $ do let spoFromSource = firstExceptT QueryCmdSPOKeyError . readSPOCredential @@ -1940,13 +2009,18 @@ runQueryStakePoolDefaultVote defVote :: L.DefaultVote <- runQuery nodeConnInfo target $ queryStakePoolDefaultVote eon spo - let defVoteJson = Aeson.encode defVote - case mOutFile of - Nothing -> - liftIO . putStrLn . C8.unpack $ LBS.toStrict defVoteJson - Just outFile -> - firstExceptT QueryCmdWriteFileError . ExceptT $ - writeLazyByteStringFile outFile defVoteJson + let output = + outputFormat + & ( id + . Vary.on (\FormatJson -> Json.encodeJson) + . Vary.on (\FormatYaml -> Json.encodeYaml) + $ Vary.exhaustiveCase + ) + $ defVote + + firstExceptT QueryCmdWriteFileError + . newExceptT + $ writeLazyByteStringOutput mOutFile output runQuery :: LocalNodeConnectInfo diff --git a/cardano-cli/src/Cardano/CLI/EraBased/StakePool/Run.hs b/cardano-cli/src/Cardano/CLI/EraBased/StakePool/Run.hs index 123ef85e2a..38e1e96f2c 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/StakePool/Run.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/StakePool/Run.hs @@ -34,7 +34,9 @@ import Cardano.CLI.Type.Error.StakePoolCmdError import Cardano.CLI.Type.Key (readVerificationKeyOrFile) import Data.ByteString.Char8 qualified as BS +import Data.ByteString.Lazy qualified as LBS import Data.Function ((&)) +import Data.Text.Encoding qualified as Text import Vary qualified runStakePoolCmds @@ -191,24 +193,19 @@ runStakePoolIdCmd } = do stakePoolVerKey <- getVerificationKeyFromStakePoolVerificationKeySource poolVerificationKeyOrFile let stakePoolKeyHash = anyStakePoolVerificationKeyHash stakePoolVerKey - outputFormat - & ( id - . Vary.on - ( \FormatBech32 -> - firstExceptT StakePoolCmdWriteFileError - . newExceptT - $ writeTextOutput mOutFile - $ serialiseToBech32 stakePoolKeyHash - ) - . Vary.on - ( \FormatHex -> - firstExceptT StakePoolCmdWriteFileError - . newExceptT - $ writeByteStringOutput mOutFile - $ serialiseToRawBytesHex stakePoolKeyHash + + let output = + outputFormat + & ( id + . Vary.on (\FormatBech32 -> Text.encodeUtf8 . serialiseToBech32) + . Vary.on (\FormatHex -> serialiseToRawBytesHex) + $ Vary.exhaustiveCase ) - $ Vary.exhaustiveCase - ) + $ stakePoolKeyHash + + firstExceptT StakePoolCmdWriteFileError + . newExceptT + $ writeByteStringOutput mOutFile output runStakePoolMetadataHashCmd :: () @@ -242,12 +239,12 @@ runStakePoolMetadataHashCmd Cmd.HashToStdout -> writeOutput Nothing metadataHash where writeOutput :: Maybe (File () Out) -> Hash StakePoolMetadata -> ExceptT StakePoolCmdError IO () - writeOutput mOutFile metadataHash = - case mOutFile of - Nothing -> liftIO $ BS.putStrLn (serialiseToRawBytesHex metadataHash) - Just (File fpath) -> - handleIOExceptT (StakePoolCmdWriteFileError . FileIOError fpath) $ - BS.writeFile fpath (serialiseToRawBytesHex metadataHash) + writeOutput mOutFile metadataHash = do + let output = LBS.fromStrict $ serialiseToRawBytesHex metadataHash + + firstExceptT StakePoolCmdWriteFileError + . newExceptT + $ writeLazyByteStringOutput mOutFile output fetchURLToStakePoolCmdError :: ExceptT FetchURLError IO BS.ByteString -> ExceptT StakePoolCmdError IO BS.ByteString diff --git a/cardano-cli/src/Cardano/CLI/EraBased/TextView/Run.hs b/cardano-cli/src/Cardano/CLI/EraBased/TextView/Run.hs index f412397861..20e6f0b30d 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/TextView/Run.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/TextView/Run.hs @@ -20,7 +20,6 @@ import Cardano.CLI.Type.Error.TextViewFileError import Data.ByteString.Lazy.Char8 qualified as LBS import Data.Function ((&)) import Data.Text.Encoding qualified as Text -import System.IO qualified as IO import Vary qualified runTextViewCmds :: TextViewCmds era -> ExceptT TextViewFileError IO () @@ -40,7 +39,7 @@ runTextViewInfoCmd tv <- firstExceptT TextViewReadFileError $ newExceptT (readTextEnvelopeFromFile inputFile) let lbCBOR = LBS.fromStrict (textEnvelopeRawCBOR tv) - outputContent <- + output <- outputFormat & ( id . Vary.on (\FormatCbor -> pure lbCBOR) @@ -49,6 +48,6 @@ runTextViewInfoCmd ) & firstExceptT TextViewCBORPrettyPrintError - let writeOutput = maybe (LBS.hPut IO.stdout) (LBS.writeFile . unFile) mOutFile - - liftIO $ writeOutput outputContent + firstExceptT TextViewWriteFileError + . newExceptT + $ writeLazyByteStringOutput mOutFile output diff --git a/cardano-cli/src/Cardano/CLI/EraIndependent/Node/Run.hs b/cardano-cli/src/Cardano/CLI/EraIndependent/Node/Run.hs index 0a19eac3f7..65ffd3d923 100644 --- a/cardano-cli/src/Cardano/CLI/EraIndependent/Node/Run.hs +++ b/cardano-cli/src/Cardano/CLI/EraIndependent/Node/Run.hs @@ -25,7 +25,6 @@ import Cardano.CLI.Type.Common import Cardano.CLI.Type.Error.NodeCmdError import Cardano.CLI.Type.Key -import Data.ByteString.Char8 qualified as BS import Data.Function ((&)) import Data.String (fromString) import Data.Word (Word64) @@ -248,9 +247,9 @@ runNodeKeyHashVrfCmd let hexKeyHash = serialiseToRawBytesHex (verificationKeyHash vkey) - case mOutFile of - Just fpath -> liftIO $ BS.writeFile (unFile fpath) hexKeyHash - Nothing -> liftIO $ BS.putStrLn hexKeyHash + firstExceptT NodeCmdWriteFileError + . newExceptT + $ writeByteStringOutput mOutFile hexKeyHash runNodeNewCounterCmd :: () diff --git a/cardano-cli/src/Cardano/CLI/Type/Error/TextViewFileError.hs b/cardano-cli/src/Cardano/CLI/Type/Error/TextViewFileError.hs index 8da8c284c5..cde78c32b5 100644 --- a/cardano-cli/src/Cardano/CLI/Type/Error/TextViewFileError.hs +++ b/cardano-cli/src/Cardano/CLI/Type/Error/TextViewFileError.hs @@ -13,6 +13,7 @@ import Cardano.CLI.Helper (HelpersError, renderHelpersError) data TextViewFileError = TextViewReadFileError (FileError TextEnvelopeError) + | TextViewWriteFileError (FileError TextEnvelopeError) | TextViewCBORPrettyPrintError !HelpersError deriving Show @@ -20,5 +21,7 @@ renderTextViewFileError :: TextViewFileError -> Doc ann renderTextViewFileError = \case TextViewReadFileError fileErr -> prettyError fileErr + TextViewWriteFileError fileErr -> + prettyError fileErr TextViewCBORPrettyPrintError hlprsErr -> "Error pretty printing CBOR: " <> renderHelpersError hlprsErr diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help.cli index 2921764395..e917bc46a3 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help.cli @@ -294,6 +294,7 @@ Usage: cardano-cli query protocol-parameters | --testnet-magic NATURAL ) --socket-path SOCKET_PATH + [--output-json | --output-yaml] [--out-file FILEPATH] Get the node's current protocol parameters @@ -302,6 +303,7 @@ Usage: cardano-cli query tip [--cardano-mode [--epoch-slots SLOTS]] (--mainnet | --testnet-magic NATURAL) --socket-path SOCKET_PATH [--volatile-tip | --immutable-tip] + [--output-json | --output-yaml] [--out-file FILEPATH] Get the node's current tip (slot no, hash, block no) @@ -337,6 +339,7 @@ Usage: cardano-cli query stake-address-info --socket-path SOCKET_PATH [--volatile-tip | --immutable-tip] --address ADDRESS + [--output-json | --output-yaml] [--out-file FILEPATH] Get the current delegations and reward accounts filtered by stake address. @@ -393,6 +396,7 @@ Usage: cardano-cli query stake-snapshot [--cardano-mode [--epoch-slots SLOTS]] ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--output-json | --output-yaml] [--out-file FILEPATH] Obtain the three stake snapshots for a pool, plus the total active stake @@ -405,6 +409,7 @@ Usage: cardano-cli query pool-params [--cardano-mode [--epoch-slots SLOTS]] ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--output-json | --output-yaml] [--out-file FILEPATH] DEPRECATED. Use query pool-state instead. Dump the pool parameters @@ -442,6 +447,7 @@ Usage: cardano-cli query kes-period-info [--cardano-mode [--epoch-slots SLOTS]] --socket-path SOCKET_PATH [--volatile-tip | --immutable-tip] --op-cert-file FILEPATH + [--output-json | --output-yaml] [--out-file FILEPATH] Get information about the current KES period and your node's operational @@ -454,6 +460,7 @@ Usage: cardano-cli query pool-state [--cardano-mode [--epoch-slots SLOTS]] ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--output-json | --output-yaml] [--out-file FILEPATH] Dump the pool state @@ -462,6 +469,7 @@ Usage: cardano-cli query tx-mempool [--cardano-mode [--epoch-slots SLOTS]] (--mainnet | --testnet-magic NATURAL) --socket-path SOCKET_PATH (info | next-tx | tx-exists) + [--output-json | --output-yaml] [--out-file FILEPATH] Local Mempool info @@ -1762,8 +1770,8 @@ Usage: cardano-cli conway governance vote create (--yes | --no | --abstain) Vote creation. -Usage: cardano-cli conway governance vote view [--output-json | --output-yaml] - --vote-file FILEPATH +Usage: cardano-cli conway governance vote view --vote-file FILEPATH + [--output-json | --output-yaml] [--out-file FILEPATH] Vote viewing. @@ -2012,6 +2020,9 @@ Usage: cardano-cli conway query kes-period-info | --immutable-tip ] --op-cert-file FILEPATH + [ --output-json + | --output-yaml + ] [--out-file FILEPATH] Get information about the current KES period and your node's operational @@ -2088,6 +2099,7 @@ Usage: cardano-cli conway query pool-params ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--output-json | --output-yaml] [--out-file FILEPATH] DEPRECATED. Use query pool-state instead. Dump the pool parameters @@ -2105,6 +2117,7 @@ Usage: cardano-cli conway query pool-state ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--output-json | --output-yaml] [--out-file FILEPATH] Dump the pool state @@ -2132,6 +2145,9 @@ Usage: cardano-cli conway query protocol-parameters | --testnet-magic NATURAL ) --socket-path SOCKET_PATH + [ --output-json + | --output-yaml + ] [--out-file FILEPATH] Get the node's current protocol parameters @@ -2213,6 +2229,9 @@ Usage: cardano-cli conway query spo-stake-distribution | --spo-key-hash HASH ) ) + [ --output-json + | --output-yaml + ] [--out-file FILEPATH] Get the SPO stake distribution. @@ -2228,6 +2247,9 @@ Usage: cardano-cli conway query stake-address-info | --immutable-tip ] --address ADDRESS + [ --output-json + | --output-yaml + ] [--out-file FILEPATH] Get the current delegations and reward accounts filtered by stake address. @@ -2276,6 +2298,9 @@ Usage: cardano-cli conway query stake-pool-default-vote | --spo-verification-key-file FILEPATH | --spo-key-hash HASH ) + [ --output-json + | --output-yaml + ] [--out-file FILEPATH] Get the stake pool default vote. @@ -2293,6 +2318,7 @@ Usage: cardano-cli conway query stake-snapshot ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--output-json | --output-yaml] [--out-file FILEPATH] Obtain the three stake snapshots for a pool, plus the total active stake @@ -2302,6 +2328,7 @@ Usage: cardano-cli conway query tip [--cardano-mode [--epoch-slots SLOTS]] (--mainnet | --testnet-magic NATURAL) --socket-path SOCKET_PATH [--volatile-tip | --immutable-tip] + [--output-json | --output-yaml] [--out-file FILEPATH] Get the node's current tip (slot no, hash, block no) @@ -2322,6 +2349,7 @@ Usage: cardano-cli conway query tx-mempool ) --socket-path SOCKET_PATH (info | next-tx | tx-exists) + [--output-json | --output-yaml] [--out-file FILEPATH] Local Mempool info @@ -4003,8 +4031,8 @@ Usage: cardano-cli latest governance vote create (--yes | --no | --abstain) Vote creation. -Usage: cardano-cli latest governance vote view [--output-json | --output-yaml] - --vote-file FILEPATH +Usage: cardano-cli latest governance vote view --vote-file FILEPATH + [--output-json | --output-yaml] [--out-file FILEPATH] Vote viewing. @@ -4253,6 +4281,9 @@ Usage: cardano-cli latest query kes-period-info | --immutable-tip ] --op-cert-file FILEPATH + [ --output-json + | --output-yaml + ] [--out-file FILEPATH] Get information about the current KES period and your node's operational @@ -4329,6 +4360,7 @@ Usage: cardano-cli latest query pool-params ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--output-json | --output-yaml] [--out-file FILEPATH] DEPRECATED. Use query pool-state instead. Dump the pool parameters @@ -4346,6 +4378,7 @@ Usage: cardano-cli latest query pool-state ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--output-json | --output-yaml] [--out-file FILEPATH] Dump the pool state @@ -4373,6 +4406,9 @@ Usage: cardano-cli latest query protocol-parameters | --testnet-magic NATURAL ) --socket-path SOCKET_PATH + [ --output-json + | --output-yaml + ] [--out-file FILEPATH] Get the node's current protocol parameters @@ -4454,6 +4490,9 @@ Usage: cardano-cli latest query spo-stake-distribution | --spo-key-hash HASH ) ) + [ --output-json + | --output-yaml + ] [--out-file FILEPATH] Get the SPO stake distribution. @@ -4469,6 +4508,9 @@ Usage: cardano-cli latest query stake-address-info | --immutable-tip ] --address ADDRESS + [ --output-json + | --output-yaml + ] [--out-file FILEPATH] Get the current delegations and reward accounts filtered by stake address. @@ -4517,6 +4559,9 @@ Usage: cardano-cli latest query stake-pool-default-vote | --spo-verification-key-file FILEPATH | --spo-key-hash HASH ) + [ --output-json + | --output-yaml + ] [--out-file FILEPATH] Get the stake pool default vote. @@ -4534,6 +4579,7 @@ Usage: cardano-cli latest query stake-snapshot ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--output-json | --output-yaml] [--out-file FILEPATH] Obtain the three stake snapshots for a pool, plus the total active stake @@ -4543,6 +4589,7 @@ Usage: cardano-cli latest query tip [--cardano-mode [--epoch-slots SLOTS]] (--mainnet | --testnet-magic NATURAL) --socket-path SOCKET_PATH [--volatile-tip | --immutable-tip] + [--output-json | --output-yaml] [--out-file FILEPATH] Get the node's current tip (slot no, hash, block no) @@ -4563,6 +4610,7 @@ Usage: cardano-cli latest query tx-mempool ) --socket-path SOCKET_PATH (info | next-tx | tx-exists) + [--output-json | --output-yaml] [--out-file FILEPATH] Local Mempool info @@ -7275,11 +7323,10 @@ Usage: cardano-cli compatible conway governance vote create Vote creation. -Usage: cardano-cli compatible conway governance vote view +Usage: cardano-cli compatible conway governance vote view --vote-file FILEPATH [ --output-json | --output-yaml ] - --vote-file FILEPATH [--out-file FILEPATH] Vote viewing. diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/compatible_conway_governance_vote_view.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/compatible_conway_governance_vote_view.cli index 436128008d..12416c6df2 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/compatible_conway_governance_vote_view.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/compatible_conway_governance_vote_view.cli @@ -1,15 +1,14 @@ -Usage: cardano-cli compatible conway governance vote view +Usage: cardano-cli compatible conway governance vote view --vote-file FILEPATH [ --output-json | --output-yaml ] - --vote-file FILEPATH [--out-file FILEPATH] Vote viewing. Available options: + --vote-file FILEPATH Input filepath of the vote. --output-json Format governance vote view output to JSON (default). --output-yaml Format governance vote view output to YAML. - --vote-file FILEPATH Input filepath of the vote. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_vote_view.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_vote_view.cli index cba261d153..f34ae1bfcb 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_vote_view.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_vote_view.cli @@ -1,12 +1,12 @@ -Usage: cardano-cli conway governance vote view [--output-json | --output-yaml] - --vote-file FILEPATH +Usage: cardano-cli conway governance vote view --vote-file FILEPATH + [--output-json | --output-yaml] [--out-file FILEPATH] Vote viewing. Available options: + --vote-file FILEPATH Input filepath of the vote. --output-json Format governance vote view output to JSON (default). --output-yaml Format governance vote view output to YAML. - --vote-file FILEPATH Input filepath of the vote. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_kes-period-info.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_kes-period-info.cli index bf304a07a3..c60311230d 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_kes-period-info.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_kes-period-info.cli @@ -9,6 +9,9 @@ Usage: cardano-cli conway query kes-period-info | --immutable-tip ] --op-cert-file FILEPATH + [ --output-json + | --output-yaml + ] [--out-file FILEPATH] Get information about the current KES period and your node's operational @@ -32,5 +35,8 @@ Available options: default) --immutable-tip Use the immutable tip as a target. --op-cert-file FILEPATH Filepath of the node's operational certificate. + --output-json Format kes-period-info query output to JSON + (default). + --output-yaml Format kes-period-info query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_ledger-peer-snapshot.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_ledger-peer-snapshot.cli index 0c5923131b..30eb62086a 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_ledger-peer-snapshot.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_ledger-peer-snapshot.cli @@ -33,7 +33,8 @@ Available options: --volatile-tip Use the volatile tip as a target. (This is the default) --immutable-tip Use the immutable tip as a target. - --output-json Format ledger-peer-snapshot output to JSON (default). - --output-yaml Format ledger-peer-snapshot output to YAML. + --output-json Format ledger-peer-snapshot query output to JSON + (default). + --output-yaml Format ledger-peer-snapshot query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_pool-params.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_pool-params.cli index 0cf0553601..d82269e844 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_pool-params.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_pool-params.cli @@ -9,6 +9,7 @@ Usage: cardano-cli conway query pool-params ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--output-json | --output-yaml] [--out-file FILEPATH] DEPRECATED. Use query pool-state instead. Dump the pool parameters @@ -36,5 +37,7 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --output-json Format pool-state query output to JSON (default). + --output-yaml Format pool-state query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_pool-state.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_pool-state.cli index 5891c85be6..8704a4cabf 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_pool-state.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_pool-state.cli @@ -9,6 +9,7 @@ Usage: cardano-cli conway query pool-state ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--output-json | --output-yaml] [--out-file FILEPATH] Dump the pool state @@ -34,5 +35,7 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --output-json Format pool-state query output to JSON (default). + --output-yaml Format pool-state query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_protocol-parameters.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_protocol-parameters.cli index 540ad0a5f5..9a2ee846f5 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_protocol-parameters.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_protocol-parameters.cli @@ -5,6 +5,9 @@ Usage: cardano-cli conway query protocol-parameters | --testnet-magic NATURAL ) --socket-path SOCKET_PATH + [ --output-json + | --output-yaml + ] [--out-file FILEPATH] Get the node's current protocol parameters @@ -23,5 +26,8 @@ Available options: CARDANO_NODE_SOCKET_PATH environment variable. The argument is optional if CARDANO_NODE_SOCKET_PATH is defined and mandatory otherwise. + --output-json Format protocol-parameters query output to JSON + (default). + --output-yaml Format protocol-parameters query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_spo-stake-distribution.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_spo-stake-distribution.cli index 54a3d37ac2..ce33205840 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_spo-stake-distribution.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_spo-stake-distribution.cli @@ -15,6 +15,9 @@ Usage: cardano-cli conway query spo-stake-distribution | --spo-key-hash HASH ) ) + [ --output-json + | --output-yaml + ] [--out-file FILEPATH] Get the SPO stake distribution. @@ -43,5 +46,8 @@ Available options: Filepath of the SPO verification key. --spo-key-hash HASH SPO verification key hash (either Bech32-encoded or hex-encoded). + --output-json Format spo-stake-distribution query output to JSON + (default). + --output-yaml Format spo-stake-distribution query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_stake-address-info.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_stake-address-info.cli index 4074c309b5..1d786075e9 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_stake-address-info.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_stake-address-info.cli @@ -9,6 +9,9 @@ Usage: cardano-cli conway query stake-address-info | --immutable-tip ] --address ADDRESS + [ --output-json + | --output-yaml + ] [--out-file FILEPATH] Get the current delegations and reward accounts filtered by stake address. @@ -31,5 +34,8 @@ Available options: default) --immutable-tip Use the immutable tip as a target. --address ADDRESS Filter by Cardano stake address (Bech32-encoded). + --output-json Format stake-address-info query output to JSON + (default). + --output-yaml Format stake-address-info query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_stake-pool-default-vote.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_stake-pool-default-vote.cli index 2290bc7327..994c8eb83a 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_stake-pool-default-vote.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_stake-pool-default-vote.cli @@ -12,6 +12,9 @@ Usage: cardano-cli conway query stake-pool-default-vote | --spo-verification-key-file FILEPATH | --spo-key-hash HASH ) + [ --output-json + | --output-yaml + ] [--out-file FILEPATH] Get the stake pool default vote. @@ -39,5 +42,8 @@ Available options: Filepath of the SPO verification key. --spo-key-hash HASH SPO verification key hash (either Bech32-encoded or hex-encoded). + --output-json Format stake-pool-default-vote query output to JSON + (default). + --output-yaml Format stake-pool-default-vote query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_stake-snapshot.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_stake-snapshot.cli index e1f64b25b0..84b9c45e7c 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_stake-snapshot.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_stake-snapshot.cli @@ -11,6 +11,7 @@ Usage: cardano-cli conway query stake-snapshot ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--output-json | --output-yaml] [--out-file FILEPATH] Obtain the three stake snapshots for a pool, plus the total active stake @@ -37,5 +38,7 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --output-json Format stake-snapshot query output to JSON (default). + --output-yaml Format stake-snapshot query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_tip.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_tip.cli index 5fa773ca0b..6e099b4a6e 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_tip.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_tip.cli @@ -2,6 +2,7 @@ Usage: cardano-cli conway query tip [--cardano-mode [--epoch-slots SLOTS]] (--mainnet | --testnet-magic NATURAL) --socket-path SOCKET_PATH [--volatile-tip | --immutable-tip] + [--output-json | --output-yaml] [--out-file FILEPATH] Get the node's current tip (slot no, hash, block no) @@ -23,5 +24,7 @@ Available options: --volatile-tip Use the volatile tip as a target. (This is the default) --immutable-tip Use the immutable tip as a target. + --output-json Format tip query output to JSON (default). + --output-yaml Format tip query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_tx-mempool.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_tx-mempool.cli index e5174b3cac..76a6c0abf1 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_tx-mempool.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_tx-mempool.cli @@ -6,6 +6,7 @@ Usage: cardano-cli conway query tx-mempool ) --socket-path SOCKET_PATH (info | next-tx | tx-exists) + [--output-json | --output-yaml] [--out-file FILEPATH] Local Mempool info @@ -24,6 +25,8 @@ Available options: CARDANO_NODE_SOCKET_PATH environment variable. The argument is optional if CARDANO_NODE_SOCKET_PATH is defined and mandatory otherwise. + --output-json Format tx-mempool query output to JSON (default). + --output-yaml Format tx-mempool query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_tx-mempool_info.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_tx-mempool_info.cli index 655625fb30..76753519c7 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_tx-mempool_info.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_tx-mempool_info.cli @@ -8,6 +8,7 @@ Usage: cardano-cli conway query tx-mempool ) --socket-path SOCKET_PATH (info | next-tx | tx-exists) + [--output-json | --output-yaml] [--out-file FILEPATH] Local Mempool info diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_tx-mempool_next-tx.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_tx-mempool_next-tx.cli index 655625fb30..76753519c7 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_tx-mempool_next-tx.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_tx-mempool_next-tx.cli @@ -8,6 +8,7 @@ Usage: cardano-cli conway query tx-mempool ) --socket-path SOCKET_PATH (info | next-tx | tx-exists) + [--output-json | --output-yaml] [--out-file FILEPATH] Local Mempool info diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_tx-mempool_tx-exists_TX_ID.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_tx-mempool_tx-exists_TX_ID.cli index 655625fb30..76753519c7 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_tx-mempool_tx-exists_TX_ID.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_tx-mempool_tx-exists_TX_ID.cli @@ -8,6 +8,7 @@ Usage: cardano-cli conway query tx-mempool ) --socket-path SOCKET_PATH (info | next-tx | tx-exists) + [--output-json | --output-yaml] [--out-file FILEPATH] Local Mempool info diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_governance_vote_view.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_governance_vote_view.cli index be01d20a5f..bbcc812c54 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_governance_vote_view.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_governance_vote_view.cli @@ -1,12 +1,12 @@ -Usage: cardano-cli latest governance vote view [--output-json | --output-yaml] - --vote-file FILEPATH +Usage: cardano-cli latest governance vote view --vote-file FILEPATH + [--output-json | --output-yaml] [--out-file FILEPATH] Vote viewing. Available options: + --vote-file FILEPATH Input filepath of the vote. --output-json Format governance vote view output to JSON (default). --output-yaml Format governance vote view output to YAML. - --vote-file FILEPATH Input filepath of the vote. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_kes-period-info.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_kes-period-info.cli index 7b51eb7058..c23385b54d 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_kes-period-info.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_kes-period-info.cli @@ -9,6 +9,9 @@ Usage: cardano-cli latest query kes-period-info | --immutable-tip ] --op-cert-file FILEPATH + [ --output-json + | --output-yaml + ] [--out-file FILEPATH] Get information about the current KES period and your node's operational @@ -32,5 +35,8 @@ Available options: default) --immutable-tip Use the immutable tip as a target. --op-cert-file FILEPATH Filepath of the node's operational certificate. + --output-json Format kes-period-info query output to JSON + (default). + --output-yaml Format kes-period-info query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_ledger-peer-snapshot.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_ledger-peer-snapshot.cli index 0df61a15ab..1bcecd9daf 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_ledger-peer-snapshot.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_ledger-peer-snapshot.cli @@ -33,7 +33,8 @@ Available options: --volatile-tip Use the volatile tip as a target. (This is the default) --immutable-tip Use the immutable tip as a target. - --output-json Format ledger-peer-snapshot output to JSON (default). - --output-yaml Format ledger-peer-snapshot output to YAML. + --output-json Format ledger-peer-snapshot query output to JSON + (default). + --output-yaml Format ledger-peer-snapshot query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_pool-params.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_pool-params.cli index c27004007c..35fb74f2c9 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_pool-params.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_pool-params.cli @@ -9,6 +9,7 @@ Usage: cardano-cli latest query pool-params ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--output-json | --output-yaml] [--out-file FILEPATH] DEPRECATED. Use query pool-state instead. Dump the pool parameters @@ -36,5 +37,7 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --output-json Format pool-state query output to JSON (default). + --output-yaml Format pool-state query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_pool-state.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_pool-state.cli index 68d366fd94..f7781e6277 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_pool-state.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_pool-state.cli @@ -9,6 +9,7 @@ Usage: cardano-cli latest query pool-state ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--output-json | --output-yaml] [--out-file FILEPATH] Dump the pool state @@ -34,5 +35,7 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --output-json Format pool-state query output to JSON (default). + --output-yaml Format pool-state query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_protocol-parameters.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_protocol-parameters.cli index 82bbeb7c03..87b982d87a 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_protocol-parameters.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_protocol-parameters.cli @@ -5,6 +5,9 @@ Usage: cardano-cli latest query protocol-parameters | --testnet-magic NATURAL ) --socket-path SOCKET_PATH + [ --output-json + | --output-yaml + ] [--out-file FILEPATH] Get the node's current protocol parameters @@ -23,5 +26,8 @@ Available options: CARDANO_NODE_SOCKET_PATH environment variable. The argument is optional if CARDANO_NODE_SOCKET_PATH is defined and mandatory otherwise. + --output-json Format protocol-parameters query output to JSON + (default). + --output-yaml Format protocol-parameters query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_spo-stake-distribution.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_spo-stake-distribution.cli index ad0098e91b..e69b5c6e3c 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_spo-stake-distribution.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_spo-stake-distribution.cli @@ -15,6 +15,9 @@ Usage: cardano-cli latest query spo-stake-distribution | --spo-key-hash HASH ) ) + [ --output-json + | --output-yaml + ] [--out-file FILEPATH] Get the SPO stake distribution. @@ -43,5 +46,8 @@ Available options: Filepath of the SPO verification key. --spo-key-hash HASH SPO verification key hash (either Bech32-encoded or hex-encoded). + --output-json Format spo-stake-distribution query output to JSON + (default). + --output-yaml Format spo-stake-distribution query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_stake-address-info.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_stake-address-info.cli index 1c2f08e75e..6ca5b56ffc 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_stake-address-info.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_stake-address-info.cli @@ -9,6 +9,9 @@ Usage: cardano-cli latest query stake-address-info | --immutable-tip ] --address ADDRESS + [ --output-json + | --output-yaml + ] [--out-file FILEPATH] Get the current delegations and reward accounts filtered by stake address. @@ -31,5 +34,8 @@ Available options: default) --immutable-tip Use the immutable tip as a target. --address ADDRESS Filter by Cardano stake address (Bech32-encoded). + --output-json Format stake-address-info query output to JSON + (default). + --output-yaml Format stake-address-info query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_stake-pool-default-vote.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_stake-pool-default-vote.cli index b17b87b45a..b91b561f81 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_stake-pool-default-vote.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_stake-pool-default-vote.cli @@ -12,6 +12,9 @@ Usage: cardano-cli latest query stake-pool-default-vote | --spo-verification-key-file FILEPATH | --spo-key-hash HASH ) + [ --output-json + | --output-yaml + ] [--out-file FILEPATH] Get the stake pool default vote. @@ -39,5 +42,8 @@ Available options: Filepath of the SPO verification key. --spo-key-hash HASH SPO verification key hash (either Bech32-encoded or hex-encoded). + --output-json Format stake-pool-default-vote query output to JSON + (default). + --output-yaml Format stake-pool-default-vote query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_stake-snapshot.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_stake-snapshot.cli index 955299d2d4..98aa2c9fd4 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_stake-snapshot.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_stake-snapshot.cli @@ -11,6 +11,7 @@ Usage: cardano-cli latest query stake-snapshot ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--output-json | --output-yaml] [--out-file FILEPATH] Obtain the three stake snapshots for a pool, plus the total active stake @@ -37,5 +38,7 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --output-json Format stake-snapshot query output to JSON (default). + --output-yaml Format stake-snapshot query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_tip.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_tip.cli index fb1929adda..a6655bbd9a 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_tip.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_tip.cli @@ -2,6 +2,7 @@ Usage: cardano-cli latest query tip [--cardano-mode [--epoch-slots SLOTS]] (--mainnet | --testnet-magic NATURAL) --socket-path SOCKET_PATH [--volatile-tip | --immutable-tip] + [--output-json | --output-yaml] [--out-file FILEPATH] Get the node's current tip (slot no, hash, block no) @@ -23,5 +24,7 @@ Available options: --volatile-tip Use the volatile tip as a target. (This is the default) --immutable-tip Use the immutable tip as a target. + --output-json Format tip query output to JSON (default). + --output-yaml Format tip query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_tx-mempool.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_tx-mempool.cli index bd9f591bde..d8df9c58d1 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_tx-mempool.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_tx-mempool.cli @@ -6,6 +6,7 @@ Usage: cardano-cli latest query tx-mempool ) --socket-path SOCKET_PATH (info | next-tx | tx-exists) + [--output-json | --output-yaml] [--out-file FILEPATH] Local Mempool info @@ -24,6 +25,8 @@ Available options: CARDANO_NODE_SOCKET_PATH environment variable. The argument is optional if CARDANO_NODE_SOCKET_PATH is defined and mandatory otherwise. + --output-json Format tx-mempool query output to JSON (default). + --output-yaml Format tx-mempool query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_tx-mempool_info.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_tx-mempool_info.cli index 70a7805f8b..4bc02b822e 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_tx-mempool_info.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_tx-mempool_info.cli @@ -8,6 +8,7 @@ Usage: cardano-cli latest query tx-mempool ) --socket-path SOCKET_PATH (info | next-tx | tx-exists) + [--output-json | --output-yaml] [--out-file FILEPATH] Local Mempool info diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_tx-mempool_next-tx.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_tx-mempool_next-tx.cli index 70a7805f8b..4bc02b822e 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_tx-mempool_next-tx.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_tx-mempool_next-tx.cli @@ -8,6 +8,7 @@ Usage: cardano-cli latest query tx-mempool ) --socket-path SOCKET_PATH (info | next-tx | tx-exists) + [--output-json | --output-yaml] [--out-file FILEPATH] Local Mempool info diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_tx-mempool_tx-exists_TX_ID.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_tx-mempool_tx-exists_TX_ID.cli index 70a7805f8b..4bc02b822e 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_tx-mempool_tx-exists_TX_ID.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_tx-mempool_tx-exists_TX_ID.cli @@ -8,6 +8,7 @@ Usage: cardano-cli latest query tx-mempool ) --socket-path SOCKET_PATH (info | next-tx | tx-exists) + [--output-json | --output-yaml] [--out-file FILEPATH] Local Mempool info diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_kes-period-info.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_kes-period-info.cli index f937321b1d..652e83f4be 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_kes-period-info.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_kes-period-info.cli @@ -3,6 +3,7 @@ Usage: cardano-cli query kes-period-info [--cardano-mode [--epoch-slots SLOTS]] --socket-path SOCKET_PATH [--volatile-tip | --immutable-tip] --op-cert-file FILEPATH + [--output-json | --output-yaml] [--out-file FILEPATH] Get information about the current KES period and your node's operational @@ -26,5 +27,8 @@ Available options: default) --immutable-tip Use the immutable tip as a target. --op-cert-file FILEPATH Filepath of the node's operational certificate. + --output-json Format kes-period-info query output to JSON + (default). + --output-yaml Format kes-period-info query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_ledger-peer-snapshot.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_ledger-peer-snapshot.cli index 8e6c014e93..c8465c77a1 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_ledger-peer-snapshot.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_ledger-peer-snapshot.cli @@ -31,7 +31,8 @@ Available options: --volatile-tip Use the volatile tip as a target. (This is the default) --immutable-tip Use the immutable tip as a target. - --output-json Format ledger-peer-snapshot output to JSON (default). - --output-yaml Format ledger-peer-snapshot output to YAML. + --output-json Format ledger-peer-snapshot query output to JSON + (default). + --output-yaml Format ledger-peer-snapshot query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_pool-params.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_pool-params.cli index 96684be5f1..5fca97998d 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_pool-params.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_pool-params.cli @@ -5,6 +5,7 @@ Usage: cardano-cli query pool-params [--cardano-mode [--epoch-slots SLOTS]] ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--output-json | --output-yaml] [--out-file FILEPATH] DEPRECATED. Use query pool-state instead. Dump the pool parameters @@ -32,5 +33,7 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --output-json Format pool-state query output to JSON (default). + --output-yaml Format pool-state query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_pool-state.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_pool-state.cli index b0460f8a43..d3ac22da36 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_pool-state.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_pool-state.cli @@ -5,6 +5,7 @@ Usage: cardano-cli query pool-state [--cardano-mode [--epoch-slots SLOTS]] ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--output-json | --output-yaml] [--out-file FILEPATH] Dump the pool state @@ -30,5 +31,7 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --output-json Format pool-state query output to JSON (default). + --output-yaml Format pool-state query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_protocol-parameters.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_protocol-parameters.cli index dc85c15a95..1e2d699dbd 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_protocol-parameters.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_protocol-parameters.cli @@ -5,6 +5,7 @@ Usage: cardano-cli query protocol-parameters | --testnet-magic NATURAL ) --socket-path SOCKET_PATH + [--output-json | --output-yaml] [--out-file FILEPATH] Get the node's current protocol parameters @@ -23,5 +24,8 @@ Available options: CARDANO_NODE_SOCKET_PATH environment variable. The argument is optional if CARDANO_NODE_SOCKET_PATH is defined and mandatory otherwise. + --output-json Format protocol-parameters query output to JSON + (default). + --output-yaml Format protocol-parameters query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_stake-address-info.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_stake-address-info.cli index 41a8fe555c..d74f495bea 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_stake-address-info.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_stake-address-info.cli @@ -7,6 +7,7 @@ Usage: cardano-cli query stake-address-info --socket-path SOCKET_PATH [--volatile-tip | --immutable-tip] --address ADDRESS + [--output-json | --output-yaml] [--out-file FILEPATH] Get the current delegations and reward accounts filtered by stake address. @@ -29,5 +30,8 @@ Available options: default) --immutable-tip Use the immutable tip as a target. --address ADDRESS Filter by Cardano stake address (Bech32-encoded). + --output-json Format stake-address-info query output to JSON + (default). + --output-yaml Format stake-address-info query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_stake-snapshot.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_stake-snapshot.cli index 3099fc4502..09d95c1989 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_stake-snapshot.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_stake-snapshot.cli @@ -5,6 +5,7 @@ Usage: cardano-cli query stake-snapshot [--cardano-mode [--epoch-slots SLOTS]] ( --all-stake-pools | (--stake-pool-id STAKE_POOL_ID) ) + [--output-json | --output-yaml] [--out-file FILEPATH] Obtain the three stake snapshots for a pool, plus the total active stake @@ -31,5 +32,7 @@ Available options: --stake-pool-id STAKE_POOL_ID Stake pool ID/verification key hash (either Bech32-encoded or hex-encoded). + --output-json Format stake-snapshot query output to JSON (default). + --output-yaml Format stake-snapshot query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_tip.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_tip.cli index 349dc5892c..8efc84af56 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_tip.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_tip.cli @@ -2,6 +2,7 @@ Usage: cardano-cli query tip [--cardano-mode [--epoch-slots SLOTS]] (--mainnet | --testnet-magic NATURAL) --socket-path SOCKET_PATH [--volatile-tip | --immutable-tip] + [--output-json | --output-yaml] [--out-file FILEPATH] Get the node's current tip (slot no, hash, block no) @@ -23,5 +24,7 @@ Available options: --volatile-tip Use the volatile tip as a target. (This is the default) --immutable-tip Use the immutable tip as a target. + --output-json Format tip query output to JSON (default). + --output-yaml Format tip query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_tx-mempool.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_tx-mempool.cli index 8e885b4e2f..38af65f6f8 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_tx-mempool.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_tx-mempool.cli @@ -2,6 +2,7 @@ Usage: cardano-cli query tx-mempool [--cardano-mode [--epoch-slots SLOTS]] (--mainnet | --testnet-magic NATURAL) --socket-path SOCKET_PATH (info | next-tx | tx-exists) + [--output-json | --output-yaml] [--out-file FILEPATH] Local Mempool info @@ -20,6 +21,8 @@ Available options: CARDANO_NODE_SOCKET_PATH environment variable. The argument is optional if CARDANO_NODE_SOCKET_PATH is defined and mandatory otherwise. + --output-json Format tx-mempool query output to JSON (default). + --output-yaml Format tx-mempool query output to YAML. --out-file FILEPATH Optional output file. Default is to write to stdout. -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_tx-mempool_info.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_tx-mempool_info.cli index 07f8967a40..7ae2644e2a 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_tx-mempool_info.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_tx-mempool_info.cli @@ -4,6 +4,7 @@ Usage: cardano-cli query tx-mempool [--cardano-mode [--epoch-slots SLOTS]] (--mainnet | --testnet-magic NATURAL) --socket-path SOCKET_PATH (info | next-tx | tx-exists) + [--output-json | --output-yaml] [--out-file FILEPATH] Local Mempool info diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_tx-mempool_next-tx.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_tx-mempool_next-tx.cli index 07f8967a40..7ae2644e2a 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_tx-mempool_next-tx.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_tx-mempool_next-tx.cli @@ -4,6 +4,7 @@ Usage: cardano-cli query tx-mempool [--cardano-mode [--epoch-slots SLOTS]] (--mainnet | --testnet-magic NATURAL) --socket-path SOCKET_PATH (info | next-tx | tx-exists) + [--output-json | --output-yaml] [--out-file FILEPATH] Local Mempool info diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_tx-mempool_tx-exists_TX_ID.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_tx-mempool_tx-exists_TX_ID.cli index 07f8967a40..7ae2644e2a 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/query_tx-mempool_tx-exists_TX_ID.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/query_tx-mempool_tx-exists_TX_ID.cli @@ -4,6 +4,7 @@ Usage: cardano-cli query tx-mempool [--cardano-mode [--epoch-slots SLOTS]] (--mainnet | --testnet-magic NATURAL) --socket-path SOCKET_PATH (info | next-tx | tx-exists) + [--output-json | --output-yaml] [--out-file FILEPATH] Local Mempool info