feat: add lock_time method on transaction type

This commit is contained in:
thunderbiscuit 2024-05-16 14:30:47 -04:00
parent c702894143
commit 5e3e24906f
No known key found for this signature in database
GPG Key ID: 88253696EB836462
2 changed files with 6 additions and 0 deletions

View File

@ -586,6 +586,8 @@ interface Transaction {
sequence<TxIn> input();
sequence<TxOut> output();
u32 lock_time();
};
interface Psbt {

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 {