coinbase_mesh/models/construction_preprocess_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
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ConstructionPreprocessResponse : ConstructionPreprocessResponse contains `options` that will be sent unmodified to `/construction/metadata`. If it is not necessary to make a request to `/construction/metadata`, `options` should be omitted. Some blockchains require the PublicKey of particular AccountIdentifiers to construct a valid transaction. To fetch these PublicKeys, populate `required_public_keys` with the AccountIdentifiers associated with the desired PublicKeys. If it is not necessary to retrieve any PublicKeys for construction, `required_public_keys` should be omitted.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ConstructionPreprocessResponse {
17 /// The options that will be sent directly to `/construction/metadata` by the caller.
18 #[serde(rename = "options", skip_serializing_if = "Option::is_none")]
19 pub options: Option<serde_json::Value>,
20 #[serde(rename = "required_public_keys", skip_serializing_if = "Option::is_none")]
21 pub required_public_keys: Option<Vec<models::AccountIdentifier>>,
22}
23
24impl ConstructionPreprocessResponse {
25 /// ConstructionPreprocessResponse contains `options` that will be sent unmodified to `/construction/metadata`. If it is not necessary to make a request to `/construction/metadata`, `options` should be omitted. Some blockchains require the PublicKey of particular AccountIdentifiers to construct a valid transaction. To fetch these PublicKeys, populate `required_public_keys` with the AccountIdentifiers associated with the desired PublicKeys. If it is not necessary to retrieve any PublicKeys for construction, `required_public_keys` should be omitted.
26 pub fn new() -> ConstructionPreprocessResponse {
27 ConstructionPreprocessResponse {
28 options: None,
29 required_public_keys: None,
30 }
31 }
32}
33