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

i2pseeds

v2026.3.16

Published

TypeScript library and CLI for I2P network reseeding — parse SU3 files, verify signatures, and extract router info into netDb

Downloads

510

Readme

i2pseeds

npm version License: MIT

A TypeScript library and CLI for I2P network reseeding. Parse and verify SU3 files, extract router info into a netDb directory, and download fresh seeds from reseed servers — all with cryptographic signature verification.

Features

  • SU3 parsing — read headers, signer IDs, content types, and version info
  • Signature verification — verify RSA / ECDSA / DSA signatures against bundled X.509 certificates
  • NetDb extraction — unpack routerInfo-*.dat entries into the standard netdb/r*/ directory layout
  • Live reseeding — download .su3 files from community reseed servers with configurable timeouts
  • Bundled seeds & certs — ships with pre-fetched seeds and all current reseed server certificates
  • CLI + API — use from the command line or import into your own TypeScript / JavaScript project

Installation

# npm
npm install i2pseeds

# bun
bun add i2pseeds

CLI Usage

The CLI exposes a single netdb command that extracts router info into a ./netdb directory.

# Extract from bundled seeds (no network access needed)
npx i2pseeds netdb

# Download fresh seeds from reseed servers first, then extract
npx i2pseeds netdb --refresh

Programmatic API

import {
  parseSu3Header,
  verifySu3Signature,
  extractZipFromSu3,
  extractNetDb,
  refreshSeeds,
} from "i2pseeds";

parseSu3Header(buf: Buffer): Su3Header | null

Parse the SU3 header from a raw buffer. Returns null if the buffer does not start with the I2Psu3 magic bytes.

const header = parseSu3Header(raw);
console.log(header?.signerId); // "[email protected]"
console.log(header?.sigType); // 6 (RSA-SHA512-4096)

verifySu3Signature(su3Buffer: Buffer, certPem: string): boolean

Verify the cryptographic signature of an SU3 file against a PEM-encoded certificate.

import fs from "node:fs/promises";

const cert = await fs.readFile("cert.crt", "utf8");
const valid = verifySu3Signature(su3Buffer, cert);

extractZipFromSu3(su3Buffer: Buffer): Buffer | null

Strip the SU3 header and return the raw ZIP payload. Returns null if no ZIP magic is found.

extractNetDb(seedsDir, targetDir, crtDir?, servers?): Promise<ExtractResult>

Extract all routerInfo-*.dat entries from every .su3 file in seedsDir into targetDir. When crtDir and servers are provided, each file is verified against the mapped certificate.

const result = await extractNetDb("./seeds", "./netdb", "./certs", servers);
console.log(`Extracted ${result.count} router entries`);

refreshSeeds(servers, outputDir, timeoutMs?): Promise<string[]>

Download fresh .su3 files from the given reseed servers. Returns a list of saved file paths.

const saved = await refreshSeeds(servers, "./seeds", 15000);

Reseed Servers

The package includes a reseed.json file mapping reseed server URLs to their certificate files. The bundled list currently covers 12 community reseed servers.

CDN

The bundled reseed data and certificates can also be downloaded directly from jsDelivr:

https://cdn.jsdelivr.net/npm/i2pseeds@latest/dist/data/

Development

# Install dependencies
bun install

# Build
bun run build

# Run tests
bun test

# Lint
bun run lint

# Type-check
bun run type-check

See CONTRIBUTING.md for the full development workflow.

License

MIT © labofsahil