Config Event
Last updated
Was this helpful?
Last updated
Was this helpful?
Once the user has completed initialization, HardwareSDK sends out events regarding device information, UI requests, device requests, etc.
Subscribe to the SDK's events.
event
- required string
event type, refer to
callback
- required function
callback functions
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.
e.g Request pin, Request passphrase
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 value
ui-receive_passphrase
Return the passphrase value
DEVICE_EVENT
button
pin
support_features
features
FIRMWARE_EVENT
firmware-release-info
ble-firmware-release-info
Some event hardware requires a feedback result. Need to use the to tell the hardware to process the result.