commit
3a0b634101
|
@ -17,7 +17,7 @@ use super::{
|
|||
#[cfg(feature = "orchard")]
|
||||
use super::orchard as orchard_fees;
|
||||
|
||||
/// A change strategy that and proposes change as a single output to the most current supported
|
||||
/// A change strategy that proposes change as a single output to the most current supported
|
||||
/// shielded pool and delegates fee calculation to the provided fee rule.
|
||||
pub struct SingleOutputChangeStrategy {
|
||||
fee_rule: FixedFeeRule,
|
||||
|
|
|
@ -21,7 +21,7 @@ use super::{
|
|||
#[cfg(feature = "orchard")]
|
||||
use super::orchard as orchard_fees;
|
||||
|
||||
/// A change strategy that and proposes change as a single output to the most current supported
|
||||
/// A change strategy that proposes change as a single output to the most current supported
|
||||
/// shielded pool and delegates fee calculation to the provided fee rule.
|
||||
pub struct SingleOutputChangeStrategy {
|
||||
fee_rule: Zip317FeeRule,
|
||||
|
|
|
@ -76,13 +76,24 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
/// A trait for encoding and decoding Zcash addresses.
|
||||
pub trait AddressCodec<P>
|
||||
where
|
||||
Self: std::marker::Sized,
|
||||
{
|
||||
type Error;
|
||||
|
||||
/// Encode a Zcash address.
|
||||
///
|
||||
/// # Arguments
|
||||
/// * `params` - The network the address is to be used on.
|
||||
fn encode(&self, params: &P) -> String;
|
||||
|
||||
/// Decodes a Zcash address from its string representation.
|
||||
///
|
||||
/// # Arguments
|
||||
/// * `params` - The network the address is to be used on.
|
||||
/// * `address` - The string representation of the address.
|
||||
fn decode(params: &P, address: &str) -> Result<Self, Self::Error>;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,9 +44,9 @@ pub const MINIMUM_FEE: NonNegativeAmount = NonNegativeAmount::const_from_u64(10_
|
|||
|
||||
/// A [`FeeRule`] implementation that implements the [ZIP 317] fee rule.
|
||||
///
|
||||
/// This fee rule supports only P2pkh transparent inputs; an error will be returned if a coin
|
||||
/// containing a non-p2pkh script is provided as an input. This fee rule may slightly overestimate
|
||||
/// fees in case where the user is attempting to spend more than ~150 transparent inputs.
|
||||
/// This fee rule supports Orchard, Sapling, and (P2PKH only) transparent inputs.
|
||||
/// Returns an error if a coin containing a non-p2pkh script is provided as an input.
|
||||
/// This fee rule may slightly overestimate fees in case where the user is attempting to spend more than ~150 transparent inputs.
|
||||
///
|
||||
/// [`FeeRule`]: crate::transaction::fees::FeeRule
|
||||
/// [ZIP 317]: https//zips.z.cash/zip-0317
|
||||
|
|
Loading…
Reference in New Issue