rosetta_types/
construction_parse_request.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/// ConstructionParseRequest : ConstructionParseRequest is the input to the `/construction/parse` endpoint. It allows the caller to parse either an unsigned or signed transaction.
12
13#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
14pub struct ConstructionParseRequest {
15    #[serde(rename = "network_identifier")]
16    pub network_identifier: crate::NetworkIdentifier,
17    /// Signed is a boolean indicating whether the transaction is signed.
18    #[serde(rename = "signed")]
19    pub signed: bool,
20    /// This must be either the unsigned transaction blob returned by `/construction/payloads` or the signed transaction blob returned by `/construction/combine`.
21    #[serde(rename = "transaction")]
22    pub transaction: String,
23}
24
25impl ConstructionParseRequest {
26    /// ConstructionParseRequest is the input to the `/construction/parse` endpoint. It allows the caller to parse either an unsigned or signed transaction.
27    pub fn new(
28        network_identifier: crate::NetworkIdentifier,
29        signed: bool,
30        transaction: String,
31    ) -> ConstructionParseRequest {
32        ConstructionParseRequest {
33            network_identifier,
34            signed,
35            transaction,
36        }
37    }
38}