fedimint_meta_common/
endpoint.rsuse std::collections::BTreeMap;
use fedimint_core::PeerId;
use serde::{Deserialize, Serialize};
use crate::{MetaKey, MetaValue};
pub const SUBMIT_ENDPOINT: &str = "submit";
pub const GET_CONSENSUS_ENDPOINT: &str = "get_consensus";
pub const GET_CONSENSUS_REV_ENDPOINT: &str = "get_consensus_rev";
pub const GET_SUBMISSIONS_ENDPOINT: &str = "get_submission";
#[derive(Debug, Serialize, Deserialize)]
pub struct SubmitRequest {
pub key: MetaKey,
pub value: MetaValue,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct GetConsensusRequest(pub MetaKey);
#[derive(Debug, Serialize, Deserialize)]
pub struct GetSubmissionsRequest(pub MetaKey);
pub type GetSubmissionResponse = BTreeMap<PeerId, MetaValue>;