Example
The logic to decide which unspent UTXOs to use can be as simple or complex as you wish, but in this example, we will use any small unspent UTXO that has received enough confirmations. We have 3 steps in the process of consolidating UTXOs:- Retrieve the max spendable amount for a specific wallet.
- This will result in an amount that considers up to 250 UTXOs within the wallet (by default, from smallest to biggest).
- Create a transaction with the amount provided.
vaultId and assetId.
Once we create a transaction with the specified amount, Fireblocks automatically selects all of the inputs (smallest to biggest) to consolidate. You can contact Fireblocks Support in order to change the default consolidation selection method and reverse it to a selection going from largest to smallest.