On this page
deviceSettings
Device settings
It is recommended to modify only one property when using it, as it needs to be confirmed on the device.
const result = await HardwareSDK.deviceSettings(connectId, params);Params
| Parameter | Type | Availability / meaning |
|---|---|---|
language | string | Supported device language code; inspect the installed SDK’s settings capabilities. |
label | string | Device display name. |
usePassphrase | boolean | Request a passphrase-protection setting change with device confirmation. |
autoLockDelayMs | number | Auto-lock delay; Protocol V2 accepts enumerated options, not every millisecond value. |
autoShutdownDelayMs | number | Auto-shutdown delay; Protocol V2 accepts enumerated options. |
hapticFeedback, bluetoothEnabled | boolean | Device-dependent haptics and Bluetooth settings. |
homescreen | string | Protocol V1 homescreen payload. |
passphraseSource | number | Protocol V1 passphrase-source setting. |
passphraseAlwaysOnDevice | boolean | Protocol V1 device-entry policy. |
displayRotation | number | Protocol V1 display rotation. |
safetyChecks | Enum_SafetyCheckLevel | Protocol V1 safety policy. Preserve strict checks unless the user explicitly requests a supported change. |
experimentalFeatures | boolean | Protocol V1 experimental message support. |
changeBrightness | boolean | Protocol V1 device-side brightness flow. |
brightness | number | Protocol V2 brightness, within the supported range. |
airgapMode | boolean | Protocol V2 device-side Air-Gap setting flow. |
animationEnabled, tapToWake, deviceNameDisplayEnabled | boolean | Protocol V2 display/interaction settings. |
fidoEnabled, usbLockEnabled, randomKeypad | boolean | Protocol V2 security-related settings. |
The current DeviceSettingsParams type defines the public keys. Unsupported protocol-specific fields are rejected. Read settings/capabilities for the connected device before offering a control; a field in the type is not proof that every model supports it.
Change only the setting the user selected. Changes to passphrase protection or connectivity may alter the active flow; refresh state afterward and do not infer success from a host dialog closing.
Example
const result = await HardwareSDK.deviceSettings(connectId, {
label: 'My OneKey Wallet'
});
if (!result.success) throw new Error(result.payload.error);Result
{
success: true,
payload: {
message: string
}
}Error
{
success: false,
payload: {
error: string, // error message
code?: string | number // error code
}
}Last updated on