[]Trait bdk::descriptor::ToPublicKey

pub trait ToPublicKey: MiniscriptKey {
    fn to_public_key(&self) -> PublicKey;
fn hash_to_hash160(hash: &Self::Hash) -> Hash; fn serialized_len(&self) -> usize { ... } }

Trait describing public key types which can be converted to bitcoin pubkeys

Required methods

fn to_public_key(&self) -> PublicKey

Converts an object to a public key

fn hash_to_hash160(hash: &Self::Hash) -> Hash

Converts a hashed version of the public key to a hash160 hash.

This method must be consistent with to_public_key, in the sense that calling MiniscriptKey::to_pubkeyhash followed by this function should give the same result as calling to_public_key and hashing the result directly.

Loading content...

Provided methods

fn serialized_len(&self) -> usize

Computes the size of a public key when serialized in a script, including the length bytes

Loading content...

Implementations on Foreign Types

impl ToPublicKey for DummyKey

impl ToPublicKey for DescriptorPublicKey

impl ToPublicKey for PublicKey

Loading content...

Implementors

Loading content...