-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change string order to OrderEnum in apis. UtxoSelectionStrategy imple…
…mented
- Loading branch information
Showing
9 changed files
with
85 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/main/java/com/bloxbean/cardano/client/backend/api/helper/UtxoSelectionStrategy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.bloxbean.cardano.client.backend.api.helper; | ||
|
||
import com.bloxbean.cardano.client.backend.common.OrderEnum; | ||
import com.bloxbean.cardano.client.backend.model.Utxo; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Implement this interface to provide custom UtxoSelection Strategy | ||
*/ | ||
public interface UtxoSelectionStrategy { | ||
|
||
/** | ||
* Filter and return selected utxos from the list | ||
* @param utxos | ||
* @return | ||
*/ | ||
public List<Utxo> filter(List<Utxo> utxos); | ||
|
||
/** | ||
* Utxo record fetch size from the server per page | ||
* @return | ||
*/ | ||
default public int getUtxoFetchSize() { | ||
return 40; | ||
} | ||
|
||
/** | ||
* Utxo fetch order | ||
* @return | ||
*/ | ||
default public OrderEnum getUtxoFetchOrder() { | ||
return OrderEnum.asc; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters