Skip to main content

AnchorBackend

Trait AnchorBackend 

Source
pub trait AnchorBackend: Send + Sync {
    // Required methods
    fn kind(&self) -> &'static str;
    fn submit(&self, bundle_bytes: &[u8]) -> Result<Value, String>;
    fn verify(&self, bundle_bytes: &[u8], inclusion_proof: &Value) -> bool;
}
Expand description

Anchor backend trait — every anchor kind exposes a submit that produces a JSON inclusion proof and a verify that re-checks the proof against the bundle bytes. Mirror of TS AnchorBackend.

Required Methods§

Source

fn kind(&self) -> &'static str

Source

fn submit(&self, bundle_bytes: &[u8]) -> Result<Value, String>

Source

fn verify(&self, bundle_bytes: &[u8], inclusion_proof: &Value) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§