Enum sapio_miniscript::interpreter::KeySigPair
source · [−]pub enum KeySigPair {
Ecdsa(PublicKey, EcdsaSig),
Schnorr(XOnlyPublicKey, SchnorrSig),
}
Expand description
A type for representing signatures supported as of bitcoin core 22.0
Variants
Ecdsa(PublicKey, EcdsaSig)
A Full public key and corresponding Ecdsa signature
Schnorr(XOnlyPublicKey, SchnorrSig)
A x-only key and corresponding Schnorr signature
Implementations
sourceimpl KeySigPair
impl KeySigPair
sourcepub fn as_ecdsa(&self) -> Option<(PublicKey, EcdsaSig)>
pub fn as_ecdsa(&self) -> Option<(PublicKey, EcdsaSig)>
Obtain a pair of (bitcoin::PublicKey
, bitcoin::EcdsaSig
) from KeySigPair
sourcepub fn as_schnorr(&self) -> Option<(XOnlyPublicKey, SchnorrSig)>
pub fn as_schnorr(&self) -> Option<(XOnlyPublicKey, SchnorrSig)>
Obtain a pair of ([bitcoin::XOnlyPublicKey
], bitcoin::SchnorrSig
) from KeySigPair
Trait Implementations
sourceimpl Clone for KeySigPair
impl Clone for KeySigPair
sourcefn clone(&self) -> KeySigPair
fn clone(&self) -> KeySigPair
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for KeySigPair
impl Debug for KeySigPair
sourceimpl PartialEq<KeySigPair> for KeySigPair
impl PartialEq<KeySigPair> for KeySigPair
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &KeySigPair) -> bool
fn ne(&self, other: &KeySigPair) -> bool
This method tests for !=
.
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
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