@ledgerhq/device-transport-kit-web-ble 0.0.0-rnble-transport-20250219135033 → 0.0.0-webhid-20250124103640

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/device-transport-kit-web-ble",
3
- "version": "0.0.0-rnble-transport-20250219135033",
3
+ "version": "0.0.0-webhid-20250124103640",
4
4
  "license": "Apache-2.0",
5
5
  "private": false,
6
6
  "exports": {
@@ -23,16 +23,16 @@
23
23
  "@types/web-bluetooth": "^0.0.20",
24
24
  "rxjs": "^7.8.1",
25
25
  "ts-node": "^10.9.2",
26
- "@ledgerhq/device-management-kit": "0.0.0-rnble-transport-20250219135033",
26
+ "@ledgerhq/device-management-kit": "0.0.0-webhid-20250124103640",
27
27
  "@ledgerhq/esbuild-tools": "0.0.2",
28
28
  "@ledgerhq/eslint-config-dsdk": "0.0.2",
29
- "@ledgerhq/prettier-config-dsdk": "0.0.2",
29
+ "@ledgerhq/jest-config-dsdk": "1.0.1",
30
30
  "@ledgerhq/tsconfig-dsdk": "1.0.1",
31
- "@ledgerhq/vitest-config-dmk": "0.0.0"
31
+ "@ledgerhq/prettier-config-dsdk": "0.0.2"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "rxjs": "^7.8.1",
35
- "@ledgerhq/device-management-kit": "0.0.0-rnble-transport-20250219135033"
35
+ "@ledgerhq/device-management-kit": "0.0.0-webhid-20250124103640"
36
36
  },
37
37
  "scripts": {
38
38
  "prebuild": "rimraf lib",
@@ -45,8 +45,8 @@
45
45
  "prettier": "prettier . --check",
46
46
  "prettier:fix": "prettier . --write",
47
47
  "typecheck": "tsc --noEmit",
48
- "test": "vitest run",
49
- "test:watch": "vitest",
50
- "test:coverage": "vitest run --coverage"
48
+ "test": "jest --passWithNoTests",
49
+ "test:watch": "pnpm test -- --watch",
50
+ "test:coverage": "pnpm test -- --coverage"
51
51
  }
52
52
  }
package/README.md DELETED
@@ -1,77 +0,0 @@
1
- # Transport Device Kit Web BLE
2
-
3
- > [!CAUTION]
4
- > This is still under development and we are free to make new interfaces which may lead to breaking changes.
5
-
6
- - [Transport Device Kit Web BLE Documentation](#transport-device-kit-web-ble)
7
- - [Description](#description)
8
- - [Installation](#installation)
9
- - [Usage](#usage)
10
- - [Compatibility](#compatibility)
11
- - [Pre-requisites](#pre-requisites)
12
- - [Main Features](#main-features)
13
- - [How To](#how-to)
14
-
15
- ## Description
16
-
17
- This transport is used to interact with a Ledger device through the Web BLE (Bluetooth) implementation by the Device Management Kit.
18
-
19
- ## Installation
20
-
21
- To install the core package, run the following command:
22
-
23
- ```sh
24
- npm install @ledgerhq/device-transport-kit-web-ble
25
- ```
26
-
27
- ## Usage
28
-
29
- ### Compatibility
30
-
31
- This library works in [any browser supporting the Web Bluetooth API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Bluetooth_API#browser_compatibility).
32
-
33
- ### Pre-requisites
34
-
35
- To use this transport, ensure you have the Device Magement Kit installed in your project.
36
-
37
- ### Main Features
38
-
39
- - Exposing a transport factory to be injected into the DeviceManagementKit
40
- - Exposing the transport directly for a custom configuration
41
-
42
- ### How To
43
-
44
- To use the transport, you need to inject it in the DeviceManagementKitBuilder before the build. This will allow the Device Managment Kit to find and interact with devices on the Web BLE protocol.
45
-
46
- ```typescript
47
- import { DeviceManagementKitBuilder } from "@ledgerhq/device-management-kit"
48
- import { webBleTransportFactory, WebBleTransport } from "@ledgerhq/device-transport-kit-web-ble"
49
-
50
- // Easy setup with the factory
51
- const dmk = new DeviceManagementKitBuilder()
52
- .addTransport(webBleTransportFactory)
53
- .build();
54
-
55
-
56
- // With custom config
57
- const dmk = new DeviceManagementKitBuilder()
58
- .addTransport(({
59
- deviceModelDataSource: DeviceModelDataSource;
60
- loggerServiceFactory: (tag: string) => LoggerPublisherService;
61
- config: DmkConfig;
62
- apduSenderServiceFactory: ApduSenderServiceFactory;
63
- apduReceiverServiceFactory: ApduReceiverServiceFactory;
64
- }) => {
65
- // custom code
66
- return new WebBleTransport(
67
- deviceModelDataSource,
68
- loggerServiceFactory,
69
- config,
70
- apduSenderServiceFactory,
71
- apduReceiverServiceFactory,
72
- );
73
- })
74
- .build();
75
-
76
- // You can then make use of the Device Management Kit
77
- ```