TxToUniv

Fill a JSON object with a human-readable description of a transaction.

Synopsis

Declared in <core_io.h>

void
TxToUniv(
    CTransaction const& tx,
    uint256 const& block_hash,
    UniValue& entry,
    bool include_hex = true,
    CTxUndo const* txundo = nullptr,
    TxVerbosity verbosity = TxVerbosity::SHOW_DETAILS,
    std::function<bool(CTxOut const&)> is_change_func = {});

Parameters

NameDescription
txTransaction to describe.
block_hashHash of the block containing the transaction, or null if unconfirmed.
entryJSON object populated with the transaction's fields.
include_hexWhen true, include the raw transaction as a hex string.
txundoOptional undo data used to report the values and scripts of spent inputs.
verbosityLevel of detail to include for the transaction's data.
is_change_funcOptional predicate that reports whether an output is change.