Skip to main content

Crate inherence_verifier

Crate inherence_verifier 

Source
Expand description

Inherence receipt verifier — reference implementation of verification protocol v1 (see spec/receipts/v1/SPEC.md).

This crate is a verifier only. It contains no policy- compilation, no proving, no circuit-construction logic. Those live behind the hosted gate and are not needed (and not available) to verify a receipt.

Usage:

use inherence_verifier::{verify_receipt, VerifyConfig};

let cfg = VerifyConfig::new()
    .pin_authority_jwk(authority_jwk_json)
    .pin_vk(vk_hash_hex, vk_bytes);

match verify_receipt(jwt_str, &cfg) {
    Ok(()) => println!("VALID"),
    Err(e) => println!("INVALID: {}", e),
}

Re-exports§

pub use error::VerifyError;

Modules§

binding
SPEC §6.7 — public-inputs serialization (Fr encoding).
eip712
SPEC §6.1 — EIP-712 principal-signature recovery.
error
Failure codes (SPEC §8 controlled vocabulary).
jwt
Bare-bones JWT (RFC 7519) parsing + EdDSA signature verification. We intentionally avoid jsonwebtoken to keep WASM bundle size small.
payload
Payload schema + cross-block consistency checks.
proof
SPEC §6.6 — Groth16 proof verification.

Structs§

VerifyConfig
Pinned trust roots the verifier consults. Constructed by the integrator; the verifier itself never fetches keys from the network.

Functions§

verify_receipt
Verify a receipt. Returns Ok(()) for VALID, Err(VerifyError) for INVALID with the failure code attached.