evidence-chain
Builder for explainable evidence chains in Rust.
An EvidenceChain is an ordered list of verifiable observations (EvidenceLinks), each with an optional numeric metric and a pass/fail threshold. Calling finalize() computes an aggregate pass ratio across all links.
Domain-agnostic — the same types work for fraud detection, trading signals, compliance checks, on-chain analysis, or any system where decisions must be auditable and explainable.
Installation
[]
= "0.1"
Usage
use ;
let mut chain = new;
chain.add_link;
chain.add_link;
chain.add_link;
chain.finalize;
println!;
// → 2/3 checks passed
Core types
| Type | Description |
|---|---|
EvidenceChain |
Ordered list of links + aggregate strength |
EvidenceLink |
Single observation with metric and threshold |
EvidenceCategory |
Structural / Temporal / Value / Behavioral |
EvidenceStrength |
total_checks, passed_checks, ratio |
Serialization
All types implement serde::Serialize and serde::Deserialize:
let json = to_string?;
let decoded: EvidenceChain = from_str?;
Examples
License
MIT — see LICENSE.