Struct bdk::descriptor::DerivedDescriptorKey [−][src]
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]
key: DescriptorPublicKey,
secp: &'s Secp256k1<All>
) -> DerivedDescriptorKey<'s>
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]
&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
impl<'s> Clone for DerivedDescriptorKey<'s>
[src]
fn clone(&self) -> DerivedDescriptorKey<'s>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'s> Debug for DerivedDescriptorKey<'s>
[src]
impl<'s> Deref for DerivedDescriptorKey<'s>
[src]
type Target = DescriptorPublicKey
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl<'s> Display for DerivedDescriptorKey<'s>
[src]
impl<'s> Eq for DerivedDescriptorKey<'s>
[src]
impl<'s> Hash for DerivedDescriptorKey<'s>
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'s> MiniscriptKey for DerivedDescriptorKey<'s>
[src]
type Hash = Self
The associated Hash type with the publicKey
fn to_pubkeyhash(&self) -> Self::Hash
[src]
fn is_uncompressed(&self) -> bool
[src]
fn serialized_len(&self) -> usize
[src]
impl<'s> Ord for DerivedDescriptorKey<'s>
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<'s> PartialEq<DerivedDescriptorKey<'s>> for DerivedDescriptorKey<'s>
[src]
impl<'s> PartialOrd<DerivedDescriptorKey<'s>> for DerivedDescriptorKey<'s>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> ToPublicKey for DerivedDescriptorKey<'s>
[src]
fn to_public_key(&self) -> PublicKey
[src]
fn hash_to_hash160(hash: &Self::Hash) -> Hash
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
[src]
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,