1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* JSON Ledger API HTTP endpoints
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 3.3.0-SNAPSHOT
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// JsPrepareSubmissionResponse : [docs-entry-end: HashingSchemeVersion]
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct JsPrepareSubmissionResponse {
/// The interpreted transaction, it represents the ledger changes necessary to execute the commands specified in the request. Clients MUST display the content of the transaction to the user for them to validate before signing the hash if the preparing participant is not trusted.
#[serde(rename = "preparedTransaction", skip_serializing_if = "Option::is_none")]
pub prepared_transaction: Option<String>,
/// Hash of the transaction, this is what needs to be signed by the party to authorize the transaction. Only provided for convenience, clients MUST recompute the hash from the raw transaction if the preparing participant is not trusted. May be removed in future versions
#[serde(rename = "preparedTransactionHash")]
pub prepared_transaction_hash: String,
#[serde(rename = "hashingSchemeVersion")]
pub hashing_scheme_version: Box<models::HashingSchemeVersion>,
/// Optional additional details on how the transaction was encoded and hashed. Only set if verbose_hashing = true in the request Note that there are no guarantees on the stability of the format or content of this field. Its content should NOT be parsed and should only be used for troubleshooting purposes.
#[serde(rename = "hashingDetails", skip_serializing_if = "Option::is_none")]
pub hashing_details: Option<String>,
}
impl JsPrepareSubmissionResponse {
/// [docs-entry-end: HashingSchemeVersion]
pub fn new(prepared_transaction_hash: String, hashing_scheme_version: models::HashingSchemeVersion) -> JsPrepareSubmissionResponse {
JsPrepareSubmissionResponse {
prepared_transaction: None,
prepared_transaction_hash,
hashing_scheme_version: Box::new(hashing_scheme_version),
hashing_details: None,
}
}
}