key: Implement From<PublicKey> for XOnlyPublicKey
This commit is contained in:
parent
0266e762bd
commit
d990084481
|
@ -253,6 +253,12 @@ impl PublicKey {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<PublicKey> for XOnlyPublicKey {
|
||||||
|
fn from(pk: PublicKey) -> XOnlyPublicKey {
|
||||||
|
pk.inner.into()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// An opaque return type for PublicKey::to_sort_key
|
/// An opaque return type for PublicKey::to_sort_key
|
||||||
#[derive(Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
|
#[derive(Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
|
||||||
pub struct SortKey(u8, [u8; 32], [u8; 32]);
|
pub struct SortKey(u8, [u8; 32], [u8; 32]);
|
||||||
|
|
Loading…
Reference in New Issue