mvcapi 3.0.11

The Client Implementation for MVCApi.
Documentation
/*
 * MicrovisionChain API Document
 *
 * API definition for MicrovisionChain provided apis
 *
 * The version of the OpenAPI document: 3.0.11
 * Contact: heqiming@metasv.com
 * Generated by: https://openapi-generator.tech
 */

/// XpubUtxo : Utxo belongs to the specified xpub



#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct XpubUtxo {
    /// xpub of the utxo
    #[serde(rename = "xpub", skip_serializing_if = "Option::is_none")]
    pub xpub: Option<String>,
    /// Address string of this utxo
    #[serde(rename = "address", skip_serializing_if = "Option::is_none")]
    pub address: Option<String>,
    /// Address type, 0 for receive address, 1 for change address. path is {{addressType}}/{{addressIndex}}
    #[serde(rename = "addressType", skip_serializing_if = "Option::is_none")]
    pub address_type: Option<i32>,
    /// Address index. Address path in the xpub is {{addressType}}/{{addressIndex}}
    #[serde(rename = "addressIndex", skip_serializing_if = "Option::is_none")]
    pub address_index: Option<i32>,
    /// Txid for this utxo.
    #[serde(rename = "txid", skip_serializing_if = "Option::is_none")]
    pub txid: Option<String>,
    /// Output index for the Utxo.
    #[serde(rename = "txIndex", skip_serializing_if = "Option::is_none")]
    pub tx_index: Option<i32>,
    /// Satoshi value of the utxo.
    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
    pub value: Option<i64>,
    /// The height of this utxo, -1 for unconfirmed utxo.
    #[serde(rename = "height", skip_serializing_if = "Option::is_none")]
    pub height: Option<i64>,
    /// The paging flag of utxo
    #[serde(rename = "flag", skip_serializing_if = "Option::is_none")]
    pub flag: Option<i64>,
}

impl XpubUtxo {
    /// Utxo belongs to the specified xpub
    pub fn new() -> XpubUtxo {
        XpubUtxo {
            xpub: None,
            address: None,
            address_type: None,
            address_index: None,
            txid: None,
            tx_index: None,
            value: None,
            height: None,
            flag: None,
        }
    }
}