Skip to content

Commit bbb3859

Browse files
committed
feat(api): create MempoolRecentTxs struct
1 parent bd20332 commit bbb3859

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/api.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,18 @@ pub struct MempoolStats {
247247
pub fee_histogram: Vec<(f64, usize)>,
248248
}
249249

250+
#[derive(Clone, Debug, PartialEq, Eq, Deserialize)]
251+
pub struct MempoolRecentTxs {
252+
/// Transaction ID as a [`Txid`].
253+
pub txid: Txid,
254+
/// [`Amount`] of fees paid by the transaction, in satoshis.
255+
pub fee: u64,
256+
/// The transaction size, in virtual bytes.
257+
pub vsize: usize,
258+
/// Combined [`Amount`] of the transaction, in satoshis.
259+
pub value: u64,
260+
}
261+
250262
impl Tx {
251263
pub fn to_tx(&self) -> Transaction {
252264
Transaction {

0 commit comments

Comments
 (0)