rosetta_types/
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
11/// 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.
12
13#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
14pub struct ConstructionPreprocessResponse {
15    /// The options that will be sent directly to `/construction/metadata` by the caller.
16    #[serde(rename = "options", skip_serializing_if = "Option::is_none")]
17    pub options: Option<serde_json::Value>,
18    #[serde(
19        rename = "required_public_keys",
20        skip_serializing_if = "Option::is_none"
21    )]
22    pub required_public_keys: Option<Vec<crate::AccountIdentifier>>,
23}
24
25impl ConstructionPreprocessResponse {
26    /// 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.
27    pub fn new() -> ConstructionPreprocessResponse {
28        ConstructionPreprocessResponse {
29            options: None,
30            required_public_keys: None,
31        }
32    }
33}