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

pal-protocol

v2.1.0

Published

PAL/2.0 — Proprietary P2P protocol for Palexplorer. Envelope signing, encryption, share negotiation, sync, routing, and security extensions.

Readme

pal-protocol

PAL/1.2 baseline with PAL/2.0 extensions — Proprietary application-layer protocol for Palexplorer. Built on BitTorrent, Ed25519, and XChaCha20-Poly1305.

What is PAL?

PAL is the control plane for Palexplorer's P2P file sharing. BitTorrent moves the bytes — PAL decides what, when, and to whom.

PAL handles: identity, share negotiation, transfer authorization, sync, chat, routing, presence, streaming signaling, and machine browsing. All messages are signed (Ed25519) and optionally encrypted (crypto_box_seal).

Protocol Stack

┌──────────────────────────────────────────────┐
│            PAL/2.0 Extensions                │  Forward secrecy, ratchet,
│                                              │  onion relay, group keys, ACK
├──────────────────────────────────────────────┤
│            PAL/1.2 (baseline)                │  Control plane
├──────────┬──────────┬───────────────────────┤
│ Signaling│  Sync    │  Policy Engine         │  Sub-protocols
├──────────┴──────────┴───────────────────────┤
│         PAL Envelope                         │  Message framing
├──────────────────────────────────────────────┤
│  Ed25519 / X25519 / XChaCha20-Poly1305       │  Cryptography
├──────────┬──────────┬───────────────────────┤
│WebTorrent│   DHT    │  mDNS                  │  Transport
├──────────┴──────────┴───────────────────────┤
│          TCP / UDP / WebRTC                   │  Network
└──────────────────────────────────────────────┘

Modules

Core (PAL/1.2)

| Module | File | Description | |--------|------|-------------| | Envelope | lib/envelope.js | Create, sign, verify, encrypt/decrypt PAL envelopes | | Messages | lib/messages.js | Message type definitions and builders | | Handler | lib/handler.js | Incoming envelope dispatcher (event-based) | | Negotiation | lib/negotiation.js | Share offer → accept → key delivery flow | | Policy | lib/policy.js | Share access policies (expiry, limits, IP, schedule) | | Router | lib/router.js | Smart route selection (LAN → direct → relay) | | Sync | lib/sync.js | 3-way manifest sync with delta support | | Rate Limit | lib/rateLimit.js | Per-key rate limiting |

Extensions (PAL/2.0)

| Module | File | Capability | Status | |--------|------|------------|--------| | Forward Secrecy | lib/session.js | pfs | Implemented — promote to core | | Double Ratchet | lib/ratchet.js | ratchet | Implemented | | Noise Signaling | lib/noise.js | noise | Implemented — under review | | Onion Relay | lib/onion.js | onion | Implemented | | Group Keys | lib/groupKeys.js | sender-keys | Implemented | | Message ACK | lib/ack.js | ack | Implemented — promote to core | | Attestation | lib/attestation.js | cap-attest | Implemented — deferred | | Certificate Transparency | lib/ct.js | ct-log | Implemented — deferred |

Usage

import { create, verify, decrypt, createEncrypted } from 'pal-protocol';

// Create a signed envelope
const envelope = create('share.offer', myKeyPair, recipientPK, {
  shareId: 'uuid',
  name: 'vacation-photos',
  totalSize: 1073741824,
});

// Verify an incoming envelope
const result = verify(envelope, { localPublicKey: myPK });
if (result.valid) {
  const payload = decrypt(envelope, myKeyPair);
}

Specs

Consumers

| Project | Role | |---------|------| | palexplorer | Desktop app — full protocol implementation | | palexplorer-server | Discovery server — envelope relay and validation | | palexplorer-mobile | Mobile app — P2P on mobile | | palexplorer-sdk | SDK for third-party developers |

Requirements

  • Node.js 20+
  • ES modules
  • sodium-native (libsodium bindings for Ed25519, XChaCha20, X25519)

License

Proprietary. See LICENSE.md.