pub trait BoxSelector<T: ErgoBoxAssets> {
// Required method
fn select(
&self,
inputs: Vec<T>,
target_balance: BoxValue,
target_tokens: &[Token],
) -> Result<BoxSelection<T>, BoxSelectorError>;
}
Expand description
Box selector
Required Methods§
Sourcefn 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)