rust_mempool/types/
mod.rs

1use serde::Deserialize;
2
3/// Represents the status of a UTXO
4#[derive(Debug, Deserialize)]
5pub struct UtxoStatus {
6    /// Whether the UTXO has been confirmed in a block
7    pub confirmed: bool,
8    /// The height of the block containing the UTXO, if confirmed
9    pub block_height: Option<u32>,
10    /// The hash of the block containing the UTXO, if confirmed
11    pub block_hash: Option<String>,
12    /// The timestamp of the block containing the UTXO, if confirmed
13    pub block_time: Option<u64>,
14}
15
16/// Represents an unspent transaction output (UTXO)
17#[derive(Debug, Deserialize)]
18pub struct Utxo {
19    /// The transaction ID
20    pub txid: String,
21    /// The output index
22    pub vout: u32,
23    /// The status of the UTXO
24    pub status: UtxoStatus,
25    /// The value of the UTXO in satoshis
26    pub value: u64,
27}