fedimint_unknown_common/
config.rs

1use fedimint_core::core::ModuleKind;
2use fedimint_core::encoding::{Decodable, Encodable};
3use fedimint_core::plugin_types_trait_impl_config;
4use serde::{Deserialize, Serialize};
5
6use crate::UnknownCommonInit;
7
8/// Contains all the configuration for the server
9#[derive(Clone, Debug, Serialize, Deserialize)]
10pub struct UnknownConfig {
11    pub private: UnknownConfigPrivate,
12    pub consensus: UnknownConfigConsensus,
13}
14
15/// Contains all the configuration for the client
16#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, Encodable, Decodable, Hash)]
17pub struct UnknownClientConfig;
18
19/// Locally unencrypted config unique to each member
20#[derive(Clone, Debug, Serialize, Deserialize, Decodable, Encodable)]
21pub struct UnknownConfigLocal;
22
23/// Will be the same for every federation member
24#[derive(Clone, Debug, Serialize, Deserialize, Decodable, Encodable)]
25pub struct UnknownConfigConsensus;
26
27/// Will be encrypted and not shared such as private key material
28#[derive(Clone, Debug, Serialize, Deserialize)]
29pub struct UnknownConfigPrivate;
30
31// Wire together the configs for this module
32plugin_types_trait_impl_config!(
33    UnknownCommonInit,
34    UnknownConfig,
35    UnknownConfigPrivate,
36    UnknownConfigConsensus,
37    UnknownClientConfig
38);