plutus-chain-index-core-0.1.0.0
Safe HaskellNone
LanguageHaskell2010

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.