mirror of
https://github.com/vacp2p/zerokit.git
synced 2026-01-09 21:58:06 -05:00
# Changes - Unified the `RLN` struct and core protocol types across public, FFI, and WASM so everything works consistently. - Fully refactored `protocol.rs` and `public.rs` to clean up the API surface and make the flow easier to work with. - Added (de)serialization for `RLN_Proof` and `RLN_ProofValues`, and matched all C, Nim, WASM, and Node.js examples. - Aligned FFI and WASM behavior, added missing APIs, and standardized how witness are created and passed around. - Reworked the error types, added clearer verification messages, and simplified the overall error structure. - Updated variable names, README, Rust docs, and examples across the repo, updated outdated RLN RFC link. - Refactored `rln-cli` to use the new public API, removed serialize-based cli example, and dropped the `eyre` crate. - Bumped dependencies, fixed CI, fixed `+atomic` flags for latest nightly Rust and added `Clippy.toml` for better fmt. - Added a `prelude.rs` file for easier use, cleaned up public access for types and types import across zerokit modules. - Separated keygen, proof handling, slashing logic, and witness into protocol folder.
32 lines
885 B
Rust
32 lines
885 B
Rust
pub mod circuit;
|
|
pub mod error;
|
|
pub mod ffi;
|
|
pub mod hashers;
|
|
pub mod pm_tree_adapter;
|
|
pub mod poseidon_tree;
|
|
pub mod prelude;
|
|
pub mod protocol;
|
|
pub mod public;
|
|
pub mod utils;
|
|
|
|
// Ensure that only one Merkle tree feature is enabled at a time
|
|
#[cfg(any(
|
|
all(feature = "fullmerkletree", feature = "optimalmerkletree"),
|
|
all(feature = "fullmerkletree", feature = "pmtree-ft"),
|
|
all(feature = "optimalmerkletree", feature = "pmtree-ft"),
|
|
))]
|
|
compile_error!(
|
|
"Only one of `fullmerkletree`, `optimalmerkletree`, or `pmtree-ft` can be enabled at a time."
|
|
);
|
|
|
|
// Ensure that the `stateless` feature is not enabled with any Merkle tree features
|
|
#[cfg(all(
|
|
feature = "stateless",
|
|
any(
|
|
feature = "fullmerkletree",
|
|
feature = "optimalmerkletree",
|
|
feature = "pmtree-ft"
|
|
)
|
|
))]
|
|
compile_error!("Cannot enable any Merkle tree features with stateless");
|