[][src]Enum wagyu_zcash::private_key::ZcashPrivateKey

pub enum ZcashPrivateKey<N: ZcashNetwork> {
    P2PKH(P2PKHSpendingKey<N>),
    P2SH(P2SHSpendingKey),
    Sprout(SproutSpendingKey<N>),
    Sapling(SaplingSpendingKey<N>),
}

Represents a Zcash private key

Variants

P2PKH transparent spending key

P2SH transparent spending key

Sprout shielded spending key

Sapling(SaplingSpendingKey<N>)

Sapling shielded spending key

Methods

impl<N: ZcashNetwork> ZcashPrivateKey<N>[src]

pub fn new_p2pkh<R: Rng>(rng: &mut R) -> Result<Self, PrivateKeyError>[src]

Returns a randomly-generated Zcash P2PKH private key.

pub fn new_sprout<R: Rng>(rng: &mut R) -> Result<Self, PrivateKeyError>[src]

Returns a randomly-generated Zcash Sprout private key.

pub fn new_sapling<R: Rng>(rng: &mut R) -> Result<Self, PrivateKeyError>[src]

Returns a randomly-generated Zcash Sapling private key.

Trait Implementations

impl<N: Clone + ZcashNetwork> Clone for ZcashPrivateKey<N>[src]

impl<N: Debug + ZcashNetwork> Debug for ZcashPrivateKey<N>[src]

impl<N: ZcashNetwork> Display for ZcashPrivateKey<N>[src]

impl<N: Eq + ZcashNetwork> Eq for ZcashPrivateKey<N>[src]

impl<N: ZcashNetwork> FromStr for ZcashPrivateKey<N>[src]

type Err = PrivateKeyError

The associated error which can be returned from parsing.

impl<N: PartialEq + ZcashNetwork> PartialEq<ZcashPrivateKey<N>> for ZcashPrivateKey<N>[src]

impl<N: ZcashNetwork> PrivateKey for ZcashPrivateKey<N>[src]

type Address = ZcashAddress<N>

type Format = ZcashFormat

type PublicKey = ZcashPublicKey<N>

fn new<R: Rng>(rng: &mut R) -> Result<Self, PrivateKeyError>[src]

Returns a randomly-generated compressed Zcash private key.

fn to_public_key(&self) -> Self::PublicKey[src]

Returns the public key of the corresponding Zcash private key.

fn to_address(
    &self,
    format: &Self::Format
) -> Result<Self::Address, AddressError>
[src]

Returns the address of the corresponding Zcash private key.

impl<N: ZcashNetwork> StructuralEq for ZcashPrivateKey<N>[src]

impl<N: ZcashNetwork> StructuralPartialEq for ZcashPrivateKey<N>[src]

Auto Trait Implementations

impl<N> RefUnwindSafe for ZcashPrivateKey<N> where
    N: RefUnwindSafe

impl<N> Send for ZcashPrivateKey<N>

impl<N> Sync for ZcashPrivateKey<N>

impl<N> Unpin for ZcashPrivateKey<N> where
    N: Unpin

impl<N> UnwindSafe for ZcashPrivateKey<N> where
    N: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,