Enum miniscript::interpreter::KeySigPair
source · pub enum KeySigPair {
Ecdsa(PublicKey, Signature),
Schnorr(XOnlyPublicKey, Signature),
}
Expand description
A type for representing signatures supported as of bitcoin core 22.0
Variants§
Ecdsa(PublicKey, Signature)
A Full public key and corresponding Ecdsa signature
Schnorr(XOnlyPublicKey, Signature)
A x-only key and corresponding Schnorr signature
Implementations§
source§impl KeySigPair
impl KeySigPair
sourcepub fn as_ecdsa(&self) -> Option<(PublicKey, Signature)>
pub fn as_ecdsa(&self) -> Option<(PublicKey, Signature)>
Obtain a pair of (bitcoin::PublicKey
, bitcoin::ecdsa::Signature
) from KeySigPair
sourcepub fn as_schnorr(&self) -> Option<(XOnlyPublicKey, Signature)>
pub fn as_schnorr(&self) -> Option<(XOnlyPublicKey, Signature)>
Obtain a pair of (bitcoin::secp256k1::XOnlyPublicKey
, bitcoin::taproot::Signature
) from KeySigPair
Trait Implementations§
source§impl Clone for KeySigPair
impl Clone for KeySigPair
source§fn clone(&self) -> KeySigPair
fn clone(&self) -> KeySigPair
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for KeySigPair
impl Debug for KeySigPair
source§impl Hash for KeySigPair
impl Hash for KeySigPair
source§impl PartialEq<KeySigPair> for KeySigPair
impl PartialEq<KeySigPair> for KeySigPair
source§fn eq(&self, other: &KeySigPair) -> bool
fn eq(&self, other: &KeySigPair) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for KeySigPair
impl Eq for KeySigPair
impl StructuralEq for KeySigPair
impl StructuralPartialEq for KeySigPair
Auto Trait Implementations§
impl RefUnwindSafe for KeySigPair
impl Send for KeySigPair
impl Sync for KeySigPair
impl Unpin for KeySigPair
impl UnwindSafe for KeySigPair
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more