ic_query/nns/registry/report/
model.rs1use serde::{Deserialize, Serialize};
2
3#[cfg(feature = "host")]
4pub(super) const NNS_REGISTRY_VERSION_REPORT_SCHEMA_VERSION: u32 = 1;
5
6#[derive(Clone, Debug, Eq, PartialEq)]
13pub struct NnsRegistryVersionRequest {
14 pub network: String,
15 pub source_endpoint: String,
16 pub now_unix_secs: u64,
17}
18
19impl NnsRegistryVersionRequest {
20 #[must_use]
21 pub fn new(
22 network: impl Into<String>,
23 source_endpoint: impl Into<String>,
24 now_unix_secs: u64,
25 ) -> Self {
26 Self {
27 network: network.into(),
28 source_endpoint: source_endpoint.into(),
29 now_unix_secs,
30 }
31 }
32}
33
34#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
41pub struct NnsRegistryVersionReport {
42 pub schema_version: u32,
43 pub network: String,
44 pub registry_canister_id: String,
45 pub registry_version: u64,
46 pub fetched_at: String,
47 pub source_endpoint: String,
48 pub fetched_by: String,
49}