Create a room handle with a configured P2P client and shared seed.
Called once when the room closes. A signaling loss with live peer channels
instead calls opts.onSignalingLost; those channels keep working until
leave() or the last peer disconnects.
Called for a decrypted string or binary message.
Called when a peer's data channel opens.
Called when a peer's data channel closes or fails authentication.
Called on each room state change.
This member's gateway id after a successful create or join.
Current room lifecycle state.
Send one encrypted message to every currently connected peer.
Create a new room and resolve on the gateway grant.
Join an existing room; data channels may open after this resolves.
Leave the room and close all peer channels. Calls onClose once.
Known other members, including peers whose channel is still opening.
Send one encrypted message to a connected peer.
An encrypted WebRTC mesh room. The gateway handles membership and directed signaling; application framing and document state belong to the caller.