Module ergo_lib_c_core::box_selector
source · Expand description
Simple box selection algorithms
Structs
- Selected boxes with change boxes (by
BoxSelector
) - Naive box selector, collects inputs until target balance is reached
Functions
- Selected boxes to spend as transaction inputs
- Selected boxes to use as change
- Create a selection to easily inject custom selection algorithms
- 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.