From 5e3e24906fe31b1c394905ea5d449fcdda939094 Mon Sep 17 00:00:00 2001 From: thunderbiscuit Date: Thu, 16 May 2024 14:30:47 -0400 Subject: [PATCH] feat: add lock_time method on transaction type --- bdk-ffi/src/bdk.udl | 2 ++ bdk-ffi/src/bitcoin.rs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/bdk-ffi/src/bdk.udl b/bdk-ffi/src/bdk.udl index 0f34488..57c7a19 100644 --- a/bdk-ffi/src/bdk.udl +++ b/bdk-ffi/src/bdk.udl @@ -586,6 +586,8 @@ interface Transaction { sequence input(); sequence output(); + + u32 lock_time(); }; interface Psbt { diff --git a/bdk-ffi/src/bitcoin.rs b/bdk-ffi/src/bitcoin.rs index b9b10be..09c9e66 100644 --- a/bdk-ffi/src/bitcoin.rs +++ b/bdk-ffi/src/bitcoin.rs @@ -177,6 +177,10 @@ impl Transaction { pub fn output(&self) -> Vec { 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 for Transaction {