Skip to main content

Crate libveritas

Crate libveritas 

Source
Expand description

Offline verification library for the Spaces protocol.

libveritas verifies space handle ownership and zone records against on-chain anchors using ZK receipts and Merkle proofs. It is the verifier counterpart to the Spaces fabric / relay infrastructure.

§Quick start

use libveritas::{Veritas, msg::QueryContext};

let veritas = Veritas::new().with_anchors(anchors)?;
let result = veritas.verify(&QueryContext::new(), message)?;
for zone in &result.zones {
    // ...
}

§Features

  • elf — embed the prover ELF binaries (FOLD_ELF, STEP_ELF) alongside the image IDs. Verifiers only need the image IDs and can skip this feature.

Re-exports§

pub use sip7;
pub use spaces_protocol;

Modules§

builder
cert
constants
msg
names

Structs§

CertificateIter
Iterator over certificates from a verified message.
CommitmentInfo
Information about a space’s commitment state.
Delegate
TrustSet
A compact representation of a set of trusted anchors.
VerifiedMessage
Result of verifying a message.
Veritas
Zone
A verified zone representing ownership and state for a space handle.

Enums§

AnchorError
Error when loading or updating anchors.
MessageError
Error during message verification.
ProvableOption
SignatureError
SovereigntyState
ZoneCompareError

Constants§

VERIFY_DEFAULT
Verification option flags (combine with bitwise OR).
VERIFY_DEV_MODE
VERIFY_ENABLE_SNARK

Functions§

compute_root_id
Compute a deterministic id for a single root anchor.
compute_trust_set
Compute a trust set from anchors.
hash_signable_message
verify_schnorr
Verify a raw Schnorr signature (no prefix, caller provides the 32-byte message hash).
verify_spaces_message
Verify a Schnorr signature over a message using the Spaces signed-message prefix.