Skip to content

Commit

Permalink
πŸ“ (doc): Update documentation after feedbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
mbertin-ledger committed Nov 8, 2024
1 parent 8cc0194 commit 6ca8903
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 27 deletions.
4 changes: 0 additions & 4 deletions apps/docs/pages/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,5 @@
"docs": {
"title": "Documentation",
"type": "page"
},
"references": {
"title": "References",
"type": "page"
}
}
2 changes: 1 addition & 1 deletion apps/docs/pages/docs/_meta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"docs": "Ledger Device Management Kits",
"explanations": "Explanations",
"begginers": "Begginer's guide",
"beginers": "Beginer's guide",
"integration_walkthroughs": "Integration Walkthrough",
"migrations": "Migrations",
"references": "References (TSDoc)"
Expand Down
Empty file removed apps/docs/pages/docs/begginers.mdx
Empty file.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion apps/docs/pages/docs/docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You can follow the migration guidelines [here](./migrations/)

## Glossary

Through all the documentation we will use some acronyme that you can find the following description :
Throughout all the documentation we will use several acronyms that you can find the following description :

- DMK: Device Management Kit
- DSK: Device Signer Kit
Expand Down
Empty file.
26 changes: 15 additions & 11 deletions apps/docs/pages/docs/explanations/dmk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Callout } from "nextra/components";

# Device Management Kit

The device management kit is the entry point for all the other libraries related to.
The device management kit is the entry point for all the other libraries related to it.
As we wanted to make the project modular.

## Main Features
Expand All @@ -22,9 +22,9 @@ As we wanted to make the project modular.
> [!NOTE]
> At the moment we do not provide the possibility to distinguish two devices of the same model, via WebHID and to avoid connection to the same device twice.
## Communicate with the device
## Communicate with a Ledger device

DMK is offering several ways to communicate with the device.
The DMK is offering several ways to communicate with a Ledger device.

### Send APDU

Expand All @@ -33,11 +33,12 @@ DMK is offering several ways to communicate with the device.
the _Command_ or _DeviceAction_ instead.
</Callout>

You can send APDU commands to the device using the `sendApdu` method of the `dmk` instance.
Parameters:
You can send APDU commands to the device using the `sendApdu` method of the Device Management Kit instance (here `dmk`) instance.

- `sessionId`: string - The session ID, which an identifier of the connection with a device.
- `apdu`: UInt8Array - Byte array of data to be send to the device.
<u>**Parameters**</u>:

- `sessionId`: string - The session ID, identifier of the connection with a device.
- `apdu`: UInt8Array - bytes array of data to be send to the device.

```typescript
await dmk.sendApdu({ sessionId, apdu });
Expand All @@ -47,7 +48,8 @@ await dmk.sendApdu({ sessionId, apdu });

Commands are pre-defined actions that you can send to the device.
You can use the `sendCommand` method of the `dmk` instance to send a command to the device.
Parameters:

<u>**Parameters**</u>:

- `sessionId`: string - The session ID, which an identifier of the connection with a device.
- `command`: Command - The command to be sent to the device.
Expand All @@ -67,7 +69,7 @@ You can use the `executeDeviceAction` method of the `dmk` instance to execute a
It is returning an observable that will emit different states of the action execution.
A device action is cancellable, you can cancel it by calling the `cancel` function returned by the `executeDeviceAction` method.

Parameters:
<u>**Parameters**</u>:

- `sessionId`: string - The session ID, which an identifier of the connection with a device.
- `deviceAction`: DeviceAction - The DeviceAction to be sent to the device.
Expand All @@ -84,8 +86,10 @@ const { observable, cancel } = await dmk.executeDeviceAction({
## State Management

For each connected device, we are managing and providing a device state.
The states are:

The different states are:

- `connected`: The device is connected.
- `locked`: The device is locked.
- `locked`: The device is locked. User needs to unlock it to perform operations.
- `busy`: The device is busy, so not reachable.
- `disconnected`: The device is disconnected.
8 changes: 4 additions & 4 deletions apps/docs/pages/docs/explanations/ledgerjs.mdx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Differences with LedgerJS

Device management kit aim to replace LedgerJS libraries, mainly `hw-app-XXX` and `transport-XXX` libraries
Device management kit aims to replace LedgerJS libraries, mainly `hw-app-XXX` and `hw-transport-XXX` libraries

## Current Problems

Ledger JS libraries where initially made for **Ledger Live** applications. As Ledger Live is a pretty old project (> 7 years),
we have inevitably a big technical debt. Moreover time make that some part of the logic are today hard to understand and to maintain.

Moreover, some device behavior are not well handled by the libraries. For example, opening an application on the device will cause unexpected disconnection.
Another feedback we have learnt from partners (software wallets) is that we have a lack of simplicity in the libraries, it require low level knowledge to use them (ex: APDU concept).
Some device behavior are not correctly handled by the libraries, for example opening an application on the device will cause unexpected disconnection.
Another feedback we have learnt from partners (software wallets) is that we have a lack of simplicity in the libraries, it requires low level knowledge to use them (ex: APDU concept).

## Target

LedgerJS was intended for Ledger Live. It was not designed to be used by third party developers.
With DMK we are targeting **third party developers first**.
With the Device Management Kit we are targeting **third party developers first**.

## Abstract complexity

Expand Down
6 changes: 3 additions & 3 deletions apps/docs/pages/docs/explanations/signers.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Signer Kits

As ledger device are able to install application that will allow to be compatible with different blockchain,
As ledger devices are able to install applications that will allow to be compatible with different blockchains,
we have created these kits.

Each **signer kit** is coming along with a Ledger Embedded App (ex: _signer-kit-eth_ is comig with _ledger app ethereum_ ).
Each **signer kit** is coming along with a Ledger Embedded App (ex: _signer-kit-eth_ is coming with _ledger app ethereum_ ).

The main goal of each signer is to ease interaction with the app in the seamlessly possible way.
The main goal of each signer is to ease interaction with the app in the most seamless way possible.

## Available Signers

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/pages/docs/explanations/signers/eth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ const { observable, cancel } = signerEth.signTypedData(
## Example
We encourage you to explore the Ethereum Signer by trying it out in our online [sample application](https://app.devicesdk.ledger-test.com/). Experience how it works and see its capabilities in action. Of course, you will need a Ledger device connected.
We encourage you to explore the Ethereum Signer by trying it out in our online [sample application](https://app.devicesdk.ledger.com/). Experience how it works and see its capabilities in action. Of course, you will need a Ledger device connected.
## Clear Signing Initiative
Expand Down
7 changes: 5 additions & 2 deletions apps/docs/pages/docs/references.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#References
# References

Device Management Kit References
Device Management Kits References:

- [Device Management Kit]() - _Coming Soon..._
- [Device Signer Kit Ethereum]() - _Coming Soon..._
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
"dmk": "Device Management Kit",
"signer_eth": "Signer Kit Ethereum"
}


FILE TO BE RENAME when TSDoc reference will be linked to this space

0 comments on commit 6ca8903

Please sign in to comment.