Struct bdk::descriptor::DerivedDescriptorKey
source · [−]pub struct DerivedDescriptorKey<'s>(_, _);
Expand description
Extended DescriptorPublicKey
that has been derived
Derived keys are guaranteed to never contain wildcards of any kind
Implementations
Construct a new derived key
Panics if the key is wildcard
Methods from Deref<Target = DescriptorPublicKey>
The fingerprint of the master key associated with this key
Full path, from the master key
For wildcard keys this will return the path up to the wildcard, so you can get full paths by appending one additional derivation step, according to the wildcard type (hardened or normal)
Whether or not the key has a wildcards
pub fn derive_public_key<C>(
&self,
secp: &Secp256k1<C>
) -> Result<PublicKey, ConversionError> where
C: Verification,
pub fn derive_public_key<C>(
&self,
secp: &Secp256k1<C>
) -> Result<PublicKey, ConversionError> where
C: Verification,
Computes the public key corresponding to this descriptor key
Will return an error if the descriptor key has any hardened derivation steps in its path, or if the key has any wildcards.
To ensure there are no wildcards, call .derive(0)
or similar;
to avoid hardened derivation steps, start from a DescriptorSecretKey
and call as_public
, or call TranslatePk2::translate_pk2
with
some function which has access to secret key data.
Trait Implementations
type Target = DescriptorPublicKey
type Target = DescriptorPublicKey
The resulting type after dereferencing.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Converts an object to a public key
Converts a hashed version of the public key to a hash160
hash. Read more
Auto Trait Implementations
impl<'s> RefUnwindSafe for DerivedDescriptorKey<'s>
impl<'s> Send for DerivedDescriptorKey<'s>
impl<'s> Sync for DerivedDescriptorKey<'s>
impl<'s> Unpin for DerivedDescriptorKey<'s>
impl<'s> UnwindSafe for DerivedDescriptorKey<'s>
Blanket Implementations
Mutably borrows from an owned value. Read more