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
/*
* Rosetta
*
* Build Once. Integrate Your Blockchain Everywhere.
*
* The version of the OpenAPI document: 1.4.13
*
* Generated by: https://openapi-generator.tech
*/
/// ConstructionPayloadsRequest : ConstructionPayloadsRequest is the request to `/construction/payloads`. It contains the network, a slice of operations, and arbitrary metadata that was returned by the call to `/construction/metadata`. Optionally, the request can also include an array of PublicKeys associated with the AccountIdentifiers returned in ConstructionPreprocessResponse.
#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
pub struct ConstructionPayloadsRequest {
#[serde(rename = "network_identifier")]
pub network_identifier: crate::NetworkIdentifier,
#[serde(rename = "operations")]
pub operations: Vec<crate::Operation>,
#[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
pub metadata: Option<serde_json::Value>,
#[serde(rename = "public_keys", skip_serializing_if = "Option::is_none")]
pub public_keys: Option<Vec<crate::PublicKey>>,
}
impl ConstructionPayloadsRequest {
/// ConstructionPayloadsRequest is the request to `/construction/payloads`. It contains the network, a slice of operations, and arbitrary metadata that was returned by the call to `/construction/metadata`. Optionally, the request can also include an array of PublicKeys associated with the AccountIdentifiers returned in ConstructionPreprocessResponse.
pub fn new(
network_identifier: crate::NetworkIdentifier,
operations: Vec<crate::Operation>,
) -> ConstructionPayloadsRequest {
ConstructionPayloadsRequest {
network_identifier,
operations,
metadata: None,
public_keys: None,
}
}
}