Response UI Event
Transfer data to the device
Transfer data to the device, currently supporting data transfer for PIN and passphrase.
const response = await HardwareSDK.uiResponse(response);Params
type— requiredstring. type to respond toui-receive_pinorui-receive_passphrasepayload— requiredobject
Return the PIN code result
HardwareSDK.uiResponse({
  type: UI_RESPONSE.RECEIVE_PIN,
  payload: ${pin_value},
});If entering the PIN on the software side, replace the content of
pin_value. If the PIN needs to be entered on the hardware side, setpin_valueas@@ONEKEY_INPUT_PIN_IN_DEVICE.
Return the Passphrase result
HardwareSDK.uiResponse({
  type: UI_RESPONSE.RECEIVE_PASSPHRASE,
  payload: {
    value: ${passphrase_value},
    passphraseOnDevice: false,
    save: false,
  },
});If the passphrase needs to be entered on the device, set value to '' and set passphraseOnDevice to true.
Last updated
Was this helpful?