Struct coins_bip32::derived::DerivedPubkey
source · [−]pub struct DerivedPubkey { /* private fields */ }
Expand description
A Pubkey with its derivation. Primarily used by PSBT.
Implementations
sourceimpl DerivedPubkey
impl DerivedPubkey
sourceimpl DerivedPubkey
impl DerivedPubkey
sourcepub fn new(key: VerifyingKey, derivation: KeyDerivation) -> Self
pub fn new(key: VerifyingKey, derivation: KeyDerivation) -> Self
Instantiate a new DerivedPubkey
sourcepub fn pubkey_hash160(&self) -> Hash160Digest
pub fn pubkey_hash160(&self) -> Hash160Digest
Return the hash of the compressed (Sec1) pubkey.
sourcepub fn fingerprint(&self) -> KeyFingerprint
pub fn fingerprint(&self) -> KeyFingerprint
The fingerprint is the first 4 bytes of the HASH160 of the serialized public key.
Trait Implementations
sourceimpl AsRef<VerifyingKey> for DerivedPubkey
impl AsRef<VerifyingKey> for DerivedPubkey
sourcefn as_ref(&self) -> &VerifyingKey
fn as_ref(&self) -> &VerifyingKey
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl Debug for DerivedPubkey
impl Debug for DerivedPubkey
sourceimpl DerivedKey for DerivedPubkey
impl DerivedKey for DerivedPubkey
sourcefn derivation(&self) -> &KeyDerivation
fn derivation(&self) -> &KeyDerivation
Return this key’s derivation
sourcefn same_root<K: DerivedKey>(&self, other: &K) -> bool
fn same_root<K: DerivedKey>(&self, other: &K) -> bool
true
if the keys share a root fingerprint, false
otherwise. Note that on key
fingerprints, which may collide accidentally, or be intentionally collided. Read more
sourcefn is_possible_ancestor_of<K: DerivedKey>(&self, other: &K) -> bool
fn is_possible_ancestor_of<K: DerivedKey>(&self, other: &K) -> bool
true
if this key is a possible ancestor of the argument, false
otherwise. Read more
sourcefn path_to_descendant<K: DerivedKey>(&self, other: &K) -> Option<DerivationPath>
fn path_to_descendant<K: DerivedKey>(&self, other: &K) -> Option<DerivationPath>
Returns the path to the descendant, or None
if the argument is definitely not a
descendant. Read more
sourceimpl<D> DigestVerifier<D, Signature<Secp256k1>> for DerivedPubkey where
D: Digest + FixedOutput<OutputSize = U32>,
impl<D> DigestVerifier<D, Signature<Secp256k1>> for DerivedPubkey where
D: Digest + FixedOutput<OutputSize = U32>,
sourceimpl<D> DigestVerifier<D, Signature> for DerivedPubkey where
D: Digest + FixedOutput<OutputSize = U32>,
impl<D> DigestVerifier<D, Signature> for DerivedPubkey where
D: Digest + FixedOutput<OutputSize = U32>,
Auto Trait Implementations
impl RefUnwindSafe for DerivedPubkey
impl Send for DerivedPubkey
impl Sync for DerivedPubkey
impl Unpin for DerivedPubkey
impl UnwindSafe for DerivedPubkey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more