pub struct Verifier { /* private fields */ }Expand description
RAII wrapper around a verifier context (void* in C, opaque to us).
Implementations§
Source§impl Verifier
impl Verifier
Sourcepub fn new(
proof: &[u8],
method: &str,
args: &str,
chain_id: u64,
trusted_checkpoint: Option<&str>,
verify_flags: u32,
) -> Result<Self, ColibriError>
pub fn new( proof: &[u8], method: &str, args: &str, chain_id: u64, trusted_checkpoint: Option<&str>, verify_flags: u32, ) -> Result<Self, ColibriError>
Create a verifier context.
proof– the SSZ-encoded proof bytes to verify.args– JSON array string of the original RPC parameters.trusted_checkpoint– optional0x-prefixed 66-char hex string. WhenNone, the C core keeps the previously configured checkpoint forchain_id.verify_flags– bitmask ofverify_flags_tvalues (e.g. PAP).
Sourcepub fn set_min_latest_block_ts(&mut self, ts: u64)
pub fn set_min_latest_block_ts(&mut self, ts: u64)
Set the lower bound (Unix seconds) for block.timestamp accepted
when the proof references the "latest" tag. 0 disables the
check.
Sourcepub fn execute_json_status(&mut self) -> Result<String, ColibriError>
pub fn execute_json_status(&mut self) -> Result<String, ColibriError>
Advance the verifier state machine one step. See
crate::types::Status for the shape of the returned JSON.
Trait Implementations§
Auto Trait Implementations§
impl !Sync for Verifier
impl Freeze for Verifier
impl RefUnwindSafe for Verifier
impl Unpin for Verifier
impl UnsafeUnpin 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