Skip to content

Commit

Permalink
feat: add master-fingerprint to descriptor
Browse files Browse the repository at this point in the history
  • Loading branch information
reez committed Nov 13, 2024
1 parent 1e714cb commit f2b1219
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bdk-ffi/src/bdk.udl
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,11 @@ interface DescriptorPublicKey {

string as_string();

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

/// The fingerprint of the master key associated with this key, `0x00000000` if none.
string master_fingerprint();
};

[Traits=(Display)]
Expand Down
4 changes: 4 additions & 0 deletions bdk-ffi/src/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ impl DescriptorPublicKey {
pub(crate) fn is_multipath(&self) -> bool {
self.0.is_multipath()
}

pub(crate) fn master_fingerprint(&self) -> String {
self.0.master_fingerprint().to_string()
}
}

#[cfg(test)]
Expand Down

0 comments on commit f2b1219

Please sign in to comment.