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

@zondax/ledger-icp

v4.0.0

Published

Node API for the Internet Computer App (Ledger Nano S/X/S+/Stax/Flex)

Readme

@zondax/ledger-icp

License npm version

This package provides a basic client library to communicate with the Internet Computer App running in a Ledger Nano S, S+, X, Stax and Flex.

We recommend using the npmjs package in order to receive updates/fixes.

Transports

InternetComputerApp accepts any transport that can send an APDU: a legacy Transport from @ledgerhq/hw-transport, or a Device Management Kit session wrapped in DMKTransport from @zondax/ledger-js.

import InternetComputerApp from "@zondax/ledger-icp";
import TransportNodeHid from "@ledgerhq/hw-transport-node-hid";

const app = new InternetComputerApp(await TransportNodeHid.create());

Device Management Kit

import InternetComputerApp from "@zondax/ledger-icp";
import { DMKTransport } from "@zondax/ledger-js";

const sessionId = await dmk.connect({
  device,
  // Not optional for this app -- see below.
  sessionRefresherOptions: { isRefresherDisabled: true },
});

const app = new InternetComputerApp(new DMKTransport(dmk, sessionId));

Disable the session refresher. By default a DMK session polls the device with GetAppAndVersion about once a second, over the same queue your APDUs leave on. sign, signUpdateCall and signBls each send their payload as a sequence of chunks, awaiting one before sending the next, so a poll can land in a gap between two chunks -- which the device sees as a foreign APDU mid-flow. hw-transport had no background traffic, so this hazard is new with the DMK. Ledger Live disables the refresher in its own DMK transport for the same reason.

Breaking changes in 4.0.0

@zondax/ledger-js moves from 0.2.x to 2.0.0. The responses this SDK returns are unchanged -- every method still resolves to a value carrying returnCode and errorMessage, on failure as much as on success -- but three inherited members did change:

| 3.x | 4.0.0 | | | ------------------------------------------------------- | ---------------------- | --------------------------------------------------------------- | | signSendChunk(chunkIdx, chunkNum, chunk, txtype, ins) | signSendChunkTx(...) | renamed; BaseApp claimed the old name for a method of its own | | prepareChunks(path, message) | protected | no longer reachable from outside the class | | acceptedPathLengths | removed | |

All three are chunk-level internals that sign() drives for you; none belongs to a normal signing flow. In plain JS a call to the old signSendChunk now returns a rejected promise rather than sending anything.

Smaller behaviour changes worth knowing:

  • Node 20 or later is required; @zondax/ledger-js 2.0.0 sets that floor.
  • @ledgerhq/hw-transport is no longer installed as a side effect. This package never imported it, but it used to arrive transitively. Declare it yourself if you import it.
  • Unknown status codes now resolve to real names: 0x6a88 was Unknown Return Code: 27272 and is now Referenced Data Not Found. 0x6985 is reworded to Conditions of Use Not Satisfied.
  • An invalid derivation path now rejects with a ResponseError carrying returnCode: 0xFFFFFFFF and the message Invalid path length. (e.g "m/44'/5757'/5'/0/3"), where 3.x rejected with a plain Error and no code.
  • getVersion().targetId changes representation. 3.x returned a number built from the four raw bytes -- a device reporting target 0x33000004 came back as 855638020, and 0 when none was sent, despite the declared type saying string. 4.0.0 returns an 8-character hex string, "33000004", and "" when none was sent. TypeScript consumers see no type change, so nothing warns them; comparisons and arithmetic on this field break silently.

Notes

Use yarn install to avoid issues.