pub trait ChainAnchor: Send + Sync {
// Required methods
fn anchor(&self, hash: &[u8; 32]) -> Result<AnchorReceipt, String>;
fn verify(&self, receipt: &AnchorReceipt) -> Result<bool, String>;
fn backend_name(&self) -> &str;
}Expand description
Trait for anchoring chain state to an external ledger or store.
Implementations might target Bitcoin (via OpenTimestamps), Ethereum, a ruvector root chain, or simply a mock for testing.
Required Methods§
Sourcefn anchor(&self, hash: &[u8; 32]) -> Result<AnchorReceipt, String>
fn anchor(&self, hash: &[u8; 32]) -> Result<AnchorReceipt, String>
Anchor the given hash to the external backend.
Sourcefn verify(&self, receipt: &AnchorReceipt) -> Result<bool, String>
fn verify(&self, receipt: &AnchorReceipt) -> Result<bool, String>
Verify a previously anchored hash against its receipt.
Sourcefn backend_name(&self) -> &str
fn backend_name(&self) -> &str
Return the backend name for display/logging.