ToXOnlyPubkey

Trait ToXOnlyPubkey 

Source
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§

Source

fn to_x_only_pubkey(&self) -> XOnlyPublicKey

Convert the key to an x-only public key.

Source

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.

Implementors§