Coin Selection Request¶
-
struct cardano_coin_selection_request_t¶
Describes all inputs to a coin selection.
All pointers are borrowed: they must remain valid for the duration of the cardano_coin_selector_select call, and the selector does not take ownership of them.
Zero-initialize the structure (
= { 0 }) so that unset optional fields default safely. Fields added in future versions will be appended to the end of the structure, with a zero value meaning “default behavior”.Public Members¶
-
cardano_utxo_list_t *pre_selected_utxo¶
Optional.
A set of pre-selected UTXOs that must be included in the final selection.
-
cardano_utxo_list_t *available_utxo¶
Required.
The list of available UTXOs from which the coin selection will be made.
-
cardano_value_t *target¶
Required.
The target value to be covered by the selection. This value is authoritative for all balance arithmetic: the selection must uphold
sum(selection) = target + sum(change_outputs).
-
cardano_transaction_output_list_t *outputs_to_cover¶
Optional.
The user-specified outputs the target was derived from.
Selectors may use this list as a shape and weight hint when generating change outputs (for example, to mimic the distribution of user payments). Selectors must not rely on it for balance arithmetic; the target is authoritative.
-
cardano_address_t *change_address¶
Required.
The address to which change outputs will be sent.
-
cardano_protocol_parameters_t *protocol_params¶
Required.
The protocol parameters, used to ensure change outputs are min-ADA compliant.
-
cardano_utxo_list_t *pre_selected_utxo¶