โ† all modules
@metanet-games/

rooms

๐Ÿ’ฌ
live on npm needs chaintag npm โ†— source โ†— Apache-2.0

Real-time chat with dynamic channels and presence, over any transport โ€” WebSocket, an HTTP relay, WebRTC, or a built-in loopback for tests.

Install

$ npm i @metanet-games/rooms

Example

import { createRooms } from "@metanet-games/rooms";
import { anon } from "@metanet-games/chaintag";

const rooms = createRooms({ transport: myWebSocket, identity: anon(localStorage) });
const lobby = rooms.channel("lobby");   // dynamic โ€” name one, it exists

lobby.on("message",  m   => render(m)); // { author:{id,name,avatar}, text }
lobby.on("presence", who => showWhosHere(who));
lobby.join(); lobby.send("gm");
setInterval(() => rooms.heartbeat(), 10000);

Plug it into your game

Bring a transport and get chat + who's-here presence with zero server logic. Channels spawn on reference โ€” one per lobby, per match, per block. Joining is presence, not access control: everyone on a transport sees all channels, so gate private/paid rooms at your relay, not the channel name.

Part of chainkit โ€” verifiable building blocks for BSV games. Verify don't trust.

๐Ÿงฉ github.com/metanet-games/chainkit ยท ๐Ÿ•น๏ธ the games ยท metanet.games