Trait coins_bip32::xkeys::Parent

source ·
pub trait Parent: Sized + Clone {
    // Required method
    fn derive_child(&self, index: u32) -> Result<Self, Bip32Error>;

    // Provided method
    fn derive_path<E, P>(&self, p: P) -> Result<Self, Bip32Error>
       where E: Into<Bip32Error>,
             P: TryInto<DerivationPath, Error = E> { ... }
}
Expand description

A Parent key can be used to derive children.

Required Methods§

source

fn derive_child(&self, index: u32) -> Result<Self, Bip32Error>

Derive the child at index. Note that this may produce the child at index+1 in rare circumstances. For public keys this will derive public children. For private keys it will derive private children.

Provided Methods§

source

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

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

Implementors§