Type Alias bitcoin::key::TweakedKeyPair

source ·
pub type TweakedKeyPair = TweakedKeypair;
👎Deprecated since 0.31.0: use TweakedKeypair instead
Expand description

Tweaked BIP-340 key pair

Aliased Type§

struct TweakedKeyPair(/* private fields */);

Implementations§

source§

impl TweakedKeypair

source

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.

source

pub fn to_inner(self) -> Keypair

Returns the underlying key pair.

source

pub fn public_parts(&self) -> (TweakedPublicKey, Parity)

Returns the TweakedPublicKey and its Parity for this TweakedKeypair.

Trait Implementations§

source§

impl Clone for TweakedKeypair

source§

fn clone(&self) -> TweakedKeypair

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TweakedKeypair

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TweakedKeypair

source§

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 Hash for TweakedKeypair

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for TweakedKeypair

source§

fn cmp(&self, other: &TweakedKeypair) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<TweakedKeypair> for TweakedKeypair

source§

fn eq(&self, other: &TweakedKeypair) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<TweakedKeypair> for TweakedKeypair

source§

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 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Serialize for TweakedKeypair

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for TweakedKeypair

source§

impl Eq for TweakedKeypair

source§

impl StructuralEq for TweakedKeypair

source§

impl StructuralPartialEq for TweakedKeypair