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

vaporyjs-ledger

v2.1.4

Published

A wrapper library around the official Ledger JavaScript library that attempts to simplify usage and handle various failure modes/problems.

Readme

A wrapper library around the official Ledger JavaScript library that attempts to simplify usage and handle various failure modes/problems.

Usage

import { LedgerVapory, BrowserLedgerConnectionFactory, Network } from "vaporyjs-ledger";

async function doStuff() {
	const onConnectLedgerRequest = async () => { await promptUserToConnectLedger(); }
	const onOpenVaporyAppRequest = async () => { await promptUserToOpenVaporyAppOnLedger(); }
	const onSwitchLedgerModeRequest = async () => { await promptUserToSwitchVaporyAppToBrowserModeAndRestartVaporyApp(); }
	const onEnableContractSupportRequest = async () => { await promptUserToEnableContractSupportInVaporyAppAndRestartVaporyApp(); }

	const ledgerVapory = new LedgerVapory(Network.Main, BrowserLedgerConnectionFactory, onConnectLedgerRequest, onOpenVaporyAppRequest, onSwitchLedgerModeRequest);
	const address = await ledgerVapory.getAddressByBip44Index(0);
	const firstSignedMessagePromise = ledgerVapory.signTransactionByBip44Index("e8018504e3b292008252089428ee52a8f3d6e5d15f8b131996950d7f296c7952872bd72a2487400080", 7);
	const secondSignedMessagePromise = ledgerVapory.signTransactionByBip32Path("e8018504e3b292008252089428ee52a8f3d6e5d15f8b131996950d7f296c7952872bd72a2487400080", "m/44'/60'/0'/0/7");

	// this will block until both first and second messages are done because the library handles ordering internally
	const secondSignedMessage = await secondSignedMessage;

	// if the ledger isn't connected with the Vapory app open in browser mode, the on*Request callbacks above will be called before the signing promises return
	const firstSignedMessage = await firstSignedMessage;

	// BIP44 index 7 is the same as `m/44'/60'/0'/0/7`; it is strongly recommended to use index 0 if you don't support multi-address wallets
	assert.equal(firstSignedMessage, secondSignedMessage);
}

Development

Note 1

package-lock.json force updates node-hid, a transitive dependency of ledgerco to 0.6.0. This is necessary to get things working on Windows without requiring python as well as get tests working in Docker until ledgerco upgrades its dependency on node-hid to 0.6.0.

Testing with a physical ledger

You can test in node by building the TypeScript files and then running node output/scripts/node.js.

You can test in browser (chrome only, look at developer console) by building the TypeScript files and then running npx budo output/scripts/browser.js --ssl (note: you need openssl binaries on your path or in the root of your project).