canton-api-client 3.3.0-0.1.2

Canton Ledger API rust client
Documentation
/*
 * 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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Signature {
    #[serde(rename = "format")]
    pub format: Box<models::SignatureFormat>,
    /// 
    #[serde(rename = "signature")]
    pub signature: String,
    /// The fingerprint/id of the keypair used to create this signature and needed to verify.
    #[serde(rename = "signedBy")]
    pub signed_by: String,
    #[serde(rename = "signingAlgorithmSpec")]
    pub signing_algorithm_spec: Box<models::SigningAlgorithmSpec>,
}

impl Signature {
    pub fn new(format: models::SignatureFormat, signature: String, signed_by: String, signing_algorithm_spec: models::SigningAlgorithmSpec) -> Signature {
        Signature {
            format: Box::new(format),
            signature,
            signed_by,
            signing_algorithm_spec: Box::new(signing_algorithm_spec),
        }
    }
}