use serde::{Deserialize, Serialize};
pub const PROTOCOL_BASE: &str = "https://firstperson.network/protocols/discovery/1.0";
pub const DISCOVER_CAPABILITIES: &str =
"https://firstperson.network/protocols/discovery/1.0/discover-capabilities";
pub const DISCOVER_CAPABILITIES_RESULT: &str =
"https://firstperson.network/protocols/discovery/1.0/discover-capabilities-result";
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CapabilitiesResponse {
pub version: String,
pub features: FeaturesInfo,
pub services: ServicesInfo,
pub webvh_servers: Vec<WebvhServerInfo>,
pub did_creation_modes: Vec<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct FeaturesInfo {
pub webvh: bool,
pub didcomm: bool,
pub tee: bool,
pub rest: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ServicesInfo {
pub rest: bool,
pub didcomm: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct WebvhServerInfo {
pub id: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
}