Skip to content

Commit

Permalink
🚚 (core) [DSDK-570]: Rename Sdk and Keyring (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdabbech-ledger authored Oct 31, 2024
2 parents 56e3f00 + c3e8066 commit 7140b4f
Show file tree
Hide file tree
Showing 553 changed files with 680 additions and 657 deletions.
2 changes: 1 addition & 1 deletion .changeset/calm-months-live.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@ledgerhq/keyring-btc": minor
"@ledgerhq/device-signer-kit-btc": minor
---

Implement MerkleTree and MerkleMap services
2 changes: 1 addition & 1 deletion .changeset/clever-badgers-pull.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@ledgerhq/device-sdk-sample": minor
"@ledgerhq/device-management-kit-sample": minor
---

Add GetAddress Solana Signer use case
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"access": "public",
"baseBranch": "develop",
"updateInternalDependencies": "patch",
"ignore": ["@ledgerhq/keyring-btc"]
"ignore": ["@ledgerhq/device-signer-kit-btc"]
}
2 changes: 1 addition & 1 deletion .changeset/cool-dancers-join.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@ledgerhq/device-signer-kit-ethereum": patch
"@ledgerhq/tsconfig-dsdk": patch
"@ledgerhq/prettier-config-dsdk": patch
"@ledgerhq/device-sdk-transport-mock": patch
"@ledgerhq/device-transport-kit-mock-client": patch
"@ledgerhq/eslint-config-dsdk": patch
"@ledgerhq/device-sdk-trusted-apps": patch
"@ledgerhq/jest-config-dsdk": patch
Expand Down
7 changes: 7 additions & 0 deletions .changeset/cuddly-ducks-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@ledgerhq/device-signer-kit-solana": patch
"@ledgerhq/device-signer-kit-ethereum": patch
"@ledgerhq/device-management-kit-sample": patch
---

Rename keyring to signer
2 changes: 1 addition & 1 deletion .changeset/cuddly-impalas-sing.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@ledgerhq/keyring-btc": minor
"@ledgerhq/device-signer-kit-btc": minor
---

Implement GetExtendedPublicKeyCommand
10 changes: 10 additions & 0 deletions .changeset/lemon-suits-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@ledgerhq/device-management-kit-flipper-plugin-client": patch
"@ledgerhq/device-signer-kit-solana": patch
"@ledgerhq/device-signer-kit-ethereum": patch
"@ledgerhq/device-transport-kit-mock-client": patch
"@ledgerhq/device-management-kit": patch
"@ledgerhq/device-management-kit-sample": patch
---

Rename SDK to DMK
2 changes: 1 addition & 1 deletion .changeset/lucky-keys-explode.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@ledgerhq/keyring-btc": minor
"@ledgerhq/device-signer-kit-btc": minor
---

Implement GetMasterFingerprintCommand
2 changes: 1 addition & 1 deletion .changeset/mighty-vans-kiss.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@ledgerhq/keyring-btc": patch
"@ledgerhq/device-signer-kit-btc": patch
---

Implement wallet policy service
2 changes: 1 addition & 1 deletion .changeset/nine-tools-bow.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
"@ledgerhq/device-management-kit-flipper-plugin-client": patch
"@ledgerhq/device-management-kit": patch
"@ledgerhq/device-sdk-sample": patch
"@ledgerhq/device-management-kit-sample": patch
---

Implement basic Flipper client for the Ledger Device Management Kit
2 changes: 1 addition & 1 deletion .changeset/perfect-deers-sneeze.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@ledgerhq/keyring-btc": patch
"@ledgerhq/device-signer-kit-btc": patch
---

Rename packages
4 changes: 2 additions & 2 deletions .changeset/smart-games-brush.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
"@ledgerhq/device-sdk-transport-mock": patch
"@ledgerhq/device-transport-kit-mock-client": patch
"@ledgerhq/device-management-kit": patch
"@ledgerhq/device-sdk-sample": patch
"@ledgerhq/device-management-kit-sample": patch
---

Add mockserver integration with transport
4 changes: 2 additions & 2 deletions .changeset/tall-hairs-cheer.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@ledgerhq/keyring-btc": minor
"@ledgerhq/device-signer-kit-btc": minor
---

