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

@nopeek/chat

v0.2.9

Published

NoPeek client SDK — E2EE chat your servers can't read.

Readme

@nopeek/chat

Official client SDK for NoPeek — end-to-end-encrypted messaging. The server only ever sees ciphertext; message bodies, attachments, and key backups are all encrypted on-device (MLS-style per-channel AES-256-GCM).

import { NoPeek } from "@nopeek/chat";

const np = await NoPeek.connect({ apiUrl, appId, userId, sessionToken });
const ch = await np.channels.create({ channelTypeKey: "direct", memberIds: [userId, peerId] });
ch.on?.("message", (m) => console.log(m.body?.text));
await ch.send({ text: "encrypted before it leaves this device" });

See the NoPeek API reference for the full surface (channels, messages, recovery, backups, bots). Used by the NoPeek messenger and by @nopeek/agent-bridge.

Storage durability (read this if you run inside a WebView)

connect({ storage }) defaults to localStorage. Inside a WebView - Capacitor, React Native, or Electron pointed at a remote URL - that store is evictable: iOS clears WKWebView local storage under pressure and after prolonged disuse, and Android's "Clear data" wipes it.

Device identity and channel keys live in that store. With escrow OFF, losing it makes the user's history permanently undecryptable through no action of their own. If you are in a WebView, pass a storage backed by native preferences:

import { Preferences } from '@capacitor/preferences'

// Hydrate into memory first so get() can stay synchronous, THEN connect().
// Connecting with an empty store looks like a brand-new device to the SDK and
// it will register a second one, orphaning the original identity.
const np = await NoPeek.connect({ ...session, storage: nativeBackedStore })

Also take a backup (np.backup()) before the user accumulates history worth losing.

Verifying from Node or CI

connect() opens a WebSocket by default, so a Node script will not exit. Pass autoConnectWs: false, and supply a Map-backed store since localStorage does not exist in Node:

const m = new Map<string, string>()
const np = await NoPeek.connect({
  ...session,
  autoConnectWs: false,
  storage: { get: (k) => m.get(k) ?? null, set: (k, v) => { m.set(k, v) } },
})

If your app owns the password, you MUST handle these three events

The backup is unlocked by a key derived from a secret YOUR app holds. NoPeek cannot see it and cannot help you if it changes without you re-wrapping. Every integration has to handle all three, and skipping one silently breaks restore for real users - usually months later, on a new device, when it is too late.

1. Login - the only moment the password exists in memory.

const np = await NoPeek.connect({ ...session, deferDeviceRegistration: true })
if (await np.hasBackup()) {
  await np.restore({ password })      // adopts the existing device identity
} else {
  await np.registerDevice()
  const recoveryCode = generateRecoveryCode()
  await np.backup({ password, recoveryCode })   // show the code ONCE
}

Use deferDeviceRegistration: true. Registering before you know whether a backup exists creates one ORPHAN device per login: it cannot read existing history, and its stale key packages degrade peers' claims.

2. Password change - re-wrap, and pass the previous password.

await np.backup({ password: newPassword, previousPassword: oldPassword })

Without this the user's own new password cannot unlock their history. Passing previousPassword also deletes the superseded envelopes, which is what actually revokes the old password - restore() tries every stored envelope, so leaving them means the old password still works.

3. Password RESET (forgotten) - you cannot re-wrap, so say so.

The wrap was derived from a password nobody has. With escrow off there is no server-side recovery: existing history is readable ONLY with the recovery code. Seed a fresh backup under the new password so future devices can restore, and tell the user plainly that older history needs their code. Failing silently here is the worst option - the user finds out on their next device.

try {
  await np.restore({ password: newPassword })     // occasionally works
} catch {
  await np.registerDevice()
  const recoveryCode = generateRecoveryCode()
  await np.backup({ password: newPassword, recoveryCode })
  // TELL THE USER older history needs their previous recovery code.
}