feat: support the attested verifier client in browser WASM - #116
Open
soamdesai-tfh wants to merge 9 commits into
Open
soamdesai-tfh wants to merge 9 commits into
soamdesai-tfh wants to merge 9 commits into
Conversation
soamdesai-tfh
marked this pull request as ready for review
September 17, 2026 22:45
soamdesai-tfh
requested review from
Dzejkop and
Takaros999
and removed request for
Dzejkop
September 17, 2026 22:59
Dzejkop
added a commit
to worldcoin/walletkit
that referenced
this pull request
Sep 22, 2026
crates.io flamingo-verifier-* 0.4.0 and pontifex 2.0.0 are not browser-safe: pontifex 2.0.0 calls std::time::SystemTime::now(), which panics in browsers. Pin the browser-compatible 0.4 line (worldcoin/flamingo#116) and the pontifex rev it pins (worldcoin/pontifex#47), and enforce rev-pinned git sources in cargo-deny. Move to merged revs/tags once worldcoin/flamingo#116 lands.
Dzejkop
added a commit
to worldcoin/walletkit
that referenced
this pull request
Sep 22, 2026
Re-pin the flamingo-verifier-* crates to worldcoin/flamingo#116's branch head and pontifex to worldcoin/pontifex#47's merged rev.
Re-pin pontifex to worldcoin/pontifex#47's merged rev (51d3b117) now that the PR has landed, and drop the unused js-sys wasm32 dev-dependency.
Port the browser harness's coverage to native integration tests over real HTTP and drop the wasm-bindgen-test harness: the browser fetch policy is not wire-visible and is covered by walletkit's browser integration. Replace the CI browser test step with a wasm32 compile check.
Dzejkop
force-pushed
the
codex/flamingo-wasm
branch
from
September 23, 2026 09:50
dffa2a4 to
327b308
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable the attested verifier client on browser WASM while preserving main's binary request/response contract, payload limits, verified result types, and input-binding checks.
Validation
Native client, protocol, and sealed-payload tests/doctests pass. All 6 browser-worker tests pass, covering binary transport, encryption, invalid attestation, stale routing, timeouts, and response type/size limits. Native/WASM Clippy, formatting, and dependency-source checks pass.
Live Nitro end-to-end matching remains unverified. This PR supports worldcoin/walletkit#548; that consumer must adapt to the updated client API when its dependency pin is advanced.
Note
Medium Risk
Touches attestation channel handling and HTTP transport for verifier assignment/match flows, but behavior is heavily covered by new native and browser-worker tests and preserves existing payload limits.
Overview
Adds browser WASM support for
flamingo-verifier-clientwhile keeping the same binary match contract, size limits, and verified result types.On wasm32, HTTP setup skips native cookie/connect timeouts and instead applies Fetch include credentials, no-store cache, and per-request deadlines via
configure_request. Match and error bodies are read through a stream-basedbounded_response(with early rejection on badContent-Length) so limits hold when length headers are missing on both native and WASM. Assignment verification is split into testable helpers (verify_assignment,handle_match_response).Pontifex is bumped to 2.0.1 (with lockfile churn for
wasm-bindgen-test,getrandomJS, etc.). Client tests drop Axum stub servers in favor of in-process exchange/response tests that run under tokio on native andwasm_bindgen_testin the browser; the separatetests/assignment.rsHTTP integration file is removed.Nix default shell adds the wasm32 toolchain,
wasm-bindgen-cli, Firefox/geckodriver, and the wasm test runner env; CI gains a WASM browser tests job that runs the client lib tests vianix develop.Reviewed by Cursor Bugbot for commit 9fa201e. Bugbot is set up for automated code reviews on this repo. Configure here.