use std::sync::Arc;
use crate::{OwnershipProver, OwnershipVerifier, proof::CircomGroth16Material};
pub trait ZkArtifactSource: Send + Sync {
fn query_material(&self) -> Result<Arc<CircomGroth16Material>, error::ZkArtifactError>;
fn nullifier_material(&self) -> Result<Arc<CircomGroth16Material>, error::ZkArtifactError>;
fn ownership_prover(&self) -> Result<OwnershipProver, error::ZkArtifactError>;
fn ownership_verifier(&self) -> Result<OwnershipVerifier, error::ZkArtifactError>;
}
pub mod cached;
pub mod dummy;
#[cfg(any(
feature = "embed-zkeys",
feature = "embed-ownership-prover",
feature = "embed-ownership-verifier"
))]
pub mod embedded;
pub mod error;
#[cfg(not(target_arch = "wasm32"))]
pub mod filesystem;
pub use error::{ZkArtifactError, ZkArtifactKind};
pub trait ZkArtifactSourceExt: ZkArtifactSource + Sized + 'static {
#[must_use]
fn cached(self) -> cached::CachedZkArtifactSource {
cached::CachedZkArtifactSource::new(self)
}
}
impl<T> ZkArtifactSourceExt for T where T: ZkArtifactSource + Sized + 'static {}