Struct miniscript::DummyKey
source · pub struct DummyKey;Expand description
Dummy key which de/serializes to the empty string; useful sometimes for testing
Trait Implementations§
source§impl MiniscriptKey for DummyKey
impl MiniscriptKey for DummyKey
§type Sha256 = DummySha256Hash
type Sha256 = DummySha256Hash
The associated [
sha256::Hash] for this MiniscriptKey,
used in the hash256 fragment.§type Hash256 = DummyHash256Hash
type Hash256 = DummyHash256Hash
The associated
hash256::Hash for this MiniscriptKey,
used in the hash256 fragment.§type Ripemd160 = DummyRipemd160Hash
type Ripemd160 = DummyRipemd160Hash
The associated [
ripedmd160::Hash] for this MiniscriptKey type.
used in the ripemd160 fragment§type Hash160 = DummyHash160Hash
type Hash160 = DummyHash160Hash
The associated [
hash160::Hash] for this MiniscriptKey type.
used in the hash160 fragmentsource§fn is_uncompressed(&self) -> bool
fn is_uncompressed(&self) -> bool
Returns true if the pubkey is uncompressed. Defaults to
false.source§fn 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.source§impl Ord for DummyKey
impl Ord for DummyKey
source§impl PartialEq<DummyKey> for DummyKey
impl PartialEq<DummyKey> for DummyKey
source§impl PartialOrd<DummyKey> for DummyKey
impl PartialOrd<DummyKey> for DummyKey
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl ToPublicKey for DummyKey
impl ToPublicKey for DummyKey
source§fn to_public_key(&self) -> PublicKey
fn to_public_key(&self) -> PublicKey
Converts an object to a public key
source§fn to_sha256(_hash: &DummySha256Hash) -> Hash
fn to_sha256(_hash: &DummySha256Hash) -> Hash
Converts the generic associated
MiniscriptKey::Sha256 to [sha256::Hash]source§fn to_hash256(_hash: &DummyHash256Hash) -> Hash
fn to_hash256(_hash: &DummyHash256Hash) -> Hash
Converts the generic associated
MiniscriptKey::Hash256 to hash256::Hashsource§fn to_ripemd160(_: &DummyRipemd160Hash) -> Hash
fn to_ripemd160(_: &DummyRipemd160Hash) -> Hash
Converts the generic associated
MiniscriptKey::Ripemd160 to [ripemd160::Hash]source§fn to_hash160(_: &DummyHash160Hash) -> Hash
fn to_hash160(_: &DummyHash160Hash) -> Hash
Converts the generic associated
MiniscriptKey::Hash160 to [hash160::Hash]source§fn to_x_only_pubkey(&self) -> XOnlyPublicKey
fn to_x_only_pubkey(&self) -> XOnlyPublicKey
Convert an object to x-only pubkey
source§fn to_pubkeyhash(&self, sig_type: SigType) -> Hash
fn to_pubkeyhash(&self, sig_type: SigType) -> Hash
Obtain the public key hash for this MiniscriptKey
Expects an argument to specify the signature type.
This would determine whether to serialize the key as 32 byte x-only pubkey
or regular public key when computing the hash160