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