DocumentationDevice interactionBeginner's guidesAdd BLE and USB support for Flex and Stax

Add BLE and USB support for Flex and Stax

DMK

Prerequisites

Device Management Kit: v0.4.0 (and later)

Implementation

import { DeviceManagementKitBuilder } from "@ledgerhq/device-management-kit";
import {
  webBleTransportFactory,
  WebUsbTransportFactory,
} from "@ledgerhq/device-transport-kit-web";
 
const dmk = new DeviceManagementKitBuilder()
  .addTransport(webBleTransportFactory)
  .addTransport(WebUsbTransportFactory)
  .build();

Find more information here.

LedgerJS

Prerequisites

LedgerJS transport libraries: v8.3.0 (and later)

Implementation

import TransportBLE from "@ledgerhq/hw-transport-web-ble";
import TransportUSB from "@ledgerhq/hw-transport-web-usb";
 
// Example of connecting to a device via BLE
const transportBLE = await TransportBLE.create();
const ethAppBLE = new AppEth(transportBLE);
 
// Example of connecting to a device via USB
const transportUSB = await TransportUSB.create();
const ethAppUSB = new AppEth(transportUSB);

Find more information here.

Custom Integration

Use the identifiers for devices and transport as describred in the reference section.

Ledger
Copyright © Ledger SAS. All rights reserved. Ledger, Ledger Nano S, Ledger Vault, Ledger OS are registered trademarks of Ledger SAS