Skip to content

Commit d24fe52

Browse files
refactor: fix tap_leaf_hash field name
1 parent 05e640a commit d24fe52

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bdk-ffi/src/bitcoin.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ pub struct TapScriptEntry {
513513
#[derive(Clone, Debug, uniffi::Record, Hash, Eq, PartialEq)]
514514
pub struct TapKeyOrigin {
515515
/// leaf hashes as hex strings
516-
pub leaf_hashes: Vec<String>,
516+
pub tap_leaf_hashes: Vec<String>,
517517
/// key source
518518
pub key_source: KeySource,
519519
}
@@ -564,7 +564,7 @@ pub struct TapScriptSigKey {
564564
pub xonly_pubkey: String,
565565
/// Taproot-tagged hash with tag "TapLeaf".
566566
/// This is used for computing tapscript script spend hash.
567-
pub leaf_hash: String,
567+
pub tap_leaf_hash: String,
568568
}
569569

570570
/// A key-value map for an input of the corresponding index in the unsigned transaction.
@@ -692,7 +692,7 @@ impl From<&BdkInput> for Input {
692692
.map(|(k, v)| {
693693
let key = TapScriptSigKey {
694694
xonly_pubkey: k.0.to_string(),
695-
leaf_hash: k.1.to_string(),
695+
tap_leaf_hash: k.1.to_string(),
696696
};
697697
(key, v.to_vec())
698698
})
@@ -720,7 +720,7 @@ impl From<&BdkInput> for Input {
720720
.map(|(k, v)| {
721721
let key = k.to_string();
722722
let value = TapKeyOrigin {
723-
leaf_hashes: v.0.iter().map(|h| h.to_string()).collect(),
723+
tap_leaf_hashes: v.0.iter().map(|h| h.to_string()).collect(),
724724
key_source: KeySource {
725725
fingerprint: v.1 .0.to_string(),
726726
path: v.1 .1.to_string(),

0 commit comments

Comments
 (0)