rosetta_types/construction_parse_response.rs
1/*
2 * Rosetta
3 *
4 * Build Once. Integrate Your Blockchain Everywhere.
5 *
6 * The version of the OpenAPI document: 1.4.13
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// ConstructionParseResponse : ConstructionParseResponse contains an array of operations that occur in a transaction blob. This should match the array of operations provided to `/construction/preprocess` and `/construction/payloads`.
12
13#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
14pub struct ConstructionParseResponse {
15 #[serde(rename = "operations")]
16 pub operations: Vec<crate::Operation>,
17 /// [DEPRECATED by `account_identifier_signers` in `v1.4.4`] All signers (addresses) of a particular transaction. If the transaction is unsigned, it should be empty.
18 #[serde(rename = "signers", skip_serializing_if = "Option::is_none")]
19 pub signers: Option<Vec<String>>,
20 #[serde(
21 rename = "account_identifier_signers",
22 skip_serializing_if = "Option::is_none"
23 )]
24 pub account_identifier_signers: Option<Vec<crate::AccountIdentifier>>,
25 #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
26 pub metadata: Option<serde_json::Value>,
27}
28
29impl ConstructionParseResponse {
30 /// ConstructionParseResponse contains an array of operations that occur in a transaction blob. This should match the array of operations provided to `/construction/preprocess` and `/construction/payloads`.
31 pub fn new(operations: Vec<crate::Operation>) -> ConstructionParseResponse {
32 ConstructionParseResponse {
33 operations,
34 signers: None,
35 account_identifier_signers: None,
36 metadata: None,
37 }
38 }
39}