Skip to content

semaphore:prove

Prove membership in a Semaphore group anonymously, signaling a message nullified per scope, and bind the proof JSON to . Uses the production ceremony artifacts for the group's tree depth. Requires an identity derived this session (semaphore:identity).

⚗️ Experimental — available at next.evmcrispr.com.

semaphore:prove <variable>
NameTypeDescription
variablevariableVariable to bind the proof JSON to
NameTypeDescription
--groupnumberGroup id to prove membership in
--messageanyMessage (number, hex or string) the proof signals
--scopeanyScope (external nullifier) — one accepted proof per identity per scope
--identitynumberIdentity commitment to prove with (default: the only identity of this session)

--message is the value your proof signals; --scope is the external nullifier — the contract accepts one proof per identity per scope, so scope a poll id, an epoch, or any replay boundary. Values may be numbers, hex, or strings (a string becomes its UTF-8 bytes as a number, matching the Semaphore SDK). Raw values ride in the proof JSON; the circuit sees them keccak-hashed, exactly as the contract re-hashes them on verification.

Proving uses the real Semaphore ceremony artifacts for the group's tree depth, fetched from snark-artifacts.pse.dev on first use and cached for the session. There is no dev-mode setup: these proofs are production-grade.

load semaphore
# One-time: derive your identity (the wallet signs a fixed message)
semaphore:identity $me
# Group admin
semaphore:create-group $group
semaphore:add-member $me to $group
# Anonymous signal: prove membership, nullified per scope
semaphore:prove $proof --group $group --message "approve proposal 42" --scope 42
semaphore:validate $proof for $group