Repository navigation
Run the proof verifier in the browser instead of on a server - #10
Merged
ulrichard merged 7 commits intoSep 18, 2026
Merged
Conversation
ulrichard
reviewed
Sep 18, 2026
Member
Member
|
Thanks a lot for the contribution. This is how I imagined it from the beginning. |
Electrum needs a TCP socket a page cannot open, so the UTXO lookups moved to Esplora over HTTP. The server is configurable and defaults to Blockstream's public instances. bitcoinconsensus is Bitcoin Core's script interpreter and therefore C++, so building it for wasm needs a C++ standard library for that target. build.sh borrows clang and libc++ from the wasi-sdk, but does not link wasi-libc: that would put a second allocator next to Rust's and add a WASI import surface the browser would have to fill in. src/csupport.rs backs libc++ with Rust's allocator instead, so the module imports nothing but its own glue. Also fixes the confirmation depth, which was off by one. The block a UTXO is mined in counts as its first confirmation, so asking for three quietly required four.
addr_of_mut! on a static mut needs an unsafe block on 1.78, which is what CI tests as the MSRV, so the exception slot is an UnsafeCell now. The fmt job only used nightly for format_code_in_doc_comments, which nothing here relies on. Also drops an unused dev-dependency, treats an emptied confirmations field as the default rather than zero, and notes that build.sh fetches Linux x86_64 tools.
The bdk_wallet 1.0 port went in as bitcoindevkit/bdk-reserves#39 and shipped as 3.0.0, so there is no reason to pin a branch on a fork any more. It pulls in bdk_wallet 3 and bitcoinconsensus 0.105, which checks signatures with the script interpreter from Bitcoin Core 25.1. bitcoinconsensus 0.105 does not use the libc crate, so the wasm-only stand-in goes, and with it the Cargo.lock juggling in build.sh that only existed to hide the patch. bdk_wallet 3 needs Rust 1.85, so that is the MSRV now.
Logo and link as in bitcoindevkit/bdk-reserves. The example proof's message still says SEBA: it is signed into the proof and cannot change.
LICENSE and the README both pointed at LICENSE-APACHE and LICENSE-MIT, which were never in this repository. The log crate has had no callers since the HTTP service went.
NiklasKoehler
force-pushed
the
feature/browser-only-wasm
branch
from
September 18, 2026 14:40
01420c1 to
935087d
Compare
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.

Electrum needs a TCP socket a page cannot open, so the UTXO lookups moved to Esplora over HTTP. The server is configurable and defaults to Blockstream's public instances.
bitcoinconsensus is Bitcoin Core's script interpreter and therefore C++, so building it for wasm needs a C++ standard library for that target. build.sh borrows clang and libc++ from the wasi-sdk, but does not link wasi-libc: that would put a second allocator next to Rust's and add a WASI import surface the browser would have to fill in. src/csupport.rs backs libc++ with Rust's allocator instead, so the module imports nothing but its own glue.
Also fixes the confirmation depth, which was off by one. The block a UTXO is mined in counts as its first confirmation, so asking for three quietly required four.