selectUtxosMultiToken

Select UTXOs for multiple token types.

Performs coin selection independently for each token type. Useful for transactions that send multiple tokens.

Example:

val requirements = mapOf(
"NIGHT_TOKEN" to BigInteger("100000000"), // 100 NIGHT
"DUST_TOKEN" to BigInteger("50000000") // 50 DUST
)

val allUtxos = utxoDao.getUnspentUtxos(address)
val result = selector.selectUtxosMultiToken(allUtxos, requirements)

Return

MultiTokenResult with selection per token type

Parameters

availableUtxos

All available UTXOs (will be filtered by token type)

requiredAmounts

Map of tokenType → required amount