pub struct CoinSelectionOpt {
pub target_value: u64,
pub target_feerate: f32,
pub long_term_feerate: Option<f32>,
pub min_absolute_fee: u64,
pub base_weight: u64,
pub change_weight: u64,
pub change_cost: u64,
pub avg_input_weight: u64,
pub avg_output_weight: u64,
pub min_change_value: u64,
pub excess_strategy: ExcessStrategy,
}
Expand description
Options required to compute fees and waste metric.
Fields§
§target_value: u64
The value we need to select.
target_feerate: f32
The target feerate we should try and achieve in sats per weight unit.
long_term_feerate: Option<f32>
The long term fee-rate is an estimate of the future transaction fee rate that a wallet might need to pay to spend its UTXOs.
If the current fee rates are less than the long term fee rate, it is optimal to consolidate UTXOs to make the spend.
It affects how the WasteMetric
is computed.
min_absolute_fee: u64
Lowest possible transaction fee required to get a transaction included in a block
base_weight: u64
Weights of data in transaction other than the list of inputs that would be selected.
This includes weight of the header, total weight out outputs, weight of fields used to represent number number of inputs and number outputs, witness etc.,
change_weight: u64
Additional weigh added to a transaction when a change output is created. Used in weight metric computation.
change_cost: u64
Total cost associated with creating and later spending a change output in a transaction. This includes the transaction fees for both the current transaction (where the change is created) and the future transaction (where the change is spent)
avg_input_weight: u64
Estimate of average weight of an input.
avg_output_weight: u64
Estimate of average weight of an output.
min_change_value: u64
The smallest amount of change that is considered acceptable in a transaction given the dust limit
excess_strategy: ExcessStrategy
Strategy to use the excess value other than fee and target
Trait Implementations§
Source§impl Clone for CoinSelectionOpt
impl Clone for CoinSelectionOpt
Source§fn clone(&self) -> CoinSelectionOpt
fn clone(&self) -> CoinSelectionOpt
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more