init(options?: LockSDKOption)
Requires:
@ray-js/lock-sdk≥1.0.0
Description
Initialize the SDK (single-device main path). With kind: 'fit', use the accessory bootstrap (passthrough report listeners, etc.); default is lock.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| No | Device and behavior options (devInfo/deviceId/kind, etc.; if omitted, deviceId can be read from launch parameters) |
Return Value
Type: Promise<void>
None
Error Code
| Error Code | Error Message |
|---|---|
1000 | Neither devInfo nor deviceId in the input, and no deviceId in the launch parameters |
Valid Values
LockSDKOption.logLevel
| Value | Description | Since |
|---|---|---|
off | - | - |
error | - | - |
warn | - | - |
info | - | - |
debug | - | - |
trace | - | - |
LockSDKOption.kind
| Value | Description | Since |
|---|---|---|
lock | - | - |
fit | - | - |
screen | - | - |