fireblocks_sdk/models/mpc_key.rs
1// Fireblocks API
2//
3// 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)
4//
5// The version of the OpenAPI document: 1.8.0
6// Contact: developers@fireblocks.com
7// Generated by: https://openapi-generator.tech
8
9use {
10 crate::models,
11 serde::{Deserialize, Serialize},
12};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct MpcKey {
16 #[serde(rename = "keyId")]
17 pub key_id: String,
18 /// The user id that owns the key
19 #[serde(rename = "userId")]
20 pub user_id: String,
21 /// The algorithm of the key
22 #[serde(rename = "algorithm")]
23 pub algorithm: f64,
24 /// The players that are associated with the key
25 #[serde(rename = "players")]
26 pub players: Vec<models::Players>,
27 /// The last index used on this key
28 #[serde(
29 rename = "lastPreprocessedIndex",
30 skip_serializing_if = "Option::is_none"
31 )]
32 pub last_preprocessed_index: Option<f64>,
33}
34
35impl MpcKey {
36 pub fn new(
37 key_id: String,
38 user_id: String,
39 algorithm: f64,
40 players: Vec<models::Players>,
41 ) -> MpcKey {
42 MpcKey {
43 key_id,
44 user_id,
45 algorithm,
46 players,
47 last_preprocessed_index: None,
48 }
49 }
50}