feat: add lock_time method on transaction type
This commit is contained in:
parent
c702894143
commit
5e3e24906f
@ -586,6 +586,8 @@ interface Transaction {
|
|||||||
sequence<TxIn> input();
|
sequence<TxIn> input();
|
||||||
|
|
||||||
sequence<TxOut> output();
|
sequence<TxOut> output();
|
||||||
|
|
||||||
|
u32 lock_time();
|
||||||
};
|
};
|
||||||
|
|
||||||
interface Psbt {
|
interface Psbt {
|
||||||
|
@ -177,6 +177,10 @@ impl Transaction {
|
|||||||
pub fn output(&self) -> Vec<TxOut> {
|
pub fn output(&self) -> Vec<TxOut> {
|
||||||
self.0.output.iter().map(|tx_out| tx_out.into()).collect()
|
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 {
|
impl From<BdkTransaction> for Transaction {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user