@onekeyfe/hd-core 1.0.39-alpha.5 → 1.0.39-alpha.7
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/dist/api/FirmwareUpdateV3.d.ts.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/device/DeviceCommands.d.ts +4 -4
- package/dist/events/ui-request.d.ts +3 -1
- package/dist/events/ui-request.d.ts.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.js +8 -0
- package/package.json +4 -4
- package/src/api/FirmwareUpdateV3.ts +2 -0
- package/src/core/index.ts +4 -0
- package/src/events/ui-request.ts +5 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FirmwareUpdateV3.d.ts","sourceRoot":"","sources":["../../src/api/FirmwareUpdateV3.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAgD,MAAM,qBAAqB,CAAC;AAgB7F,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAM/E,eAAO,MAAM,gCAAgC,UAAU,CAAC;AAaxD,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,wBAAwB,CAAC,sBAAsB,CAAC;IAC5F,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,CAAQ;IAE1C,IAAI;IAiCE,GAAG;;;;;IA2CT,OAAO,CAAC,wBAAwB;YAiBlB,qBAAqB;YAmBrB,uBAAuB;YAiBvB,2BAA2B;YA+C3B,aAAa;
|
|
1
|
+
{"version":3,"file":"FirmwareUpdateV3.d.ts","sourceRoot":"","sources":["../../src/api/FirmwareUpdateV3.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAgD,MAAM,qBAAqB,CAAC;AAgB7F,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAM/E,eAAO,MAAM,gCAAgC,UAAU,CAAC;AAaxD,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,wBAAwB,CAAC,sBAAsB,CAAC;IAC5F,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,CAAQ;IAE1C,IAAI;IAiCE,GAAG;;;;;IA2CT,OAAO,CAAC,wBAAwB;YAiBlB,qBAAqB;YAmBrB,uBAAuB;YAiBvB,2BAA2B;YA+C3B,aAAa;IA+JrB,sBAAsB,CAAC,OAAO,EAAE,MAAM;CAoD7C"}
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";AACA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAY,6BAA6B,EAAoB,MAAM,wBAAwB,CAAC;AA6BnG,OAAO,EAEL,WAAW,EAWZ,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,eAAe,EAAe,MAAM,UAAU,CAAC;AAE7D,OAAO,eAAe,MAAM,2BAA2B,CAAC;AAMxD,KAAK,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAsCtD,eAAO,MAAM,OAAO,YAAmB,WAAW,WAAW,WAAW,iBA2DvE,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";AACA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAY,6BAA6B,EAAoB,MAAM,wBAAwB,CAAC;AA6BnG,OAAO,EAEL,WAAW,EAWZ,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,eAAe,EAAe,MAAM,UAAU,CAAC;AAE7D,OAAO,eAAe,MAAM,2BAA2B,CAAC;AAMxD,KAAK,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAsCtD,eAAO,MAAM,OAAO,YAAmB,WAAW,WAAW,WAAW,iBA2DvE,CAAC;AAqiBF,eAAO,MAAM,MAAM,YAAa,WAAW,cAAc,MAAM,SA2E9D,CAAC;AA2KF,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,YAAY;IAC5C,OAAO,CAAC,YAAY,CAAsB;IAG1C,OAAO,CAAC,qBAAqB,CAA4B;IAEzD,OAAO,CAAC,iBAAiB,CAAoB;IAE7C,OAAO,CAAC,cAAc;IAWhB,aAAa,CAAC,OAAO,EAAE,WAAW;IAqDxC,OAAO;CAGR;AAED,eAAO,MAAM,QAAQ,YAGpB,CAAC;AAEF,eAAO,MAAM,aAAa,uBAIzB,CAAC;AAMF,eAAO,MAAM,IAAI,aACL,eAAe,aACd,GAAG,WACL,6BAA6B,8BAoBvC,CAAC;AAEF,eAAO,MAAM,eAAe;SAKrB,eAAe,CAAC,KAAK,CAAC;eAChB,GAAG;;UASf,CAAC"}
|
|
@@ -31,7 +31,7 @@ export declare const cancelDeviceInPrompt: (device: Device, expectResponse?: boo
|
|
|
31
31
|
};
|
|
32
32
|
} | {
|
|
33
33
|
success: boolean;
|
|
34
|
-
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 900 | 901 | 902;
|
|
34
|
+
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 900 | 901 | 902;
|
|
35
35
|
payload: {
|
|
36
36
|
message: string;
|
|
37
37
|
};
|
|
@@ -50,7 +50,7 @@ export declare const cancelDeviceWithInitialize: (device: Device) => Promise<{
|
|
|
50
50
|
};
|
|
51
51
|
} | {
|
|
52
52
|
success: boolean;
|
|
53
|
-
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 900 | 901 | 902;
|
|
53
|
+
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 900 | 901 | 902;
|
|
54
54
|
payload: {
|
|
55
55
|
message: string;
|
|
56
56
|
};
|
|
@@ -78,7 +78,7 @@ export declare class DeviceCommands {
|
|
|
78
78
|
};
|
|
79
79
|
} | {
|
|
80
80
|
success: boolean;
|
|
81
|
-
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 900 | 901 | 902;
|
|
81
|
+
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 900 | 901 | 902;
|
|
82
82
|
payload: {
|
|
83
83
|
message: string;
|
|
84
84
|
};
|
|
@@ -97,7 +97,7 @@ export declare class DeviceCommands {
|
|
|
97
97
|
};
|
|
98
98
|
} | {
|
|
99
99
|
success: boolean;
|
|
100
|
-
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 900 | 901 | 902;
|
|
100
|
+
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 900 | 901 | 902;
|
|
101
101
|
payload: {
|
|
102
102
|
message: string;
|
|
103
103
|
};
|
|
@@ -13,6 +13,8 @@ export declare const UI_REQUEST: {
|
|
|
13
13
|
readonly CLOSE_UI_WINDOW: "ui-close_window";
|
|
14
14
|
readonly DEVICE_PROGRESS: "ui-device_progress";
|
|
15
15
|
readonly BLUETOOTH_PERMISSION: "ui-bluetooth_permission";
|
|
16
|
+
readonly BLUETOOTH_UNSUPPORTED: "ui-bluetooth_unsupported";
|
|
17
|
+
readonly BLUETOOTH_POWERED_OFF: "ui-bluetooth_powered_off";
|
|
16
18
|
readonly BLUETOOTH_CHARACTERISTIC_NOTIFY_CHANGE_FAILURE: "ui-bluetooth_characteristic_notify_change_failure";
|
|
17
19
|
readonly LOCATION_PERMISSION: "ui-location_permission";
|
|
18
20
|
readonly LOCATION_SERVICE_PERMISSION: "ui-location_service_permission";
|
|
@@ -33,7 +35,7 @@ export declare const UI_REQUEST: {
|
|
|
33
35
|
readonly NOT_USE_ONEKEY_DEVICE: "ui-device_please_use_onekey_device";
|
|
34
36
|
};
|
|
35
37
|
export interface UiRequestWithoutPayload {
|
|
36
|
-
type: typeof UI_REQUEST.CLOSE_UI_WINDOW | typeof UI_REQUEST.BLUETOOTH_PERMISSION | 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;
|
|
38
|
+
type: typeof UI_REQUEST.CLOSE_UI_WINDOW | 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;
|
|
37
39
|
payload?: typeof undefined;
|
|
38
40
|
}
|
|
39
41
|
export interface UiRequestFirmwareProgressing {
|
|
@@ -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,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,QAAQ,aAAa,CAAC;AAEnC,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"ui-request.d.ts","sourceRoot":"","sources":["../../src/events/ui-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,QAAQ,aAAa,CAAC;AAEnC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCb,CAAC;AAEX,MAAM,WAAW,uBAAuB;IACtC,IAAI,EACA,OAAO,UAAU,CAAC,eAAe,GACjC,OAAO,UAAU,CAAC,oBAAoB,GACtC,OAAO,UAAU,CAAC,qBAAqB,GACvC,OAAO,UAAU,CAAC,qBAAqB,GACvC,OAAO,UAAU,CAAC,8CAA8C,GAChE,OAAO,UAAU,CAAC,mBAAmB,GACrC,OAAO,UAAU,CAAC,2BAA2B,GAC7C,OAAO,UAAU,CAAC,mBAAmB,GACrC,OAAO,UAAU,CAAC,mCAAmC,CAAC;IAC1D,OAAO,CAAC,EAAE,OA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wB;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,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"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2476,6 +2476,8 @@ declare const UI_REQUEST: {
|
|
|
2476
2476
|
readonly CLOSE_UI_WINDOW: "ui-close_window";
|
|
2477
2477
|
readonly DEVICE_PROGRESS: "ui-device_progress";
|
|
2478
2478
|
readonly BLUETOOTH_PERMISSION: "ui-bluetooth_permission";
|
|
2479
|
+
readonly BLUETOOTH_UNSUPPORTED: "ui-bluetooth_unsupported";
|
|
2480
|
+
readonly BLUETOOTH_POWERED_OFF: "ui-bluetooth_powered_off";
|
|
2479
2481
|
readonly BLUETOOTH_CHARACTERISTIC_NOTIFY_CHANGE_FAILURE: "ui-bluetooth_characteristic_notify_change_failure";
|
|
2480
2482
|
readonly LOCATION_PERMISSION: "ui-location_permission";
|
|
2481
2483
|
readonly LOCATION_SERVICE_PERMISSION: "ui-location_service_permission";
|
|
@@ -2496,7 +2498,7 @@ declare const UI_REQUEST: {
|
|
|
2496
2498
|
readonly NOT_USE_ONEKEY_DEVICE: "ui-device_please_use_onekey_device";
|
|
2497
2499
|
};
|
|
2498
2500
|
interface UiRequestWithoutPayload {
|
|
2499
|
-
type: typeof UI_REQUEST.CLOSE_UI_WINDOW | typeof UI_REQUEST.BLUETOOTH_PERMISSION | 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;
|
|
2501
|
+
type: typeof UI_REQUEST.CLOSE_UI_WINDOW | 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;
|
|
2500
2502
|
payload?: typeof undefined;
|
|
2501
2503
|
}
|
|
2502
2504
|
interface UiRequestFirmwareProgressing {
|
|
@@ -2858,7 +2860,7 @@ declare class DeviceCommands {
|
|
|
2858
2860
|
};
|
|
2859
2861
|
} | {
|
|
2860
2862
|
success: boolean;
|
|
2861
|
-
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 900 | 901 | 902;
|
|
2863
|
+
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 900 | 901 | 902;
|
|
2862
2864
|
payload: {
|
|
2863
2865
|
message: string;
|
|
2864
2866
|
};
|
|
@@ -2877,7 +2879,7 @@ declare class DeviceCommands {
|
|
|
2877
2879
|
};
|
|
2878
2880
|
} | {
|
|
2879
2881
|
success: boolean;
|
|
2880
|
-
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 900 | 901 | 902;
|
|
2882
|
+
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 900 | 901 | 902;
|
|
2881
2883
|
payload: {
|
|
2882
2884
|
message: string;
|
|
2883
2885
|
};
|
package/dist/index.js
CHANGED
|
@@ -25718,6 +25718,8 @@ const UI_REQUEST = {
|
|
|
25718
25718
|
CLOSE_UI_WINDOW: 'ui-close_window',
|
|
25719
25719
|
DEVICE_PROGRESS: 'ui-device_progress',
|
|
25720
25720
|
BLUETOOTH_PERMISSION: 'ui-bluetooth_permission',
|
|
25721
|
+
BLUETOOTH_UNSUPPORTED: 'ui-bluetooth_unsupported',
|
|
25722
|
+
BLUETOOTH_POWERED_OFF: 'ui-bluetooth_powered_off',
|
|
25721
25723
|
BLUETOOTH_CHARACTERISTIC_NOTIFY_CHANGE_FAILURE: 'ui-bluetooth_characteristic_notify_change_failure',
|
|
25722
25724
|
LOCATION_PERMISSION: 'ui-location_permission',
|
|
25723
25725
|
LOCATION_SERVICE_PERMISSION: 'ui-location_service_permission',
|
|
@@ -29613,6 +29615,8 @@ class FirmwareUpdateV3 extends FirmwareUpdateBaseMethod {
|
|
|
29613
29615
|
hdShared.HardwareErrorCode.ActionCancelled,
|
|
29614
29616
|
hdShared.HardwareErrorCode.BleDeviceNotBonded,
|
|
29615
29617
|
hdShared.HardwareErrorCode.BleServiceNotFound,
|
|
29618
|
+
hdShared.HardwareErrorCode.BlePoweredOff,
|
|
29619
|
+
hdShared.HardwareErrorCode.BleUnsupported,
|
|
29616
29620
|
hdShared.HardwareErrorCode.BlePermissionError,
|
|
29617
29621
|
hdShared.HardwareErrorCode.BleLocationError,
|
|
29618
29622
|
hdShared.HardwareErrorCode.BleDeviceBondError,
|
|
@@ -38798,6 +38802,8 @@ const ensureConnected = (_context, method, pollingId, abortSignal) => __awaiter(
|
|
|
38798
38802
|
postMessage(createUiMessage(UI_REQUEST.BLUETOOTH_CHARACTERISTIC_NOTIFY_CHANGE_FAILURE));
|
|
38799
38803
|
}
|
|
38800
38804
|
if ([
|
|
38805
|
+
hdShared.HardwareErrorCode.BlePoweredOff,
|
|
38806
|
+
hdShared.HardwareErrorCode.BleUnsupported,
|
|
38801
38807
|
hdShared.HardwareErrorCode.BlePermissionError,
|
|
38802
38808
|
hdShared.HardwareErrorCode.BleLocationError,
|
|
38803
38809
|
hdShared.HardwareErrorCode.BleLocationServicesDisabled,
|
|
@@ -39036,6 +39042,8 @@ class Core extends events.exports {
|
|
|
39036
39042
|
}
|
|
39037
39043
|
break;
|
|
39038
39044
|
}
|
|
39045
|
+
case UI_REQUEST.BLUETOOTH_UNSUPPORTED:
|
|
39046
|
+
case UI_REQUEST.BLUETOOTH_POWERED_OFF:
|
|
39039
39047
|
case UI_REQUEST.BLUETOOTH_PERMISSION:
|
|
39040
39048
|
case UI_REQUEST.BLUETOOTH_CHARACTERISTIC_NOTIFY_CHANGE_FAILURE:
|
|
39041
39049
|
case UI_REQUEST.LOCATION_PERMISSION:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-core",
|
|
3
|
-
"version": "1.0.39-alpha.
|
|
3
|
+
"version": "1.0.39-alpha.7",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "OneKey",
|
|
6
6
|
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@onekeyfe/hd-shared": "^1.0.39-alpha.
|
|
29
|
-
"@onekeyfe/hd-transport": "^1.0.39-alpha.
|
|
28
|
+
"@onekeyfe/hd-shared": "^1.0.39-alpha.7",
|
|
29
|
+
"@onekeyfe/hd-transport": "^1.0.39-alpha.7",
|
|
30
30
|
"axios": "^0.27.2",
|
|
31
31
|
"bignumber.js": "^9.0.2",
|
|
32
32
|
"bytebuffer": "^5.0.1",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"@types/web-bluetooth": "^0.0.21",
|
|
47
47
|
"ripple-keypairs": "^1.1.4"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "df213188c56438b560e062822171c705d2bd9595"
|
|
50
50
|
}
|
|
@@ -289,6 +289,8 @@ export default class FirmwareUpdateV3 extends FirmwareUpdateBaseMethod<FirmwareU
|
|
|
289
289
|
HardwareErrorCode.ActionCancelled,
|
|
290
290
|
HardwareErrorCode.BleDeviceNotBonded,
|
|
291
291
|
HardwareErrorCode.BleServiceNotFound,
|
|
292
|
+
HardwareErrorCode.BlePoweredOff,
|
|
293
|
+
HardwareErrorCode.BleUnsupported,
|
|
292
294
|
HardwareErrorCode.BlePermissionError,
|
|
293
295
|
HardwareErrorCode.BleLocationError,
|
|
294
296
|
HardwareErrorCode.BleDeviceBondError,
|
package/src/core/index.ts
CHANGED
|
@@ -655,6 +655,8 @@ const ensureConnected = async (
|
|
|
655
655
|
}
|
|
656
656
|
if (
|
|
657
657
|
[
|
|
658
|
+
HardwareErrorCode.BlePoweredOff,
|
|
659
|
+
HardwareErrorCode.BleUnsupported,
|
|
658
660
|
HardwareErrorCode.BlePermissionError,
|
|
659
661
|
HardwareErrorCode.BleLocationError,
|
|
660
662
|
HardwareErrorCode.BleLocationServicesDisabled,
|
|
@@ -975,6 +977,8 @@ export default class Core extends EventEmitter {
|
|
|
975
977
|
break;
|
|
976
978
|
}
|
|
977
979
|
|
|
980
|
+
case UI_REQUEST.BLUETOOTH_UNSUPPORTED:
|
|
981
|
+
case UI_REQUEST.BLUETOOTH_POWERED_OFF:
|
|
978
982
|
case UI_REQUEST.BLUETOOTH_PERMISSION:
|
|
979
983
|
case UI_REQUEST.BLUETOOTH_CHARACTERISTIC_NOTIFY_CHANGE_FAILURE:
|
|
980
984
|
case UI_REQUEST.LOCATION_PERMISSION:
|
package/src/events/ui-request.ts
CHANGED
|
@@ -18,6 +18,9 @@ export const UI_REQUEST = {
|
|
|
18
18
|
DEVICE_PROGRESS: 'ui-device_progress',
|
|
19
19
|
|
|
20
20
|
BLUETOOTH_PERMISSION: 'ui-bluetooth_permission',
|
|
21
|
+
BLUETOOTH_UNSUPPORTED: 'ui-bluetooth_unsupported',
|
|
22
|
+
BLUETOOTH_POWERED_OFF: 'ui-bluetooth_powered_off',
|
|
23
|
+
|
|
21
24
|
BLUETOOTH_CHARACTERISTIC_NOTIFY_CHANGE_FAILURE:
|
|
22
25
|
'ui-bluetooth_characteristic_notify_change_failure',
|
|
23
26
|
LOCATION_PERMISSION: 'ui-location_permission',
|
|
@@ -47,6 +50,8 @@ export interface UiRequestWithoutPayload {
|
|
|
47
50
|
type:
|
|
48
51
|
| typeof UI_REQUEST.CLOSE_UI_WINDOW
|
|
49
52
|
| typeof UI_REQUEST.BLUETOOTH_PERMISSION
|
|
53
|
+
| typeof UI_REQUEST.BLUETOOTH_UNSUPPORTED
|
|
54
|
+
| typeof UI_REQUEST.BLUETOOTH_POWERED_OFF
|
|
50
55
|
| typeof UI_REQUEST.BLUETOOTH_CHARACTERISTIC_NOTIFY_CHANGE_FAILURE
|
|
51
56
|
| typeof UI_REQUEST.LOCATION_PERMISSION
|
|
52
57
|
| typeof UI_REQUEST.LOCATION_SERVICE_PERMISSION
|