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

blind-push

v0.2.3

Published

P2P Push notification gateway that work with blind-peer

Readme

blind-push

Create encrypted Hypercore push notifications for the sender core -> blind-peer -> push forwarder -> FCM -> receiver core flow.

Overview

This package turns Hypercore proofs into compact notification payloads for the blind-peer delivery path. In the deployed flow, the sender core does not hand craft the push payload itself. Instead, it sends an RPC request to a blind-peer, the blind-peer generates the encrypted payload from its replicated Hypercore state, then sends an RPC request to a push forwarder, which delivers the payload over FCM to the receiver core.

High level:

sender core
  -> BlindPeerRequest RPC
blind-peer
  -> createNotification(...)
  -> { discoveryKey, payload }
  -> ForwardPushRequest RPC
push forwarder
  -> FCM
receiver core
  -> decode(...)            // optional transport decoding
  -> readNotification(store, roomKey, payload)
  -> verified proof / newer-state signal

If the latest block would make the notification too large for common push payload limits, blind-push falls back to a compact proof without inline block data. The receiver can still verify that newer data exists and fetch the missing block over Hypercore replication.

API

const notification = await blindPush.createNotification(core, [options])

Create an encrypted notification payload from a Hypercore block proof.

In the deployed flow, core is typically the blind-peer's replicated view of the sender core, not the sender's local process.

options include:

  • roomKey: optional room key used to encrypt the notification. Defaults to core.key.
  • roomDiscoveryKey: optional discovery key to expose in the returned payload. Defaults to crypto.discoveryKey(roomKey).
  • index: optional block index to prove. Defaults to core.length - 1.
  • timeout: optional timeout passed to core.get(...). Defaults to 10000.
  • extra: optional metadata embedded in the encrypted proof payload.

Resolves to:

  • notification.discoveryKey: discovery key for the room.
  • notification.payload: encrypted proof bytes suitable for forwarding in a push payload.

If the encrypted payload exceeds the internal size budget, the returned notification omits inline block data and carries a compact proof instead. The embedded version and extra fields live inside the encrypted proof payload and are exposed after decryption via readNotification(...).

const result = await blindPush.readNotification(store, roomKey, payload)

Decrypt and verify a notification payload against a local Hypercore store.

  • store: a Hypercore store instance, for example core.state.storage.store.
  • roomKey: the room key used to decrypt the notification payload.
  • payload: encrypted proof bytes returned by createNotification.

Resolves to the verified result from hypercore/lib/fully-remote-proof, or null if the proof targets a core that does not exist in the provided store.

Common fields on the resolved result include:

  • key: the sender core key.
  • discoveryKey: the sender core discovery key.
  • length: the proved core length.
  • newer: true when the receiver is behind the proved length.
  • block: the proved block when it was embedded in the notification, otherwise null.

const raw = blindPush.encode(notification)

Encode a { discoveryKey, payload } notification object using the package's PushPayload compact encoding.

const notification = blindPush.decode(raw)

Decode a PushPayload buffer back into { discoveryKey, payload }.

Errors

const BlindPushError = require('blind-push/errors')

Exports the package error type.

BlindPushError.PAYLOAD_TOO_LARGE()

Returned by createNotification(...) when the compact proof still exceeds the internal push payload size budget, typically because extra is too large.

Encodings

const encodings = require('blind-push/encodings')

Exports the generated compact encodings used by the package:

  • encodings.PushPayload: { discoveryKey, payload }, the encrypted push payload delivered to the receiver.
  • encodings.BlindPeerRequest: sender -> blind-peer RPC envelope with { block: { key, index }, destination: { key, discoveryKey } }.
  • encodings.ForwardPushRequest: blind-peer -> push forwarder RPC envelope with { payload, appId? }.