rosetta_types/signing_payload.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/// SigningPayload : SigningPayload is signed by the client with the keypair associated with an AccountIdentifier using the specified SignatureType. SignatureType can be optionally populated if there is a restriction on the signature scheme that can be used to sign the payload.
12
13#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
14pub struct SigningPayload {
15 /// [DEPRECATED by `account_identifier` in `v1.4.4`] The network-specific address of the account that should sign the payload.
16 #[serde(rename = "address", skip_serializing_if = "Option::is_none")]
17 pub address: Option<String>,
18 #[serde(rename = "account_identifier", skip_serializing_if = "Option::is_none")]
19 pub account_identifier: Option<crate::AccountIdentifier>,
20 /// Hex-encoded string of the payload bytes.
21 #[serde(rename = "hex_bytes")]
22 pub hex_bytes: String,
23 #[serde(rename = "signature_type", skip_serializing_if = "Option::is_none")]
24 pub signature_type: Option<crate::SignatureType>,
25}
26
27impl SigningPayload {
28 /// SigningPayload is signed by the client with the keypair associated with an AccountIdentifier using the specified SignatureType. SignatureType can be optionally populated if there is a restriction on the signature scheme that can be used to sign the payload.
29 pub fn new(hex_bytes: String) -> SigningPayload {
30 SigningPayload {
31 address: None,
32 account_identifier: None,
33 hex_bytes,
34 signature_type: None,
35 }
36 }
37}