SkillAgentSearch skills...

Ledgerjs

⛔️ MOVED to monorepo "ledger-live"

Install / Use

/learn @LedgerHQ/Ledgerjs
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

⛔️ DEPRECATED

This repository is now deprecated. We moved to a new mono repository architecture containing all of Ledger Live JavaScript Ecosystem that you can find here. You can follow the migration guide to help you make the transition.

We are hiring, join us! 👨‍💻👩‍💻

<img src="https://user-images.githubusercontent.com/3273751/151214602-f5153588-1911-4456-ae65-604d56821b36.png" height="80" /> <img src="https://user-images.githubusercontent.com/211411/52533081-e679d380-2d2e-11e9-9c5e-571e4ad0107b.png" height="80" />

Ledger Devs Slack License

Welcome to Ledger's JavaScript libraries.

See also:

@ledgerhq/hw-transport-*

To communicate with a Ledger device, you first need to identify which transport(s) to use.

The hw-transport libraries implement communication protocol for our hardware wallet devices (Ledger Nano / Ledger Nano S / Ledger Nano X / Ledger Blue) in many platforms: Web, Node, Electron, React Native,... and using many different communication channels: U2F, HID, WebUSB, Bluetooth,...

| Channels | U2F/WebAuthn | HID | WebUSB | Bluetooth | |----------|--------------|-----|--------|-----------| | Blue | DEPRECATED<sup>1</sup> | YES | NO | NO | | Nano S | DEPRECATED<sup>1</sup> | YES | YES | NO | | Nano X | DEPRECATED<sup>1</sup> | YES | YES | YES |

  1. U2F is deprecated. See https://github.com/LedgerHQ/ledgerjs/blob/master/docs/migrate_webusb.md

Summary of implementations available per platform

| Platforms | U2F/WebAuthn | HID | WebUSB | Bluetooth | |------------------|------------------|-----------------------------------|---------------------|-------------------------------| | Web | @ledgerhq/hw-transport-u2f | @ledgerhq/hw-transport-webhid | @ledgerhq/hw-transport-webusb | @ledgerhq/hw-transport-web-ble | | Electron/Node.js | NO | @ledgerhq/hw-transport-node-hid<sup>1</sup> | NO | @ledgerhq/hw-transport-node-ble | | iOS | NO | NO | NO | @ledgerhq/react-native-hw-transport-ble | | Android | @ledgerhq/hw-transport-u2f<sup>2</sup> | @ledgerhq/react-native-hid | @ledgerhq/hw-transport-webusb<sup>2</sup> | @ledgerhq/react-native-hw-transport-ble |

  1. 3 implementations available
  2. via Android Chrome

Beware the current web support:

| Channels | U2F | WebHID. | WebUSB | WebBluetooth | |----------|-------------------|-----------------|--------------------|--------------| | Windows | DEPRECATED<sup>1</sup> | YES | OK BUT<sup>2</sup> | YES | | Mac | DEPRECATED<sup>1</sup> | YES | YES | YES | | Linux | DEPRECATED<sup>1</sup> | YES | YES | YES | | Chrome | DEPRECATED<sup>1</sup> | YES<sup>3</sup> | YES | YES | | Safari | DEPRECATED<sup>1</sup> | NO | NO | NO | | Firefox | DEPRECATED<sup>1</sup> | NO | NO | NO | | IE. | DEPRECATED<sup>1</sup> | NO | NO | NO |

  1. U2F is deprecated. See https://github.com/LedgerHQ/ledgerjs/blob/master/docs/migrate_webusb.md
  2. instabilities has been reported
  3. WebHID supported under Chrome experimental flags

Please find respective documentation for each transport:

An unified Transport interface

All these transports implement a generic interface exposed by @ledgerhq/hw-transport. There are specifics for each transport which are explained in each package.

A Transport is essentially:

  • Transport.listen: (observer)=>Subscription
  • Transport.open: (descriptor)=>Promise<Transport>
  • transport.exchange(apdu: Buffer): Promise<Buffer>
  • transport.close()

and some derivates:

  • transport.create(): Promise<Transport>: make use of listen and open for the most simple scenario.
  • transport.send(cla, ins, p1, p2, data): Promise<Buffer>: a small abstraction of exchange

NB: APDU is the encoding primitive for all binary exchange with the devices. (it comes from smart card industry)

@ledgerhq/hw-app-*

As soon as your Transport is created, you can already communicate by implementing the apps protocol (refer to application documentations, for instance BTC app and ETH app ones).

We also provide libraries that help implementing the low level exchanges. These higher level APIs are split per app:

View on GitHub
GitHub Stars573
CategoryDevelopment
Updated7h ago
Forks372

Languages

TypeScript

Security Score

95/100

Audited on Apr 2, 2026

No findings