esplora-btc-api 1.3.0

Esplora Bitcoin OpenAPI Client
Documentation
/*
 * Blockstream Esplora HTTP API
 *
 * JSON over RESTful HTTP. Amounts are always represented in satoshis.
 *
 * The version of the OpenAPI document: 1.0.1
 * 
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Spend {
    #[serde(rename = "spent")]
    pub spent: bool,
    #[serde(rename = "txid", skip_serializing_if = "Option::is_none")]
    pub txid: Option<String>,
    #[serde(rename = "vin", skip_serializing_if = "Option::is_none")]
    pub vin: Option<String>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Box<crate::models::Status>>,
}

impl Spend {
    pub fn new(spent: bool) -> Spend {
        Spend {
            spent,
            txid: None,
            vin: None,
            status: None,
        }
    }
}