Struct coins_bip32::derived::DerivedXPub
source · [−]pub struct DerivedXPub { /* private fields */ }
Expand description
An XPub with its derivation.
Implementations
sourceimpl DerivedXPub
impl DerivedXPub
sourceimpl DerivedXPub
impl DerivedXPub
sourcepub fn new(xpub: XPub, derivation: KeyDerivation) -> Self
pub fn new(xpub: XPub, derivation: KeyDerivation) -> Self
Instantiate a derived XPub from the XPub and derivatin. This usually should not be called directly. Prefer deriving keys from parents.
sourcepub fn is_public_ancestor_of(
&self,
other: &DerivedXPub
) -> Result<bool, Bip32Error>
pub fn is_public_ancestor_of(
&self,
other: &DerivedXPub
) -> Result<bool, Bip32Error>
Check if this XPriv is the private ancestor of some other derived key
Trait Implementations
sourceimpl AsRef<VerifyingKey> for DerivedXPub
impl AsRef<VerifyingKey> for DerivedXPub
sourcefn as_ref(&self) -> &VerifyingKey
fn as_ref(&self) -> &VerifyingKey
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl AsRef<XKeyInfo> for DerivedXPub
impl AsRef<XKeyInfo> for DerivedXPub
sourceimpl AsRef<XPub> for DerivedXPub
impl AsRef<XPub> for DerivedXPub
sourceimpl Clone for DerivedXPub
impl Clone for DerivedXPub
sourcefn clone(&self) -> DerivedXPub
fn clone(&self) -> DerivedXPub
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DerivedXPub
impl Debug for DerivedXPub
sourceimpl DerivedKey for DerivedXPub
impl DerivedKey for DerivedXPub
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<'de> Deserialize<'de> for DerivedXPub
impl<'de> Deserialize<'de> for DerivedXPub
sourcefn 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
sourceimpl<D> DigestVerifier<D, Signature<Secp256k1>> for DerivedXPub where
D: Digest + FixedOutput<OutputSize = U32>,
impl<D> DigestVerifier<D, Signature<Secp256k1>> for DerivedXPub where
D: Digest + FixedOutput<OutputSize = U32>,
sourceimpl<D> DigestVerifier<D, Signature> for DerivedXPub where
D: Digest + FixedOutput<OutputSize = U32>,
impl<D> DigestVerifier<D, Signature> for DerivedXPub where
D: Digest + FixedOutput<OutputSize = U32>,
sourceimpl Parent for DerivedXPub
impl Parent for DerivedXPub
sourcefn derive_child(&self, index: u32) -> Result<Self, Bip32Error>
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. Read more
sourcefn derive_path<E, P>(&self, p: P) -> Result<Self, Bip32Error> where
E: Into<Bip32Error>,
P: TryInto<DerivationPath, Error = E>,
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. Read more
sourceimpl PartialEq<DerivedXPub> for DerivedXPub
impl PartialEq<DerivedXPub> for DerivedXPub
sourcefn eq(&self, other: &DerivedXPub) -> bool
fn eq(&self, other: &DerivedXPub) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &DerivedXPub) -> bool
fn ne(&self, other: &DerivedXPub) -> bool
This method tests for !=
.
sourceimpl Serialize for DerivedXPub
impl Serialize for DerivedXPub
impl StructuralPartialEq for DerivedXPub
Auto Trait Implementations
impl RefUnwindSafe for DerivedXPub
impl Send for DerivedXPub
impl Sync for DerivedXPub
impl Unpin for DerivedXPub
impl UnwindSafe for DerivedXPub
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