pub trait ToPublicKey: MiniscriptKey {
    fn to_public_key(&self) -> PublicKey;
    fn hash_to_hash160(hash: &<Self as MiniscriptKey>::Hash) -> Hash;
}
Expand description

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

Required Methods

Converts an object to a public key

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.

Implementations on Foreign Types

Implementors