Create keyring-btc package
Create device-signer-kit-btc package
2 changes: 1 addition & 1 deletion .changeset/tasty-falcons-doubt.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"@ledgerhq/signer-utils": patch
"@ledgerhq/device-signer-kit-ethereum": patch
"@ledgerhq/device-management-kit": patch
"@ledgerhq/device-sdk-sample": patch
"@ledgerhq/device-management-kit-sample": patch
---

Use type keyword when importing type
2 changes: 1 addition & 1 deletion .changeset/tiny-hornets-grin.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
"@ledgerhq/device-management-kit": patch
"@ledgerhq/device-sdk-sample": patch
"@ledgerhq/device-management-kit-sample": patch
---

Add unlock timeout input in open app device action
2 changes: 1 addition & 1 deletion .changeset/tiny-otters-draw.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@ledgerhq/device-sdk-sample": minor
"@ledgerhq/device-management-kit-sample": minor
---

Add keyring eth provider
2 changes: 1 addition & 1 deletion .changeset/twelve-snakes-agree.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
"@ledgerhq/device-management-kit": patch
"@ledgerhq/device-sdk-sample": patch
"@ledgerhq/device-management-kit-sample": patch
---

New use case listenToKnownDevices
2 changes: 1 addition & 1 deletion .changeset/weak-ads-chew.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@ledgerhq/keyring-btc": patch
"@ledgerhq/device-signer-kit-btc": patch
---

Implement PSBT parser and mapper services
35 changes: 18 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
<p align="center">
<!-- Update with each individual package version -->
<!-- Enable and display when CI set up -->
<!-- <a href="https://github.com/LedgerHQ/platform-sdk/actions">
<img alt="Tests Passing" src="https://github.com/LedgerHQ/platform-sdk/workflows/CI/badge.svg" />
</a> -->
<a href="https://www.typescriptlang.org/">
<img alt="TypeScript" src="https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white" />
</a>
Expand All @@ -29,6 +26,10 @@
<a href="https://www.npmjs.com/">
<img alt="NPM" src="https://img.shields.io/badge/npm-CB3837?style=for-the-badge&logo=npm&logoColor=white" />
</a>
<br />
<a href="https://github.com/LedgerHQ/device-sdk-ts/actions/workflows/pull_request.yml">
<img alt="Pull request Tests Passing" src="https://github.com/LedgerHQ/device-sdk-ts/actions/workflows/pull_request.yml/badge.svg" />
</a>
</p>

<p align="center">
Expand Down Expand Up @@ -61,7 +62,7 @@ The Device Management Kit features an interface for applications to handle any L

```mermaid
flowchart LR;
application(Application) <--API--> DSDK(DeviceSDK) <--USB/BLE--> device(Device);
application(Application) <--API--> LDMK(LedgerDeviceManagementKit) <--USB/BLE--> device(Device);
```

The Device Management Kit is available in 3 different environments (web, Android & iOS).
Expand All @@ -72,24 +73,24 @@ This repository is dedicated to **web environment** and is written in TypeScript

### Repository

The Device Management Kit is structured as a monorepository whose prupose is to centralise all the TypeScript code related to the SDK in one place.
The Device Management Kit is structured as a monorepository whose prupose is to centralise all the TypeScript code related to the Device Management Kit in one place.

