Doc improvements

This commit is contained in:
Andrew Arnott 2024-01-06 20:28:20 -07:00
parent 2be6166f9f
commit aabee02247
No known key found for this signature in database
GPG Key ID: 251505B99C25745D
4 changed files with 16 additions and 5 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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>;
}

View File

@ -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 inputs from orchard, sapling, and transparent pools (P2PKH only).
/// 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.
///
/// [`FeeRule`]: crate::transaction::fees::FeeRule
/// [ZIP 317]: https//zips.z.cash/zip-0317