[−][src]Trait ergo_lib::wallet::box_selector::BoxSelector
Box selector
Required methods
pub fn select(
&self,
inputs: Vec<T>,
target_balance: BoxValue,
target_tokens: &[Token]
) -> Result<BoxSelection<T>, BoxSelectorError>
[src]
&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)
Implementors
impl<T: ErgoBoxAssets> BoxSelector<T> for SimpleBoxSelector
[src]
pub fn select(
&self,
inputs: Vec<T>,
target_balance: BoxValue,
target_tokens: &[Token]
) -> Result<BoxSelection<T>, BoxSelectorError>
[src]
&self,
inputs: Vec<T>,
target_balance: BoxValue,
target_tokens: &[Token]
) -> Result<BoxSelection<T>, BoxSelectorError>
Selects inputs to satisfy target balance and tokens.
inputs
- available inputs (returns an error, if empty),
target_balance
- coins (in nanoERGs) needed,
target_tokens
- amount of tokens needed.
Returns selected inputs and box assets(value+tokens) with change.