Struct miniscript::descriptor::DefiniteDescriptorKey
source · pub struct DefiniteDescriptorKey(/* private fields */);
Expand description
A DescriptorPublicKey
without any wildcards.
Implementations§
source§impl DefiniteDescriptorKey
impl DefiniteDescriptorKey
sourcepub fn derive_public_key<C: Verification>(
&self,
secp: &Secp256k1<C>
) -> Result<PublicKey, ConversionError>
pub fn derive_public_key<C: Verification>( &self, secp: &Secp256k1<C> ) -> Result<PublicKey, ConversionError>
Computes the public key corresponding to this descriptor key.
When deriving from an XOnlyPublicKey, it adds the default 0x02 y-coordinate
and returns the obtained full bitcoin::PublicKey
. All BIP32 derivations
always return a compressed key
Will return an error if the descriptor key has any hardened derivation steps in its path. To
avoid this error you should replace any such public keys first with translate_pk
.
sourcepub fn master_fingerprint(&self) -> Fingerprint
pub fn master_fingerprint(&self) -> Fingerprint
The fingerprint of the master key associated with this key, 0x00000000
if none.
sourcepub fn full_derivation_path(&self) -> Option<DerivationPath>
pub fn full_derivation_path(&self) -> Option<DerivationPath>
Full path from the master key if not a multipath extended key.
sourcepub fn full_derivation_paths(&self) -> Vec<DerivationPath>
pub fn full_derivation_paths(&self) -> Vec<DerivationPath>
Full paths from the master key. The vector will contain just one path for single keys, and multiple ones for multipath extended keys
sourcepub fn as_descriptor_public_key(&self) -> &DescriptorPublicKey
pub fn as_descriptor_public_key(&self) -> &DescriptorPublicKey
Reference to the underlying DescriptorPublicKey
sourcepub fn into_descriptor_public_key(self) -> DescriptorPublicKey
pub fn into_descriptor_public_key(self) -> DescriptorPublicKey
Converts the definite key into a generic one
Trait Implementations§
source§impl AssetProvider<DefiniteDescriptorKey> for Assets
impl AssetProvider<DefiniteDescriptorKey> for Assets
source§fn provider_lookup_ecdsa_sig(&self, pk: &DefiniteDescriptorKey) -> bool
fn provider_lookup_ecdsa_sig(&self, pk: &DefiniteDescriptorKey) -> bool
source§fn provider_lookup_tap_key_spend_sig(
&self,
pk: &DefiniteDescriptorKey
) -> Option<usize>
fn provider_lookup_tap_key_spend_sig( &self, pk: &DefiniteDescriptorKey ) -> Option<usize>
source§fn provider_lookup_tap_leaf_script_sig(
&self,
pk: &DefiniteDescriptorKey,
tap_leaf_hash: &TapLeafHash
) -> Option<usize>
fn provider_lookup_tap_leaf_script_sig( &self, pk: &DefiniteDescriptorKey, tap_leaf_hash: &TapLeafHash ) -> Option<usize>
source§fn provider_lookup_sha256(&self, hash: &Hash) -> bool
fn provider_lookup_sha256(&self, hash: &Hash) -> bool
source§fn provider_lookup_hash256(&self, hash: &Hash) -> bool
fn provider_lookup_hash256(&self, hash: &Hash) -> bool
source§fn provider_lookup_ripemd160(&self, hash: &Hash) -> bool
fn provider_lookup_ripemd160(&self, hash: &Hash) -> bool
source§fn provider_lookup_hash160(&self, hash: &Hash) -> bool
fn provider_lookup_hash160(&self, hash: &Hash) -> bool
source§fn check_older(&self, s: LockTime) -> bool
fn check_older(&self, s: LockTime) -> bool
source§fn check_after(&self, l: LockTime) -> bool
fn check_after(&self, l: LockTime) -> bool
source§fn provider_lookup_tap_control_block_map(
&self
) -> Option<&BTreeMap<ControlBlock, (ScriptBuf, LeafVersion)>>
fn provider_lookup_tap_control_block_map( &self ) -> Option<&BTreeMap<ControlBlock, (ScriptBuf, LeafVersion)>>
source§fn provider_lookup_raw_pkh_pk(&self, _: &Hash) -> Option<PublicKey>
fn provider_lookup_raw_pkh_pk(&self, _: &Hash) -> Option<PublicKey>
Pkh
, lookup corresponding bitcoin::PublicKey
source§fn provider_lookup_raw_pkh_x_only_pk(&self, _: &Hash) -> Option<XOnlyPublicKey>
fn provider_lookup_raw_pkh_x_only_pk(&self, _: &Hash) -> Option<XOnlyPublicKey>
Pkh
, lookup corresponding bitcoin::secp256k1::XOnlyPublicKey
source§fn provider_lookup_raw_pkh_ecdsa_sig(&self, _: &Hash) -> Option<PublicKey>
fn provider_lookup_raw_pkh_ecdsa_sig(&self, _: &Hash) -> Option<PublicKey>
source§fn provider_lookup_raw_pkh_tap_leaf_script_sig(
&self,
_: &(Hash, TapLeafHash)
) -> Option<(XOnlyPublicKey, usize)>
fn provider_lookup_raw_pkh_tap_leaf_script_sig( &self, _: &(Hash, TapLeafHash) ) -> Option<(XOnlyPublicKey, usize)>
source§impl<'a> AssetProvider<DefiniteDescriptorKey> for LoggerAssetProvider<'a>
impl<'a> AssetProvider<DefiniteDescriptorKey> for LoggerAssetProvider<'a>
source§fn provider_lookup_ecdsa_sig(&self, pk: &DefiniteDescriptorKey) -> bool
fn provider_lookup_ecdsa_sig(&self, pk: &DefiniteDescriptorKey) -> bool
source§fn provider_lookup_tap_key_spend_sig(
&self,
pk: &DefiniteDescriptorKey
) -> Option<usize>
fn provider_lookup_tap_key_spend_sig( &self, pk: &DefiniteDescriptorKey ) -> Option<usize>
source§fn provider_lookup_tap_leaf_script_sig(
&self,
pk: &DefiniteDescriptorKey,
leaf_hash: &TapLeafHash
) -> Option<usize>
fn provider_lookup_tap_leaf_script_sig( &self, pk: &DefiniteDescriptorKey, leaf_hash: &TapLeafHash ) -> Option<usize>
source§fn provider_lookup_tap_control_block_map(
&self
) -> Option<&BTreeMap<ControlBlock, (ScriptBuf, LeafVersion)>>
fn provider_lookup_tap_control_block_map( &self ) -> Option<&BTreeMap<ControlBlock, (ScriptBuf, LeafVersion)>>
source§fn provider_lookup_raw_pkh_pk(&self, hash: &Hash) -> Option<PublicKey>
fn provider_lookup_raw_pkh_pk(&self, hash: &Hash) -> Option<PublicKey>
Pkh
, lookup corresponding bitcoin::PublicKey
source§fn provider_lookup_raw_pkh_x_only_pk(
&self,
hash: &Hash
) -> Option<XOnlyPublicKey>
fn provider_lookup_raw_pkh_x_only_pk( &self, hash: &Hash ) -> Option<XOnlyPublicKey>
Pkh
, lookup corresponding bitcoin::secp256k1::XOnlyPublicKey
source§fn provider_lookup_raw_pkh_ecdsa_sig(&self, hash: &Hash) -> Option<PublicKey>
fn provider_lookup_raw_pkh_ecdsa_sig(&self, hash: &Hash) -> Option<PublicKey>
source§fn provider_lookup_raw_pkh_tap_leaf_script_sig(
&self,
hash: &(Hash, TapLeafHash)
) -> Option<(XOnlyPublicKey, usize)>
fn provider_lookup_raw_pkh_tap_leaf_script_sig( &self, hash: &(Hash, TapLeafHash) ) -> Option<(XOnlyPublicKey, usize)>
source§fn provider_lookup_sha256(&self, hash: &Hash) -> bool
fn provider_lookup_sha256(&self, hash: &Hash) -> bool
source§fn provider_lookup_hash256(&self, hash: &Hash) -> bool
fn provider_lookup_hash256(&self, hash: &Hash) -> bool
source§fn provider_lookup_ripemd160(&self, hash: &Hash) -> bool
fn provider_lookup_ripemd160(&self, hash: &Hash) -> bool
source§fn provider_lookup_hash160(&self, hash: &Hash) -> bool
fn provider_lookup_hash160(&self, hash: &Hash) -> bool
source§fn check_older(&self, s: LockTime) -> bool
fn check_older(&self, s: LockTime) -> bool
source§fn check_after(&self, t: LockTime) -> bool
fn check_after(&self, t: LockTime) -> bool
source§impl Borrow<DescriptorPublicKey> for DefiniteDescriptorKey
impl Borrow<DescriptorPublicKey> for DefiniteDescriptorKey
source§fn borrow(&self) -> &DescriptorPublicKey
fn borrow(&self) -> &DescriptorPublicKey
source§impl Clone for DefiniteDescriptorKey
impl Clone for DefiniteDescriptorKey
source§fn clone(&self) -> DefiniteDescriptorKey
fn clone(&self) -> DefiniteDescriptorKey
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DefiniteDescriptorKey
impl Debug for DefiniteDescriptorKey
source§impl Display for DefiniteDescriptorKey
impl Display for DefiniteDescriptorKey
source§impl From<DefiniteDescriptorKey> for DescriptorPublicKey
impl From<DefiniteDescriptorKey> for DescriptorPublicKey
source§fn from(d: DefiniteDescriptorKey) -> Self
fn from(d: DefiniteDescriptorKey) -> Self
source§impl FromStr for DefiniteDescriptorKey
impl FromStr for DefiniteDescriptorKey
source§impl Hash for DefiniteDescriptorKey
impl Hash for DefiniteDescriptorKey
source§impl MiniscriptKey for DefiniteDescriptorKey
impl MiniscriptKey for DefiniteDescriptorKey
§type Sha256 = Hash
type Sha256 = Hash
bitcoin::hashes::sha256::Hash
for this MiniscriptKey
, used in the
sha256 fragment.§type Hash256 = Hash
type Hash256 = Hash
miniscript::hash256::Hash
for this MiniscriptKey
, used in the
hash256 fragment.§type Ripemd160 = Hash
type Ripemd160 = Hash
bitcoin::hashes::ripemd160::Hash
for this MiniscriptKey
type, used
in the ripemd160 fragment.§type Hash160 = Hash
type Hash160 = Hash
bitcoin::hashes::hash160::Hash
for this MiniscriptKey
type, used in
the hash160 fragment.source§fn is_uncompressed(&self) -> bool
fn is_uncompressed(&self) -> bool
false
.source§fn is_x_only_key(&self) -> bool
fn is_x_only_key(&self) -> bool
false
.source§fn num_der_paths(&self) -> usize
fn num_der_paths(&self) -> usize
source§impl Ord for DefiniteDescriptorKey
impl Ord for DefiniteDescriptorKey
source§fn cmp(&self, other: &DefiniteDescriptorKey) -> Ordering
fn cmp(&self, other: &DefiniteDescriptorKey) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<DefiniteDescriptorKey> for DefiniteDescriptorKey
impl PartialEq<DefiniteDescriptorKey> for DefiniteDescriptorKey
source§fn eq(&self, other: &DefiniteDescriptorKey) -> bool
fn eq(&self, other: &DefiniteDescriptorKey) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<DefiniteDescriptorKey> for DefiniteDescriptorKey
impl PartialOrd<DefiniteDescriptorKey> for DefiniteDescriptorKey
source§fn partial_cmp(&self, other: &DefiniteDescriptorKey) -> Option<Ordering>
fn partial_cmp(&self, other: &DefiniteDescriptorKey) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl ToPublicKey for DefiniteDescriptorKey
impl ToPublicKey for DefiniteDescriptorKey
source§fn to_public_key(&self) -> PublicKey
fn to_public_key(&self) -> PublicKey
source§fn to_sha256(hash: &Hash) -> Hash
fn to_sha256(hash: &Hash) -> Hash
MiniscriptKey::Sha256
to sha256::Hash
source§fn to_hash256(hash: &Hash) -> Hash
fn to_hash256(hash: &Hash) -> Hash
MiniscriptKey::Hash256
to hash256::Hash
source§fn to_ripemd160(hash: &Hash) -> Hash
fn to_ripemd160(hash: &Hash) -> Hash
MiniscriptKey::Ripemd160
to ripemd160::Hash
source§fn to_hash160(hash: &Hash) -> Hash
fn to_hash160(hash: &Hash) -> Hash
MiniscriptKey::Hash160
to hash160::Hash