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

@momics/iroh-http-tauri

v0.4.0

Published

Tauri plugin for iroh-http peer-to-peer HTTP

Readme

@momics/iroh-http-tauri

npm

Pre-v1.0. APIs may change between minor releases.

Tauri v2 plugin for iroh-http: peer-to-peer networking over Iroh QUIC. Nodes are addressed by Ed25519 public key, with no DNS, no TLS certificates, and no intermediate servers.

Install

npm install @momics/iroh-http-tauri

Add the Rust plugin to your Tauri app's Cargo.toml:

[dependencies]
tauri-plugin-iroh-http = "0.3"

Register in src-tauri/src/lib.rs:

fn main() {
    tauri::Builder::default()
        .plugin(tauri_plugin_iroh_http::init())
        .run(tauri::generate_context!())
        .unwrap();
}

HTTP: serve and fetch

Send and receive HTTP requests over QUIC using the standard WHATWG Request/Response interface.

import { createNode } from "@momics/iroh-http-tauri";

const node = await createNode();
console.log("Node ID:", node.publicKey.toString()); // share out-of-band

const ALLOWED_PEERS = new Set(["<remote-node-public-key>"]);
node.serve({}, (req) => {
  const peerId = req.headers.get("Peer-Id");
  if (!ALLOWED_PEERS.has(peerId)) return new Response("Forbidden", { status: 403 });
  return new Response("Hello from Tauri!");
});

const res = await node.fetch("httpi://<remote-node-public-key>/");
console.log(await res.text());

Raw QUIC sessions

Open a raw QUIC connection to any peer and exchange data over bidirectional streams, unidirectional streams, or datagrams. The API mirrors WebTransport.

// Connect to a peer:
const session = await node.dial("<peer-public-key>");
await session.ready;

const { readable, writable } = await session.createBidirectionalStream();
const writer = writable.getWriter();
await writer.write(new TextEncoder().encode("hello"));
await writer.close();

// Accept incoming sessions:
for await (const session of node.incoming()) {
  console.log("peer connected:", session.remoteId.toString());
  for await (const { readable, writable } of session.incomingBidirectionalStreams) {
    // handle stream
  }
}

Requires the iroh-http:connect permission (see Permissions below).

Cryptographic utilities

Every node has an Ed25519 keypair. Key generation, signing, and verification are also available as standalone functions.

import { generateSecretKey, secretKeySign, publicKeyVerify } from "@momics/iroh-http-tauri";

const sk = generateSecretKey();                              // 32-byte Uint8Array
const data = new TextEncoder().encode("hello");
const sig = await secretKeySign(sk, data);                   // 64-byte Uint8Array
const ok  = await publicKeyVerify(node.publicKey.bytes, data, sig); // boolean

Class API on a live node:

const sig = await node.secretKey.sign(data);
const ok  = await node.publicKey.verify(data, sig);
const saved = node.secretKey.toBytes(); // persist and restore identity
const restored = await createNode({ key: saved });

Requires the iroh-http:crypto permission.

mDNS peer discovery

await node.advertise("my-app.iroh-http");

for await (const event of node.browse({ serviceName: "my-app.iroh-http" })) {
  if (event.type === "discovered") {
    const res = await node.fetch(`httpi://${event.nodeId}/api`);
  }
}

Requires the iroh-http:mdns permission.

Security

Any peer that knows your node's public key can connect and send requests. Iroh QUIC authenticates peer identity cryptographically, but not authorization. Use req.headers.get('Peer-Id') in your HTTP handler, and session.remoteId for raw sessions, to implement allowlists:

node.serve({}, (req) => {
  const peerId = req.headers.get("Peer-Id");
  if (!ALLOWED_PEERS.has(peerId)) return new Response("Forbidden", { status: 403 });
  return new Response("ok");
});

Permissions

Permissions are declared in your app's capabilities/default.json. They are split by capability so you only grant what your app actually uses.

| Permission | What it covers | |---|---| | iroh-http:default | createNode(), close(), node introspection (publicKey, nodeAddr, etc.) | | iroh-http:fetch | node.fetch() and all internal body-streaming required for it | | iroh-http:serve | node.serve() and all internal body-streaming required for it | | iroh-http:connect | Raw QUIC sessions: bidirectional streams and datagrams | | iroh-http:mdns | Local peer discovery via mDNS | | iroh-http:crypto | Key generation, signing, and verification |

A typical app using fetch and serve:

{
  "permissions": [
    "iroh-http:default",
    "iroh-http:fetch",
    "iroh-http:serve"
  ]
}

Supported Platforms

| Platform | Architecture | Status | |----------|:----------:|:------:| | macOS | x86_64 | ✅ | | macOS | aarch64 (Apple Silicon) | ✅ | | Linux | x86_64 | ✅ | | Linux | aarch64 | ✅ | | Windows | x86_64 | ✅ |

Other runtimes

| Runtime | Package | Docs | |---------|---------|------| | Node.js | @momics/iroh-http-node | npmjs.com/package/@momics/iroh-http-node | | Deno | @momics/iroh-http-deno | jsr.io/@momics/iroh-http-deno |

License

MIT OR Apache-2.0