[][src]Struct bitcoin::util::bip32::ExtendedPrivKey

pub struct ExtendedPrivKey {
    pub network: Network,
    pub depth: u8,
    pub parent_fingerprint: Fingerprint,
    pub child_number: ChildNumber,
    pub secret_key: SecretKey,
    pub chain_code: ChainCode,
}

Extended private key

Fields

network: Network

The network this key is to be used on

depth: u8

How many derivations this key is from the master (which is 0)

parent_fingerprint: Fingerprint

Fingerprint of the parent key (0 for master)

child_number: ChildNumber

Child number of the key used to derive from parent (0 for master)

secret_key: SecretKey

Secret key

chain_code: ChainCode

Chain code

Methods

impl ExtendedPrivKey[src]

pub fn new_master(
    network: Network,
    seed: &[u8]
) -> Result<ExtendedPrivKey, Error>
[src]

Construct a new master key from a seed value

pub fn derive_priv<C: Signing>(
    &self,
    secp: &Secp256k1<C>,
    cnums: &[ChildNumber]
) -> Result<ExtendedPrivKey, Error>
[src]

Attempts to derive an extended private key from a path.

pub fn ckd_priv<C: Signing>(
    &self,
    secp: &Secp256k1<C>,
    i: ChildNumber
) -> Result<ExtendedPrivKey, Error>
[src]

Private->Private child key derivation

pub fn identifier<C: Signing>(&self, secp: &Secp256k1<C>) -> Hash[src]

Returns the HASH160 of the chaincode

pub fn fingerprint<C: Signing>(&self, secp: &Secp256k1<C>) -> Fingerprint[src]

Returns the first four bytes of the identifier

Trait Implementations

impl Eq for ExtendedPrivKey[src]

impl Clone for ExtendedPrivKey[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for ExtendedPrivKey[src]

impl PartialEq<ExtendedPrivKey> for ExtendedPrivKey[src]

impl Debug for ExtendedPrivKey[src]

impl Display for ExtendedPrivKey[src]

impl FromStr for ExtendedPrivKey[src]

type Err = Error

The associated error which can be returned from parsing.

Auto Trait Implementations

Blanket Implementations

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

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

type Owned = T

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

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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