This project uses [turbo monorepo](https://turbo.build/repo/docs) to build and release different packages on NPM registry and a sample demo application on Vercel.

### Modules

A brief description of this project packages:

| Name | Path | Description |
| --------------------------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| @ledgerhq/device-sdk-sample | apps/sample | React Next web app used to test & demonstrate the Web Device Management Kit |
| @ledgerhq/eslint-config-dsdk | packages/config/eslint | internal package which contains eslint shared config. Used by `extends: ["@ledgerhq/dsdk"]` in `.eslintrc`. |
| @ledgerhq/jest-config-dsdk | packages/config/jest | internal package which contains jest shared config. Used by `preset: "@ledgerhq/jest-config-dsdk"` in `jest.config.ts` |
| @ledgerhq/tsconfig-dsdk | packages/config/typescript | internal package which contains typescript shared config. Used by `"extends": "@ledgerhq/tsconfig-dsdk/tsconfig.sdk"` in `tsconfig.json` |
| @ledgerhq/device-management-kit | packages/core | external package that contains the core of the Web SDK |
| @ledgerhq/device-sdk-signer | packages/signer | external package that contains device coin application dedicated handlers |
| @ledgerhq/device-sdk-trusted-apps | packages/trusted-apps | external package that contains device trusted application dedicated handlers |
| @ledgerhq/device-sdk-ui | packages/ui | external package |
| Name | Path | Description |
|----------------------------------------|--------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|
| @ledgerhq/device-management-kit-sample | apps/sample | React Next web app used to test & demonstrate the Web Device Management Kit |
| @ledgerhq/eslint-config-dsdk | packages/config/eslint | internal package which contains eslint shared config. Used by `extends: ["@ledgerhq/dsdk"]` in `.eslintrc`. |
| @ledgerhq/jest-config-dsdk | packages/config/jest | internal package which contains jest shared config. Used by `preset: "@ledgerhq/jest-config-dsdk"` in `jest.config.ts` |
| @ledgerhq/tsconfig-dsdk | packages/config/typescript | internal package which contains typescript shared config. Used by `"extends": "@ledgerhq/tsconfig-dsdk/tsconfig.sdk"` in `tsconfig.json` |
| @ledgerhq/device-management-kit | packages/device-management-kit | external package that contains the core of the Web Device Management Kit |
| @ledgerhq/device-signer-kit-ethereum | packages/signer/signer-eth | external package that contains device ethereum coin application dedicated handlers |
| @ledgerhq/device-signer-kit-solana | packages/signer/signer-solana | external package that contains device solana coin application dedicated handlers |
| @ledgerhq/device-management-kit-flipper-plugin-client | packages/flipper-plugin-client | external package that contains [flipper](https://github.com/facebook/flipper) logger for Device Management Kit |

# Getting started

Expand Down Expand Up @@ -182,7 +183,7 @@ Each package is built using the following command (at the root of the monorepo).
Device Management Kit main module.

```bash
pnpm core build
pnpm dmk build
```

### Signer
Expand Down Expand Up @@ -258,7 +259,7 @@ Finally, we should add a script in the correct `package.json` as a shortcut to t
eg:

```
pnpm core module:create
pnpm dmk module:create
```

Under the hood, the script looks like this:
Expand Down
2 changes: 1 addition & 1 deletion apps/sample/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const sentryWebpackPluginOptions = {

silent: true,
org: "ledger",
project: "device-sdk-sample",
project: "device-management-kit-sample",

// Additional Sentry options
widenClientFileUpload: true, // Upload a larger set of source maps for prettier stack traces (increases build time)
Expand Down
4 changes: 2 additions & 2 deletions apps/sample/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@ledgerhq/device-sdk-sample",
"name": "@ledgerhq/device-management-kit-sample",
"version": "0.1.3",
"private": true,
"scripts": {
Expand All @@ -20,7 +20,7 @@
"@ledgerhq/device-management-kit-flipper-plugin-client": "workspace:*",
"@ledgerhq/device-signer-kit-ethereum": "workspace:*",
"@ledgerhq/device-signer-kit-solana": "workspace:*",
"@ledgerhq/device-sdk-transport-mock": "workspace:*",
"@ledgerhq/device-transport-kit-mock-client": "workspace:*",
"@ledgerhq/react-ui": "^0.16.2",
"@sentry/nextjs": "^8.32.0",
"@playwright/test": "^1.47.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ test.describe("ETH Signer: get address, happy paths", () => {
});

await test.step("When execute ETH: get address", async () => {
await whenNavigateTo(page, "/keyring");
await whenNavigateTo(page, "/signer");

await whenClicking(page, "CTA_command-Ethereum");

Expand Down Expand Up @@ -75,7 +75,7 @@ test.describe("ETH Signer: get address, happy paths", () => {
});

await test.step("When execute ETH: get address with checkOnDevice on", async () => {
await whenNavigateTo(page, "/keyring");
await whenNavigateTo(page, "/signer");

await whenClicking(page, "CTA_command-Ethereum");

Expand Down Expand Up @@ -125,7 +125,7 @@ test.describe("ETH Signer: get address, happy paths", () => {
});

await test.step("Then execute ETH: get address", async () => {
await whenNavigateTo(page, "/keyring");
await whenNavigateTo(page, "/signer");

await whenClicking(page, "CTA_command-Ethereum");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ test.describe("ETH Signer: get address, unhappy paths", () => {
});

await test.step("Then execute ETH: get address with malformed derivation paths", async () => {
await whenNavigateTo(page, "/keyring");
await whenNavigateTo(page, "/signer");
await whenClicking(page, "CTA_command-Ethereum");

const malformedDerivationPaths = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ test.describe("ETH Signer: sign message, happy paths", () => {
});

await test.step("When execute ETH: sign message", async () => {
await whenNavigateTo(page, "/keyring");
await whenNavigateTo(page, "/signer");
await whenClicking(page, "CTA_command-Ethereum");

await whenExecuteDeviceAction(page, "Sign message", [
Expand Down Expand Up @@ -75,7 +75,7 @@ test.describe("ETH Signer: sign message, happy paths", () => {
});

await test.step("When execute ETH: sign message", async () => {
await whenNavigateTo(page, "/keyring");
await whenNavigateTo(page, "/signer");

await whenClicking(page, "CTA_command-Ethereum");

Expand Down Expand Up @@ -137,7 +137,7 @@ test.describe("ETH Signer: sign message, happy paths", () => {
});

await test.step("When execute ETH: sign message", async () => {
await whenNavigateTo(page, "/keyring");
await whenNavigateTo(page, "/signer");

await whenClicking(page, "CTA_command-Ethereum");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ test.describe("ETH Signer: sign message, unhappy paths", () => {
});

await test.step("When execute ETH: sign message with malformed derivation paths", async () => {
await whenNavigateTo(page, "/keyring");
await whenNavigateTo(page, "/signer");
await whenClicking(page, "CTA_command-Ethereum");

const malformedDerivationPaths = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ test.describe("ETH Signer: sign transaction, happy paths", () => {
});

await test.step("When execute ETH: sign transaction", async () => {
await whenNavigateTo(page, "/keyring");
await whenNavigateTo(page, "/signer");

await whenClicking(page, "CTA_command-Ethereum");

Expand Down Expand Up @@ -79,7 +79,7 @@ test.describe("ETH Signer: sign transaction, happy paths", () => {
});

await test.step("When execute ETH: sign transaction", async () => {
await whenNavigateTo(page, "/keyring");
await whenNavigateTo(page, "/signer");

await whenClicking(page, "CTA_command-Ethereum");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ test.describe("ETH Signer: sign transaction, unhappy paths", () => {
});

await test.step("When execute ETH: sign transaction with malformed derivation paths", async () => {
await whenNavigateTo(page, "/keyring");
await whenNavigateTo(page, "/signer");
await whenClicking(page, "CTA_command-Ethereum");

const malformedDerivationPaths = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ test.describe("ETH Signer: sign EIP712 message, happy paths", () => {
});

await test.step("When execute ETH: sign EIP712 message", async () => {
await whenNavigateTo(page, "/keyring");
await whenNavigateTo(page, "/signer");
await whenClicking(page, "CTA_command-Ethereum");

await whenExecuteDeviceAction(page, "Sign typed message", [
Expand Down Expand Up @@ -76,7 +76,7 @@ test.describe("ETH Signer: sign EIP712 message, happy paths", () => {
});

await test.step("When execute ETH: sign EIP712 message", async () => {
await whenNavigateTo(page, "/keyring");
await whenNavigateTo(page, "/signer");
await whenClicking(page, "CTA_command-Ethereum");

await whenExecuteDeviceAction(page, "Sign typed message", [
Expand Down Expand Up @@ -139,7 +139,7 @@ test.describe("ETH Signer: sign EIP712 message, happy paths", () => {
});

await test.step("When execute ETH: sign EIP712 message", async () => {
await whenNavigateTo(page, "/keyring");
await whenNavigateTo(page, "/signer");

await whenClicking(page, "CTA_command-Ethereum");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ test.describe("ETH Signer: sign EIP712 message, unhappy paths", () => {
});

await test.step("When execute ETH: sign typed message with malformed derivation paths", async () => {
await whenNavigateTo(page, "/keyring");
await whenNavigateTo(page, "/signer");

await whenClicking(page, "CTA_command-Ethereum");

Expand Down
Loading

0 comments on commit 7140b4f

Please sign in to comment.