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
/*
* Ethereal Exchange API
*
* Ethereal HTTP API for real-time trading, order management, and market data access.
*
* The version of the OpenAPI document: 0.1.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SignerDto {
/// Id representing the linked signer
#[serde(rename = "id")]
pub id: String,
/// Address of the signer linked with the subaccount (non-checksummed)
#[serde(rename = "signer")]
pub signer: String,
#[serde(rename = "status")]
pub status: models::SignerDtoOrderStatus,
/// Block number the signer has been linked on. Undefined means it has not be processed
#[serde(rename = "blockNumber", skip_serializing_if = "Option::is_none")]
pub block_number: Option<String>,
/// Onchain linkage timestamp (ms since Unix Epoch)
#[serde(rename = "linkedAt", skip_serializing_if = "Option::is_none")]
pub linked_at: Option<f64>,
/// Block number the signer has been revoked on. Undefined means it has not be processed
#[serde(rename = "revokedBlockNumber", skip_serializing_if = "Option::is_none")]
pub revoked_block_number: Option<String>,
/// Onchain revocation timestamp (ms since Unix Epoch)
#[serde(rename = "revokedAt", skip_serializing_if = "Option::is_none")]
pub revoked_at: Option<f64>,
/// Signer expiry timestamp (ms since Unix Epoch)
#[serde(rename = "expiresAt")]
pub expires_at: f64,
/// Link signer submission timestamp (ms since Unix Epoch)
#[serde(rename = "createdAt")]
pub created_at: f64,
}
impl SignerDto {
pub fn new(
id: String,
signer: String,
status: models::SignerDtoOrderStatus,
expires_at: f64,
created_at: f64,
) -> SignerDto {
SignerDto {
id,
signer,
status,
block_number: None,
linked_at: None,
revoked_block_number: None,
revoked_at: None,
expires_at,
created_at,
}
}
}