groupedFilter

fun groupedFilter(groupId: GroupId, normal: Boolean = true, authority: ULong = GroupAuthorityFlags.AUTHORITY, maskOff: ULong = 0.toULong(), contractId: ByteArray? = null): (Spendable) -> Long

Returns a predicate function that accepts a Spendable. This function returns the token amount if the BCHspendable is in the passed group and has properties based on passed flags, and is not already reserved.

Parameters

normal

if it is true, any non-authority utxo will return true.

authority

if it is a bitmap, returns true if these bits are set in the authorityFlags.

maskOff

if it is zero, maskOff is set to "authority" (and so does nothing). Otherwise all set bits are part of the filter. This parameter allows the caller require that a bit is zero, by setting it in "maskOff", but leaving it cleared in "authority".

contractId

If null (default) only UTXOs with no associated contract are selected. Otherwise only UTXOs with the provided contractId are selected.