Skip to Content
HardwareDevice APIdeviceSettings
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

Optional common params

ParameterTypeAvailability / meaning
languagestringSupported device language code; inspect the installed SDK’s settings capabilities.
labelstringDevice display name.
usePassphrasebooleanRequest a passphrase-protection setting change with device confirmation.
autoLockDelayMsnumberAuto-lock delay; Protocol V2 accepts enumerated options, not every millisecond value.
autoShutdownDelayMsnumberAuto-shutdown delay; Protocol V2 accepts enumerated options.
hapticFeedback, bluetoothEnabledbooleanDevice-dependent haptics and Bluetooth settings.
homescreenstringProtocol V1 homescreen payload.
passphraseSourcenumberProtocol V1 passphrase-source setting.
passphraseAlwaysOnDevicebooleanProtocol V1 device-entry policy.
displayRotationnumberProtocol V1 display rotation.
safetyChecksEnum_SafetyCheckLevelProtocol V1 safety policy. Preserve strict checks unless the user explicitly requests a supported change.
experimentalFeaturesbooleanProtocol V1 experimental message support.
changeBrightnessbooleanProtocol V1 device-side brightness flow.
brightnessnumberProtocol V2 brightness, within the supported range.
airgapModebooleanProtocol V2 device-side Air-Gap setting flow.
animationEnabled, tapToWake, deviceNameDisplayEnabledbooleanProtocol V2 display/interaction settings.
fidoEnabled, usbLockEnabled, randomKeypadbooleanProtocol 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