#[derive(Debug, Clone)]
pub struct OutputGroup {
pub value: u64,
pub weight: u64,
pub input_count: usize,
pub creation_sequence: Option<u32>,
}
#[derive(Debug, Clone)]
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,
}
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum ExcessStrategy {
ToFee,
ToRecipient,
ToChange,
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Clone, Copy)]
pub enum SelectionError {
InsufficientFunds,
NoSolutionFound,
NonPositiveTarget,
NonPositiveFeeRate,
AbnormallyHighFeeRate,
}
#[derive(Debug)]
pub struct WasteMetric(pub f32);
#[derive(Debug)]
pub struct SelectionOutput {
pub selected_inputs: Vec<usize>,
pub waste: WasteMetric,
}
pub type EffectiveValue = u64;
pub type Weight = u64;