pub trait ToXOnlyPubkey: SimplicityKey {
// Required methods
fn to_x_only_pubkey(&self) -> XOnlyPublicKey;
fn to_sha256(hash: &Self::Sha256) -> Hash;
}Expand description
Public key which can be converted to a (x-only) public key which can be used in Simplicity.
Required Methods§
Sourcefn to_x_only_pubkey(&self) -> XOnlyPublicKey
fn to_x_only_pubkey(&self) -> XOnlyPublicKey
Convert the key to an x-only public key.
Sourcefn to_sha256(hash: &Self::Sha256) -> Hash
fn to_sha256(hash: &Self::Sha256) -> Hash
Convert the generic associated SimplicityKey::Sha256 to sha256::Hash.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.