Estimated reading time: 3 minutes
In order to deeply understand 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:
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.
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.
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: