expose info whether entry gateway enforces zk-nym in self-described api (#4529)

This commit is contained in:
Jędrzej Stuczyński
2024-04-12 18:05:28 +01:00
committed by GitHub
parent 1c93cc8a68
commit 3e12766afd
3 changed files with 5 additions and 0 deletions
+1
View File
@@ -33,6 +33,7 @@ fn load_gateway_details(
};
Ok(api_requests::v1::gateway::models::Gateway {
enforces_zk_nyms: config.gateway.only_coconut_credentials,
client_interfaces: api_requests::v1::gateway::models::ClientInterfaces {
wireguard,
mixnet_websockets: Some(api_requests::v1::gateway::models::WebSockets {
@@ -7,6 +7,9 @@ use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, Clone, JsonSchema)]
#[cfg_attr(feature = "openapi", derive(utoipa::ToSchema))]
pub struct Gateway {
#[serde(default)]
pub enforces_zk_nyms: bool,
pub client_interfaces: ClientInterfaces,
}
+1
View File
@@ -484,6 +484,7 @@ impl NymNode {
wss_port: self.config.entry_gateway.announce_wss_port,
});
let gateway_details = api_requests::v1::gateway::models::Gateway {
enforces_zk_nyms: self.config.entry_gateway.enforce_zk_nyms,
client_interfaces: api_requests::v1::gateway::models::ClientInterfaces {
wireguard,
mixnet_websockets,