[−][src]Struct bitcoin::util::bip32::ExtendedPrivKey
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: PrivateKey
Private key
chain_code: ChainCode
Chain code
Methods
impl ExtendedPrivKey
[src]
pub fn new_master(
network: Network,
seed: &[u8]
) -> Result<ExtendedPrivKey, Error>
[src]
network: Network,
seed: &[u8]
) -> Result<ExtendedPrivKey, Error>
Construct a new master key from a seed value
pub fn derive_priv<C: Signing, P: AsRef<[ChildNumber]>>(
&self,
secp: &Secp256k1<C>,
path: &P
) -> Result<ExtendedPrivKey, Error>
[src]
&self,
secp: &Secp256k1<C>,
path: &P
) -> Result<ExtendedPrivKey, Error>
Attempts to derive an extended private key from a path.
The path
argument can be both of type DerivationPath
or Vec<ChildNumber>
.
pub fn ckd_priv<C: Signing>(
&self,
secp: &Secp256k1<C>,
i: ChildNumber
) -> Result<ExtendedPrivKey, Error>
[src]
&self,
secp: &Secp256k1<C>,
i: ChildNumber
) -> Result<ExtendedPrivKey, Error>
Private->Private child key derivation
pub fn decode(data: &[u8]) -> Result<ExtendedPrivKey, Error>
[src]
Decoding extended private key from binary data according to BIP 32
pub fn encode(&self) -> [u8; 78]
[src]
Extended private key binary encoding according to BIP 32
pub fn identifier<C: Signing>(&self, secp: &Secp256k1<C>) -> XpubIdentifier
[src]
Returns the HASH160 of the public key belonging to the xpriv
pub fn fingerprint<C: Signing>(&self, secp: &Secp256k1<C>) -> Fingerprint
[src]
Returns the first four bytes of the identifier
Trait Implementations
impl Clone for ExtendedPrivKey
[src]
fn clone(&self) -> ExtendedPrivKey
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<ExtendedPrivKey> for ExtendedPrivKey
[src]
fn eq(&self, other: &ExtendedPrivKey) -> bool
[src]
fn ne(&self, other: &ExtendedPrivKey) -> bool
[src]
impl Eq for ExtendedPrivKey
[src]
impl Copy for ExtendedPrivKey
[src]
impl Display for ExtendedPrivKey
[src]
impl Debug for ExtendedPrivKey
[src]
impl FromStr for ExtendedPrivKey
[src]
Auto Trait Implementations
impl Unpin for ExtendedPrivKey
impl Sync for ExtendedPrivKey
impl Send for ExtendedPrivKey
impl UnwindSafe for ExtendedPrivKey
impl RefUnwindSafe for ExtendedPrivKey
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,