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
 */

/// XPubTransaction : Xpub transaction history



#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct XPubTransaction {
    /// query xpub
    #[serde(rename = "xpub", skip_serializing_if = "Option::is_none")]
    pub xpub: Option<String>,
    /// Txid for this transaction.
    #[serde(rename = "txid", skip_serializing_if = "Option::is_none")]
    pub txid: Option<String>,
    /// Max lookahead receive index when processing this transaction.
    #[serde(rename = "maxReceiveIndex", skip_serializing_if = "Option::is_none")]
    pub max_receive_index: Option<i32>,
    /// Max lookahead change index when processing this transaction.
    #[serde(rename = "maxChangeIndex", skip_serializing_if = "Option::is_none")]
    pub max_change_index: Option<i32>,
    /// Total received satoshis(Including all address)
    #[serde(rename = "income", skip_serializing_if = "Option::is_none")]
    pub income: Option<i64>,
    /// Total spent satoshis(Including all address)
    #[serde(rename = "outcome", skip_serializing_if = "Option::is_none")]
    pub outcome: Option<i64>,
    /// Height for this transaction. -1 for unconfirmed
    #[serde(rename = "height", skip_serializing_if = "Option::is_none")]
    pub height: Option<i64>,
    /// Block index for this transaction, -1 for unconfirmed
    #[serde(rename = "blockIndex", skip_serializing_if = "Option::is_none")]
    pub block_index: Option<i32>,
    /// Block timestamp for this transaction, if unconfirmed, the time is first seen time.
    #[serde(rename = "blockTime", skip_serializing_if = "Option::is_none")]
    pub block_time: Option<i64>,
    /// Paging flag, format blockTimestamp_blockIndex
    #[serde(rename = "flag", skip_serializing_if = "Option::is_none")]
    pub flag: Option<String>,
}

impl XPubTransaction {
    /// Xpub transaction history
    pub fn new() -> XPubTransaction {
        XPubTransaction {
            xpub: None,
            txid: None,
            max_receive_index: None,
            max_change_index: None,
            income: None,
            outcome: None,
            height: None,
            block_index: None,
            block_time: None,
            flag: None,
        }
    }
}