cooked-validators
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cooked.Pretty.Cooked

Description

This module implements pretty-printing for Cooked structures such as skeletons and chain state.

It contains orphaned instances of PrettyCooked for Cooked datatypes. They cannot be provided in Cooked.Pretty.Class because of dependency cycles and, for ease of maintainability, we chose to centralize all pretty-printing related code in submodules of Cooked.Pretty instead of having PrettyCooked instances scattered around.

Some structure require additional arguments to be pretty-printed and have therefore no instances PrettyCooked (for example TxSkel needs some SkelContext).

Synopsis

Documentation

prettyBalancingWallet :: PrettyCookedOpts -> Wallet -> DocCooked Source #

Same as the PrettyCooked instance for Wallet with a suffix mentioning this is the balancing wallet

prettySigners :: PrettyCookedOpts -> TxOpts -> [Wallet] -> [DocCooked] Source #

Prints a list of pubkeys with a flag next to the balancing wallet

mPrettyTxOpts :: PrettyCookedOpts -> TxOpts -> Maybe DocCooked Source #

Pretty-print a list of transaction skeleton options, only printing an option if its value is non-default. If no non-default options are in the list, return nothing.

prettyTxSkelInReference :: PrettyCookedOpts -> SkelContext -> TxOutRef -> Maybe DocCooked Source #

Prints a reference input within a certain SkelContext

prettyAddressState :: PrettyCookedOpts -> Address -> UtxoPayloadSet -> DocCooked Source #

Pretty prints the state of an address, that is the list of UTxOs (including value and datum), grouped

prettyPayloadGrouped :: PrettyCookedOpts -> [UtxoPayload] -> Maybe DocCooked Source #

Pretty prints payloads (datum and value corresponding to 1 UTxO) grouped together when they carry same value and datum

prettyPayload :: PrettyCookedOpts -> Bool -> UtxoPayload -> Maybe DocCooked Source #

Optionally prints a UtxoPayload with an option piloting whether TxOutRefs should be shown.

Orphan instances

PrettyCooked MockChainError Source # 
Instance details

PrettyCooked MockChainLogEntry Source #

This prints a MockChainLogEntry. In the log, we know a transaction has been validated if the MCLogSubmittedTxSkel is followed by a MCLogNewTx.

Instance details

PrettyCooked UtxoState Source #

Pretty print a UtxoState. Print the known wallets first, then unknown pubkeys, then scripts.

Instance details

PrettyCooked TxSkelOutDatum Source #

The PrettyCooked instance for TxSkelOutDatum prints the datum it contains according to its own PrettyCooked instance.

Instance details

PrettyCooked Mint Source #

Prints a minting specification

Example: > #abcdef - Redeemer: red - Reference script at: txOutRef - Foo: 500 - Bar: 1000

Instance details

PrettyCooked TxSkelOut Source # 
Instance details

PrettyCooked TxGovAction Source # 
Instance details

PrettyCooked TxParameterChange Source # 
Instance details

PrettyCooked TxSkelProposal Source # 
Instance details

Show a => PrettyCooked (MockChainReturn a UtxoState) Source # 
Instance details

Show a => PrettyCooked (a, UtxoState) Source # 
Instance details