APIs
Wallet API
Server
Handlers
Device

overview

The Device handlers provides methods for handling the physical device, including opening low-level transport and selecting a device in the connected wallet.

request handlers:

"device.close" - Close Device

Close a device in the connected wallet.

parameter (in req.params)required?note
transportIdA device's transport id.
walletHandler usednote
device.close
  • Returns: A promise that resolves the transport id.

"device.exchange" -

parameter (in req.params)required?note
transportId
apduHex
walletHandler usednote
device.exchange
  • Returns: A promise that resolves with responseHex

"device.open" - Open Device

Open a device in the connected wallet.

parameterrequired?note
req.paramsAn object containing the parameters to open the device.
walletHandler usednote
device.open
  • Returns: A promise that resolves with a transportId

"device.select" - Select Device

Select a device in the connected wallet.

parameterrequired?note
paramsAn object containing the parameters to select and check the device.
walletHandler usednote
device.select
  • Returns: A promise that resolves with a deviceId which can be used with the device.open method.

"device.transport" - Open Low-Level Transport

Open low-level transport in the connected wallet.

parameterrequired?note
req.paramsAn object containing the parameters for the transport.
walletHandler usednote
device.transport
  • Calls the wallet handler device.transport
  • Returns: Returns: A promise that resolves with an instance of Transport compatible with @ledgerhq/hw-transport.