fedimint_meta_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::MetaCommonInit;
7
8/// Contains all the configuration for the server
9#[derive(Clone, Debug, Serialize, Deserialize)]
10pub struct MetaConfig {
11    pub private: MetaConfigPrivate,
12    pub consensus: MetaConfigConsensus,
13}
14
15/// Contains all the configuration for the client
16#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, Encodable, Decodable, Hash)]
17pub struct MetaClientConfig;
18
19/// Locally unencrypted config unique to each member
20#[derive(Clone, Debug, Serialize, Deserialize, Decodable, Encodable)]
21pub struct MetaConfigLocal;
22
23/// Will be the same for every federation member
24#[derive(Clone, Debug, Serialize, Deserialize, Decodable, Encodable)]
25pub struct MetaConfigConsensus;
26
27/// Will be encrypted and not shared such as private key material
28#[derive(Clone, Debug, Serialize, Deserialize)]
29pub struct MetaConfigPrivate;
30
31// Wire together the configs for this module
32plugin_types_trait_impl_config!(
33    MetaCommonInit,
34    MetaConfig,
35    MetaConfigPrivate,
36    MetaConfigConsensus,
37    MetaClientConfig
38);