Module

Contract.Utxos

A module that defines the different Utxo Data.Maps from transaction input to transaction output. Furthermore, a helper to get the utxos at a given Address is defined.

#getUtxo

getUtxo :: TransactionInput -> Contract (Maybe TransactionOutput)

Queries for an utxo given a transaction input. Returns Nothing if the output has already been spent.

#utxosAt

utxosAt :: Address -> Contract UtxoMap

Queries for UTxOs at the given Address.

Note: calling utxosAt on an address controlled by the light wallet may result in hard-to-debug problems with wallet interactions. The developers should not assume that all UTxOs that are available on wallet addresses are actually spendable. See the docs for UTxO locking in doc/query-layers.md. Using getWalletUtxos is a way to avoid the potential problems. This function will raise a warning in the logs if wallet address is used.

Re-exports from Cardano.Types

Modules