use async_trait::async_trait;
use std::fmt::Debug;
use crate::{
entities::{ProtocolMessage, ProtocolMessagePartValue},
StdResult,
};
#[cfg(test)]
use mockall::automock;
pub trait Beacon: Send + Sync {}
#[typetag::serde(tag = "type")]
pub trait Artifact: Debug + Send + Sync {
fn get_id(&self) -> String;
}
#[cfg_attr(test, automock)]
#[async_trait]
pub trait SignableBuilder<U>: Send + Sync
where
U: Beacon,
{
async fn compute_protocol_message(&self, beacon: U) -> StdResult<ProtocolMessage>;
}
#[cfg_attr(test, automock)]
#[async_trait]
pub trait SignableSeedBuilder: Send + Sync {
async fn compute_next_aggregate_verification_key(&self) -> StdResult<ProtocolMessagePartValue>;
async fn compute_next_protocol_parameters(&self) -> StdResult<ProtocolMessagePartValue>;
async fn compute_current_epoch(&self) -> StdResult<ProtocolMessagePartValue>;
}