Struct miniscript::descriptor::DescriptorPublicKeyCtx
source · [−]pub struct DescriptorPublicKeyCtx<'secp, C: 'secp + Verification> { /* private fields */ }
Expand description
Context information for deriving a public key from DescriptorPublicKey
Implementations
sourceimpl<'secp, C: Verification> DescriptorPublicKeyCtx<'secp, C>
impl<'secp, C: Verification> DescriptorPublicKeyCtx<'secp, C>
sourcepub fn new(secp_ctx: &'secp Secp256k1<C>, child_number: ChildNumber) -> Self
pub fn new(secp_ctx: &'secp Secp256k1<C>, child_number: ChildNumber) -> Self
Create a new context
Trait Implementations
sourceimpl<'secp, C: Verification> Clone for DescriptorPublicKeyCtx<'secp, C>
impl<'secp, C: Verification> Clone for DescriptorPublicKeyCtx<'secp, C>
sourceimpl<'secp, C: Debug + 'secp + Verification> Debug for DescriptorPublicKeyCtx<'secp, C>
impl<'secp, C: Debug + 'secp + Verification> Debug for DescriptorPublicKeyCtx<'secp, C>
sourceimpl<'secp, C: Verification> ToPublicKey<DescriptorPublicKeyCtx<'secp, C>> for DescriptorPublicKey
impl<'secp, C: Verification> ToPublicKey<DescriptorPublicKeyCtx<'secp, C>> for DescriptorPublicKey
sourcefn to_public_key(
&self,
to_pk_ctx: DescriptorPublicKeyCtx<'secp, C>
) -> PublicKey
fn to_public_key(
&self,
to_pk_ctx: DescriptorPublicKeyCtx<'secp, C>
) -> PublicKey
Converts an object to a public key C represents additional context information that maybe required for deriving a bitcoin::PublicKey from MiniscriptKey You may require secp context for crypto operations or additional information for substituting the wildcard in extended pubkeys Read more
sourcefn hash_to_hash160(
hash: &Self::Hash,
to_pk_ctx: DescriptorPublicKeyCtx<'secp, C>
) -> Hash
fn hash_to_hash160(
hash: &Self::Hash,
to_pk_ctx: DescriptorPublicKeyCtx<'secp, C>
) -> Hash
Converts a hashed version of the public key to a hash160
hash. Read more
sourcefn serialized_len(&self, to_pk_ctx: ToPkCtx) -> usize
fn serialized_len(&self, to_pk_ctx: ToPkCtx) -> usize
Computes the size of a public key when serialized in a script, including the length bytes Read more
impl<'secp, C: Verification> Copy for DescriptorPublicKeyCtx<'secp, C>
Auto Trait Implementations
impl<'secp, C> RefUnwindSafe for DescriptorPublicKeyCtx<'secp, C> where
C: RefUnwindSafe,
impl<'secp, C> Send for DescriptorPublicKeyCtx<'secp, C>
impl<'secp, C> Sync for DescriptorPublicKeyCtx<'secp, C>
impl<'secp, C> Unpin for DescriptorPublicKeyCtx<'secp, C>
impl<'secp, C> UnwindSafe for DescriptorPublicKeyCtx<'secp, C> where
C: RefUnwindSafe,
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more