Doc improvements
This commit is contained in:
parent
2be6166f9f
commit
aabee02247
|
@ -17,7 +17,7 @@ use super::{
|
||||||
#[cfg(feature = "orchard")]
|
#[cfg(feature = "orchard")]
|
||||||
use super::orchard as orchard_fees;
|
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.
|
/// shielded pool and delegates fee calculation to the provided fee rule.
|
||||||
pub struct SingleOutputChangeStrategy {
|
pub struct SingleOutputChangeStrategy {
|
||||||
fee_rule: FixedFeeRule,
|
fee_rule: FixedFeeRule,
|
||||||
|
|
|
@ -21,7 +21,7 @@ use super::{
|
||||||
#[cfg(feature = "orchard")]
|
#[cfg(feature = "orchard")]
|
||||||
use super::orchard as orchard_fees;
|
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.
|
/// shielded pool and delegates fee calculation to the provided fee rule.
|
||||||
pub struct SingleOutputChangeStrategy {
|
pub struct SingleOutputChangeStrategy {
|
||||||
fee_rule: Zip317FeeRule,
|
fee_rule: Zip317FeeRule,
|
||||||
|
|
|
@ -76,13 +76,24 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// A trait for encoding and decoding Zcash addresses.
|
||||||
pub trait AddressCodec<P>
|
pub trait AddressCodec<P>
|
||||||
where
|
where
|
||||||
Self: std::marker::Sized,
|
Self: std::marker::Sized,
|
||||||
{
|
{
|
||||||
type Error;
|
type Error;
|
||||||
|
|
||||||
|
/// Encode a Zcash address.
|
||||||
|
///
|
||||||
|
/// # Arguments
|
||||||
|
/// * `params` - The network the address is to be used on.
|
||||||
fn encode(&self, params: &P) -> String;
|
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>;
|
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.
|
/// 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
|
/// This fee rule supports inputs from orchard, sapling, and transparent pools (P2PKH only).
|
||||||
/// containing a non-p2pkh script is provided as an input. This fee rule may slightly overestimate
|
/// An error will be returned if a coin containing a non-p2pkh script is provided as an input.
|
||||||
/// fees in case where the user is attempting to spend more than ~150 transparent inputs.
|
/// 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
|
/// [`FeeRule`]: crate::transaction::fees::FeeRule
|
||||||
/// [ZIP 317]: https//zips.z.cash/zip-0317
|
/// [ZIP 317]: https//zips.z.cash/zip-0317
|
||||||
|
|
Loading…
Reference in New Issue