Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Cooked.Pretty.Cooked
Contents
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
TxSkelContext
).
Synopsis
- prettyTxSkel :: PrettyCookedOpts -> SkelContext -> TxSkel -> DocCooked
- prettyBalancingWallet :: PrettyCookedOpts -> Wallet -> DocCooked
- prettySigners :: PrettyCookedOpts -> TxOpts -> [Wallet] -> [DocCooked]
- prettyMints :: PrettyCookedOpts -> (Versioned MintingPolicy, TxSkelRedeemer, TokenName, Integer) -> DocCooked
- mPrettyTxOpts :: PrettyCookedOpts -> TxOpts -> Maybe DocCooked
- prettyTxSkelOut :: PrettyCookedOpts -> TxSkelOut -> DocCooked
- prettyTxSkelOutDatumMaybe :: PrettyCookedOpts -> TxSkelOutDatum -> Maybe DocCooked
- prettyTxSkelIn :: PrettyCookedOpts -> SkelContext -> (TxOutRef, TxSkelRedeemer) -> DocCooked
- prettyTxSkelInReference :: PrettyCookedOpts -> SkelContext -> TxOutRef -> Maybe DocCooked
- prettyAddressState :: PrettyCookedOpts -> Address -> UtxoPayloadSet -> DocCooked
- prettyPayloadGrouped :: PrettyCookedOpts -> [UtxoPayload] -> Maybe DocCooked
- prettyPayload :: PrettyCookedOpts -> Bool -> UtxoPayload -> Maybe DocCooked
- prettyReferenceScriptHash :: PrettyCookedOpts -> ScriptHash -> DocCooked
Documentation
prettyTxSkel :: PrettyCookedOpts -> SkelContext -> TxSkel -> DocCooked Source #
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
prettyMints :: PrettyCookedOpts -> (Versioned MintingPolicy, TxSkelRedeemer, TokenName, Integer) -> DocCooked Source #
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.
prettyTxSkelOut :: PrettyCookedOpts -> TxSkelOut -> DocCooked Source #
prettyTxSkelIn :: PrettyCookedOpts -> SkelContext -> (TxOutRef, TxSkelRedeemer) -> DocCooked Source #
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 #