axiom-crypto / semaphore-mock

Generate a mock World ID semaphore tree to generate mock inclusion proofs for unit testing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

semaphore-mock

Generate a mock World ID semaphore tree to generate mock inclusion proofs for unit testing. Doesn't require signup-sequencer and uses semaphore-rs to generate the tree and the proofs.

Usage

Generate identities:

# Generates 100 secrets from which you can create Semaphore identities (out/random_identities.json)
cargo run --release generate-identities -identities 100

Prove inclusion and output the proof to json:

# Generates an inclusion proof for a given leaf index (out/proof.json)
cargo run --release prove-inclusion -i "out/random_identities.json" -tree-depth 16 --identity-index 16

About

Generate a mock World ID semaphore tree to generate mock inclusion proofs for unit testing.

License:MIT License


Languages

Language:Rust 100.0%