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

@permitplane/client

v0.1.0

Published

PermitPlane licensing client for Electron, React Native and Node: offline grant verification, DPoP device proofs, licence key activation.

Readme

@permitplane/client (TypeScript SDK, phase 1)

PermitPlane licensing client for Electron, React Native and Node. Zero runtime dependencies. It does offline RS256 grant verification, ES256 DPoP proofs, licence key activation, hosted approval, vendor-owned enrollment, refresh and release, and passes the 66 shared PermitPlane conformance vectors.

Install

npm install @permitplane/client

Licensed under Apache-2.0. Homepage: https://permitplane.com

Supported runtimes

  • Node 22 or newer
  • Electron 28 or newer (run LicenseClient in the main process; expose status, hasFeature and getLimit to the renderer through contextBridge)
  • React Native 0.79 or newer (Hermes)

The package is ESM only and uses an exports map (., ./protocol and ./testing). Metro honours exports from React Native 0.79. A CommonJS Electron main process must use dynamic import() unless its Node version supports require(esm) (Node 22.12 or newer).

Platform capabilities you inject

Everything platform specific sits behind an interface, so the same code runs everywhere:

| Interface | Purpose | Phase 1 implementation | | --- | --- | --- | | CryptoProvider | SHA-256, RS256/ES256 verify, random bytes | webCryptoProvider() (Node, Electron). React Native must inject one (phase 2). | | KeyStore | Protected P-256 installation key, signs messages | MemoryKeyStore from /testing (tests only) | | StateStore | Persists credentials and the clock anchor | MemoryStateStore from /testing (tests only) | | PlatformClock | Boot id and suspend-inclusive monotonic time | processClock() from /testing (tests only: a random boot id per process, so each restart is treated as a reboot) | | TimeSource | Synchronous wall and monotonic clocks | systemTimeSource | | fetch | HTTP | globalThis.fetch |

keyStore, stateStore and clock are required so a production app can never silently fall back to an in-memory key. Electron and React Native adapters are phase 2.

Production PlatformClock. processClock is for tests only. A production clock must report the operating system's real boot id (for example Linux /proc/sys/kernel/random/boot_id, Windows boot GUID) and a suspend-inclusive monotonic time, and set confident: false when it cannot. Never derive the boot id from Date.now() - os.uptime(): it changes with every clock change and defeats the reboot check.

The memory stores and processClock are exported from @permitplane/client/testing, not from the main entry point.

The persisted state holds a bearer installation_token and the signed grant. Implement StateStore on protected storage (Keychain, Android Keystore, Electron safeStorage), never a plain file, and never log it. LicenseClient keeps credentials out of its own properties, JSON.stringify and util.inspect.

Usage

import { LicenseClient } from '@permitplane/client';

const client = new LicenseClient({
  config: { baseUrl, issuer, audience, vendorId, productId, environment: 'production', keys },
  keyStore, stateStore, clock,
});
await client.initialize();
await client.activateWithKey('PP-7KQ4M-X9T2H-B6WRN-3FJ8D');
if (client.hasFeature('export')) { /* ... */ }

hasFeature and getLimit are synchronous and never touch the network.

Threat model notes

  • The clock anchor in the state store is not authenticated. Someone who can write the store can move the anchor, which can extend offline use only up to the signed grant exp (at most 21 days after issue), and cannot extend rights past what the server signed. Protect the store so only the app can write it.
  • The installation private key must be non-exportable where the platform allows it. Possession is proven at initialize() with a local DPoP proof.
  • API responses are capped at 1 MiB, the verification URI must be https, and the hosted poll interval is clamped to 5-300 seconds.

Behaviour notes

  • A hosted approval that is denied or expired clears the pending request, as vendor enrollment does.
  • Polling and redemption share one rate gate (minimum 5 seconds), so a failing redemption cannot be retried in a tight loop.