Struct thor_devkit::hdnode::HDNode

source ·
pub struct HDNode(/* private fields */);
Expand description

Hierarchically deterministic node.

Implementations§

source§

impl HDNode

source

pub fn build<'a>() -> HDNodeBuilder<'a>

Build an HDNode from various parameters

source

pub fn derive(&self, index: u32) -> Result<Self, HDNodeError>

Derive a child given an index.

source

pub fn public_key(&self) -> ExtendedPublicKey<PublicKey>

Get underlying public key.

source

pub fn private_key(&self) -> Result<ExtendedPrivateKey<PrivateKey>, HDNodeError>

Get underlying private key.

source

pub fn chain_code(&self) -> ChainCode

Get underlying chain code.

source

pub fn parent_fingerprint(&self) -> [u8; 4]

Get underlying chain code.

source

pub fn child_number(&self) -> ChildNumber

Get underlying chain code.

source

pub fn depth(&self) -> u8

Get underlying chain code.

source

pub fn address(self) -> Address

Get the address of current node.

Trait Implementations§

source§

impl Clone for HDNode

source§

fn clone(&self) -> HDNode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for HDNode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for HDNode

source§

fn eq(&self, other: &HDNode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for HDNode

source§

impl StructuralEq for HDNode

source§

impl StructuralPartialEq for HDNode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V