Documentation ¶
Overview ¶
Package utxo implements operations related to unspent transaction outputs (UTXO), which allow us to check for the balance of every wallet of the network. When we look for our balance, we only need to find those that can be unlocked with our key.
"Unspent outputs" means that they haven't been referenced in any input, and thus, still belong to the person that received them.
The UTXO set is a cache that is built from all blockchain transactions, so we have to iterate over all of them just once to find an unspent output or an address balance.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Set ¶
Set represents a UTXO set and holds all the unspent transaction outputs of an address.
func (*Set) AccountUTXOs ¶
AccountUTXOs returns an account's unspent outputs to be used in a new transaction.
It returns an error if the account doesn't have enough funds.