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

/// BlockTx : Tx simple info for block tx list.



#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct BlockTx {
    /// Transaction hash.
    #[serde(rename = "txid", skip_serializing_if = "Option::is_none")]
    pub txid: Option<String>,
    /// Block height of this tx.
    #[serde(rename = "height", skip_serializing_if = "Option::is_none")]
    pub height: Option<i64>,
    /// Hash of the block
    #[serde(rename = "blockHash", skip_serializing_if = "Option::is_none")]
    pub block_hash: Option<String>,
    /// transaction size
    #[serde(rename = "size", skip_serializing_if = "Option::is_none")]
    pub size: Option<i64>,
    /// Input count in this transaction
    #[serde(rename = "inputCount", skip_serializing_if = "Option::is_none")]
    pub input_count: Option<i32>,
    /// Output count in this transaction.
    #[serde(rename = "outputCount", skip_serializing_if = "Option::is_none")]
    pub output_count: Option<i32>,
    /// Lock time of this transaction
    #[serde(rename = "lockTime", skip_serializing_if = "Option::is_none")]
    pub lock_time: Option<i64>,
    /// Trasaction fee.
    #[serde(rename = "fee", skip_serializing_if = "Option::is_none")]
    pub fee: Option<i64>,
    /// Confirmations of this transaction, -1 if unconfirmed.
    #[serde(rename = "confirmations", skip_serializing_if = "Option::is_none")]
    pub confirmations: Option<i64>,
    /// Block timestamp for the transaction, confirmed tx only.
    #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
    pub timestamp: Option<i64>,
}

impl BlockTx {
    /// Tx simple info for block tx list.
    pub fn new() -> BlockTx {
        BlockTx {
            txid: None,
            height: None,
            block_hash: None,
            size: None,
            input_count: None,
            output_count: None,
            lock_time: None,
            fee: None,
            confirmations: None,
            timestamp: None,
        }
    }
}