pub struct TweakedPublicKey(/* private fields */);
Expand description
Tweaked BIP-340 X-coord-only public key
Implementations§
Source§impl TweakedPublicKey
impl TweakedPublicKey
Sourcepub fn dangerous_assume_tweaked(key: XOnlyPublicKey) -> TweakedPublicKey
pub fn dangerous_assume_tweaked(key: XOnlyPublicKey) -> TweakedPublicKey
Creates a new TweakedPublicKey
from a XOnlyPublicKey
. No tweak is applied, consider
calling tap_tweak
on an UntweakedPublicKey
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 to_inner(self) -> XOnlyPublicKey
pub fn to_inner(self) -> XOnlyPublicKey
Returns the underlying public key.
Sourcepub fn as_inner(&self) -> &XOnlyPublicKey
pub fn as_inner(&self) -> &XOnlyPublicKey
Returns a reference to underlying public key.
Trait Implementations§
Source§impl Clone for TweakedPublicKey
impl Clone for TweakedPublicKey
Source§fn clone(&self) -> TweakedPublicKey
fn clone(&self) -> TweakedPublicKey
Returns a duplicate 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 TweakedPublicKey
impl Debug for TweakedPublicKey
Source§impl<'de> Deserialize<'de> for TweakedPublicKey
impl<'de> Deserialize<'de> for TweakedPublicKey
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 Display for TweakedPublicKey
impl Display for TweakedPublicKey
Source§impl From<TweakedPublicKey> for XOnlyPublicKey
impl From<TweakedPublicKey> for XOnlyPublicKey
Source§fn from(pair: TweakedPublicKey) -> Self
fn from(pair: TweakedPublicKey) -> Self
Converts to this type from the input type.
Source§impl Hash for TweakedPublicKey
impl Hash for TweakedPublicKey
Source§impl LowerHex for TweakedPublicKey
impl LowerHex for TweakedPublicKey
Source§impl Ord for TweakedPublicKey
impl Ord for TweakedPublicKey
Source§fn cmp(&self, other: &TweakedPublicKey) -> Ordering
fn cmp(&self, other: &TweakedPublicKey) -> 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 for TweakedPublicKey
impl PartialEq for TweakedPublicKey
Source§impl PartialOrd for TweakedPublicKey
impl PartialOrd for TweakedPublicKey
Source§impl Serialize for TweakedPublicKey
impl Serialize for TweakedPublicKey
impl Copy for TweakedPublicKey
impl Eq for TweakedPublicKey
impl StructuralPartialEq for TweakedPublicKey
Auto Trait Implementations§
impl Freeze for TweakedPublicKey
impl RefUnwindSafe for TweakedPublicKey
impl Send for TweakedPublicKey
impl Sync for TweakedPublicKey
impl Unpin for TweakedPublicKey
impl UnwindSafe for TweakedPublicKey
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