Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including @ledgerhq/hw-transport-web-ble with all npm packages installed. Try it out:

var hwTransportWebBle = require("@ledgerhq/hw-transport-web-ble")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@ledgerhq/hw-transport-web-ble v4.68.2

Ledger Hardware Wallet Web Bluetooth implementation of the communication layer

Github, Ledger Devs Slack

@ledgerhq/hw-transport-web-ble

Allows to communicate with Ledger Hardware Wallets.

[Web] (Bluetooth)check browser support.

API

Table of Contents

BluetoothTransport

Extends Transport

react-native bluetooth BLE implementation

Parameters

  • device Device
  • writeCharacteristic Characteristic
  • notifyObservable Observable<any>
  • deviceModel DeviceModel

Examples

import BluetoothTransport from "@ledgerhq/hw-transport-web-ble";

exchange

Exchange with the device using APDU protocol.

Parameters

Returns Promise<Buffer> a promise of apdu response

observeAvailability

observe event with { available: bool, type: string } (available is generic, type is specific) an event is emit once and then each time it changes

Parameters
  • observer any

listen

Scan for Ledger Bluetooth devices. On this web implementation, it only emits ONE device, the one that was selected in the UI (if any).

Parameters
  • observer any

open

open a bluetooth device.

Parameters
  • deviceOrId (Device | string)

disconnect

globally disconnect a bluetooth device by its id.

Parameters
  • id any
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free