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

@freqhole/midden

v0.1.31

Published

WASM bindings for freqhole P2P client (iroh-based)

Downloads

206

Readme

midden

browser WASM client for freqhole P2P federation.

what it does

midden provides a MiddenNode class that lets browsers connect to freqhole peers over iroh P2P. just need the peer's node_id (public key) to connect - iroh handles discovery via relay.

building

requires wasm-pack and LLVM toolchain:

# install wasm-pack
cargo install wasm-pack

# on macOS, ensure LLVM is installed
brew install llvm

# build (dev mode)
make build

# build (release mode, optimized)
make build-release

output goes to pkg/ directory.

usage

import { MiddenNode } from "midden";

// create node (waits for relay connection)
const node = await MiddenNode.create();
console.log("my node_id:", node.node_id());

// make API request to peer - accepts plain node_id or full endpoint JSON
const response = await node.proxy_request(
  peerNodeId, // e.g. "abc123def456..." or '{"id":"...","addrs":[...]}'
  "GET",
  "/api/music/songs?limit=10",
  null,
);
console.log(response.status, response.body);

// fetch blob from peer
const blob = await node.fetch_blob(peerNodeId, blobId);
console.log(blob.size(), blob.content_type());
// blob.data() returns Uint8Array

peer address formats

midden accepts two formats for peer_addr:

  1. plain node_id (64 hex chars): uses iroh relay for discovery

    13a257b5367d6b5b7ceb67ec6246c3dafbe886af8ed429408cd7619c7a4787b1
  2. full endpoint JSON: includes relay URL and/or direct IP hints

    {
      "id": "13a257b5...",
      "addrs": [{ "Relay": "https://..." }, { "Ip": "192.168.1.100:57383" }]
    }

protocol

uses same protocol as grimoire's federation transport:

  • ALPN: freqhole/1
  • messages: ProxyRequest, ProxyResponse, BlobStreamRequest, BlobStreamResponse
  • blob streaming: length-prefixed header followed by raw bytes

see grimoire/src/federation/transport/protocol.rs for details.


made with 💖 in NYC