Struct sapio_bitcoin::util::schnorr::TweakedKeyPair
source · [−]pub struct TweakedKeyPair(_);
Expand description
Tweaked BIP-340 key pair
Implementations
sourceimpl TweakedKeyPair
impl TweakedKeyPair
sourcepub fn dangerous_assume_tweaked(pair: KeyPair) -> TweakedKeyPair
pub fn dangerous_assume_tweaked(pair: KeyPair) -> TweakedKeyPair
Creates a new TweakedKeyPair
from a KeyPair
. No tweak is applied, consider
calling tap_tweak
on an UntweakedKeyPair
instead of using this constructor.
This method is dangerous and can lead to loss of funds if used incorrectly. Specifically, in multi-party protocols a peer can provide a value that allows them to steal.
sourcepub fn into_inner(self) -> KeyPair
pub fn into_inner(self) -> KeyPair
Returns the underlying key pair
Trait Implementations
sourceimpl Clone for TweakedKeyPair
impl Clone for TweakedKeyPair
sourcefn clone(&self) -> TweakedKeyPair
fn clone(&self) -> TweakedKeyPair
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 TweakedKeyPair
impl Debug for TweakedKeyPair
sourceimpl<'de> Deserialize<'de> for TweakedKeyPair
impl<'de> Deserialize<'de> for TweakedKeyPair
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<TweakedKeyPair> for KeyPair
impl From<TweakedKeyPair> for KeyPair
sourcefn from(pair: TweakedKeyPair) -> Self
fn from(pair: TweakedKeyPair) -> Self
Converts to this type from the input type.
sourceimpl Hash for TweakedKeyPair
impl Hash for TweakedKeyPair
sourceimpl Ord for TweakedKeyPair
impl Ord for TweakedKeyPair
sourceimpl PartialEq<TweakedKeyPair> for TweakedKeyPair
impl PartialEq<TweakedKeyPair> for TweakedKeyPair
sourcefn eq(&self, other: &TweakedKeyPair) -> bool
fn eq(&self, other: &TweakedKeyPair) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TweakedKeyPair) -> bool
fn ne(&self, other: &TweakedKeyPair) -> bool
This method tests for !=
.
sourceimpl PartialOrd<TweakedKeyPair> for TweakedKeyPair
impl PartialOrd<TweakedKeyPair> for TweakedKeyPair
sourcefn partial_cmp(&self, other: &TweakedKeyPair) -> Option<Ordering>
fn partial_cmp(&self, other: &TweakedKeyPair) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Serialize for TweakedKeyPair
impl Serialize for TweakedKeyPair
impl Copy for TweakedKeyPair
impl Eq for TweakedKeyPair
impl StructuralEq for TweakedKeyPair
impl StructuralPartialEq for TweakedKeyPair
Auto Trait Implementations
impl RefUnwindSafe for TweakedKeyPair
impl Send for TweakedKeyPair
impl Sync for TweakedKeyPair
impl Unpin for TweakedKeyPair
impl UnwindSafe for TweakedKeyPair
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)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more