rosetta_types/
construction_payloads_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/// ConstructionPayloadsResponse : ConstructionTransactionResponse is returned by `/construction/payloads`. It contains an unsigned transaction blob (that is usually needed to construct the a network transaction from a collection of signatures) and an array of payloads that must be signed by the caller.
12
13#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
14pub struct ConstructionPayloadsResponse {
15    #[serde(rename = "unsigned_transaction")]
16    pub unsigned_transaction: String,
17    #[serde(rename = "payloads")]
18    pub payloads: Vec<crate::SigningPayload>,
19}
20
21impl ConstructionPayloadsResponse {
22    /// ConstructionTransactionResponse is returned by `/construction/payloads`. It contains an unsigned transaction blob (that is usually needed to construct the a network transaction from a collection of signatures) and an array of payloads that must be signed by the caller.
23    pub fn new(
24        unsigned_transaction: String,
25        payloads: Vec<crate::SigningPayload>,
26    ) -> ConstructionPayloadsResponse {
27        ConstructionPayloadsResponse {
28            unsigned_transaction,
29            payloads,
30        }
31    }
32}