public class DefaultUtxoSelectionStrategyImpl extends java.lang.Object implements UtxoSelectionStrategy
UtxoSelectionStrategy
Applications can provide their own custom implementation| Constructor and Description |
|---|
DefaultUtxoSelectionStrategyImpl(UtxoService utxoService) |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.List<Utxo> |
filter(java.util.List<Utxo> fetchData) |
protected OrderEnum |
getUtxoFetchOrder() |
protected int |
getUtxoFetchSize() |
boolean |
ignoreUtxosWithDatumHash() |
java.util.List<Utxo> |
selectUtxos(java.lang.String address,
java.lang.String unit,
java.math.BigInteger amount,
java.util.Set<Utxo> excludeUtxos)
Selected utxos based on a strategy
|
java.util.List<Utxo> |
selectUtxos(java.lang.String address,
java.lang.String unit,
java.math.BigInteger amount,
java.lang.String datumHash,
java.util.Set<Utxo> excludeUtxos)
Selected utxos based on a strategy
|
void |
setIgnoreUtxosWithDatumHash(boolean ignoreUtxosWithDatumHash)
Set if utxos with datum hash need to be ignored or not
|
public DefaultUtxoSelectionStrategyImpl(UtxoService utxoService)
public java.util.List<Utxo> selectUtxos(java.lang.String address, java.lang.String unit, java.math.BigInteger amount, java.util.Set<Utxo> excludeUtxos) throws ApiException
UtxoSelectionStrategyselectUtxos in interface UtxoSelectionStrategyaddress - Address to select utxos forunit - Unitamount - AmountexcludeUtxos - Utxos to ignoreApiExceptionpublic java.util.List<Utxo> selectUtxos(java.lang.String address, java.lang.String unit, java.math.BigInteger amount, java.lang.String datumHash, java.util.Set<Utxo> excludeUtxos) throws ApiException
UtxoSelectionStrategyselectUtxos in interface UtxoSelectionStrategyaddress - Address to select utxos forunit - Unitamount - AmountdatumHash - DatumHash to compareexcludeUtxos - Utxos to ignoreApiExceptionpublic boolean ignoreUtxosWithDatumHash()
ignoreUtxosWithDatumHash in interface UtxoSelectionStrategypublic void setIgnoreUtxosWithDatumHash(boolean ignoreUtxosWithDatumHash)
UtxoSelectionStrategysetIgnoreUtxosWithDatumHash in interface UtxoSelectionStrategyprotected OrderEnum getUtxoFetchOrder()
protected int getUtxoFetchSize()