React native HID

This page is an extract from the repository

Sections in this article

Install the package

yarn add @ledgerhq/react-native-hid

API

HIDTransport

Extends Transport

Ledger’s React Native HID Transport implementation

Parameters

Examples

import TransportHID from "@ledgerhq/react-native-hid";
...
TransportHID.create().then(transport => ...)

exchange

Parameters

  • apdu any input value

Returns Promise<any> Promise of apdu response

close

Close the transport

Returns any Promise

isSupported

Check if the transport is supported (basically true on Android)

Returns Promise<boolean>

list

List currently connected devices.

Returns Promise<Array<any» Promise of devices

listen

Listen to ledger devices events

Parameters

  • observer any

Returns any

open

Open a the transport with a Ledger device

Parameters

  • deviceObj DeviceObj

Did you find this page helpful?

What would you like to see here?
Node Speculos
React native Bluetooth
Getting Started
Theme Features
Customization