Struct hwi::types::HWIExtendedPubKey
source · pub struct HWIExtendedPubKey {
pub xpub: Xpub,
}
Fields§
§xpub: Xpub
Methods from Deref<Target = Xpub>§
sourcepub fn derive_pub<C, P>(
&self,
secp: &Secp256k1<C>,
path: &P
) -> Result<Xpub, Error>
pub fn derive_pub<C, P>( &self, secp: &Secp256k1<C>, path: &P ) -> Result<Xpub, Error>
Attempts to derive an extended public key from a path.
The path
argument can be any type implementing AsRef<ChildNumber>
, such as DerivationPath
, for instance.
sourcepub fn ckd_pub_tweak(
&self,
i: ChildNumber
) -> Result<(SecretKey, ChainCode), Error>
pub fn ckd_pub_tweak( &self, i: ChildNumber ) -> Result<(SecretKey, ChainCode), Error>
Compute the scalar tweak added to this key to get a child key
sourcepub fn ckd_pub<C>(
&self,
secp: &Secp256k1<C>,
i: ChildNumber
) -> Result<Xpub, Error>where
C: Verification,
pub fn ckd_pub<C>(
&self,
secp: &Secp256k1<C>,
i: ChildNumber
) -> Result<Xpub, Error>where
C: Verification,
Public->Public child key derivation
sourcepub fn identifier(&self) -> XKeyIdentifier
pub fn identifier(&self) -> XKeyIdentifier
Returns the HASH160 of the chaincode
sourcepub fn fingerprint(&self) -> Fingerprint
pub fn fingerprint(&self) -> Fingerprint
Returns the first four bytes of the identifier
Trait Implementations§
source§impl Clone for HWIExtendedPubKey
impl Clone for HWIExtendedPubKey
source§fn clone(&self) -> HWIExtendedPubKey
fn clone(&self) -> HWIExtendedPubKey
Returns a copy 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 HWIExtendedPubKey
impl Debug for HWIExtendedPubKey
source§impl Deref for HWIExtendedPubKey
impl Deref for HWIExtendedPubKey
source§impl<'de> Deserialize<'de> for HWIExtendedPubKey
impl<'de> Deserialize<'de> for HWIExtendedPubKey
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for HWIExtendedPubKey
impl PartialEq for HWIExtendedPubKey
source§fn eq(&self, other: &HWIExtendedPubKey) -> bool
fn eq(&self, other: &HWIExtendedPubKey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for HWIExtendedPubKey
impl StructuralPartialEq for HWIExtendedPubKey
Auto Trait Implementations§
impl Freeze for HWIExtendedPubKey
impl RefUnwindSafe for HWIExtendedPubKey
impl Send for HWIExtendedPubKey
impl Sync for HWIExtendedPubKey
impl Unpin for HWIExtendedPubKey
impl UnwindSafe for HWIExtendedPubKey
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