Skip to content

Commit ac3d79c

Browse files
committed
rust: TransactionMeta: add version and locktime
1 parent b4de813 commit ac3d79c

File tree

1 file changed

+6
-0
lines changed
  • subprojects/gdk_rust/gdk_common/src

1 file changed

+6
-0
lines changed

subprojects/gdk_rust/gdk_common/src/model.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,10 @@ pub struct TransactionMeta {
317317
// The utxos used in the transaction
318318
#[serde(default)]
319319
pub used_utxos: Vec<UnspentOutput>,
320+
#[serde(rename = "transaction_version")]
321+
pub version: u32,
322+
#[serde(rename = "transaction_locktime")]
323+
pub lock_time: u32,
320324
}
321325

322326
impl From<BETransaction> for TransactionMeta {
@@ -349,6 +353,8 @@ impl From<BETransaction> for TransactionMeta {
349353
vsize: (weight as f32 / 4.0) as usize,
350354
size: transaction.get_size(),
351355
used_utxos: vec![],
356+
version: transaction.version(),
357+
lock_time: transaction.lock_time(),
352358
}
353359
}
354360
}

0 commit comments

Comments
 (0)