mithril_aggregator/artifact_builder/interface.rs
1use async_trait::async_trait;
2use mithril_common::{
3 entities::Certificate,
4 signable_builder::{Artifact, Beacon},
5 StdResult,
6};
7
8/// ArtifactBuilder is trait for building an artifact
9#[cfg_attr(test, mockall::automock)]
10#[async_trait]
11pub trait ArtifactBuilder<U, W>: Send + Sync
12where
13 U: Beacon,
14 W: Artifact,
15{
16 /// Compute an artifact
17 async fn compute_artifact(&self, beacon: U, certificate: &Certificate) -> StdResult<W>;
18}