Skip to main content

Module protocol

Module protocol 

Source
Expand description

Browser-facing WebRTC Direct wire profile.

The complete application contract lives in saorsa_transport::webrtc; this module is retained as a compatibility re-export for existing ant-core callers.

Structs§

BrowserCommitmentArtifact
JSON-safe form of a node’s signed storage commitment.
BrowserEndpoint
Manifest- and wire-compatible wrapper around a WebRTC Direct multiaddress.
BrowserHello
Metadata returned by an authenticated node’s encrypted HELLO response.
BrowserNode
One node returned by the browser closest-node RPC.
BrowserPaymentNetwork
Public EVM identity transmitted by manifests and HELLO responses. RPC endpoints belong to the node operator or client application and never form part of this wire record.
BrowserQuoteArtifact
JSON-safe form of the native EVM payment quote returned over WebRTC.
BrowserRequest
A complete browser RPC request header.
BrowserRequestFrame
A decoded request frame.
BrowserResponse
A complete browser RPC response header.
BrowserResponseFrame
A decoded response frame.
WebRtcDirectEndpoint
Parsed, certificate-pinned direct endpoint.

Enums§

BrowserEndpointInput
Endpoint accepted from either a raw multiaddress or manifest object.
BrowserProtocolError
Errors produced by browser address, framing, and identity validation.
BrowserRequestBody
Browser RPC request methods and their fields.
BrowserResponseBody
Browser RPC response variants and their fields.
BrowserResponseStatus
High-level browser response status.

Constants§

BROWSER_PROTOCOL_NAME
Protocol name authenticated by the node HELLO response.
BROWSER_PROTOCOL_VERSION
Current browser request/response protocol version.
MAX_BROWSER_FRAME_BYTES
Maximum complete browser application frame.
MAX_BROWSER_HEADER_BYTES
Fixed maximum JSON header carried by one browser protocol frame.
MAX_BROWSER_RECORD_BYTES
Maximum content carried by one browser protocol frame.
MAX_BROWSER_RESPONSE_BYTES
Backwards-compatible name for the maximum complete response frame.
MAX_WEBRTC_DIRECT_MULTIADDR_LENGTH
Maximum accepted WebRTC Direct multiaddress length.
WEBRTC_DIRECT_DATA_CHANNEL
Ordered WebRTC DataChannel label used by Autonomi nodes.
WEBRTC_WRITE_CHUNK_BYTES
DataChannel message size shared by native and browser adapters.

Functions§

decode_hex
Decode a fixed-width hexadecimal wire field.
encode_request_frame
Encode one typed JSON-header-plus-binary request frame.
encode_response_frame
Encode one typed JSON-header-plus-binary response frame.
ice_password_from_sdp
Read the effective browser-generated ICE password from a local SDP offer.
normalize_hex
Normalize a fixed-width hexadecimal wire field.
parse_request_frame
Parse one complete browser request.
parse_request_header
Parse a complete request without copying its binary content.
parse_response_frame
Parse one complete browser response.
parse_webrtc_direct_multiaddr
Parse and validate a signaling-free WebRTC Direct multiaddress.
response_frame_length
Determine a frame’s complete length once its JSON header is available.
server_answer_sdp
Build the certificate-pinned ICE-lite SDP answer for a direct endpoint.
v2_server_ice_credential
Build the v2 server username fragment that carries the browser’s ICE password.
validate_hello_metadata
Validate metadata received inside an authenticated post-quantum session.