pub struct ExtendedPublicKey { /* private fields */ }Expand description
Extended public key (BIP32).
Can derive child public keys for non-hardened paths only.
Implementations§
Source§impl ExtendedPublicKey
impl ExtendedPublicKey
Sourcepub fn derive_child(&self, index: u32) -> Result<Self, HdError>
pub fn derive_child(&self, index: u32) -> Result<Self, HdError>
Derive child public key (normal derivation only).
Returns error for hardened derivation (index >= 0x80000000).
Sourcepub fn derive_path(&self, path: &DerivationPath) -> Result<Self, HdError>
pub fn derive_path(&self, path: &DerivationPath) -> Result<Self, HdError>
Derive key at derivation path (normal derivation only).
Sourcepub fn public_key(&self) -> PublicKey
pub fn public_key(&self) -> PublicKey
Get the underlying public key.
Sourcepub fn fingerprint(&self) -> [u8; 4]
pub fn fingerprint(&self) -> [u8; 4]
Get fingerprint (first 4 bytes of HASH160 of public key).
Sourcepub fn chain_code(&self) -> &[u8; 32]
pub fn chain_code(&self) -> &[u8; 32]
Get chain code.
Trait Implementations§
Source§impl Clone for ExtendedPublicKey
impl Clone for ExtendedPublicKey
Source§fn clone(&self) -> ExtendedPublicKey
fn clone(&self) -> ExtendedPublicKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExtendedPublicKey
impl Debug for ExtendedPublicKey
Auto Trait Implementations§
impl Freeze for ExtendedPublicKey
impl RefUnwindSafe for ExtendedPublicKey
impl Send for ExtendedPublicKey
impl Sync for ExtendedPublicKey
impl Unpin for ExtendedPublicKey
impl UnwindSafe for ExtendedPublicKey
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