mirror of https://github.com/zcash/orchard.git
Add doctest example to orchard::Address that exercises key derivation
This commit is contained in:
parent
27501702d5
commit
5772c71a89
|
@ -3,6 +3,15 @@ use halo2::pasta::pallas;
|
|||
use crate::keys::Diversifier;
|
||||
|
||||
/// A shielded payment address.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use orchard::keys::{SpendingKey, FullViewingKey};
|
||||
///
|
||||
/// let sk = SpendingKey::from_bytes([7; 32]).unwrap();
|
||||
/// let address = FullViewingKey::from(&sk).default_address();
|
||||
/// ```
|
||||
#[derive(Debug)]
|
||||
pub struct Address {
|
||||
d: Diversifier,
|
||||
|
|
Loading…
Reference in New Issue