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

arrr-network

v2.1.1

Published

SDK for connecting to mesh network for multiplayer applications

Readme

arrr-network

Client SDK for the ARRR network (Agentic Real-time Relay Routing) — a mesh networking layer with WebSocket rooms, deterministic input ordering, state sync, and cross-node replication.

This package is transport only: it gets your inputs into a room, in order, and hands you back the ticks. Simulation is yours.

Install

npm install arrr-network

Or, in a browser, use the prebuilt IIFE bundle, which exposes the SDK as the global arrrNetwork:

<script src="https://www.arrr.fun/sdk/arrr-network.iife.js"></script>

Usage

import { connect } from 'arrr-network';

const conn = await connect('my-room', {
  appId: 'my-app',            // Required - your application ID
  apiKey: 'arrr_…',           // Your app's API key, from the portal (see below)
  user: { id: 'player1' },

  onConnect: (snapshot, events, frame) => {
    console.log('Connected at frame', frame);
  },

  onTick: (frame, events) => {
    for (const event of events) {
      console.log(`Frame ${frame}:`, event.data);
    }
  }
});

conn.send({ move: { x: 1, y: 0 } });

By default the SDK asks the central service at https://cloud.arrr.fun which node to dial. Point centralServiceUrl (or nodeUrl, to skip discovery) at your own deployment to run against a self-hosted mesh.

apiKey is the application API key minted in the portal. It is sent as x-api-key when the SDK asks central for a node. A service running with APP_REGISTRATION=key refuses connections without one; in the default open mode it is optional, though a key that is unknown or belongs to another app is refused either way. It ships in your client, so treat it as attribution and a revocation switch, not a secret - per-user identity is joinToken / authToken.

API

| Export | Description | |--------|-------------| | connect(roomId, options) | Join a room; resolves to a Connection | | arrr | Alias of connect | | listRooms(appId, options?) | List an app's rooms with client counts | | getRandomRoom(appId, options?) | Pick a room for auto-matchmaking | | auth | Auth module (login, signup, session, providers) | | registerClientId(clientId) | Register a client ID for hash lookup | | unregisterClientId(clientId) | Drop a registered client ID | | hashClientId(clientId) | Hash a client ID the way the wire format does | | encodeSyncHash(...) / decodeBinaryMessage(...) | Binary protocol helpers | | encode(value) / decode(buffer) | Codec used on the wire |

A Connection exposes send, sendSnapshot, leaveRoom, close, getClients, and the connected, clientId, frame, bandwidthIn, bandwidthOut properties.

Guides and examples are at arrr.fun. This repository is published from a private monorepo where the SDK is developed alongside the node and the cloud service; issues and pull requests are welcome here, and accepted changes are applied there and appear in the next publish.

Requirements

Node.js 18 or newer, or any browser with WebSocket. In Node the SDK uses ws; in browsers that dependency is stubbed out in favour of the platform WebSocket.

License

MIT