Socket
Socket
Sign inDemoInstall

@ledgerhq/hw-transport-webusb

Package Overview
Dependencies
Maintainers
20
Versions
288
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ledgerhq/hw-transport-webusb - npm Package Compare versions

Comparing version 6.27.5-nightly.2 to 6.27.5

31

CHANGELOG.md
# @ledgerhq/hw-transport-webusb
## 6.27.5-nightly.2
## 6.27.5
### Patch Changes
- [#1356](https://github.com/LedgerHQ/ledger-live/pull/1356) [`ecac411d7a`](https://github.com/LedgerHQ/ledger-live/commit/ecac411d7aad6f4003503ba6259d7c25017ca7aa) Thanks [@juan-cortes](https://github.com/juan-cortes)! - Updated readme.md of packages
- Updated dependencies [[`1a94cbf28a`](https://github.com/LedgerHQ/ledger-live/commit/1a94cbf28aaa2917c70719e22f446148cd66cef6), [`e0915b34ba`](https://github.com/LedgerHQ/ledger-live/commit/e0915b34ba37d9906b6c65e7e42f87893c088325)]:
- @ledgerhq/errors@6.11.0
- @ledgerhq/devices@7.0.2
- @ledgerhq/hw-transport@6.27.5
- Updated dependencies [[`ecac411d7a`](https://github.com/LedgerHQ/ledger-live/commit/ecac411d7aad6f4003503ba6259d7c25017ca7aa)]:
- @ledgerhq/devices@7.0.2-nightly.2
- @ledgerhq/errors@6.11.0-nightly.1
- @ledgerhq/hw-transport@6.27.5-nightly.2
- @ledgerhq/logs@6.10.1-nightly.1
## 6.27.5-next.0
## 6.27.5-nightly.1
### Patch Changes
- Updated dependencies [[`1a94cbf28a`](https://github.com/LedgerHQ/ledger-live/commit/1a94cbf28aaa2917c70719e22f446148cd66cef6)]:
- @ledgerhq/errors@6.11.0-nightly.0
- @ledgerhq/devices@7.0.2-nightly.1
- @ledgerhq/hw-transport@6.27.5-nightly.1
- Updated dependencies [[`1a94cbf28a`](https://github.com/LedgerHQ/ledger-live/commit/1a94cbf28aaa2917c70719e22f446148cd66cef6), [`e0915b34ba`](https://github.com/LedgerHQ/ledger-live/commit/e0915b34ba37d9906b6c65e7e42f87893c088325)]:
- @ledgerhq/errors@6.11.0-next.0
- @ledgerhq/devices@7.0.2-next.0
- @ledgerhq/hw-transport@6.27.5-next.0
## 6.27.5-nightly.0
### Patch Changes
- Updated dependencies [[`e0915b34ba`](https://github.com/LedgerHQ/ledger-live/commit/e0915b34ba37d9906b6c65e7e42f87893c088325)]:
- @ledgerhq/devices@7.0.2-nightly.0
- @ledgerhq/hw-transport@6.27.5-nightly.0
## 6.27.4

@@ -33,0 +22,0 @@

{
"name": "@ledgerhq/hw-transport-webusb",
"version": "6.27.5-nightly.2",
"version": "6.27.5",
"description": "Ledger Hardware Wallet WebUSB implementation of the communication layer",

@@ -29,6 +29,6 @@ "keywords": [

"dependencies": {
"@ledgerhq/devices": "^7.0.2-nightly.2",
"@ledgerhq/errors": "^6.11.0-nightly.1",
"@ledgerhq/hw-transport": "^6.27.5-nightly.2",
"@ledgerhq/logs": "^6.10.1-nightly.1"
"@ledgerhq/devices": "^7.0.2",
"@ledgerhq/errors": "^6.11.0",
"@ledgerhq/hw-transport": "^6.27.5",
"@ledgerhq/logs": "^6.10.0"
},

@@ -35,0 +35,0 @@ "devDependencies": {

@@ -1,6 +0,5 @@

<img src="https://user-images.githubusercontent.com/4631227/191834116-59cf590e-25cc-4956-ae5c-812ea464f324.png" height="100" />
<img src="https://user-images.githubusercontent.com/211411/34776833-6f1ef4da-f618-11e7-8b13-f0697901d6a8.png" height="100" />
[GitHub](https://github.com/LedgerHQ/ledger-live/),
[Ledger Devs Discord](https://developers.ledger.com/discord-pro),
[Developer Portal](https://developers.ledger.com/)
[Github](https://github.com/LedgerHQ/ledgerjs/),
[Ledger Devs Slack](https://ledger-dev.slack.com/)

@@ -17,3 +16,3 @@ ## @ledgerhq/hw-transport-webusb

You may be using this package to open a USB connection between your web application and the device.
You may be using this package to open a USB connexion between your web application and the device.

@@ -29,9 +28,9 @@ For a smooth and quick integration:

The transport functions `create()` and `listen()` must be called in the context of a user interaction (like a **"click"** event), otherwise it fails with DOM Exception. This is by WebUSB design. You also must run on HTTPS.
The transport functions `create()` and `listen()` must be called in the context of an user interaction (like a **"click"** event), otherwise it fails with DOM Exception. This is by WebUSB design. You also must run on HTTPS.
### How to use this transport regarding WebUSB paradigm?
In WebUSB, we have a "permission native" modal that appears when we need to "request" a device. This is required at-least-once for the user to accept, and then we can open the transport without triggering this modal. However, in both cases, it must happen in context of a click like explain above. Our current implementation trade off is to abstract this out and only trigger the permission modal if no device are listed. This might change in the future.
In WebUSB, we have a "permission native" modal that appears when we need to "request" a device. This is required at-least-once for the user to accept, and then we can open the transport without triggering this modal. However, in both cases, it must happen in context of a click like explain above. Our current implementation tradeoff is to abstract this out and only trigger the permission modal if no device are listed. This might change in the future.
In terms of UX, there are two classical use cases:
In term of UX, there are two classical usecases:

@@ -42,3 +41,3 @@ 1. you only need the device at key times, like once to get the address. once to sign a transaction,...

in (1) case, you can just do your logic in each button (Get Address / Sign Transaction) time (create it, do the logic, close it).
in (2) case, you will need to have a Connect button that appear when you don’t have the connection yet. And you need to hook to the “disconnect” event to potentially make the UI reflect that and require user to click again on that Connect button, because you can’t automatically `create()`/`open()` again.
in (2) case, you will need to have a Connect button that appear when you don’t have the connection yet. and you need to hook to the “disconnect” event to potentially make the UI reflect that and require user to click again on that Connect button, because you can’t automatically `create()`/`open()` again.

@@ -45,0 +44,0 @@ ### Support status

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc