Struct bitcoin::util::schnorr::TweakedKeyPair
source · pub struct TweakedKeyPair(/* private fields */);
Expand description
Tweaked BIP-340 key pair
Implementations§
source§impl 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
👎Deprecated since 0.29.0: use to_inner instead
pub fn into_inner(self) -> KeyPair
Returns the underlying key pair
Trait Implementations§
source§impl Clone for TweakedKeyPair
impl Clone for TweakedKeyPair
source§fn clone(&self) -> TweakedKeyPair
fn clone(&self) -> TweakedKeyPair
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 TweakedKeyPair
impl Debug for TweakedKeyPair
source§impl<'de> Deserialize<'de> for TweakedKeyPair
impl<'de> Deserialize<'de> for TweakedKeyPair
source§fn 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
source§impl From<TweakedKeyPair> for KeyPair
impl From<TweakedKeyPair> for KeyPair
source§fn from(pair: TweakedKeyPair) -> Self
fn from(pair: TweakedKeyPair) -> Self
Converts to this type from the input type.
source§impl Hash for TweakedKeyPair
impl Hash for TweakedKeyPair
source§impl Ord for TweakedKeyPair
impl Ord for TweakedKeyPair
source§fn cmp(&self, other: &TweakedKeyPair) -> Ordering
fn cmp(&self, other: &TweakedKeyPair) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<TweakedKeyPair> for TweakedKeyPair
impl PartialEq<TweakedKeyPair> for TweakedKeyPair
source§fn 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 ==
.source§impl PartialOrd<TweakedKeyPair> for TweakedKeyPair
impl PartialOrd<TweakedKeyPair> for TweakedKeyPair
source§fn partial_cmp(&self, other: &TweakedKeyPair) -> Option<Ordering>
fn partial_cmp(&self, other: &TweakedKeyPair) -> Option<Ordering>
1.0.0 · source§fn 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 moresource§impl 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§
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