deviceReset

Reset device

Perform device setup and generate new seed.

const result = await HardwareSDK.resetDevice(connectId, params);

Params

Optional common params

  • displayRandom — optional boolean. Display entropy generated by the device before asking for additional entropy.

  • strength — optional number Accepted values are [128|192|256]. Default is set to 256

  • label — optional string

  • u2fCounter — optional number. Default value is set to current time stamp in seconds.

  • pinProtection — optional boolean

  • passphraseProtection — optional boolean

  • skipBackup — optional boolean

  • noBackup — optional boolean create a seedless device

Example

HardwareSDK.resetDevice(connectId, {
    label: 'OneKey Classic',
});

Result

{
    success: true,
    payload: {
        message: string
    }
}

Error

{
    success: false,
    payload: {
        error: string, // error message
        code: number // error code
    }
}

Last updated