fireblocks-sdk 2025.10.17

Rust implementation of the Fireblocks SDK
Documentation
// Fireblocks API
//
// Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain.  - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com)
//
// The version of the OpenAPI document: 1.8.0
// Contact: developers@fireblocks.com
// Generated by: https://openapi-generator.tech

use {
    crate::models,
    serde::{Deserialize, Serialize},
};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SigningKeyDto {
    /// External signing key id set by Fireblocks.
    #[serde(rename = "keyId")]
    pub key_id: String,
    /// The ID, name or label of the key specified on the customer's signing
    /// device.
    #[serde(rename = "signingDeviceKeyId")]
    pub signing_device_key_id: String,
    /// PEM encoded public key
    #[serde(rename = "publicKeyPem")]
    pub public_key_pem: String,
    /// Algorithm and curve used for the signature. Can be: ECDSA_SECP256K1 or
    /// EDDSA_ED25519
    #[serde(rename = "algorithm")]
    pub algorithm: String,
    /// True if the signing key is enabled
    #[serde(rename = "enabled")]
    pub enabled: bool,
    /// Id of the vault account which this key is linked to
    #[serde(rename = "vaultAccountId", deserialize_with = "Option::deserialize")]
    pub vault_account_id: Option<f64>,
    /// Id of user that represent agent servers that can sign with the key
    #[serde(rename = "agentUserId")]
    pub agent_user_id: String,
    /// Creation date (timestamp) in milliseconds.
    #[serde(rename = "createdAt")]
    pub created_at: f64,
}

impl SigningKeyDto {
    pub fn new(
        key_id: String,
        signing_device_key_id: String,
        public_key_pem: String,
        algorithm: String,
        enabled: bool,
        vault_account_id: Option<f64>,
        agent_user_id: String,
        created_at: f64,
    ) -> SigningKeyDto {
        SigningKeyDto {
            key_id,
            signing_device_key_id,
            public_key_pem,
            algorithm,
            enabled,
            vault_account_id,
            agent_user_id,
            created_at,
        }
    }
}