diff --git a/bitcoin/src/crypto/key.rs b/bitcoin/src/crypto/key.rs index 5108940e..50be0d27 100644 --- a/bitcoin/src/crypto/key.rs +++ b/bitcoin/src/crypto/key.rs @@ -264,6 +264,12 @@ 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() } }