Application Architecture | Developers

Application Architecture

Estimated reading time: 3 minutes

Architecture Overview

In order to understand deeply the interactions between different components of the application, we need to understand the architecture of the application. The overall architecture of the integration is based on the following layers:

Ledger Live Prerequisites Fig. 1: Overall Architecture

On the client side we have your core application containing your business logic and workflows. You need to integrate at least the LedgerJS Transport Library in order to discuss with the Ledger device.

Some major networks have dedicated JS Library, like Bitcoin / Ethereum. You should use them if you are planning to integrate with these apps. This will provide a good abstraction level and allow you to use a proper SDK. You can see how to use them in Integration Walkthrough - Web USB/HID.

Nano API calls

This section describes what are the role of the Nano API. Indeed we call Nano API the “LedgerJS Dedicated App Lib” on the above image at the top of the page. You must have encontered few of the APIs if you have gone through the Integration Walkthrough. In the Walkthroughs, we have mostly used the Bitcoin and Ethereum API provided by Ledger.

The Nano API role is to help you to carry out operations in the “Nano Apps” (rf. image at the top).

The APIs are not written in the same way for all Nano apps. In addition, while some of them are provided by ledger, others are written by the various crypto communities.

You can have a look at how they are coded and documented at the LedgerHQ repository. You can also see the different Nano API provided by Ledger below.

Nano APIs provided by Ledger

Here is the list of all the APIs provided by Ledger.

Blockchain Nano API
Algorand npm @ledgerhq/hw-app-algorand
Bitcoin npm @ledgerhq/hw-app-btc
Cosmos npm @ledgerhq/hw-app-cosmos
Elrond npm @ledgerhq/hw-app-elrond
Ethereum npm @ledgerhq/hw-app-eth
Polkadot npm @ledgerhq/hw-app-polkadot
Solana npm @ledgerhq/hw-app-solana
Stellar npm @ledgerhq/hw-app-str
Tezos npm @ledgerhq/hw-app-tezos
Tron npm @ledgerhq/hw-app-trx
Ripple npm @ledgerhq/hw-app-xrp

Nano APIs provided by the crypto-asset community

You may find these libraries on the GitHub repositories written by the community.

We currently do not have an updated list of all community-developed Nano APIs. If you wish to contribute yours, please use the comment box at the bottom of this page.

Here is the list of all the APIs from the community that you can find on npm.

Blockchain Nano API
Vite npm ledgerjs-hw-app-vite
Ergo npm ledgerjs-hw-app-ergo
Cardano npm @cardano-foundation/ledgerjs-hw-app-cardano
Sia npm @siacentral/ledgerjs-sia

Nano API-less calls

When there is no available Nano API, the way to make your Nano calls is by constructing the ADPU call yourself, by using the syntax information found in each application documentation.

Here are some examples:

Blockchain App Application documentation
Polymath Polymath
Filecoin Filecoin

Did you find this page helpful?

How would you improve this page?

Node HID integration
Architecture Dataflow
Getting Started
Theme Features