pub trait MiniscriptKey: Clone + Eq + Ord + Debug + Display + Hash {
    type Sha256: Clone + Eq + Ord + Display + Debug + Hash;
    type Hash256: Clone + Eq + Ord + Display + Debug + Hash;
    type Ripemd160: Clone + Eq + Ord + Display + Debug + Hash;
    type Hash160: Clone + Eq + Ord + Display + Debug + Hash;

    // Provided methods
    fn is_uncompressed(&self) -> bool { ... }
    fn is_x_only_key(&self) -> bool { ... }
    fn num_der_paths(&self) -> usize { ... }
}
Expand description

Public key trait which can be converted to Hash type

Required Associated Types§

source

type Sha256: Clone + Eq + Ord + Display + Debug + Hash

The associated [bitcoin::hashes::sha256::Hash] for this MiniscriptKey, used in the sha256 fragment.

source

type Hash256: Clone + Eq + Ord + Display + Debug + Hash

The associated miniscript::hash256::Hash for this MiniscriptKey, used in the hash256 fragment.

source

type Ripemd160: Clone + Eq + Ord + Display + Debug + Hash

The associated [bitcoin::hashes::ripemd160::Hash] for this MiniscriptKey type, used in the ripemd160 fragment.

source

type Hash160: Clone + Eq + Ord + Display + Debug + Hash

The associated [bitcoin::hashes::hash160::Hash] for this MiniscriptKey type, used in the hash160 fragment.

Provided Methods§

source

fn is_uncompressed(&self) -> bool

Returns true if the pubkey is uncompressed. Defaults to false.

source

fn is_x_only_key(&self) -> bool

Returns true if the pubkey is an x-only pubkey. Defaults to false.

source

fn num_der_paths(&self) -> usize

Returns the number of different derivation paths in this key. Only >1 for keys in BIP389 multipath descriptors.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl MiniscriptKey for String

source§

impl MiniscriptKey for PublicKey

source§

fn is_uncompressed(&self) -> bool

Returns the compressed-ness of the underlying secp256k1 key.

§

type Sha256 = Hash

§

type Hash256 = Hash

§

type Ripemd160 = Hash

§

type Hash160 = Hash

source§

impl MiniscriptKey for PublicKey

§

type Sha256 = Hash

§

type Hash256 = Hash

§

type Ripemd160 = Hash

§

type Hash160 = Hash

source§

impl MiniscriptKey for XOnlyPublicKey

§

type Sha256 = Hash

§

type Hash256 = Hash

§

type Ripemd160 = Hash

§

type Hash160 = Hash

source§

fn is_x_only_key(&self) -> bool

Implementors§