1.0.1 • Published 1 year ago

@blooo/ledger-thorchain-js v1.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

@blooo/ledger-thorchain-js

This package provides a basic client library to communicate with the THORChain App running in a Ledger Nano S/S+/X devices

We recommend using the npmjs package in order to receive updates/fixes.

Available commands

OperationResponseCommand
getVersionapp version---------------
publicKeypubkeypath (legacy command)
getAddressAndPubKeypubkey + addresspath + ( showInDevice )
showAddressAndPubKeysigned messagepath
appInfoname, version, flags, etc---------------
deviceInfofw and mcu version, id, etcOnly available in dashboard
signsigned messagepath + transaction type + message
signsigned messagepath + transaction type + message

getAddress command requires that you set the derivation path (account, change, index) and has an option parameter to display the address on the device. By default, it will retrieve the information without user confirmation.

sign command requires that you specify the transaction type, '0' for json transaction

Testing with real devices

It is possible to test this package with a real Ledger Nano device. To accomplish that, you will need to follow these steps:

  • Install the application in the Ledger device
  • Install the dependencies from this project
  • Run tests
yarn install
yarn test:integration