feat: add portable browser protocol surface - #29
Draft
mickvandijke wants to merge 3 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
Makes the compatibility-sensitive parts of ant-protocol available to browser/WASM clients and adds the shared post-quantum application session used by both the browser client and ant-node's WebRTC Direct listener.
The existing native surface remains the default. Browser consumers opt into the narrowly scoped portable feature and use the same quote encodings, payment hash, pricing curve, storage-commitment verification, transfer deadlines, cryptographic handshake, and encrypted record format as the node. This keeps protocol and cryptographic behavior in one Rust implementation instead of duplicating it in JavaScript or in separate client/server codecs.
What changes
Portable protocol surface
Shared WebRTC post-quantum session
Security boundary
WebRTC still authenticates the pinned DTLS certificate and supplies ICE/DTLS/SCTP transport. The new application session independently authenticates the ANT node identity and protects all RPC and chunk plaintext with ML-KEM-derived keys.
This is intentionally defense in depth:
Compatibility
Test evidence
Current-head validation:
Existing portable/native parity coverage also checks quote encoding, payment hashing, pricing, commitment validation, and ML-DSA verification.
Draft integration notes
Coordinated draft stack
Rollback
Consumers can continue using the default native surface. Removing the optional portable/browser session does not alter native QUIC behavior or existing stored data.