use crate::{
claim::{Claim, ClaimMatchingError, ClaimVerificationError, ClaimVerificationResult},
proof::Proof,
};
pub trait Service {
fn new() -> Self
where
Self: Sized;
fn info(&self) -> &ServiceInfo;
fn match_claim(&self, claim: &Claim) -> Result<bool, ClaimMatchingError>;
fn verify_claim(
&self,
claim: &Claim,
proofs: &[Proof],
) -> Result<ClaimVerificationResult, ClaimVerificationError>;
}
#[derive(Debug)]
pub struct ServiceInfo {
pub name: String,
pub id: String,
pub homepage: String,
}
pub enum ServicePriority {
WildcardDomain = 1,
UniqueDomain = 2,
}