Trait ZkvmGuest

Source
pub trait ZkvmGuest: Zkvm + Send {
    // Required methods
    fn read_from_host<T: DeserializeOwned>(&self) -> T;
    fn commit<T: Serialize>(&self, item: &T);
}
Expand description

A trait which is accessible from within a zkVM program.

Required Methods§

Source

fn read_from_host<T: DeserializeOwned>(&self) -> T

Obtain “advice” non-deterministically from the host

Source

fn commit<T: Serialize>(&self, item: &T)

Add a public output to the zkVM proof

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§