plutus-ledger-0.1.0.0: Wallet API

Description

AddressMaps and functions for working on them.

AddressMaps are used to represent the limited knowledge about the state of the ledger that the wallet retains. Rather than keeping the entire ledger (which can be very large) the wallet only tracks the UTxOs at particular addresses.

Synopsis

# Documentation

A map of Addresses and their unspent outputs.

Constructors

#### Instances

Instances details

Add a list of Addresses with no unspent outputs to the map.

filterRefs :: (TxOutRef -> TxOutTx -> Bool) -> AddressMap -> AddressMap Source #

Filter the transaction output references in the map

Get the funds available at a particular address.

The total value of unspent outputs (which the map knows about) at an address.

traverseWithKey :: Applicative f => (Address -> Map TxOutRef TxOutTx -> f (Map TxOutRef TxOutTx)) -> AddressMap -> f AddressMap Source #

Walk through the address map, applying an effectful function to each entry.

An address map with a single unspent transaction output.

Create an AddressMap with the unspent outputs of a single transaction.

Create a map of unspent transaction outputs to their addresses (the "inverse" of an AddressMap, without the values)

Update an AddressMap with the inputs and outputs of a new transaction. updateAddresses does not add or remove any keys from the map.

Update an AddressMap with the inputs and outputs of a new transaction, including all addresses in the transaction.

Restrict an AddressMap to a set of addresses.

Get the set of all addresses that the transaction spends outputs from or produces outputs to

The unspent transaction outputs of the ledger as a whole.