You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library works in [any browser supporting the WebHID API](https://developer.mozilla.org/en-US/docs/Web/API/WebHID_API#browser_compatibility).
43
-
44
39
### Pre-requisites
45
40
46
-
Some of the APIs exposed return objects of type `Observable` from RxJS. Ensure you are familiar with the basics of the Observer pattern and RxJS before using this SDK. You can refer to [RxJS documentation](https://rxjs.dev/guide/overview) for more information.
41
+
Some of the APIs exposed return objects of type `Observable` from RxJS. Ensure you are familiar with the basics of the Observer pattern and RxJS before using this dmk. You can refer to [RxJS documentation](https://rxjs.dev/guide/overview) for more information.
47
42
48
43
### Main Features
49
44
@@ -60,48 +55,49 @@ Some of the APIs exposed return objects of type `Observable` from RxJS. Ensure y
60
55
> [!NOTE]
61
56
> At the moment we do not provide the possibility to distinguish two devices of the same model, via USB and to avoid connection to the same device twice.
62
57
63
-
### Setting up the SDK
58
+
### Setting up the DMK
64
59
65
-
The core package exposes an SDK builder `DeviceSdkBuilder` which will be used to initialise the SDK with your configuration.
60
+
The core package exposes a DMK builder `DeviceManagementKitBuilder` which will be used to initialise the DMK with your configuration.
66
61
67
62
For now it allows you to add one or more custom loggers.
68
63
69
-
In the following example, we add a console logger (`.addLogger(new ConsoleLogger())`). Then we build the SDK with `.build()`.
64
+
In the following example, we add a console logger (`.addLogger(new ConsoleLogger())`) and a WebHID transport. Then we build the DMK with `.build()`.
70
65
71
-
**The returned object will be the entrypoint for all your interactions with the SDK.**
66
+
**The returned object will be the entrypoint for all your interactions with the DMK.**
72
67
73
-
The SDK should be built only once in your application runtime so keep a reference of this object somewhere.
68
+
The DMK should be built only once in your application runtime so keep a reference of this object somewhere.
@@ -178,7 +174,7 @@ The `sendCommand` method will take care of building the APDU, sending it to the
178
174
> ### ❗️ Error Responses
179
175
>
180
176
> Most of the commands will reject with an error if the device is locked.
181
-
> Ensure that the device is unlocked before sending commands. You can check the device session state (`sdk.getDeviceSessionState`) to know if the device is locked.
177
+
> Ensure that the device is unlocked before sending commands. You can check the device session state (`dmk.getDeviceSessionState`) to know if the device is locked.
182
178
>
183
179
> Most of the commands will reject with an error if the response status word is not `0x9000` (success response from the device).
184
180
@@ -191,7 +187,7 @@ import { OpenAppCommand } from "@ledgerhq/device-management-kit";
191
187
192
188
const command =newOpenAppCommand("Bitcoin"); // Open the Bitcoin app
193
189
194
-
awaitsdk.sendCommand({ sessionId, command });
190
+
awaitdmk.sendCommand({ sessionId, command });
195
191
```
196
192
197
193
#### Close App
@@ -203,36 +199,36 @@ import { CloseAppCommand } from "@ledgerhq/device-management-kit";
203
199
204
200
const command =newCloseAppCommand();
205
201
206
-
awaitsdk.sendCommand({ sessionId, command });
202
+
awaitdmk.sendCommand({ sessionId, command });
207
203
```
208
204
209
205
#### Get OS Version
210
206
211
207
This command will return information about the currently installed OS on the device.
212
208
213
-
> ℹ️ If you want this information you can simply get it from the device session state by observing it with `sdk.getDeviceSessionState({ sessionId })`.
209
+
> ℹ️ If you want this information you can simply get it from the device session state by observing it with `dmk.getDeviceSessionState({ sessionId })`.
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, you need to have the DMK installed on your project as well.
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 DMK to find and interact with devices on the Web BLE protocol.
0 commit comments