plutus-chain-index-core-1.2.0.0
Safe Haskell None
Language Haskell2010

Plutus.ChainIndex.TxOutBalance

Synopsis

Documentation

transactionOutputStatus Source #

Arguments

:: BlockNumber

Current block number for inspecting the state of the transaction output

-> TxIdState

Information on the state of a transaction. Needed for determining its status.

-> TxOutBalance

Balance of spent and unspent transaction outputs.

-> TxOutRef

Target transaction output for inspecting its state.

-> Either TxStatusFailure TxOutStatus

Given the current block, compute the status for the given transaction output by getting the state of the transaction that produced it and checking if the output is spent or unspent.

isUnspentOutput :: TxOutRef -> UtxoState TxOutBalance -> Bool Source #

Whether a TxOutRef is a member of the UTXO set (ie. unspent)

isSpentOutput :: TxOutRef -> UtxoState TxOutBalance -> Bool Source #

Whether a TxOutRef is a member of the spent tx output set.