Struct hwi::types::HWIExtendedPubKey
source · pub struct HWIExtendedPubKey {
pub xpub: ExtendedPubKey,
}
Fields§
§xpub: ExtendedPubKey
Methods from Deref<Target = ExtendedPubKey>§
sourcepub fn derive_pub<C, P>(
&self,
secp: &Secp256k1<C>,
path: &P
) -> Result<ExtendedPubKey, Error>where
C: Verification,
P: AsRef<[ChildNumber]>,
pub fn derive_pub<C, P>(
&self,
secp: &Secp256k1<C>,
path: &P
) -> Result<ExtendedPubKey, Error>where
C: Verification,
P: AsRef<[ChildNumber]>,
Attempts to derive an extended public key from a path.
The path
argument can be both of type DerivationPath
or Vec<ChildNumber>
.
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<ExtendedPubKey, Error>where
C: Verification,
pub fn ckd_pub<C>(
&self,
secp: &Secp256k1<C>,
i: ChildNumber
) -> Result<ExtendedPubKey, Error>where
C: Verification,
Public->Public child key derivation
sourcepub fn identifier(&self) -> XpubIdentifier
pub fn identifier(&self) -> XpubIdentifier
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<HWIExtendedPubKey> for HWIExtendedPubKey
impl PartialEq<HWIExtendedPubKey> 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 ==
.