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 🙏

© 2025 – Pkg Stats / Ryan Hefner

tlsn-js

v0.1.0-alpha.12.0

Published

![MIT licensed][mit-badge] ![Apache licensed][apache-badge]

Readme

MIT licensed
Apache licensed

tlsn-js

NPM modules for proving and verifying using TLSNotary in the browser.

[!IMPORTANT] tlsn-js is developed specifically for browser environments and does not work in Node.js.

[!IMPORTANT] The primary goal of tlsn-js is to support the development of the TLSNotary browser extension.
Please do not treat this as a public API (yet).

License

This repository is licensed under either:

...at your option.

Examples

tlsn-js can be used in several modes depending on your use case.

The ./demo folder contains three demos:

  • react-ts-webpack: Create an attestation with a Notary and render the result.
  • interactive-demo: Prove data interactively to a Verifier.
  • web-to-web-p2p: Prove data between two browser peers.

Running a Local WebSocket Proxy

In the demos, we attest data from https://raw.githubusercontent.com. Since browsers do not support raw TCP connections, a WebSocket proxy is required:

  1. Install wstcp:

    | Tool | Command | | ------ | ----------------------------- | | cargo | cargo install wstcp | | brew | brew install wstcp | | source | https://github.com/sile/wstcp |

  2. Run a WebSocket proxy for https://raw.githubusercontent.com:

    wstcp --bind-addr 127.0.0.1:55688 raw.githubusercontent.com:443

Install as NPM Package

npm install tlsn-js

Development

This library wraps the tlsn-wasm module.

To work on both tlsn-wasm and tlsn-js locally, update package.json:

"tlsn-wasm": "./tlsn-wasm/pkg"

Then build tlsn-wasm:

npm run build:wasm

Next:

npm install
npm run test

ℹ️ To switch back to the npm-published version of tlsn-wasm, delete or reset package-lock.json to remove the local path reference.

Build for NPM

npm install
npm run build

Testing

Testing is slightly complex due to the need for browser-based workers.

  • Tests live in the test/ directory.
  • The tests/ directory contains a Playwright test runner that opens a Chromium browser and runs the actual test page.

Some tests require a running Notary. You can start one via Docker:

npm run notary

Adding a New tlsn-js Test

  1. Create a new-test.spec.ts file in the test/ directory.

  2. Add your spec file to the entry object in webpack.web.dev.config.js.

  3. Create a corresponding new-test.spec.ts file in the playwright-test/ directory.

  4. Add an expect() call for it in tests/test.spec.ts.

Testing the Demos

Playwright is also used to test the demos.

npm install
npm run test
  • View tests in the browser:

    npx playwright test --ui
  • Debug tests:

    npx playwright test --debug