Function ergo::ergo_lib_simple_box_selector_select
source ยท #[no_mangle]
pub unsafe extern "C" fn ergo_lib_simple_box_selector_select(
simple_box_selector_ptr: ConstSimpleBoxSelectorPtr,
inputs_ptr: ConstCollectionPtr<ErgoBox>,
target_balance_ptr: ConstBoxValuePtr,
target_tokens_ptr: ConstCollectionPtr<Token>,
box_selection_out: *mut BoxSelectionPtr,
) -> ErrorPtr
Expand description
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.