aptos-client-icp 0.0.1

The Aptos Node API is a RESTful API for client applications to interact with the Aptos blockchain.
Documentation
/*
 * Aptos Node API
 *
 * The Aptos Node API is a RESTful API for client applications to interact with the Aptos blockchain.
 *
 * The version of the OpenAPI document: 1.2.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TransactionStateCheckpointTransaction {
    /// A string containing a 64-bit unsigned integer.  We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively. 
    #[serde(rename = "version")]
    pub version: String,
    #[serde(rename = "hash")]
    pub hash: String,
    #[serde(rename = "state_change_hash")]
    pub state_change_hash: String,
    #[serde(rename = "event_root_hash")]
    pub event_root_hash: String,
    #[serde(rename = "state_checkpoint_hash", skip_serializing_if = "Option::is_none")]
    pub state_checkpoint_hash: Option<String>,
    /// A string containing a 64-bit unsigned integer.  We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively. 
    #[serde(rename = "gas_used")]
    pub gas_used: String,
    /// Whether the transaction was successful
    #[serde(rename = "success")]
    pub success: bool,
    /// The VM status of the transaction, can tell useful information in a failure
    #[serde(rename = "vm_status")]
    pub vm_status: String,
    #[serde(rename = "accumulator_root_hash")]
    pub accumulator_root_hash: String,
    /// Final state of resources changed by the transaction
    #[serde(rename = "changes")]
    pub changes: Vec<models::WriteSetChange>,
    /// A string containing a 64-bit unsigned integer.  We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively. 
    #[serde(rename = "timestamp")]
    pub timestamp: String,
    #[serde(rename = "type")]
    pub r#type: Type,
}

impl TransactionStateCheckpointTransaction {
    pub fn new(version: String, hash: String, state_change_hash: String, event_root_hash: String, gas_used: String, success: bool, vm_status: String, accumulator_root_hash: String, changes: Vec<models::WriteSetChange>, timestamp: String, r#type: Type) -> TransactionStateCheckpointTransaction {
        TransactionStateCheckpointTransaction {
            version,
            hash,
            state_change_hash,
            event_root_hash,
            state_checkpoint_hash: None,
            gas_used,
            success,
            vm_status,
            accumulator_root_hash,
            changes,
            timestamp,
            r#type,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "state_checkpoint_transaction")]
    StateCheckpointTransaction,
}

impl Default for Type {
    fn default() -> Type {
        Self::StateCheckpointTransaction
    }
}