UI Events: PIN

  • When a protected call is made (e.g., btcGetAddress) and the device is locked, the SDK emits UI_REQUEST.REQUEST_PIN.

  • Respond with one of the following:

    • Enter on device (recommended;):

      await HardwareSDK.uiResponse({ 
        type: UI_RESPONSE.RECEIVE_PIN,
        payload: '@@ONEKEY_INPUT_PIN_IN_DEVICE' 
      });
    • Software Blind PIN (not supported on Pro/Touch): show a fixed 3×3 keypad and send the transformed PIN string.

      let inputValue = '1111'
      await HardwareSDK.uiResponse({ 
        type: UI_RESPONSE.RECEIVE_PIN,
        payload: value 
      });
  • Close your prompt when receiving UI_REQUEST.CLOSE_UI_WINDOW.

Learn more:

Last updated

Was this helpful?