diff --git a/bitcoin/src/crypto/key.rs b/bitcoin/src/crypto/key.rs index 5108940e..41c541c0 100644 --- a/bitcoin/src/crypto/key.rs +++ b/bitcoin/src/crypto/key.rs @@ -264,6 +264,10 @@ impl PublicKey { } } +impl From for PublicKey { + fn from(pk: secp256k1::PublicKey) -> PublicKey { PublicKey::new(pk) } +} + impl From for XOnlyPublicKey { fn from(pk: PublicKey) -> XOnlyPublicKey { pk.inner.into() } }