Skip to content

Commit

Permalink
feat: add is_multipath to descriptor
Browse files Browse the repository at this point in the history
  • Loading branch information
reez committed Nov 15, 2024
1 parent 4395965 commit 13fbb5b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bdk-ffi/src/bdk.udl
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,9 @@ interface Descriptor {
constructor([ByRef] DescriptorPublicKey public_key, string fingerprint, KeychainKind keychain, Network network);

string to_string_with_secret();

/// Whether or not this key has multiple derivation paths.
boolean is_multipath();
};

// ------------------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions bdk-ffi/src/descriptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ impl Descriptor {
let key_map = &self.key_map;
descriptor.to_string_with_secret(key_map)
}

pub(crate) fn is_multipath(&self) -> bool {
self.extended_descriptor.is_multipath()
}
}

impl Display for Descriptor {
Expand Down

0 comments on commit 13fbb5b

Please sign in to comment.