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

keymaster-hold

v0.1.0

Published

Keymaster Hold

Readme

KeymasterHold

Keymaster Hold

本仓库包含 Keymaster Hold v1 的 TypeScript 与 Go 双语实现。两种实现遵循 文件格式规范 和 SDK API 设计,只处理内存数据,不连接 S3、不读写文件,也不管理 UI。

TypeScript

npm install
npm test

构建产物位于 dist/,公开入口为 src/index.ts(构建后为 dist/src/index.js),浏览器可使用 src/browser.ts(包导出 keymaster-hold/browser)。 密码操作通过 Web Crypto 执行,PBKDF2 为异步调用;secp256k1 使用无 Node 依赖的实现。

浏览器包构建:

npm run build:browser

发布 0.1.0 前先执行检查,确认无误后由发布者手工执行:

npm ci
npm run test:all
npm publish --access public

npm publish 会通过 prepublishOnly 自动重新生成 Node 与浏览器构建产物;包只发布 dist/src 和浏览器 bundle。

真实 Chromium 回归(首次运行需安装浏览器):

npx playwright install chromium
npm run test:browser

npm run test:all 会运行 TypeScript、Chromium 和 Go 检查,需要 Go 工具链及上述浏览器。

Go

go test ./...

Go module 为 keymasterhold,包名为 hold。testdata/vector.json 由 TypeScript 和 Go 测试共同读取,作为跨语言互操作基线;TypeScript 测试还会运行 Go 互操作辅助程序,验证 TypeScript 创建后由 Go 解密、以及 Go 创建后由 TypeScript 解密。

endpoint 校验在 Go 中使用固定版本的 WHATWG URL 解析器,与 TypeScript/浏览器采用同一 host 算法,并在解析前拒绝非法原始文本。共享 host 用例还覆盖 Unicode、数值域名、IPv4/IPv6、端口和转义的批量跨语言对照;接受的配置字符串保持原样。

TypeScript 在原生 URL 解析前使用固定版本的 tr46 做 IDNA 校验,避免浏览器容忍非法 Punycode 而 Node/Go 拒绝的差异。浏览器测试直接加载构建产物,检查共享 host 用例、参数访问器拒绝、异步快照及文件往返。