cardano-cli
Safe HaskellNone
LanguageHaskell2010

Cardano.CLI.EraBased.Run.Query

Synopsis

Documentation

runQueryPoolStateCmd :: QueryPoolStateCmdArgs -> ExceptT QueryCmdError IO () Source #

Query the current and future parameters for a stake pool, including the retirement date. Any of these may be empty (in which case a null will be displayed).

runQueryStakeAddressInfoCmd :: QueryStakeAddressInfoCmdArgs -> ExceptT QueryCmdError IO () Source #

Query the current delegations and reward accounts, filtered by a given set of addresses, from a Shelley node via the local state query protocol.

runQueryStakeSnapshotCmd :: QueryStakeSnapshotCmdArgs -> ExceptT QueryCmdError IO () Source #

Obtain stake snapshot information for a pool, plus information about the total active stake. This information can be used for leader slot calculation, for example, and has been requested by SPOs. Obtaining the information directly is significantly more time and memory efficient than using a full ledger state dump.

runQueryUTxOCmd :: QueryUTxOCmdArgs -> ExceptT QueryCmdError IO () Source #

Query the UTxO, filtered by a given set of addresses, from a Shelley node via the local state query protocol.

newOutputFormat :: Maybe OutputFormatJsonOrText -> Maybe a -> OutputFormatJsonOrText Source #

The output format to use, for commands with a recently introduced --output-[json,text] flag and that used to have the following default: --out-file implies JSON, output to stdout implied text.

percentage Source #

Arguments

:: RelativeTime

tolerance. If b - a < tolerance, then 100% is reported. This even if we are tolerance seconds behind, we are still considered fully synced.

-> RelativeTime

tipTime The time of the most recently synced block.

-> RelativeTime

nowTime The time of the tip of the block chain to which we need to sync.

-> Text 

Calculate the percentage sync rendered as text: min 1 (tipTime/nowTime)