Skip to main content

Crate wickra_proof_core

Crate wickra_proof_core 

Source
Expand description

§wickra-proof-core

Proof-of-Backtest: fold a (spec, data) pair into a deterministic wickra-backtest report and a canonical blake3 hash that anyone recomputes byte-for-byte in ten languages. Verification recomputes the report and compares hashes, so a forged report cannot pass.

canonicalize is the single source of the hash’s stability; prove and verify are the core operations; Prover exposes the same command_json boundary the ten language bindings forward verbatim.

Structs§

Candle
The OHLCV candle type consumed by prove/verify, re-exported from the pinned backtest engine so consumers do not depend on it directly. One OHLCV bar. time is the bar’s open time (engine-defined epoch unit; it is passed straight through to indicators that need a timestamp).
Config
A thin wrapper around a ProofSpec for CLI file loading.
Proof
The proof: the full backtest report plus the two canonical hashes and the exact engine version that produced it.
ProofSpec
The input to prove: an embedded backtest strategy, an opaque dataset reference, and an optional engine-version pin.
Prover
Stateless command-JSON handle. It holds nothing, but is handle-shaped so the ten language bindings share the same surface as screener/terminal.

Enums§

Error
Errors returned by wickra-proof-core operations. Every fallible boundary (parsing, engine invocation, canonicalization) maps into one of these; no operation panics on caller-supplied input.

Functions§

canonicalize
Produce the canonical, whitespace-free, key-sorted string form of value. Byte-identical across languages; the input to the blake3 hash.
hash_candles
The canonical hash of a candle series – the dataset commitment.
hash_report
The canonical hash of a backtest report.
hash_value
The canonical hash of any JSON value: the blake3 of its canonical form.
prove
Fold (spec, data) into a deterministic report and its canonical hashes.
verify
Verify a proof by recomputing it from (spec, data) and comparing the canonical hashes and engine version. This is recomputation, not blind trust of a supplied hash, so a forged report+hash cannot pass.
version
The wickra-proof-core crate version.

Type Aliases§

Result
Result alias for wickra-proof-core.