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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// 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,
}
}
}