The checker
The service that confirms a fact outside Midnight and signs a pass the form's contract checks inside the proof.
apps/verify confirms facts that live outside Midnight (a passport, an email inbox, an account, a wallet's balance) and turns them into one thing the contract understands: a pass.
A session
The person's browser opens a session with its subject key (a Poseidon hash of its secret for this form). The session lasts an hour.
The browser completes each check against the session.
When every check on the form has passed, and the form's published rules still match the rules hash it was deployed with (as Mitome recorded it), the checker signs the pass with jubjubSchnorrSign over [contract address, rules hash, subject key, nullifier seed].
The browser keeps the pass as a private input. The circuit verifies it with jubjubSchnorrVerify.
Passes have no expiry date on purpose: anything compared to block time would be public and could date the check. A pass is single-use (one nullifier) and bound to one form and one person's secret.
How each check is verified
| Check | Verified by |
|---|---|
| Passport (age, country, person, identity) | The browser asks ZKPassport with the form's checks; the checker rebuilds the same query itself and verifies the proofs locally with ZKPassport's SDK, scoped to this form, valid for 24 hours, then checks each result (age, nationality in or out, sanctions passed, face match passed). Test passports are refused in production. |
| A 6-digit code from a secure random source, emailed through Resend, kept only as a keyed hash; 10 minutes, a new code after 30 seconds, 5 tries. List membership is revealed only after the right code. | |
| GitHub, Discord, X | OAuth in a popup on the checker's own address, with PKCE for GitHub and X, and a cookie that ties the sign-in to the browser that started it (so nobody can send someone their link and take the pass). Scopes: none for GitHub, identify for Discord, users.read tweet.read for X. |
| Token, wallet list | A Sign-In with Ethereum message the checker writes (single-use, 10 minutes), verified with viem (smart-contract wallets too), then balanceOf through public Ethereum or Base nodes with fallbacks. |
What it keeps
A session holds the subject key, which checks passed, and the nullifier seeds. While an email code is pending it holds the address and the code's hash; during OAuth, the state and PKCE verifier. Sessions are deleted after an hour.
It never stores passport data, OAuth tokens, account handles or wallet addresses. Rate limits per network address are kept in memory only.
Rate limits, per network address per hour
| Per network address, per hour | Limit |
|---|---|
| Sessions | 120 |
| Sending an email code | 20 |
| Confirming a code | 60 |
| Passport proofs | 30 |
| Account sign-ins | 30 |
| Wallet challenges | 30 |
Configuration
MITOME_CHECKER_SIGNING_KEY (its public half is the API's CHECKER_VERIFYING_KEY, sealed into every form with checks), RESEND_API_KEY, GITHUB_CLIENT_ID / _SECRET and the same for Discord and X, ETHEREUM_RPC_URLS, BASE_RPC_URLS, ZKPASSPORT_DOMAIN. Run it yourself.
The contract has room for two checker keys. Mitome's app fills the first; the second slot is there for another checker, and isn't used by the app yet.