key: Impl From<secp256k1::PublicKey> for bitcoin::PublicKey
This commit is contained in:
parent
8f4b57e3c5
commit
b3ac00b8b3
|
@ -264,6 +264,12 @@ impl PublicKey {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<secp256k1::PublicKey> for PublicKey {
|
||||||
|
fn from(pk: secp256k1::PublicKey) -> PublicKey {
|
||||||
|
PublicKey::new(pk)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl From<PublicKey> for XOnlyPublicKey {
|
impl From<PublicKey> for XOnlyPublicKey {
|
||||||
fn from(pk: PublicKey) -> XOnlyPublicKey { pk.inner.into() }
|
fn from(pk: PublicKey) -> XOnlyPublicKey { pk.inner.into() }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue