Config Event
Once the user has completed initialization, HardwareSDK sends out events regarding device information, UI requests, device requests, etc.
Events
Subscribe to the SDK's events.
Params
event
- requiredstring
event type, refer to Eventcallback
- requiredfunction
callback functions
Result
Event objects are usually of the following types.
The event
field is a classification of events, you can distinguish specific events by the type
field of the event object, you also import all types of constants in the @onekeyfe/hd-core
library.
uiResponse
Some event hardware requires a feedback result. Need to use the uiResponse Api
to tell the hardware to process the result.
e.g Request pin, Request passphrase
Subscribe to the event
List of events that support subscription
UI_EVENT
ui-request_pin
Enter the PIN code.ui-receive_pin
ui-request_passphrase
Enter the passphrase.ui-request_passphrase_on_device
Enter the passphrase on the device.ui-button
Confirm on the device.ui-close_window
The method invocation is completed. You may close all UI prompts.ui-bluetooth_permission
ui-location_permission
ui-firmware-progress
ui-device_not_in_bootloader_mode
UI_RESPONSE
ui-receive_pin
Return the PIN code valueui-receive_passphrase
Return the passphrase value
DEVICE_EVENT
button
pin
support_features
features
FIRMWARE_EVENT
firmware-release-info
ble-firmware-release-info
Last updated