aptos_client_icp/models/encode_submission_request.rs
1/*
2 * Aptos Node API
3 *
4 * The Aptos Node API is a RESTful API for client applications to interact with the Aptos blockchain.
5 *
6 * The version of the OpenAPI document: 1.2.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// EncodeSubmissionRequest : Request to encode a submission
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct EncodeSubmissionRequest {
17 /// 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.
18 #[serde(rename = "sender")]
19 pub sender: String,
20 /// 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.
21 #[serde(rename = "sequence_number")]
22 pub sequence_number: String,
23 /// 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.
24 #[serde(rename = "max_gas_amount")]
25 pub max_gas_amount: String,
26 /// 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.
27 #[serde(rename = "gas_unit_price")]
28 pub gas_unit_price: String,
29 /// 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.
30 #[serde(rename = "expiration_timestamp_secs")]
31 pub expiration_timestamp_secs: String,
32 #[serde(rename = "payload")]
33 pub payload: Box<models::TransactionPayload>,
34 /// Secondary signer accounts of the request for Multi-agent
35 #[serde(rename = "secondary_signers", skip_serializing_if = "Option::is_none")]
36 pub secondary_signers: Option<Vec<String>>,
37}
38
39impl EncodeSubmissionRequest {
40 /// Request to encode a submission
41 pub fn new(sender: String, sequence_number: String, max_gas_amount: String, gas_unit_price: String, expiration_timestamp_secs: String, payload: models::TransactionPayload) -> EncodeSubmissionRequest {
42 EncodeSubmissionRequest {
43 sender,
44 sequence_number,
45 max_gas_amount,
46 gas_unit_price,
47 expiration_timestamp_secs,
48 payload: Box::new(payload),
49 secondary_signers: None,
50 }
51 }
52}
53