feat: add lock_time method on transaction type

This commit is contained in:
thunderbiscuit committed 2024-05-16 14:30:47 -04:00
1 parent c702894143
commit 5e3e24906f
2 files changed
+6

No files matched your search

+2
View File
@@ -586,6 +586,8 @@ interface Transaction {
sequence<TxIn> input();
sequence<TxOut> output();
u32 lock_time();
};
interface Psbt {
+4
View File
@@ -177,6 +177,10 @@ impl Transaction {
pub fn output(&self) -> Vec<TxOut> {
self.0.output.iter().map(|tx_out| tx_out.into()).collect()
}
pub fn lock_time(&self) -> u32 {
self.0.lock_time.to_consensus_u32()
}
}
impl From<BdkTransaction> for Transaction {