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

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)

private_key: SecretKey

Private key

chain_code: ChainCode

Chain code

Implementations

Construct a new master key from a seed value

Constructs ECDSA compressed private key matching internal secret key representation.

Constructs BIP340 keypair for Schnorr signatures and Taproot use matching the internal secret key representation.

Attempts to derive an extended private key from a path.

The path argument can be both of type DerivationPath or Vec<ChildNumber>.

Private->Private child key derivation

Decoding extended private key from binary data according to BIP 32

Extended private key binary encoding according to BIP 32

Returns the HASH160 of the public key belonging to the xpriv

Returns the first four bytes of the identifier

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.