ic_query/sns/report/model/identity.rs
1//! Canonical SNS canister identities shared by discovery, joined catalogs and reports.
2
3use serde::{Deserialize, Serialize};
4
5///
6/// MainnetSnsCanisters
7///
8/// Complete canister identities for one deployed SNS shared by sources and reports.
9///
10
11#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
12pub struct MainnetSnsCanisters {
13 /// SNS Root canister principal.
14 pub root_canister_id: String,
15 /// SNS Governance canister principal.
16 pub governance_canister_id: String,
17 /// SNS ledger canister principal.
18 pub ledger_canister_id: String,
19 /// SNS decentralization-swap canister principal.
20 pub swap_canister_id: String,
21 /// SNS ledger index canister principal.
22 pub index_canister_id: String,
23}
24
25///
26/// SnsReportContext
27///
28/// SNS identity and collection provenance shared by governance report envelopes.
29///
30
31#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
32pub struct SnsReportContext {
33 /// Requested IC network identity.
34 pub network: String,
35 /// SNS-W canister used for discovery.
36 pub sns_wasm_canister_id: String,
37 /// UTC collection timestamp.
38 pub fetched_at: String,
39 /// Explicit collection endpoint.
40 pub source_endpoint: String,
41 /// Collector identity.
42 pub fetched_by: String,
43 /// Current SNS-W list position.
44 pub id: usize,
45 /// Current SNS display name.
46 pub name: String,
47 /// Stable SNS Root canister identity.
48 pub root_canister_id: String,
49 /// Stable SNS Governance canister identity.
50 pub governance_canister_id: String,
51}