Struct coins_bip32::xkeys::XPriv[][src]

pub struct XPriv { /* fields omitted */ }

A BIP32 eXtended Privkey

Implementations

impl XPriv[src]

pub fn new(key: SigningKey, xkey_info: XKeyInfo) -> Self[src]

Instantiate a new XPriv.

pub fn verify_key(&self) -> XPub[src]

Derive the associated XPub

pub fn fingerprint(&self) -> KeyFingerprint[src]

The fingerprint is the first 4 bytes of the HASH160 of the public key

pub fn root_node(
    hmac_key: &[u8],
    data: &[u8],
    hint: Option<Hint>
) -> Result<XPriv, Bip32Error>
[src]

Generate a customized root node

pub fn root_from_seed(
    data: &[u8],
    hint: Option<Hint>
) -> Result<XPriv, Bip32Error>
[src]

Generate a root node from some seed data. Uses the BIP32-standard hmac key.

Important:

Use a seed of AT LEAST 128 bits.

pub fn custom_root_node(
    hmac_key: &[u8],
    data: &[u8],
    hint: Option<Hint>
) -> Result<XPriv, Bip32Error>
[src]

Instantiate a root node using a custom HMAC key.

pub fn custom_root_from_seed(
    data: &[u8],
    hint: Option<Hint>
) -> Result<XPriv, Bip32Error>
[src]

Generate a root node from some seed data. Uses the BIP32-standard hmac key.

Important:

Use a seed of AT LEAST 128 bits.

pub fn derive_path<E, P>(&self, p: P) -> Result<Self, Bip32Error> where
    E: Into<Bip32Error>,
    P: TryInto<DerivationPath, Error = E>, 
[src]

Derive a series of child indices. Allows traversing several levels of the tree at once. Accepts an iterator producing u32, or a string.

Trait Implementations

impl AsRef<SigningKey> for XPriv[src]

impl AsRef<XKeyInfo> for XPriv[src]

impl AsRef<XPriv> for XPriv[src]

impl AsRef<XPriv> for DerivedXPriv[src]

impl Clone for XPriv[src]

impl Debug for XPriv[src]

impl<'de> Deserialize<'de> for XPriv[src]

impl<D> DigestSigner<D, Signature<Secp256k1>> for XPriv where
    D: BlockInput + FixedOutput<OutputSize = U32> + Clone + Default + Reset + Update
[src]

impl<D> DigestSigner<D, Signature> for XPriv where
    D: BlockInput + FixedOutput<OutputSize = U32> + Clone + Default + Reset + Update
[src]

impl FromStr for XPriv[src]

type Err = Bip32Error

The associated error which can be returned from parsing.

impl Parent for XPriv[src]

impl PartialEq<XPriv> for XPriv[src]

impl Serialize for XPriv[src]

Auto Trait Implementations

impl RefUnwindSafe for XPriv

impl Send for XPriv

impl Sync for XPriv

impl Unpin for XPriv

impl UnwindSafe for XPriv

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> Conv for T

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> FmtForward for T

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

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

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

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.