data/bridge/bridge_protocol library

Classes

BridgeHandshake
Handshake payload sent during initialization.
BridgeNotification
A JSON-RPC 2.0 notification (no id, no response expected).
BridgeProtocol
The main protocol handler for bridge communication.
BridgeProtocolVersion
Semantic version for the bridge protocol.
BridgeRequest
A JSON-RPC 2.0 request on the bridge.
BridgeResponse
A JSON-RPC 2.0 response on the bridge.
ErrorCode
Standard JSON-RPC 2.0 error codes plus custom protocol codes.
MessageSerializer
Handles serialization/deserialization of JSON-RPC 2.0 messages.
ProtocolMessage
A parsed protocol message (tagged union).
RequestRegistry
Tracks pending outgoing requests, handles timeouts.

Enums

BridgeCapability
Capabilities that a bridge endpoint can advertise.
MessageType
Classification of a JSON-RPC message.

Typedefs

NotificationHandler = void Function(String method, dynamic params)
Handler for incoming notifications.
RequestHandler = Future Function(String method, dynamic params)
Handler for incoming requests. Returns the result to send back.

Exceptions / Errors

BridgeError
Error object in the bridge protocol (JSON-RPC 2.0 error shape).