rosetta_types/construction_metadata_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/// ConstructionMetadataResponse : The ConstructionMetadataResponse returns network-specific metadata used for transaction construction. Optionally, the implementer can return the suggested fee associated with the transaction being constructed. The caller may use this info to adjust the intent of the transaction or to create a transaction with a different account that can pay the suggested fee. Suggested fee is an array in case fee payment must occur in multiple currencies.
12
13#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
14pub struct ConstructionMetadataResponse {
15 #[serde(rename = "metadata")]
16 pub metadata: serde_json::Value,
17 #[serde(rename = "suggested_fee", skip_serializing_if = "Option::is_none")]
18 pub suggested_fee: Option<Vec<crate::Amount>>,
19}
20
21impl ConstructionMetadataResponse {
22 /// The ConstructionMetadataResponse returns network-specific metadata used for transaction construction. Optionally, the implementer can return the suggested fee associated with the transaction being constructed. The caller may use this info to adjust the intent of the transaction or to create a transaction with a different account that can pay the suggested fee. Suggested fee is an array in case fee payment must occur in multiple currencies.
23 pub fn new(metadata: serde_json::Value) -> ConstructionMetadataResponse {
24 ConstructionMetadataResponse {
25 metadata,
26 suggested_fee: None,
27 }
28 }
29}