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;
// Required method
fn num_der_paths(&self) -> usize;
// Provided methods
fn is_uncompressed(&self) -> bool { ... }
fn is_x_only_key(&self) -> bool { ... }
}
Expand description
Public key trait which can be converted to Hash type
Required Associated Types§
Sourcetype Sha256: Clone + Eq + Ord + Display + Debug + Hash
type Sha256: Clone + Eq + Ord + Display + Debug + Hash
The associated qtum::hashes::sha256::Hash
for this MiniscriptKey
, used in the
sha256 fragment.
Sourcetype Hash256: Clone + Eq + Ord + Display + Debug + Hash
type Hash256: Clone + Eq + Ord + Display + Debug + Hash
The associated miniscript::hash256::Hash
for this MiniscriptKey
, used in the
hash256 fragment.
Sourcetype Ripemd160: Clone + Eq + Ord + Display + Debug + Hash
type Ripemd160: Clone + Eq + Ord + Display + Debug + Hash
The associated qtum::hashes::ripemd160::Hash
for this MiniscriptKey
type, used
in the ripemd160 fragment.
Sourcetype Hash160: Clone + Eq + Ord + Display + Debug + Hash
type Hash160: Clone + Eq + Ord + Display + Debug + Hash
The associated qtum::hashes::hash160::Hash
for this MiniscriptKey
type, used in
the hash160 fragment.
Required Methods§
Sourcefn num_der_paths(&self) -> usize
fn num_der_paths(&self) -> usize
Returns the number of different derivation paths in this key. Only >1 for keys in BIP389 multipath descriptors.
Provided Methods§
Sourcefn is_uncompressed(&self) -> bool
fn is_uncompressed(&self) -> bool
Returns true if the pubkey is uncompressed. Defaults to false
.
Sourcefn is_x_only_key(&self) -> bool
fn is_x_only_key(&self) -> bool
Returns true if the pubkey is an x-only pubkey. Defaults to false
.
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.