wickra_proof_core/lib.rs
1//! # wickra-proof-core
2//!
3//! Proof-of-Backtest: fold a `(spec, data)` pair into a deterministic
4//! `wickra-backtest` report and a canonical blake3 hash that anyone recomputes
5//! byte-for-byte in ten languages. Verification recomputes the report and
6//! compares hashes, so a forged report cannot pass.
7//!
8//! [`canonicalize`] is the single source of the hash's stability; [`prove`] and
9//! [`verify`] are the core operations; [`Prover`] exposes the same
10//! `command_json` boundary the ten language bindings forward verbatim.
11
12mod canonical;
13mod config;
14mod error;
15mod proof;
16mod spec;
17
18pub use canonical::{canonicalize, hash_candles, hash_report, hash_value};
19pub use config::Config;
20pub use error::{Error, Result};
21pub use proof::{prove, verify, Proof, Prover};
22pub use spec::ProofSpec;
23
24/// The OHLCV candle type consumed by [`prove`]/[`verify`], re-exported from the
25/// pinned backtest engine so consumers do not depend on it directly.
26pub use wickra_backtest_core::Candle;
27
28/// The wickra-proof-core crate version.
29#[must_use]
30pub fn version() -> &'static str {
31 env!("CARGO_PKG_VERSION")
32}
33
34#[cfg(test)]
35mod tests;