pub struct HDNode(/* private fields */);Expand description
Hierarchically deterministic node.
To construct a wallet, use the HDNode::build method. It exposes access to the builder
that supports multiple construction methods and validates the arguments.
Implementations§
Source§impl HDNode
impl HDNode
Sourcepub fn build<'a>() -> HDNodeBuilder<'a>
pub fn build<'a>() -> HDNodeBuilder<'a>
Build an HDNode from various parameters
Sourcepub fn derive(&self, index: u32) -> Result<Self, HDNodeError>
pub fn derive(&self, index: u32) -> Result<Self, HDNodeError>
Derive a child given an index.
Sourcepub fn public_key(&self) -> ExtendedPublicKey<PublicKey>
pub fn public_key(&self) -> ExtendedPublicKey<PublicKey>
Get underlying extended public key.
Sourcepub fn private_key(&self) -> Result<ExtendedPrivateKey<PrivateKey>, HDNodeError>
pub fn private_key(&self) -> Result<ExtendedPrivateKey<PrivateKey>, HDNodeError>
Get underlying extended private key.
Sourcepub fn chain_code(&self) -> ChainCode
pub fn chain_code(&self) -> ChainCode
Get underlying chain code.
Sourcepub fn parent_fingerprint(&self) -> [u8; 4]
pub fn parent_fingerprint(&self) -> [u8; 4]
Get underlying chain code.
Sourcepub fn child_number(&self) -> ChildNumber
pub fn child_number(&self) -> ChildNumber
Get underlying chain code.
Trait Implementations§
impl Eq for HDNode
impl StructuralPartialEq for HDNode
Auto Trait Implementations§
impl Freeze for HDNode
impl RefUnwindSafe for HDNode
impl Send for HDNode
impl Sync for HDNode
impl Unpin for HDNode
impl UnwindSafe for HDNode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more