1use crate::dto::prelude::*;
2
3#[derive(CandidType, Clone, Copy, Debug, Deserialize, Eq, PartialEq)]
8pub enum AppCommand {
9 SetStatus(AppStatus),
10 SetCyclesFundingEnabled(bool),
11}
12
13#[derive(CandidType, Clone, Copy, Debug, Deserialize, Eq, PartialEq)]
18pub enum AppStatus {
19 Active,
20 Readonly,
21 Stopped,
22}
23
24#[derive(CandidType, Clone, Copy, Debug, Deserialize, Eq, PartialEq)]
29pub enum AppMode {
30 Enabled,
31 Readonly,
32 Disabled,
33}
34
35#[derive(CandidType, Clone, Copy, Debug, Deserialize, Eq, PartialEq)]
40pub struct AppStateInput {
41 pub mode: AppMode,
42 pub cycles_funding_enabled: bool,
43}
44
45#[derive(CandidType, Deserialize)]
50pub struct AppStateResponse {
51 pub mode: AppMode,
52 pub cycles_funding_enabled: bool,
53}
54
55#[derive(CandidType, Clone, Debug, Deserialize, Eq, PartialEq)]
60pub struct SubnetRootPublicKeyInput {
61 pub public_key_sec1: Vec<u8>,
62 pub key_name: String,
63 pub key_hash: [u8; 32],
64}
65
66#[derive(CandidType, Clone, Debug, Default, Deserialize, Eq, PartialEq)]
71pub struct SubnetAuthStateInput {
72 pub delegated_root_public_key: Option<SubnetRootPublicKeyInput>,
73}
74
75#[derive(CandidType, Clone, Debug, Default, Deserialize, Eq, PartialEq)]
80pub struct SubnetStateInput {
81 pub auth: SubnetAuthStateInput,
82}
83
84#[derive(CandidType, Clone, Debug, Default, Deserialize, Eq, PartialEq)]
89pub struct SubnetStateResponse {
90 pub auth: SubnetAuthStateInput,
91}
92
93#[derive(CandidType, Clone, Debug, Deserialize, Eq, PartialEq)]
98pub struct BootstrapStatusResponse {
99 pub ready: bool,
100 pub phase: String,
101 pub last_error: Option<String>,
102}