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
42
43
44
45
46
47
48
49
50
51
52
/*
* JSON Ledger API HTTP endpoints
*
* This specification version fixes the API inconsistencies where certain fields marked as required in the spec are in fact optional. If you use code generation tool based on this file, you might need to adjust the existing application code to handle those fields as optional. If you do not want to change your client code, continue using the OpenAPI specification for the latest Canton 3.4 patch release. MINIMUM_CANTON_VERSION=3.6.0
*
* The version of the OpenAPI document: 3.6.0-SNAPSHOT
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// CostEstimationHints : Hints to improve cost estimation precision of a prepared transaction
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CostEstimationHints {
/// Disable cost estimation Default (not set) is false Optional
#[serde(rename = "disabled", skip_serializing_if = "Option::is_none")]
pub disabled: Option<bool>,
/// Details on the keys that will be used to sign the transaction (how many and of which type). Signature size impacts the cost of the transaction. If empty, the signature sizes will be approximated with threshold-many signatures (where threshold is defined in the PartyToParticipant of the external party), using keys in the order they are registered. Empty list is equivalent to not providing this field Optional: can be empty
#[serde(rename = "expectedSignatures", skip_serializing_if = "Option::is_none")]
pub expected_signatures: Option<Vec<ExpectedSignatures>>,
}
impl CostEstimationHints {
/// Hints to improve cost estimation precision of a prepared transaction
pub fn new() -> CostEstimationHints {
CostEstimationHints {
disabled: None,
expected_signatures: None,
}
}
}
/// Details on the keys that will be used to sign the transaction (how many and of which type). Signature size impacts the cost of the transaction. If empty, the signature sizes will be approximated with threshold-many signatures (where threshold is defined in the PartyToParticipant of the external party), using keys in the order they are registered. Empty list is equivalent to not providing this field Optional: can be empty
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ExpectedSignatures {
#[serde(rename = "SIGNING_ALGORITHM_SPEC_UNSPECIFIED")]
SigningAlgorithmSpecUnspecified,
#[serde(rename = "SIGNING_ALGORITHM_SPEC_ED25519")]
SigningAlgorithmSpecEd25519,
#[serde(rename = "SIGNING_ALGORITHM_SPEC_EC_DSA_SHA_256")]
SigningAlgorithmSpecEcDsaSha256,
#[serde(rename = "SIGNING_ALGORITHM_SPEC_EC_DSA_SHA_384")]
SigningAlgorithmSpecEcDsaSha384,
}
impl Default for ExpectedSignatures {
fn default() -> ExpectedSignatures {
Self::SigningAlgorithmSpecUnspecified
}
}