use crate::transaction::fees::transparent::InputSize;
use zcash_protocol::{
consensus::{self, BlockHeight},
value::Zatoshis,
};
#[cfg(feature = "non-standard-fees")]
pub mod fixed;
pub mod transparent;
pub mod zip317;
#[cfg(zcash_unstable = "zfuture")]
pub mod tze;
pub trait FeeRule {
type Error;
#[allow(clippy::too_many_arguments)]
fn fee_required<P: consensus::Parameters>(
&self,
params: &P,
target_height: BlockHeight,
transparent_input_sizes: impl IntoIterator<Item = InputSize>,
transparent_output_sizes: impl IntoIterator<Item = usize>,
sapling_input_count: usize,
sapling_output_count: usize,
orchard_action_count: usize,
) -> Result<Zatoshis, Self::Error>;
}
#[cfg(zcash_unstable = "zfuture")]
pub trait FutureFeeRule: FeeRule {
#[allow(clippy::too_many_arguments)]
fn fee_required_zfuture<P: consensus::Parameters>(
&self,
params: &P,
target_height: BlockHeight,
transparent_input_sizes: impl IntoIterator<Item = InputSize>,
transparent_output_sizes: impl IntoIterator<Item = usize>,
sapling_input_count: usize,
sapling_output_count: usize,
orchard_action_count: usize,
tze_inputs: &[impl tze::InputView],
tze_outputs: &[impl tze::OutputView],
) -> Result<Zatoshis, Self::Error>;
}