## Basic Capabilities

### Import Cloud Capabilities

The SDK relies on cloud capabilities. In the [MiniApp Developer Platform](https://platform.tuya.com/miniapp/) under Development Settings - Cloud Capabilities, authorize the cloud capability `Door Lock Device Mini Program Control Capability`.

### Installation

Add to your project

```shell
yarn add @ray-js/lock-sdk
```

### Usage

When entering the panel, you need to call the [init](/en/miniapp/develop/ray/api/doorlock/basic/init) API to initialize. After initialization is complete, you can use the SDK API normally

```tsx

import { init as initLock } from '@ray-js/lock-sdk';


async onLaunch(object: any) {
    devices.common.init();
    // Initialize door lock SDK
    initLock({
        passwordDigitalBase: 10,
        passwordSupportZero: true,
        strictMode: false,
    });
    devices.common.onInitialized(device => dpKit.init(device));
    const systemInfo = getSystemInfoSync();
    const { theme } = systemInfo;

    dispatch(initializeSystemInfo(systemInfo));
    dispatch(updateThemeType(theme));
}

```
