@onekeyfe/hd-core 1.2.0-alpha.52 → 1.2.0-alpha.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__tests__/AllNetworkGetAddressBase.tracing.test.ts +78 -0
- package/__tests__/DeviceCommands.test.ts +45 -0
- package/__tests__/DeviceEventRegistration.test.ts +6 -0
- package/__tests__/check-all-firmware-release-protocol-v2.test.ts +198 -3
- package/__tests__/connectSettings.test.ts +5 -47
- package/__tests__/device-lifecycle-events.test.ts +105 -3
- package/__tests__/deviceUploadNft.test.ts +293 -0
- package/__tests__/firmware-update/firmware-update-v2-download-before-boot.test.ts +31 -59
- package/__tests__/get-device-state.test.ts +132 -12
- package/__tests__/homescreen.test.ts +41 -1
- package/__tests__/logBlockEvent.test.ts +1 -1
- package/__tests__/method-protocol-support.test.ts +19 -0
- package/__tests__/open-wallet-session.test.ts +446 -33
- package/__tests__/pro2Nft.test.ts +108 -0
- package/__tests__/protocol-binding.test.ts +89 -0
- package/__tests__/protocol-v2-resources.test.ts +284 -0
- package/__tests__/protocol-v2-ui-lifecycle.test.ts +91 -0
- package/__tests__/protocol-v2-unlock-policy.test.ts +201 -35
- package/__tests__/protocol-v2.test.ts +1349 -1005
- package/__tests__/protocolV2UiInteraction.test.ts +63 -0
- package/__tests__/public-pro2-api-boundary.test.ts +1 -0
- package/__tests__/search-devices.test.ts +12 -3
- package/__tests__/uiProgressThrottle.test.ts +74 -0
- package/__tests__/uiPromiseRegistry.test.ts +86 -0
- package/dist/api/BaseMethod.d.ts +3 -1
- package/dist/api/BaseMethod.d.ts.map +1 -1
- package/dist/api/CheckAllFirmwareRelease.d.ts +2 -1
- package/dist/api/CheckAllFirmwareRelease.d.ts.map +1 -1
- package/dist/api/DetectDeviceConnectProtocol.d.ts +7 -0
- package/dist/api/DetectDeviceConnectProtocol.d.ts.map +1 -0
- package/dist/api/FirmwareUpdate.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV2.d.ts +0 -11
- package/dist/api/FirmwareUpdateV2.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV3.d.ts +3 -7
- package/dist/api/FirmwareUpdateV3.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV4.d.ts +11 -25
- package/dist/api/FirmwareUpdateV4.d.ts.map +1 -1
- package/dist/api/GetPassphraseState.d.ts.map +1 -1
- package/dist/api/OpenWalletSession.d.ts.map +1 -1
- package/dist/api/SearchDevices.d.ts.map +1 -1
- package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts.map +1 -1
- package/dist/api/device/DeviceUnlock.d.ts +2 -2
- package/dist/api/device/DeviceUnlock.d.ts.map +1 -1
- package/dist/api/device/DeviceUpdateBootloader.d.ts +1 -5
- package/dist/api/device/DeviceUpdateBootloader.d.ts.map +1 -1
- package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts +0 -9
- package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts.map +1 -1
- package/dist/api/firmware/getBinary.d.ts +0 -7
- package/dist/api/firmware/getBinary.d.ts.map +1 -1
- package/dist/api/firmware/updateBootloader.d.ts +0 -2
- package/dist/api/firmware/updateBootloader.d.ts.map +1 -1
- package/dist/api/firmware/uploadFirmware.d.ts +1 -9
- package/dist/api/firmware/uploadFirmware.d.ts.map +1 -1
- package/dist/api/helpers/protocolV2FileWrite.d.ts +2 -0
- package/dist/api/helpers/protocolV2FileWrite.d.ts.map +1 -1
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceUploadNft.d.ts +31 -0
- package/dist/api/protocol-v2/DeviceUploadNft.d.ts.map +1 -0
- package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts.map +1 -1
- package/dist/api/protocol-v2/helpers.d.ts.map +1 -1
- package/dist/api/stellar/StellarSignTransaction.d.ts +1 -1
- package/dist/core/deviceEventRegistration.d.ts +2 -0
- package/dist/core/deviceEventRegistration.d.ts.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/uiPromiseRegistry.d.ts +4 -0
- package/dist/core/uiPromiseRegistry.d.ts.map +1 -0
- package/dist/data-manager/DataManager.d.ts +4 -2
- package/dist/data-manager/DataManager.d.ts.map +1 -1
- package/dist/data-manager/connectSettings.d.ts.map +1 -1
- package/dist/device/Device.d.ts +29 -6
- package/dist/device/Device.d.ts.map +1 -1
- package/dist/device/DeviceCommands.d.ts +4 -4
- package/dist/device/DeviceCommands.d.ts.map +1 -1
- package/dist/device/DevicePool.d.ts.map +1 -1
- package/dist/events/device.d.ts +4 -0
- package/dist/events/device.d.ts.map +1 -1
- package/dist/events/logBlockEvent.d.ts.map +1 -1
- package/dist/events/ui-promise.d.ts +4 -2
- package/dist/events/ui-promise.d.ts.map +1 -1
- package/dist/events/ui-request.d.ts +31 -2
- package/dist/events/ui-request.d.ts.map +1 -1
- package/dist/events/ui-response.d.ts +10 -2
- package/dist/events/ui-response.d.ts.map +1 -1
- package/dist/index.d.ts +214 -231
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2559 -3497
- package/dist/inject.d.ts +6 -1
- package/dist/inject.d.ts.map +1 -1
- package/dist/lowLevelInject.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/features.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/resources.d.ts +30 -0
- package/dist/protocols/protocol-v2/resources.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/uiInteraction.d.ts +7 -4
- package/dist/protocols/protocol-v2/uiInteraction.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/unlockPolicy.d.ts +1 -3
- package/dist/protocols/protocol-v2/unlockPolicy.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/unlockPolicyRunner.d.ts +22 -0
- package/dist/protocols/protocol-v2/unlockPolicyRunner.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/walletSession.d.ts +5 -1
- package/dist/protocols/protocol-v2/walletSession.d.ts.map +1 -1
- package/dist/topLevelInject.d.ts.map +1 -1
- package/dist/types/api/checkAllFirmwareRelease.d.ts +2 -4
- package/dist/types/api/checkAllFirmwareRelease.d.ts.map +1 -1
- package/dist/types/api/detectDeviceConnectProtocol.d.ts +4 -0
- package/dist/types/api/detectDeviceConnectProtocol.d.ts.map +1 -0
- package/dist/types/api/deviceUnlock.d.ts +5 -1
- package/dist/types/api/deviceUnlock.d.ts.map +1 -1
- package/dist/types/api/deviceUpdateBootloader.d.ts +0 -6
- package/dist/types/api/deviceUpdateBootloader.d.ts.map +1 -1
- package/dist/types/api/export.d.ts +2 -4
- package/dist/types/api/export.d.ts.map +1 -1
- package/dist/types/api/firmwareUpdate.d.ts +2 -70
- package/dist/types/api/firmwareUpdate.d.ts.map +1 -1
- package/dist/types/api/index.d.ts +7 -10
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/protocolV2.d.ts +3 -0
- package/dist/types/api/protocolV2.d.ts.map +1 -1
- package/dist/types/device.d.ts.map +1 -1
- package/dist/types/params.d.ts +1 -0
- package/dist/types/params.d.ts.map +1 -1
- package/dist/types/settings.d.ts +22 -13
- package/dist/types/settings.d.ts.map +1 -1
- package/dist/utils/deviceFeaturesCompat.d.ts +0 -1
- package/dist/utils/deviceFeaturesCompat.d.ts.map +1 -1
- package/dist/utils/deviceFeaturesUtils.d.ts +4 -0
- package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
- package/dist/utils/homescreen.d.ts +4 -0
- package/dist/utils/homescreen.d.ts.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/patch.d.ts +1 -1
- package/dist/utils/patch.d.ts.map +1 -1
- package/dist/utils/pro2Nft.d.ts +31 -0
- package/dist/utils/pro2Nft.d.ts.map +1 -0
- package/dist/utils/pro2Wallpaper.d.ts +10 -0
- package/dist/utils/pro2Wallpaper.d.ts.map +1 -1
- package/dist/utils/uiProgressThrottle.d.ts +3 -0
- package/dist/utils/uiProgressThrottle.d.ts.map +1 -0
- package/package.json +4 -4
- package/src/api/BaseMethod.ts +8 -10
- package/src/api/CheckAllFirmwareRelease.ts +54 -57
- package/src/api/DetectDeviceConnectProtocol.ts +18 -0
- package/src/api/FirmwareUpdate.ts +7 -15
- package/src/api/FirmwareUpdateV2.ts +126 -316
- package/src/api/FirmwareUpdateV3.ts +63 -265
- package/src/api/FirmwareUpdateV4.ts +566 -965
- package/src/api/GetPassphraseState.ts +7 -1
- package/src/api/OpenWalletSession.ts +54 -17
- package/src/api/SearchDevices.ts +3 -1
- package/src/api/allnetwork/AllNetworkGetAddressBase.ts +32 -11
- package/src/api/device/DeviceUnlock.ts +8 -3
- package/src/api/device/DeviceUpdateBootloader.ts +6 -122
- package/src/api/firmware/FirmwareUpdateBaseMethod.ts +16 -83
- package/src/api/firmware/updateBootloader.ts +4 -19
- package/src/api/firmware/uploadFirmware.ts +39 -144
- package/src/api/helpers/protocolV2FileWrite.ts +11 -4
- package/src/api/index.ts +2 -0
- package/src/api/protocol-v2/DeviceUploadNft.ts +189 -0
- package/src/api/protocol-v2/ProtocolInfoRequest.ts +3 -1
- package/src/api/protocol-v2/helpers.ts +1 -0
- package/src/core/deviceEventRegistration.ts +4 -0
- package/src/core/index.ts +167 -83
- package/src/core/uiPromiseRegistry.ts +41 -0
- package/src/data/messages/messages-protocol-v2.json +25 -0
- package/src/data-manager/DataManager.ts +67 -38
- package/src/data-manager/connectSettings.ts +0 -11
- package/src/device/Device.ts +258 -42
- package/src/device/DeviceCommands.ts +7 -1
- package/src/device/DevicePool.ts +7 -2
- package/src/events/device.ts +4 -0
- package/src/events/logBlockEvent.ts +1 -0
- package/src/events/ui-promise.ts +4 -2
- package/src/events/ui-request.ts +36 -2
- package/src/events/ui-response.ts +12 -2
- package/src/index.ts +0 -5
- package/src/inject.ts +60 -24
- package/src/lowLevelInject.ts +7 -8
- package/src/protocols/protocol-v2/features.ts +10 -3
- package/src/protocols/protocol-v2/resources.ts +359 -0
- package/src/protocols/protocol-v2/uiInteraction.ts +46 -6
- package/src/protocols/protocol-v2/unlockPolicy.ts +1 -105
- package/src/protocols/protocol-v2/unlockPolicyRunner.ts +118 -0
- package/src/protocols/protocol-v2/walletSession.ts +180 -30
- package/src/topLevelInject.ts +7 -8
- package/src/types/api/checkAllFirmwareRelease.ts +2 -4
- package/src/types/api/detectDeviceConnectProtocol.ts +7 -0
- package/src/types/api/deviceUnlock.ts +12 -1
- package/src/types/api/deviceUpdateBootloader.ts +0 -6
- package/src/types/api/export.ts +1 -18
- package/src/types/api/firmwareUpdate.ts +3 -76
- package/src/types/api/index.ts +13 -14
- package/src/types/api/protocolV2.ts +13 -0
- package/src/types/device.ts +3 -0
- package/src/types/params.ts +7 -1
- package/src/types/settings.ts +42 -13
- package/src/utils/deviceFeaturesCompat.ts +0 -6
- package/src/utils/deviceFeaturesUtils.ts +8 -0
- package/src/utils/homescreen.ts +32 -6
- package/src/utils/index.ts +6 -1
- package/src/utils/pro2Nft.ts +142 -0
- package/src/utils/pro2Wallpaper.ts +35 -8
- package/src/utils/uiProgressThrottle.ts +63 -0
- package/__tests__/device-initialize-timeout.test.ts +0 -56
- package/__tests__/firmware-update/check-all-firmware-release.test.ts +0 -175
- package/__tests__/firmware-update/firmware-artifact-source.test.ts +0 -119
- package/__tests__/firmware-update/firmware-host-binding.test.ts +0 -70
- package/__tests__/firmware-update/firmware-preparation-error.test.ts +0 -27
- package/__tests__/firmware-update/firmware-update-bootloader-poll.test.ts +0 -200
- package/__tests__/firmware-update/firmware-update-capabilities.test.ts +0 -13
- package/__tests__/firmware-update/firmware-update-plan-bootloader-identity.test.ts +0 -294
- package/__tests__/firmware-update/firmware-update-plan.test.ts +0 -593
- package/__tests__/firmware-update/firmware-update-prepared-plan.test.ts +0 -213
- package/__tests__/firmware-update/firmware-update-v3-reconnect.test.ts +0 -58
- package/__tests__/firmware-update/firmware-upload-source.test.ts +0 -70
- package/dist/api/firmware/FirmwareArtifactSource.d.ts +0 -25
- package/dist/api/firmware/FirmwareArtifactSource.d.ts.map +0 -1
- package/dist/api/firmware/FirmwareHostBinding.d.ts +0 -6
- package/dist/api/firmware/FirmwareHostBinding.d.ts.map +0 -1
- package/dist/api/firmware/FirmwarePreparationError.d.ts +0 -3
- package/dist/api/firmware/FirmwarePreparationError.d.ts.map +0 -1
- package/dist/api/firmware/FirmwareUpdateCapabilities.d.ts +0 -3
- package/dist/api/firmware/FirmwareUpdateCapabilities.d.ts.map +0 -1
- package/dist/api/firmware/FirmwareUpdatePlan.d.ts +0 -25
- package/dist/api/firmware/FirmwareUpdatePlan.d.ts.map +0 -1
- package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts +0 -32
- package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts.map +0 -1
- package/dist/api/firmware/progressThrottle.d.ts +0 -3
- package/dist/api/firmware/progressThrottle.d.ts.map +0 -1
- package/dist/protocols/protocol-v2/lockedError.d.ts +0 -2
- package/dist/protocols/protocol-v2/lockedError.d.ts.map +0 -1
- package/dist/protocols/protocol-v2/unlockRetry.d.ts +0 -10
- package/dist/protocols/protocol-v2/unlockRetry.d.ts.map +0 -1
- package/dist/types/api/firmwareUpdateCapabilities.d.ts +0 -9
- package/dist/types/api/firmwareUpdateCapabilities.d.ts.map +0 -1
- package/dist/types/api/firmwareUpdatePlan.d.ts +0 -28
- package/dist/types/api/firmwareUpdatePlan.d.ts.map +0 -1
- package/dist/types/api/firmwareUpdatePreparedPlan.d.ts +0 -42
- package/dist/types/api/firmwareUpdatePreparedPlan.d.ts.map +0 -1
- package/src/api/firmware/FirmwareArtifactSource.ts +0 -278
- package/src/api/firmware/FirmwareHostBinding.ts +0 -100
- package/src/api/firmware/FirmwarePreparationError.ts +0 -12
- package/src/api/firmware/FirmwareUpdateCapabilities.ts +0 -9
- package/src/api/firmware/FirmwareUpdatePlan.ts +0 -772
- package/src/api/firmware/FirmwareUpdatePreparedPlan.ts +0 -415
- package/src/api/firmware/progressThrottle.ts +0 -44
- package/src/protocols/protocol-v2/lockedError.ts +0 -10
- package/src/protocols/protocol-v2/unlockRetry.ts +0 -109
- package/src/types/api/firmwareUpdateCapabilities.ts +0 -9
- package/src/types/api/firmwareUpdatePlan.ts +0 -38
- package/src/types/api/firmwareUpdatePreparedPlan.ts +0 -53
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { PROTO } from '../constants';
|
|
2
2
|
import type { Device } from '../types';
|
|
3
3
|
import type { DeviceButtonRequest } from './device';
|
|
4
|
+
import type { UiResponseCorrelation } from './ui-response';
|
|
4
5
|
import type { MessageFactoryFn } from './utils';
|
|
5
6
|
export declare const UI_EVENT = "UI_EVENT";
|
|
6
7
|
export declare const UI_REQUEST: {
|
|
@@ -38,6 +39,16 @@ export declare const UI_REQUEST: {
|
|
|
38
39
|
};
|
|
39
40
|
export type ProtocolV2UiEventSource = 'unlock-coordinator' | 'wallet-session-coordinator' | 'method-lifecycle';
|
|
40
41
|
export type ProtocolV2UiCompletion = 'page-accepted' | 'operation-completed';
|
|
42
|
+
export type HardwareUiInteractionMeta = {
|
|
43
|
+
interactionId: string;
|
|
44
|
+
phaseId: string;
|
|
45
|
+
sequence: number;
|
|
46
|
+
phase: 'pin' | 'passphrase' | 'passphrase-on-device' | 'button' | 'processing';
|
|
47
|
+
transition: 'start' | 'complete' | 'finish';
|
|
48
|
+
outcome?: 'submitted' | 'succeeded' | 'failed' | 'cancelled' | 'disconnected';
|
|
49
|
+
protocol: 'V2';
|
|
50
|
+
device?: Device;
|
|
51
|
+
};
|
|
41
52
|
export type ProtocolV2UiEventMetadata = {
|
|
42
53
|
source?: ProtocolV2UiEventSource;
|
|
43
54
|
reason?: string;
|
|
@@ -46,9 +57,23 @@ export type ProtocolV2UiEventMetadata = {
|
|
|
46
57
|
method?: string;
|
|
47
58
|
page?: string | number;
|
|
48
59
|
operation?: string;
|
|
60
|
+
interaction?: HardwareUiInteractionMeta;
|
|
61
|
+
};
|
|
62
|
+
export type UiRequestWindowClose = {
|
|
63
|
+
type: typeof UI_REQUEST.CLOSE_UI_WINDOW;
|
|
64
|
+
payload: HardwareUiInteractionMeta;
|
|
65
|
+
} | {
|
|
66
|
+
type: typeof UI_REQUEST.CLOSE_UI_PIN_WINDOW;
|
|
67
|
+
payload: HardwareUiInteractionMeta;
|
|
68
|
+
} | {
|
|
69
|
+
type: typeof UI_REQUEST.CLOSE_UI_WINDOW;
|
|
70
|
+
payload?: undefined;
|
|
71
|
+
} | {
|
|
72
|
+
type: typeof UI_REQUEST.CLOSE_UI_PIN_WINDOW;
|
|
73
|
+
payload?: undefined;
|
|
49
74
|
};
|
|
50
75
|
export interface UiRequestWithoutPayload {
|
|
51
|
-
type: typeof UI_REQUEST.
|
|
76
|
+
type: typeof UI_REQUEST.BLUETOOTH_PERMISSION | typeof UI_REQUEST.BLUETOOTH_UNSUPPORTED | typeof UI_REQUEST.BLUETOOTH_POWERED_OFF | typeof UI_REQUEST.BLUETOOTH_CHARACTERISTIC_NOTIFY_CHANGE_FAILURE | typeof UI_REQUEST.LOCATION_PERMISSION | typeof UI_REQUEST.LOCATION_SERVICE_PERMISSION | typeof UI_REQUEST.FIRMWARE_PROCESSING | typeof UI_REQUEST.WEB_DEVICE_PROMPT_ACCESS_PERMISSION;
|
|
52
77
|
payload?: typeof undefined;
|
|
53
78
|
}
|
|
54
79
|
export interface UiRequestFirmwareProgressing {
|
|
@@ -62,6 +87,7 @@ export type UiRequestDeviceAction = {
|
|
|
62
87
|
payload: ProtocolV2UiEventMetadata & {
|
|
63
88
|
device: Device;
|
|
64
89
|
type?: PROTO.PinMatrixRequestType | 'ButtonRequest_PinEntry' | 'ButtonRequest_AttachPin';
|
|
90
|
+
responseCorrelation?: UiResponseCorrelation;
|
|
65
91
|
};
|
|
66
92
|
};
|
|
67
93
|
export interface UiRequestButton {
|
|
@@ -78,6 +104,8 @@ export interface UiRequestPassphrase {
|
|
|
78
104
|
source?: 'wallet-session-coordinator';
|
|
79
105
|
reason?: 'open-wallet' | 'session-recovery';
|
|
80
106
|
expectedPassphraseState?: string;
|
|
107
|
+
interaction?: HardwareUiInteractionMeta;
|
|
108
|
+
responseCorrelation?: UiResponseCorrelation;
|
|
81
109
|
};
|
|
82
110
|
}
|
|
83
111
|
export interface UiRequestPassphraseOnDevice {
|
|
@@ -87,6 +115,7 @@ export interface UiRequestPassphraseOnDevice {
|
|
|
87
115
|
passphraseState?: string;
|
|
88
116
|
source?: 'wallet-session-coordinator';
|
|
89
117
|
reason?: 'open-wallet' | 'session-recovery';
|
|
118
|
+
interaction?: HardwareUiInteractionMeta;
|
|
90
119
|
};
|
|
91
120
|
}
|
|
92
121
|
export interface UiRequestSelectDeviceInBootloaderForWebDevice {
|
|
@@ -149,7 +178,7 @@ export interface PreviousAddressResult {
|
|
|
149
178
|
};
|
|
150
179
|
};
|
|
151
180
|
}
|
|
152
|
-
export type UiEvent = UiRequestWithoutPayload | UiRequestDeviceAction | UiRequestButton | UiRequestPassphraseOnDevice | UiRequestPassphrase | UiRequestSelectDeviceInBootloaderForWebDevice | UiRequestSelectDeviceForSwitchFirmwareWebDevice | FirmwareProcessing | UiRequestSelectDeviceInBootloaderForWebDevice | FirmwareProgress | FirmwareTip | DeviceProgress | PreviousAddressResult;
|
|
181
|
+
export type UiEvent = UiRequestWithoutPayload | UiRequestWindowClose | UiRequestDeviceAction | UiRequestButton | UiRequestPassphraseOnDevice | UiRequestPassphrase | UiRequestSelectDeviceInBootloaderForWebDevice | UiRequestSelectDeviceForSwitchFirmwareWebDevice | FirmwareProcessing | UiRequestSelectDeviceInBootloaderForWebDevice | FirmwareProgress | FirmwareTip | DeviceProgress | PreviousAddressResult;
|
|
153
182
|
export declare enum FirmwareUpdateTipMessage {
|
|
154
183
|
CheckLatestUiResource = "CheckLatestUiResource",
|
|
155
184
|
StartDownloadFirmware = "StartDownloadFirmware",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-request.d.ts","sourceRoot":"","sources":["../../src/events/ui-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,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C,qBAAqB,0BAA0B;IAC/C,sBAAsB,2BAA2B;IACjD,wBAAwB,6BAA6B;IACrD,gBAAgB,qBAAqB;IACrC,mBAAmB,wBAAwB;IAC3C,gCAAgC,qCAAqC;IAErE,+BAA+B,oCAAoC;IACnE,uBAAuB,4BAA4B;IACnD,0BAA0B,+BAA+B;IACzD,uCAAuC,4CAA4C;IAEnF,sBAAsB,2BAA2B;IACjD,qBAAqB,0BAA0B;IAC/C,oCAAoC,yCAAyC;IAC7E,6BAA6B,kCAAkC;IAC/D,eAAe,oBAAoB;IACnC,oBAAoB,yBAAyB;IAC7C,iBAAiB,sBAAsB;IACvC,kBAAkB,uBAAuB;IACzC,gBAAgB,qBAAqB;IACrC,uBAAuB,4BAA4B;IACnD,iBAAiB,sBAAsB;IACvC,wBAAwB,6BAA6B;IACrD,gBAAgB,qBAAqB;IACrC,uBAAuB,4BAA4B;CACpD;AAED,MAAM,MAAM,yBAAyB,GAAG,GAAG,wBAAwB,EAAE,CAAC;AAEtE,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG;IAAE,KAAK,EAAE,OAAO,QAAQ,CAAA;CAAE,CAAC;AAElE,eAAO,MAAM,eAAe,EAAE,gBAAgB,CAAC,OAAO,QAAQ,EAAE,OAAO,CAK5D,CAAC"}
|
|
@@ -6,11 +6,19 @@ export declare const UI_RESPONSE: {
|
|
|
6
6
|
readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "ui-receive_select-device-in-bootloader-for-web-device";
|
|
7
7
|
readonly SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE: "ui-receive_select-device-for-switch-firmware-web-device";
|
|
8
8
|
};
|
|
9
|
-
export interface
|
|
9
|
+
export interface UiResponseCorrelation {
|
|
10
|
+
interactionId: string;
|
|
11
|
+
deviceId: string;
|
|
12
|
+
}
|
|
13
|
+
export interface UiResponseCorrelationFields {
|
|
14
|
+
interactionId?: string;
|
|
15
|
+
deviceId?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface UiResponsePin extends UiResponseCorrelationFields {
|
|
10
18
|
type: typeof UI_RESPONSE.RECEIVE_PIN;
|
|
11
19
|
payload: string;
|
|
12
20
|
}
|
|
13
|
-
export interface UiResponsePassphrase {
|
|
21
|
+
export interface UiResponsePassphrase extends UiResponseCorrelationFields {
|
|
14
22
|
type: typeof UI_RESPONSE.RECEIVE_PASSPHRASE;
|
|
15
23
|
payload: {
|
|
16
24
|
value: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-response.d.ts","sourceRoot":"","sources":["../../src/events/ui-response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,WAAW;;;;;CAOd,CAAC;AAEX,MAAM,WAAW,aAAa;
|
|
1
|
+
{"version":3,"file":"ui-response.d.ts","sourceRoot":"","sources":["../../src/events/ui-response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,WAAW;;;;;CAOd,CAAC;AAEX,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,2BAA2B;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAc,SAAQ,2BAA2B;IAChE,IAAI,EAAE,OAAO,WAAW,CAAC,WAAW,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,oBAAqB,SAAQ,2BAA2B;IACvE,IAAI,EAAE,OAAO,WAAW,CAAC,kBAAkB,CAAC;IAC5C,OAAO,EAAE;QACP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