liana: implement LianaDescriptor::contains_fingerprint()
This commit is contained in:
parent
8a8b4dafcd
commit
fa8fd4782f
@ -1,6 +1,7 @@
|
||||
use miniscript::{
|
||||
bitcoin::{
|
||||
self, bip32,
|
||||
self,
|
||||
bip32::{self, Fingerprint},
|
||||
constants::WITNESS_SCALE_FACTOR,
|
||||
psbt::{Input as PsbtIn, Output as PsbtOut, Psbt},
|
||||
secp256k1,
|
||||
@ -210,6 +211,12 @@ impl LianaDescriptor {
|
||||
})
|
||||
}
|
||||
|
||||
/// Whether a key matching this fingerprint is part of this descriptor
|
||||
pub fn contains_fingerprint(&self, fg: Fingerprint) -> bool {
|
||||
self.multi_desc
|
||||
.for_any_key(|k| k.master_fingerprint() == fg)
|
||||
}
|
||||
|
||||
/// Get the descriptor for receiving addresses.
|
||||
pub fn receive_descriptor(&self) -> &SinglePathLianaDesc {
|
||||
&self.receive_desc
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user