feat: add an ant-core-powered direct browser client - #186
Draft
mickvandijke wants to merge 21 commits into
Draft
Conversation
This was referenced Sep 1, 2026
Draft
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.
Summary
Adds a direct Autonomi browser client powered by ant-core compiled to WebAssembly.
The browser connects to storage nodes over WebRTC Direct, authenticates their ANT identities, establishes a fresh post-quantum application session, performs iterative closest-node lookup, verifies quotes, pays once, uploads content-addressed records, resolves public DataMaps, downloads/reconstructs files, and serves seekable media ranges without an application gateway.
Compatibility-sensitive behavior stays in Rust. JavaScript is limited to browser-owned boundaries: DOM interaction, file/save handles, worker and IndexedDB integration, service-worker messaging, and submitting an ant-core-verified payment plan through the wallet provider.
Companion node implementation: ant-node#220
ant-core architecture
The native facade is unchanged. Existing Rust desktop applications and ant-cli continue to use the native QUIC client without source changes; only browser-wasm selects the WebRTC adapter.
Post-quantum WebRTC application session
Browser protocol v4 replaces the former plaintext v3 RPC channel and standalone ML-DSA HELLO challenge:
The handshake, key derivation, replay protection, sequence handling, outer framing, and bounds all come from the shared ant-protocol module. JavaScript contains no parallel cryptographic protocol.
WebRTC still supplies certificate-pinned DTLS, ICE, SCTP, and DataChannel transport. The application session protects RPC and chunk plaintext against later compromise of only the classical DTLS key exchange, but it does not hide transport metadata, lengths, timing, or make the WebRTC stack itself post-quantum secure.
Browser workflows
Paid uploads
Public downloads
Random-access streaming
Compatibility and rollout
Coordinated draft stack
Draft dependencies are pinned by immutable Git SHA so CI does not depend on sibling worktrees.
Risk tier
Reason: the client implements a new public transport/RPC surface and performs quote, payment, and storage operations while deliberately preserving existing native and stored-data formats.
Test evidence
Current-head protocol-v4 validation:
Earlier headless-Chromium and public-testnet results validated WebRTC connectivity, decentralized lookup, range streaming, and paid uploads under protocol v3. They are useful transport evidence but do not validate the new v4 record layer. A real browser run against a matching deployed v4 node fleet remains required.
New dependencies
Rust/WASM surface:
ADR
The browser architecture is covered by ADR-0003. The node-side transport and v4 cryptographic design are covered by ant-node ADR-0009.
Mitigation / rollback
Do not build or ship browser-wasm, and keep using the default native feature. Native ant-core, ant-cli, QUIC networking, and existing stored data remain available independently.
Remaining draft work