Struct bdk::descriptor::DerivedDescriptorKey[][src]

pub struct DerivedDescriptorKey<'s>(_, _);

Extended DescriptorPublicKey that has been derived

Derived keys are guaranteed to never contain wildcards of any kind

Implementations

impl<'s> DerivedDescriptorKey<'s>[src]

pub fn new(
    key: DescriptorPublicKey,
    secp: &'s Secp256k1<All>
) -> DerivedDescriptorKey<'s>
[src]

Construct a new derived key

Panics if the key is wildcard

Methods from Deref<Target = DescriptorPublicKey>

pub fn master_fingerprint(&self) -> Fingerprint[src]

The fingerprint of the master key associated with this key

pub fn full_derivation_path(&self) -> DerivationPath[src]

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)

pub fn is_deriveable(&self) -> bool[src]

Whether or not the key has a wildcards

pub fn derive_public_key<C>(
    &self,
    secp: &Secp256k1<C>
) -> Result<PublicKey, ConversionError> where
    C: Verification, 
[src]

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

impl<'s> Clone for DerivedDescriptorKey<'s>[src]

impl<'s> Debug for DerivedDescriptorKey<'s>[src]

impl<'s> Deref for DerivedDescriptorKey<'s>[src]

type Target = DescriptorPublicKey

The resulting type after dereferencing.

impl<'s> Display for DerivedDescriptorKey<'s>[src]

impl<'s> Eq for DerivedDescriptorKey<'s>[src]

impl<'s> Hash for DerivedDescriptorKey<'s>[src]

impl<'s> MiniscriptKey for DerivedDescriptorKey<'s>[src]

type Hash = Self

The associated Hash type with the publicKey

impl<'s> Ord for DerivedDescriptorKey<'s>[src]

impl<'s> PartialEq<DerivedDescriptorKey<'s>> for DerivedDescriptorKey<'s>[src]

impl<'s> PartialOrd<DerivedDescriptorKey<'s>> for DerivedDescriptorKey<'s>[src]

impl<'s> ToPublicKey for DerivedDescriptorKey<'s>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,