pub struct Verifier {
pub agent: Agent,
pub canister: Principal,
}
Fields§
§agent: Agent
§canister: Principal
Implementations§
source§impl Verifier
impl Verifier
A proxy verifier to interact with the managed verifier contract
sourcepub async fn from_config(config: &Config) -> Result<Self>
pub async fn from_config(config: &Config) -> Result<Self>
Creates a new verifier from a config struct
sourcepub async fn get_public_key(&self) -> Result<String, Box<dyn Error>>
pub async fn get_public_key(&self) -> Result<String, Box<dyn Error>>
Retrieves the public key of the specified canister
sourcepub async fn verify_proof(
&self,
string_proofs: Vec<String>,
notary_pub_key: String,
) -> Result<VerificationResponse, Box<dyn Error>>
pub async fn verify_proof( &self, string_proofs: Vec<String>, notary_pub_key: String, ) -> Result<VerificationResponse, Box<dyn Error>>
Verifies a proof on-chain and validates the response locally
Auto Trait Implementations§
impl Freeze for Verifier
impl !RefUnwindSafe for Verifier
impl Send for Verifier
impl Sync for Verifier
impl Unpin for Verifier
impl !UnwindSafe for Verifier
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more