filterInputs

open override fun filterInputs(minAmt: Long, minConfirms: Int = 0, filter: (Spendable) -> Long? = null): MutableList<Spendable>

Selects UTXOs this contract can use as inputs, layering three gates on top of CommonWallet.filterInputs (which already applies unspent / not-reserved / minConfirms):

  1. Ownership — sp.contractId == this.contractId, tagged by markInterestingSpendable.

  2. Maturity — per UTXO, since one factory holds vaults maturing at different times. This is the CLTV clause: the network rejects a spend whose nLockTime is below the unlock value, so refuse here rather than build a tx the node discards. Closed when isVaultMature is null.

  3. Selection — filter == null counts only ungrouped Nexa, by satoshi, keeping minAmt in satoshis; a caller wanting tokens returns sp.groupInfo()?.tokenAmount ?: 0 or similar.

This override answers the CONTRACT-WIDE question — every vault of the factory — matching balance and the no-scope send. The VaultScope overload is the address-gated one.


fun filterInputs(scope: VaultScope, minAmt: Long, minConfirms: Int = 0, filter: (Spendable) -> Long? = null): MutableList<Spendable>

What a claim of scope would offer — the same selection send makes, so the two cannot silently disagree. See the filterInputs override for the gates; this entry point adds the address gate for a single-vault scope.