@onekeyfe/hd-core 1.2.0-alpha.78 → 1.2.0-alpha.79
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__/check-all-firmware-release-protocol-v2.test.ts +12 -71
- package/__tests__/protocol-v2-resources.test.ts +102 -222
- package/__tests__/protocol-v2.test.ts +110 -380
- package/dist/api/CheckAllFirmwareRelease.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV4.d.ts +0 -6
- package/dist/api/FirmwareUpdateV4.d.ts.map +1 -1
- package/dist/api/UploadPortfolio.d.ts.map +1 -1
- package/dist/data-manager/DataManager.d.ts +1 -2
- package/dist/data-manager/DataManager.d.ts.map +1 -1
- package/dist/index.d.ts +74 -32
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +255 -499
- package/dist/inject.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/resources.d.ts +31 -28
- package/dist/protocols/protocol-v2/resources.d.ts.map +1 -1
- package/dist/types/api/checkAllFirmwareRelease.d.ts +1 -0
- package/dist/types/api/checkAllFirmwareRelease.d.ts.map +1 -1
- package/dist/types/api/export.d.ts +1 -0
- package/dist/types/api/export.d.ts.map +1 -1
- package/dist/types/api/index.d.ts +2 -0
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/protocolV2ResourceManifest.d.ts +17 -0
- package/dist/types/api/protocolV2ResourceManifest.d.ts.map +1 -0
- package/dist/types/settings.d.ts +30 -21
- package/dist/types/settings.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/api/CheckAllFirmwareRelease.ts +5 -34
- package/src/api/FirmwareUpdateV4.ts +48 -220
- package/src/api/UploadPortfolio.ts +18 -0
- package/src/data-manager/DataManager.ts +2 -6
- package/src/index.ts +6 -0
- package/src/inject.ts +2 -0
- package/src/protocols/protocol-v2/resources.ts +193 -324
- package/src/types/api/checkAllFirmwareRelease.ts +1 -0
- package/src/types/api/export.ts +4 -0
- package/src/types/api/index.ts +2 -0
- package/src/types/api/protocolV2ResourceManifest.ts +19 -0
- package/src/types/settings.ts +30 -36
package/src/types/settings.ts
CHANGED
|
@@ -64,48 +64,42 @@ export type IProtocolV2FirmwareComponent = {
|
|
|
64
64
|
version?: IVersionArray;
|
|
65
65
|
};
|
|
66
66
|
|
|
67
|
-
export type
|
|
68
|
-
|
|
69
|
-
| 'animation'
|
|
70
|
-
| 'wallpaper'
|
|
71
|
-
| 'translations'
|
|
72
|
-
| 'roobert'
|
|
73
|
-
| 'noto'
|
|
74
|
-
| 'firmware_logo';
|
|
75
|
-
|
|
76
|
-
/** Pro2 RES package descriptor. Hashes identify content without a human-managed version. */
|
|
77
|
-
export type IProtocolV2Resource = {
|
|
78
|
-
type: IProtocolV2ResourceType;
|
|
79
|
-
url: string;
|
|
80
|
-
/** Complete okpkg file size in bytes. */
|
|
81
|
-
size: number;
|
|
82
|
-
/** SHA-256 of the complete okpkg file. */
|
|
83
|
-
fileHash: string;
|
|
84
|
-
/** SHA3-512 header_hash from the signed okpkg header. */
|
|
85
|
-
headerHash: string;
|
|
67
|
+
export type IProtocolV2ResourceSource = {
|
|
68
|
+
manifestUrl: string;
|
|
86
69
|
};
|
|
87
70
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
name?: string;
|
|
91
|
-
url: string;
|
|
92
|
-
devicePath: string;
|
|
93
|
-
size: number;
|
|
94
|
-
/** SHA-256 of the complete file. */
|
|
95
|
-
fileHash: string;
|
|
71
|
+
export type IProtocolV2Resources = {
|
|
72
|
+
source: IProtocolV2ResourceSource;
|
|
96
73
|
};
|
|
97
74
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
75
|
+
export type IProtocolV2ResourceManifestFile = {
|
|
76
|
+
archive_path: string;
|
|
77
|
+
original_name: string;
|
|
78
|
+
device_path: string;
|
|
79
|
+
size: number;
|
|
80
|
+
sha256: string;
|
|
81
|
+
signed: true;
|
|
82
|
+
sig_algo: 'ed25519' | 'mldsa65';
|
|
83
|
+
payload_version: string | null;
|
|
104
84
|
};
|
|
105
85
|
|
|
106
|
-
export type
|
|
107
|
-
|
|
108
|
-
|
|
86
|
+
export type IProtocolV2ResourceManifest = {
|
|
87
|
+
schema: 1;
|
|
88
|
+
artifact_name: string;
|
|
89
|
+
release_name: string;
|
|
90
|
+
variant: 'resource';
|
|
91
|
+
commit: string;
|
|
92
|
+
short_sha: string;
|
|
93
|
+
timestamp_utc: string;
|
|
94
|
+
core_version: string;
|
|
95
|
+
key_set: string;
|
|
96
|
+
device_root: 'vol0:';
|
|
97
|
+
restore_mode: 'bootloader_update';
|
|
98
|
+
trees: Array<{
|
|
99
|
+
path: string;
|
|
100
|
+
device: string;
|
|
101
|
+
}>;
|
|
102
|
+
files: IProtocolV2ResourceManifestFile[];
|
|
109
103
|
};
|
|
110
104
|
|
|
111
105
|
/** Pro2 RESC bundle okpkg descriptor for incremental FileWrite synchronization. */
|