Skip to content

Commit 14cdff5

Browse files
authored
feat: get Wtxid from a transaction
1 parent 04756c0 commit 14cdff5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

bdk-ffi/src/bitcoin.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,11 @@ impl Transaction {
308308
Arc::new(Txid(self.0.compute_txid()))
309309
}
310310

311+
/// Compute the Wtxid, which includes the witness in the transaction hash.
312+
pub fn compute_wtxid(&self) -> Arc<Wtxid> {
313+
Arc::new(Wtxid(self.0.compute_wtxid()))
314+
}
315+
311316
/// Returns the weight of this transaction, as defined by BIP-141.
312317
///
313318
/// > Transaction weight is defined as Base transaction size * 3 + Total transaction size (ie.

0 commit comments

Comments
 (0)