diff --git a/src/util/schnorr.rs b/src/util/schnorr.rs index 8a1d8f9a..ee030275 100644 --- a/src/util/schnorr.rs +++ b/src/util/schnorr.rs @@ -189,6 +189,20 @@ impl TweakedKeyPair { } } +impl From for XOnlyPublicKey { + #[inline] + fn from(pair: TweakedPublicKey) -> Self { + pair.0 + } +} + +impl From for KeyPair { + #[inline] + fn from(pair: TweakedKeyPair) -> Self { + pair.0 + } +} + /// A BIP340-341 serialized schnorr signature with the corresponding hash type. #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]