convex-testing-interface
Safe HaskellSafe-Inferred
LanguageHaskell2010

Convex.TestingInterface.Trace.TxSummary

Synopsis

Documentation

summarizeTx :: RedeemerTagger -> AddressLabeler -> Tx ConwayEra -> UTxO ConwayEra -> TxSummary Source #

Summarize a full transaction, resolving inputs from the given UTxO set. The RedeemerTagger is applied to each script input's parsed redeemer Data to optionally produce Tier 2 (tisRedeemerKind / tisRedeemerPayload) labels. Pass mempty for Tier 1-only behaviour. The AddressLabeler is applied to every address's credential hash to produce tisAddressLabel / tosAddressLabel.

summarizeTxBody :: RedeemerTagger -> AddressLabeler -> TxBody ConwayEra -> UTxO ConwayEra -> TxSummary Source #

Summarize a transaction body, resolving inputs from the given UTxO set. Spend redeemers are read from the body's TxBodyScriptData (always available on a built TxBody) and surfaced per script input. The RedeemerTagger supplies the optional Tier 2 labels, and the AddressLabeler supplies the optional friendly address labels.

renderAddress :: Address ShelleyAddr -> Text Source #

Render a Shelley address as bech32 text.

toValueSummary :: Value -> ValueSummary Source #

Build a structured ValueSummary from a cardano-api Value.

renderAssetName :: AssetName -> Text Source #

Render an AssetName as text, trying UTF-8 decoding first.

renderDatum :: TxOutDatum CtxTx ConwayEra -> Maybe Text Source #

Render a datum reference for a transaction output.