esplora_btc_api/models/
status.rs

1/*
2 * Blockstream Esplora HTTP API
3 *
4 * JSON over RESTful HTTP. Amounts are always represented in satoshis.
5 *
6 * The version of the OpenAPI document: 1.0.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Status {
16    #[serde(rename = "confirmed")]
17    pub confirmed: bool,
18    #[serde(rename = "block_height", skip_serializing_if = "Option::is_none")]
19    pub block_height: Option<f32>,
20    #[serde(rename = "block_hash", skip_serializing_if = "Option::is_none")]
21    pub block_hash: Option<String>,
22    #[serde(rename = "block_time", skip_serializing_if = "Option::is_none")]
23    pub block_time: Option<f32>,
24}
25
26impl Status {
27    pub fn new(confirmed: bool) -> Status {
28        Status {
29            confirmed,
30            block_height: None,
31            block_hash: None,
32            block_time: None,
33        }
34    }
35}
36
37