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};

/// PendingTransaction : A transaction waiting in mempool
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PendingTransaction {
    #[serde(rename = "hash")]
    pub hash: String,
    /// A hex encoded 32 byte Aptos account address.  This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.  For example, address 0x0000000000000000000000000000000000000000000000000000000000000001 is represented as 0x1. 
    #[serde(rename = "sender")]
    pub sender: 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 = "sequence_number")]
    pub sequence_number: 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 = "max_gas_amount")]
    pub max_gas_amount: 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_unit_price")]
    pub gas_unit_price: 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 = "expiration_timestamp_secs")]
    pub expiration_timestamp_secs: String,
    #[serde(rename = "payload")]
    pub payload: Box<models::TransactionPayload>,
    #[serde(rename = "signature", skip_serializing_if = "Option::is_none")]
    pub signature: Option<Box<models::TransactionSignature>>,
}

impl PendingTransaction {
    /// A transaction waiting in mempool
    pub fn new(hash: String, sender: String, sequence_number: String, max_gas_amount: String, gas_unit_price: String, expiration_timestamp_secs: String, payload: models::TransactionPayload) -> PendingTransaction {
        PendingTransaction {
            hash,
            sender,
            sequence_number,
            max_gas_amount,
            gas_unit_price,
            expiration_timestamp_secs,
            payload: Box::new(payload),
            signature: None,
        }
    }
}