From 204f477a34bede7bc57f8230536b6454c7e1d259 Mon Sep 17 00:00:00 2001 From: Jeremy Rubin Date: Thu, 24 Mar 2022 14:15:41 -0700 Subject: [PATCH] Add serde to TweakedPublicKey --- src/util/schnorr.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/schnorr.rs b/src/util/schnorr.rs index 6a30000a..535abb98 100644 --- a/src/util/schnorr.rs +++ b/src/util/schnorr.rs @@ -40,6 +40,8 @@ pub type UntweakedPublicKey = ::XOnlyPublicKey; /// Tweaked BIP-340 X-coord-only public key #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "serde", serde(transparent))] pub struct TweakedPublicKey(::XOnlyPublicKey); impl fmt::LowerHex for TweakedPublicKey {