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

@n11x/ghostnet-sdk

v0.1.0

Published

TypeScript SDK for integrating with the GhostNet encrypted mesh network

Readme

@n11x/ghostnet-sdk

TypeScript SDK for integrating with the GhostNet encrypted mesh network.

GhostNet is a privacy-first peer-to-peer mesh built by N11X Labs. This SDK lets third-party apps join the mesh as a node — inheriting end-to-end encryption, identity management, and private messaging out of the box.

Runtimes: Node 18+, modern browsers, React Native.

Install

npm install @n11x/ghostnet-sdk

Quickstart

import { GhostNet } from '@n11x/ghostnet-sdk';

const gn = new GhostNet({ debug: true });

// Create a new identity (or restore with gn.loadIdentity(seedPhrase))
const identity = gn.createIdentity();
console.log('Node ID:', identity.nodeId);
console.log('Seed phrase:', identity.seedPhrase); // back this up!

// Connect to the mesh
await gn.connect();

// Listen for messages
gn.on('message', (msg) => {
  console.log(`${msg.from}: ${msg.data}`);
});

// Send an encrypted message to a peer
await gn.send('0x<peer-node-id>', 'hello from the mesh!');

// Disconnect when done
gn.disconnect();

API

new GhostNet(options?)

| Option | Type | Default | Description | | ---------- | --------- | ---------------------------------- | ----------------------- | | endpoint | string | wss://ghostnet-ji-production... | WebSocket relay URL | | debug | boolean | false | Enable console logging |

Identity

| Method | Returns | Description | | ----------------------------- | ---------- | ---------------------------------------- | | .createIdentity() | Identity | Generate a new BIP-39 identity | | .loadIdentity(seedPhrase) | Identity | Restore identity from a 12-word mnemonic | | .getIdentity() | Identity \| null | Current identity |

Connection

| Method | Returns | Description | | --------------- | --------------- | ---------------------------- | | .connect() | Promise<void> | Connect to the mesh relay | | .disconnect() | void | Gracefully disconnect |

Messaging

| Method | Returns | Description | | ------------------------- | --------------- | ---------------------------------- | | .send(peerId, message) | Promise<void> | Send encrypted message to a peer |

Events

| Event | Payload | Description | | -------------- | ---------------------------------------- | ---------------------- | | message | { from: string, data: string, timestamp: number } | Incoming message | | error | Error | Connection/crypto error| | connect | — | Connected to relay | | disconnect | string (reason) | Disconnected |

Errors

All errors extend GhostNetError (which extends Error):

  • ConnectionError — WebSocket connection failures
  • IdentityError — invalid seed phrase or key derivation failure
  • EncryptionError — encrypt/decrypt failures
  • PeerNotFoundError — unknown or unreachable peer (includes .peerId)

Crypto scheme

| Primitive | Algorithm | | ----------------- | -------------------------------- | | Identity key | Ed25519 (from BIP-39 seed) | | Node ID | BLAKE3 hash of public key | | Key exchange | X25519 ECDH (ephemeral keypair) | | Key derivation | HKDF-SHA256 | | Message encryption| AES-256-GCM |

Dependencies

| Package | Why | | ----------------- | ------------------------------------------------------ | | @noble/curves | Ed25519 + X25519 — audited, zero-dep, cross-platform | | @noble/hashes | BLAKE3, HKDF, SHA-256 — same family, audited | | bip39 | BIP-39 mnemonic generation and validation | | ws | WebSocket client for Node.js (browsers use native WS) |

4 runtime deps. Zero peer deps.

Roadmap

The following features are planned for future releases:

  • v0.2 — GhostNet Pay (micropayments over the mesh)
  • v0.2 — Ghost Radar (peer discovery)
  • v0.2 — Ghost Shield cloaking
  • v0.3 — Ghost Cards (portable identity cards)
  • v0.3 — Proximity Connect (local mesh via BLE/mDNS)

License

MIT — N11X Labs