npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tasfer/provider-relay

v0.1.4

Published

WebSocket-relay transport for @tasfer/editor — peers behind NATs sync through a relay that forwards AES-256-GCM sealed updates it cannot read.

Downloads

422

Readme

@tasfer/provider-relay

Sync through a WebSocket relay for @tasfer/editor. Peers in the same room exchange document operations through a server that blindly forwards frames between them — the network-relay sibling of @tasfer/provider-webrtc, and the fit when direct peer-to-peer is blocked but a relay is reachable.

Install

npm install @tasfer/editor @tasfer/provider-core @tasfer/provider-relay

Usage

import { createRelayProvider } from "@tasfer/provider-relay";

const provider = createRelayProvider({
  doc: editor.doc,
  room: "team-notes",
  relay: "wss://relay.tasfer.app",
  secret: roomSecret, // shared with peers out of band, never with the relay
});

provider.on("sync", ({ connected, peers }) => {
  status.textContent = connected ? `${peers} peer(s)` : "connecting…";
});

| Option | | | -------- | --------------------------------------------------------------------------- | | doc | The document to sync — editor.doc, or a standalone createDoc(...). | | room | Logical room. Replicas sharing a room and relay converge. | | relay | Relay base URL, e.g. wss://relay.tasfer.app. | | secret | Shared room secret — a passphrase or raw key bytes. null sends plaintext. | | peerId | This replica's stable id. Defaults to doc.peerId. |

What the relay can and cannot see

Document frames are sealed with AES-256-GCM under a key derived from secret, so a relay operator forwards bytes they can neither read nor alter undetected. Distribute the secret out of band — an invite link, your own auth — and keep it away from the relay.

Three limits worth stating plainly:

  • The relay still learns the room name, peer ids, and the size and timing of every frame.
  • Every peer in a room shares one key, so the from field is unforgeable to the relay but not to another peer holding that key.
  • secret: null disables all of it and hands the relay operator every document in the room. Only reasonable when you run the relay yourself, or already encrypt above this provider.

If you need the server out of the data path entirely, use @tasfer/provider-webrtc.

Presence

provider.presence.set({ name: "Ada", color: "#1db984" });

Bind presence to on-canvas remote carets with bindPresenceCursors from @tasfer/provider-core/cursors.

The low-level RelayTransport is exported too, for hosts that want to drive createProvider from @tasfer/provider-core themselves.

Documentation

tasfer.app/docs/editor/collaboration

License

MIT