Skip to Content

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

Optional common params

  • type - required string. type to respond to ui-receive_pin or ui-receive_passphrase
  • payload - required object

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, set pin_value as @@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 on