Implement serde for TweakedKeyPair

This commit is contained in:
Dr Maxim Orlovsky 2022-03-28 21:29:04 +02:00
parent df3297c34e
commit 174a99cd06
No known key found for this signature in database
GPG Key ID: FFC0250947E5C6F7
1 changed files with 3 additions and 2 deletions

View File

@ -60,8 +60,9 @@ impl fmt::Display for TweakedPublicKey {
pub type UntweakedKeyPair = ::KeyPair;
/// Tweaked BIP-340 key pair
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "std", derive(Debug))]
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", serde(transparent))]
pub struct TweakedKeyPair(::KeyPair);
/// A trait for tweaking BIP340 key types (x-only public keys and key pairs).