rosetta_types/signature.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/// Signature : Signature contains the payload that was signed, the public keys of the keypairs used to produce the signature, the signature (encoded in hex), and the SignatureType. PublicKey is often times not known during construction of the signing payloads but may be needed to combine signatures properly.
12
13#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
14pub struct Signature {
15 #[serde(rename = "signing_payload")]
16 pub signing_payload: crate::SigningPayload,
17 #[serde(rename = "public_key")]
18 pub public_key: crate::PublicKey,
19 #[serde(rename = "signature_type")]
20 pub signature_type: crate::SignatureType,
21 #[serde(rename = "hex_bytes")]
22 pub hex_bytes: String,
23}
24
25impl Signature {
26 /// Signature contains the payload that was signed, the public keys of the keypairs used to produce the signature, the signature (encoded in hex), and the SignatureType. PublicKey is often times not known during construction of the signing payloads but may be needed to combine signatures properly.
27 pub fn new(
28 signing_payload: crate::SigningPayload,
29 public_key: crate::PublicKey,
30 signature_type: crate::SignatureType,
31 hex_bytes: String,
32 ) -> Signature {
33 Signature {
34 signing_payload,
35 public_key,
36 signature_type,
37 hex_bytes,
38 }
39 }
40}