Trait ergo_lib::wallet::box_selector::BoxSelector
source · [−]pub trait BoxSelector<T: ErgoBoxAssets> {
fn select(
&self,
inputs: Vec<T>,
target_balance: BoxValue,
target_tokens: &[Token]
) -> Result<BoxSelection<T>, BoxSelectorError>;
}
Expand description
Box selector
Required Methods
fn select(
&self,
inputs: Vec<T>,
target_balance: BoxValue,
target_tokens: &[Token]
) -> Result<BoxSelection<T>, BoxSelectorError>
fn select(
&self,
inputs: Vec<T>,
target_balance: BoxValue,
target_tokens: &[Token]
) -> Result<BoxSelection<T>, BoxSelectorError>
Selects boxes out of the provided inputs to satisfy target balance and tokens
inputs
- spendable boxes
target_balance
- value (in nanoERGs) to find in input boxes (inputs)
target_tokens
- token amounts to find in input boxes(inputs)