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

biometric-vault

v1.0.1

Published

Passkey-Secured LocalStorage using WebAuthn API and Hardware Security Modules

Downloads

38

Readme

biometric-vault

The Passkey-Secured Storage Library.

Currently, if a developer wants to encrypt data in localStorage, they usually hardcode a "secret key" in their JavaScript. This is useless because any hacker (or malicious Chrome extension) can just read the source code and find the key.

biometric-vault uses the browser's native WebAuthn API (the same tech behind Passkeys/FaceID) to encrypt and decrypt data. The encryption key is derived using the WebAuthn PRF extension and bound to the user's Hardware Security Module (TPM). It is only released when the user physically touches their fingerprint scanner or looks at their FaceID.

🚀 Features

  • Hardware-Bound Keys: Uses the WebAuthn prf extension to bind encryption keys to the physical device. If someone steals the database/localStorage, they can't open it without the user's physical presence.
  • Duress Mode: You can set a "secondary fingerprint" (like your pinky finger) that, when scanned, wipes the local storage instead of opening it (for high-security situations).
  • Auto-Entropy Injection: The library uses the crypto.getRandomValues() API to inject real-world randomness into key generation and encryption IVs.
  • Zero-Knowledge Recovery: Generate a "Paper Key" that can be stored offline in case the device's biometric sensor breaks.

Installation

npm install biometric-vault

Usage

import { BiometricVault } from 'biometric-vault';

// This will trigger a FaceID/Fingerprint popup automatically
const vault = await BiometricVault.open('medical_records');

await vault.set('test_results', { cholesterol: 'low' });

// If someone else tries to read this, it returns encrypted garbage 
// unless the owner provides their biometric again.
const results = await vault.get('test_results');
console.log(results); // { cholesterol: 'low' }

Duress Mode

Register a secondary fingerprint to wipe the vault when scanned.

await BiometricVault.setupDuress('medical_records');
// Scans the duress finger. Next time `open()` is called with this finger, the vault is wiped.

Paper Key Recovery

If the user loses their hardware authenticator, they can recover using a Paper Key.

const paperKey = await vault.getPaperKey();
// Store paperKey safely offline

// ...Later, to recover:
const recoveredVault = await BiometricVault.recover('medical_records', paperKey);
await recoveredVault.get('test_results');