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

licenseeye-sdk

v1.0.0

Published

TypeScript client SDK for LicenseEye license validation with Ed25519 verification, quota tracking, and policy management

Readme

LicenseEye SDK(客户端 SDK)

LicenseEye 的客户端 SDK,提供常用的许可证校验与消费工具。

功能

  • 心跳(heartbeat),并记录服务器时间(server-time)
  • Ed25519 特性令牌验证(feature token verification)
  • 临时令牌(ephemeral token)TTL 验证
  • 基于策略的行为适配(policy-driven behavior)
  • 通过存储适配器跟踪配额(quota tracking)
  • consume() 辅助方法用于特性门控(feature gating)

用法示例

import { LicenseEyeClient } from 'licenseeye-sdk'

// 简单内存存储示例
const storage = {
  data: new Map(),
  async get(key: string) { return this.data.get(key) || null },
  async set(key: string, value: string) { this.data.set(key, value) }
}

const client = new LicenseEyeClient('https://your-worker.workers.dev', storage)

// 心跳
const hb = await client.heartbeat(license_key, session_id, machine_id)
console.log('State:', hb.state) // active | grace | restricted | revoked
console.log('Policy:', hb.policy)
console.log('Soft checks:', hb.soft_checks)

// 特性消费
const ft = await client.issueFeatureToken(license_key, { export_4k: true })
const result = await client.consume('export_4k', ft, hb.policy, publicJWK, license_key)
if (!result.ok) console.error('Feature blocked:', result.error)

// 临时令牌
const token = await client.issueEphemeral(license_key, machine_id, 3600)
const valid = client.validateEphemeral(token)

构建

npm install
npm run build

备注:示例代码中的 storage 仅作演示,生产环境中请提供持久化实现(localStorage、IndexedDB、文件、数据库等)。