0.4.0 • Published 3 years ago

@zondax/ledger-tendermint v0.4.0

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

@zondax/ledger-tendermint

License npm version

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

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

Notes

Use yarn install to avoid issues.

Minimal example

This is very simple. First you need to use one of the transport classes provided by Ledger.

import TransportWebUSB from "@ledgerhq/hw-transport-webusb";
transport = await TransportWebUSB.create();
const app = new TendermintApp(transport);

the TendermintApp object will provide

const response = await app.getVersion();

if (response.returnCode !== TendermintApp.ERROR_CODE.NoError) {
      console.log(`Error [${response.returnCode}] ${response.errorMessage}`);
} else {
    console.log(response);
}