247420 // wireweaveprobably emerging 🌀
npm i wireweave
nostr. webrtc. zero backend.
wireweave is the networking layer pulled out of zellous. p2p voice, chat, channels, servers, ban/role/settings — every byte moves through public nostr relays. import, wire, ship.
01 / install
install
one package. thirteen modules.
wireweave ships as a single esm package. every subsystem is its own export so you tree-shake whatever you do not use.
npm i wireweave nostr-tools
# then in browser
import { createWireweave } from 'wireweave';
const ww = createWireweave({ nostrTools, xstate, storage, relays });
02 / api
api
everything EventTarget, everything real.
no fake relays. no stubs. wireweave talks to live public nostr relays and live webrtc peers from the first line. the api is EventTarget all the way down so you can subscribe to any surface without owning the loop.
const voice = ww.ensureVoice();
voice.addEventListener('peer-joined', e => console.log(e.detail));
await voice.connect('general');
03 / modules
docs
13 pieces, each its own file.
relay-pool, auth, fsm, voice, chat, channels, servers, message, bans, roles, settings, media, pages. open src/ — no sprawl, no monolith.
// modules10 files
// 01
voice
perfect negotiation, ice restart, track-stall detection, hub election.
// 02
chat
public channels, replies, reactions. kinds 42 + 7.
// 03
servers
community events, invite links, owner rename, delete.
// 04
channels
parameterized replaceable channel list per server.
// 05
roles
role events keyed by server id + pubkey.
// 06
bans
signed ban events with expiry. kick-from-voice on top.
// 07
settings
bitrate, embed allowlist, arbitrary key/value.
// 08
media
nip-98 auth upload to any blossom server. cdn mirror list.
// 09
auth
extension first, local nsec fallback, stored in provided storage.
// 10
fsm
voice, peer, relay, sfu, camera — every state machine exported.