# Setup

## What is the DMK?

This package contains the core of the Device Management Kit (DMK). It provides a simple interface to handle Ledger devices and features the Device Management Kit's entry points, classes, types, structures, and models.

## Installation

Add the DMK to your project with this command:

```sh
npm install @ledgerhq/device-management-kit
```

## Browser Compatibility

This library is compatible with any browser that supports the [WebHID API](https://developer.mozilla.org/en-US/docs/Web/API/WebHID_API#browser_compatibility).

## Understanding RxJS: A Quick Primer

The DMK uses [RxJS](https://rxjs.dev/) to handle asynchronous operations. If you're new to RxJS, here's what you need to know:

1. **Observables**: Most DMK functions return "Observables" instead of Promises
2. **Subscription**: You need to "subscribe" to an Observable to get its data

Basic example:

```ts
dmk.someFunction().subscribe({
  next: (data) => console.log("Data received:", data),
  error: (error) => console.error("Error:", error),
  complete: () => console.log("Operation completed"),
});
```

## What's Next?

Now that you have the DMK installed, proceed to the next guide to learn how to initialize it in your application.
