canSpendUTXO method

bool canSpendUTXO(
  1. WalletState state,
  2. String utxoKey
)

Check if UTXO can be spent (business rules)

Implementation

bool canSpendUTXO(WalletState state, String utxoKey) {
  final utxo = state.utxos[utxoKey];
  return utxo != null && utxo.status == UTXOStatus.available;
}