1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
* 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 TransactionPendingTransaction {
#[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>>,
#[serde(rename = "type")]
pub r#type: Type,
}
impl TransactionPendingTransaction {
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, r#type: Type) -> TransactionPendingTransaction {
TransactionPendingTransaction {
hash,
sender,
sequence_number,
max_gas_amount,
gas_unit_price,
expiration_timestamp_secs,
payload: Box::new(payload),
signature: None,
r#type,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "pending_transaction")]
PendingTransaction,
}
impl Default for Type {
fn default() -> Type {
Self::PendingTransaction
}
}