@ukeyfe/hardware-core 1.1.34 → 2.0.1
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 +1 -1
- package/dist/api/firmware/updateBootloader.d.ts.map +1 -1
- package/dist/index.js +219 -219
- package/package.json +4 -4
- package/src/api/FirmwareUpdateV2.ts +1 -1
- package/src/api/FirmwareUpdateV3.ts +1 -1
- package/src/api/alephium/AlephiumGetAddress.ts +1 -1
- package/src/api/alephium/AlephiumSignMessage.ts +1 -1
- package/src/api/alephium/AlephiumSignTransaction.ts +1 -1
- package/src/api/algo/AlgoGetAddress.ts +1 -1
- package/src/api/algo/AlgoSignTransaction.ts +1 -1
- package/src/api/aptos/AptosGetAddress.ts +1 -1
- package/src/api/aptos/AptosGetPublicKey.ts +1 -1
- package/src/api/aptos/AptosSignInMessage.ts +2 -2
- package/src/api/aptos/AptosSignMessage.ts +1 -1
- package/src/api/aptos/AptosSignTransaction.ts +5 -5
- package/src/api/benfen/BenfenGetAddress.ts +3 -3
- package/src/api/benfen/BenfenGetPublicKey.ts +3 -3
- package/src/api/benfen/BenfenSignMessage.ts +3 -3
- package/src/api/benfen/BenfenSignTransaction.ts +3 -3
- package/src/api/btc/BTCSignMessage.ts +2 -2
- package/src/api/btc/BTCSignPsbt.ts +3 -3
- package/src/api/btc/helpers/versionLimit.ts +2 -2
- package/src/api/cardano/CardanoGetAddress.ts +2 -2
- package/src/api/cardano/CardanoGetPublicKey.ts +2 -2
- package/src/api/cardano/CardanoSignMessage.ts +3 -3
- package/src/api/cardano/CardanoSignTransaction.ts +6 -6
- package/src/api/conflux/ConfluxGetAddress.ts +1 -1
- package/src/api/conflux/ConfluxSignMessage.ts +1 -1
- package/src/api/conflux/ConfluxSignMessageCIP23.ts +1 -1
- package/src/api/conflux/ConfluxSignTransaction.ts +1 -1
- package/src/api/cosmos/CosmosGetAddress.ts +2 -2
- package/src/api/cosmos/CosmosGetPublicKey.ts +2 -2
- package/src/api/cosmos/CosmosSignTransaction.ts +2 -2
- package/src/api/device/DeviceFullyUploadResource.ts +1 -1
- package/src/api/device/DeviceRebootToBoardloader.ts +2 -2
- package/src/api/device/DeviceRebootToBootloader.ts +2 -2
- package/src/api/device/DeviceSettings.ts +1 -1
- package/src/api/device/DeviceUploadResource.ts +5 -5
- package/src/api/dynex/DnxGetAddress.ts +1 -1
- package/src/api/dynex/DnxSignTransaction.ts +1 -1
- package/src/api/evm/EVMSignMessageEIP712.ts +2 -2
- package/src/api/evm/EVMSignTransaction.ts +5 -5
- package/src/api/evm/EVMSignTypedData.ts +3 -3
- package/src/api/evm/latest/signTypedHash.ts +1 -1
- package/src/api/evm/legacyV1/signTypedHash.ts +1 -1
- package/src/api/filecoin/FilecoinGetAddress.ts +2 -2
- package/src/api/filecoin/FilecoinSignTransaction.ts +2 -2
- package/src/api/firmware/updateBootloader.ts +2 -4
- package/src/api/firmware/uploadFirmware.ts +2 -2
- package/src/api/kaspa/KaspaGetAddress.ts +5 -5
- package/src/api/kaspa/KaspaSignTransaction.ts +5 -5
- package/src/api/lightning/LnurlAuth.ts +2 -2
- package/src/api/near/NearGetAddress.ts +1 -1
- package/src/api/near/NearSignTransaction.ts +1 -1
- package/src/api/neo/NeoGetAddress.ts +3 -3
- package/src/api/neo/NeoSignTransaction.ts +3 -3
- package/src/api/nervos/NervosGetAddress.ts +2 -2
- package/src/api/nervos/NervosSignTransaction.ts +2 -2
- package/src/api/nexa/NexaGetAddress.ts +2 -2
- package/src/api/nexa/NexaSignTransaction.ts +2 -2
- package/src/api/nostr/NostrDecryptMessage.ts +2 -2
- package/src/api/nostr/NostrEncryptMessage.ts +2 -2
- package/src/api/nostr/NostrGetPublicKey.ts +2 -2
- package/src/api/nostr/NostrSignEvent.ts +2 -2
- package/src/api/nostr/NostrSignSchnorr.ts +2 -2
- package/src/api/polkadot/networks.ts +6 -6
- package/src/api/scdo/ScdoGetAddress.ts +1 -1
- package/src/api/scdo/ScdoSignMessage.ts +1 -1
- package/src/api/scdo/ScdoSignTransaction.ts +1 -1
- package/src/api/solana/SolSignMessage.ts +5 -5
- package/src/api/solana/SolSignOffchainMessage.ts +3 -3
- package/src/api/solana/SolSignTransaction.ts +4 -4
- package/src/api/sui/SuiGetAddress.ts +2 -2
- package/src/api/sui/SuiGetPublicKey.ts +2 -2
- package/src/api/sui/SuiSignMessage.ts +2 -2
- package/src/api/sui/SuiSignTransaction.ts +4 -4
- package/src/api/ton/TonGetAddress.ts +2 -2
- package/src/api/ton/TonSignMessage.ts +11 -11
- package/src/api/ton/TonSignProof.ts +2 -2
- package/src/api/tron/TronGetAddress.ts +1 -1
- package/src/api/tron/TronSignMessage.ts +5 -5
- package/src/api/tron/TronSignTransaction.ts +9 -9
- package/src/api/xrp/XrpGetAddress.ts +1 -1
- package/src/api/xrp/XrpSignTransaction.ts +1 -1
- package/src/data-manager/DataManager.ts +2 -2
- package/src/data-manager/MessagesConfig.ts +2 -2
- package/src/device/Device.ts +2 -2
- package/src/utils/bridgeUpdate.ts +3 -3
- package/src/utils/deviceFeaturesUtils.ts +16 -16
- package/src/utils/homescreen.ts +2 -2
|
@@ -45,7 +45,7 @@ export default class TronSignMessage extends BaseMethod<HardwareTronSignMessage>
|
|
|
45
45
|
getVersionRange() {
|
|
46
46
|
return {
|
|
47
47
|
model_mini: {
|
|
48
|
-
min: '
|
|
48
|
+
min: '1.1.0',
|
|
49
49
|
},
|
|
50
50
|
};
|
|
51
51
|
}
|
|
@@ -53,16 +53,16 @@ export default class TronSignMessage extends BaseMethod<HardwareTronSignMessage>
|
|
|
53
53
|
getMessageV2VersionRange() {
|
|
54
54
|
return {
|
|
55
55
|
core26: {
|
|
56
|
-
min: '
|
|
56
|
+
min: '1.1.0',
|
|
57
57
|
},
|
|
58
58
|
core27pro: {
|
|
59
|
-
min: '
|
|
59
|
+
min: '1.1.0',
|
|
60
60
|
},
|
|
61
61
|
touch: {
|
|
62
|
-
min: '
|
|
62
|
+
min: '1.1.0',
|
|
63
63
|
},
|
|
64
64
|
classic1s: {
|
|
65
|
-
min: '
|
|
65
|
+
min: '1.1.0',
|
|
66
66
|
},
|
|
67
67
|
};
|
|
68
68
|
}
|
|
@@ -148,7 +148,7 @@ export default class TronSignTransaction extends BaseMethod<TronSignTx> {
|
|
|
148
148
|
getVersionRange() {
|
|
149
149
|
return {
|
|
150
150
|
model_mini: {
|
|
151
|
-
min: '
|
|
151
|
+
min: '1.1.0',
|
|
152
152
|
},
|
|
153
153
|
};
|
|
154
154
|
}
|
|
@@ -156,16 +156,16 @@ export default class TronSignTransaction extends BaseMethod<TronSignTx> {
|
|
|
156
156
|
getFixDataTypeVersionRange(): DeviceFirmwareRange {
|
|
157
157
|
return {
|
|
158
158
|
core26: {
|
|
159
|
-
min: '
|
|
159
|
+
min: '1.1.0',
|
|
160
160
|
},
|
|
161
161
|
core27pro: {
|
|
162
|
-
min: '
|
|
162
|
+
min: '1.1.0',
|
|
163
163
|
},
|
|
164
164
|
touch: {
|
|
165
|
-
min: '
|
|
165
|
+
min: '1.1.0',
|
|
166
166
|
},
|
|
167
167
|
model_classic1s: {
|
|
168
|
-
min: '
|
|
168
|
+
min: '1.1.0',
|
|
169
169
|
},
|
|
170
170
|
};
|
|
171
171
|
}
|
|
@@ -182,16 +182,16 @@ export default class TronSignTransaction extends BaseMethod<TronSignTx> {
|
|
|
182
182
|
supportDelegateResourceLockPeriodVersionRange(): DeviceFirmwareRange {
|
|
183
183
|
return {
|
|
184
184
|
core26: {
|
|
185
|
-
min: '
|
|
185
|
+
min: '1.1.0',
|
|
186
186
|
},
|
|
187
187
|
core27pro: {
|
|
188
|
-
min: '
|
|
188
|
+
min: '1.1.0',
|
|
189
189
|
},
|
|
190
190
|
touch: {
|
|
191
|
-
min: '
|
|
191
|
+
min: '1.1.0',
|
|
192
192
|
},
|
|
193
193
|
model_classic1s: {
|
|
194
|
-
min: '
|
|
194
|
+
min: '1.1.0',
|
|
195
195
|
},
|
|
196
196
|
};
|
|
197
197
|
}
|
|
@@ -397,8 +397,8 @@ export default class DataManager {
|
|
|
397
397
|
}
|
|
398
398
|
|
|
399
399
|
const url = settings.preRelease
|
|
400
|
-
? 'https://data.
|
|
401
|
-
: 'https://data.
|
|
400
|
+
? 'https://data.ukey.io/pre-config.json'
|
|
401
|
+
: 'https://data.ukey.io/config.json';
|
|
402
402
|
|
|
403
403
|
const urlWithCache = `${url}?noCache=${getTimeStamp()}`;
|
|
404
404
|
let data: RemoteConfigResponse | null = null;
|
|
@@ -12,7 +12,7 @@ export const PROTOBUF_MESSAGE_CONFIG: DeviceVersionConfig = {
|
|
|
12
12
|
model_mini: [
|
|
13
13
|
// Classic1s starts from 3.5.0, so use latest by default
|
|
14
14
|
// Only use v1 for specific old versions (< 3.3.0)
|
|
15
|
-
{ minVersion: '
|
|
15
|
+
{ minVersion: '1.1.0', messageVersion: 'latest' },
|
|
16
16
|
{ minVersion: '0.0.1', messageVersion: 'v1' },
|
|
17
17
|
// Fallback to latest for unknown versions (0.0.0) to prevent device type detection issues
|
|
18
18
|
{ minVersion: '0.0.0', messageVersion: 'latest' },
|
|
@@ -20,7 +20,7 @@ export const PROTOBUF_MESSAGE_CONFIG: DeviceVersionConfig = {
|
|
|
20
20
|
model_touch: [
|
|
21
21
|
// Use latest by default for Touch/Core26/Core27Pro
|
|
22
22
|
// Only use v1 for specific old versions (< 4.5.0)
|
|
23
|
-
{ minVersion: '
|
|
23
|
+
{ minVersion: '1.1.0', messageVersion: 'latest' },
|
|
24
24
|
{ minVersion: '0.0.1', messageVersion: 'v1' },
|
|
25
25
|
// Fallback to latest for unknown versions (0.0.0)
|
|
26
26
|
{ minVersion: '0.0.0', messageVersion: 'latest' },
|
package/src/device/Device.ts
CHANGED
|
@@ -781,10 +781,10 @@ export class Device extends EventEmitter {
|
|
|
781
781
|
supportUnlockVersionRange(): DeviceFirmwareRange {
|
|
782
782
|
return {
|
|
783
783
|
core26: {
|
|
784
|
-
min: '
|
|
784
|
+
min: '1.1.0',
|
|
785
785
|
},
|
|
786
786
|
core27pro: {
|
|
787
|
-
min: '
|
|
787
|
+
min: '1.1.0',
|
|
788
788
|
},
|
|
789
789
|
};
|
|
790
790
|
}
|
|
@@ -7,9 +7,9 @@ import { DataManager } from '../data-manager';
|
|
|
7
7
|
|
|
8
8
|
import type { IDeviceType } from '../types';
|
|
9
9
|
|
|
10
|
-
const REQUIRED_BRIDGE_VERSION = '
|
|
11
|
-
const TOUCH_NEED_UPDATE_BRIDGE_VERSION = '
|
|
12
|
-
const CLASSIC_MINI_NEED_UPDATE_BRIDGE_VERSION = '
|
|
10
|
+
const REQUIRED_BRIDGE_VERSION = '1.1.0';
|
|
11
|
+
const TOUCH_NEED_UPDATE_BRIDGE_VERSION = '1.1.0';
|
|
12
|
+
const CLASSIC_MINI_NEED_UPDATE_BRIDGE_VERSION = '1.1.0';
|
|
13
13
|
|
|
14
14
|
export async function getBridgeReleaseInfo({
|
|
15
15
|
deviceType,
|
|
@@ -61,7 +61,7 @@ export const supportInputPinOnSoftware = (features: Features): SupportFeatureTyp
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
const currentVersion = getDeviceFirmwareVersion(features).join('.');
|
|
64
|
-
return { support: semver.gte(currentVersion, '
|
|
64
|
+
return { support: semver.gte(currentVersion, '1.1.0'), require: '1.1.0' };
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
export const supportNewPassphrase = (features?: Features): SupportFeatureType => {
|
|
@@ -74,7 +74,7 @@ export const supportNewPassphrase = (features?: Features): SupportFeatureType =>
|
|
|
74
74
|
|
|
75
75
|
const currentVersion = getDeviceFirmwareVersion(features).join('.');
|
|
76
76
|
|
|
77
|
-
return { support: semver.gte(currentVersion, '
|
|
77
|
+
return { support: semver.gte(currentVersion, '1.1.0'), require: '1.1.0' };
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
export const getPassphraseStateWithRefreshDeviceInfo = async (
|
|
@@ -148,7 +148,7 @@ export const getPassphraseState = async (
|
|
|
148
148
|
);
|
|
149
149
|
const supportGetPassphraseState =
|
|
150
150
|
supportAttachPinCapability ||
|
|
151
|
-
((deviceType === EDeviceType.Core26 || deviceType === EDeviceType.Core27Pro) && semver.gte(firmwareVersion.join('.'), '
|
|
151
|
+
((deviceType === EDeviceType.Core26 || deviceType === EDeviceType.Core27Pro) && semver.gte(firmwareVersion.join('.'), '1.1.0'));
|
|
152
152
|
|
|
153
153
|
if (supportGetPassphraseState) {
|
|
154
154
|
const { message, type } = await commands.typedCall('GetPassphraseState', 'PassphraseState', {
|
|
@@ -198,16 +198,16 @@ export const supportBatchPublicKey = (
|
|
|
198
198
|
const deviceType = getDeviceType(features);
|
|
199
199
|
// btc batch get public key
|
|
200
200
|
if (!!options?.includeNode && (deviceType === EDeviceType.Core26 || deviceType === EDeviceType.Core27Pro)) {
|
|
201
|
-
return semver.gte(currentVersion, '
|
|
201
|
+
return semver.gte(currentVersion, '1.1.0');
|
|
202
202
|
}
|
|
203
203
|
if (!!options?.includeNode && deviceType === EDeviceType.Touch) {
|
|
204
|
-
return semver.gte(currentVersion, '
|
|
204
|
+
return semver.gte(currentVersion, '1.1.0');
|
|
205
205
|
}
|
|
206
206
|
if (!!options?.includeNode && DeviceModelToTypes.model_classic1s.includes(deviceType)) {
|
|
207
|
-
return semver.gte(currentVersion, '
|
|
207
|
+
return semver.gte(currentVersion, '1.1.0');
|
|
208
208
|
}
|
|
209
209
|
if (!!options?.includeNode && DeviceModelToTypes.model_mini.includes(deviceType)) {
|
|
210
|
-
return semver.gte(currentVersion, '
|
|
210
|
+
return semver.gte(currentVersion, '1.1.0');
|
|
211
211
|
}
|
|
212
212
|
if (options?.includeNode) {
|
|
213
213
|
return false;
|
|
@@ -215,10 +215,10 @@ export const supportBatchPublicKey = (
|
|
|
215
215
|
|
|
216
216
|
// support batch get public key
|
|
217
217
|
if (deviceType === EDeviceType.Touch || deviceType === EDeviceType.Core26 || deviceType === EDeviceType.Core27Pro) {
|
|
218
|
-
return semver.gte(currentVersion, '
|
|
218
|
+
return semver.gte(currentVersion, '1.1.0');
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
return semver.gte(currentVersion, '
|
|
221
|
+
return semver.gte(currentVersion, '1.1.0');
|
|
222
222
|
};
|
|
223
223
|
|
|
224
224
|
export const supportModifyHomescreen = (features?: Features): SupportFeatureType => {
|
|
@@ -230,7 +230,7 @@ export const supportModifyHomescreen = (features?: Features): SupportFeatureType
|
|
|
230
230
|
return { support: true };
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
return { support: semver.gte(currentVersion, '
|
|
233
|
+
return { support: semver.gte(currentVersion, '1.1.0') };
|
|
234
234
|
};
|
|
235
235
|
|
|
236
236
|
export const getLatestFirmwareField = (firmwareType?: EFirmwareType): IFirmwareField => {
|
|
@@ -267,11 +267,11 @@ export const getFirmwareUpdateField = ({
|
|
|
267
267
|
|
|
268
268
|
if (deviceType === EDeviceType.Touch) {
|
|
269
269
|
if (targetVersion) {
|
|
270
|
-
if (semver.eq(targetVersion, '
|
|
271
|
-
if (semver.gt(targetVersion, '
|
|
270
|
+
if (semver.eq(targetVersion, '1.1.0')) return 'firmware-v2';
|
|
271
|
+
if (semver.gt(targetVersion, '1.1.0')) return latestFirmwareField;
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
-
if (semver.lt(deviceFirmwareVersion.join('.'), '
|
|
274
|
+
if (semver.lt(deviceFirmwareVersion.join('.'), '1.1.0')) return 'firmware';
|
|
275
275
|
|
|
276
276
|
return latestFirmwareField;
|
|
277
277
|
}
|
|
@@ -305,13 +305,13 @@ export const getFirmwareUpdateFieldArray = (
|
|
|
305
305
|
|
|
306
306
|
if (deviceType === 'touch') {
|
|
307
307
|
const currentVersion = getDeviceFirmwareVersion(features).join('.');
|
|
308
|
-
if (semver.gt(currentVersion, '
|
|
308
|
+
if (semver.gt(currentVersion, '1.1.0')) {
|
|
309
309
|
return ['firmware-v8', 'firmware'];
|
|
310
310
|
}
|
|
311
|
-
if (semver.gte(currentVersion, '
|
|
311
|
+
if (semver.gte(currentVersion, '1.1.0')) {
|
|
312
312
|
return ['firmware-v2', 'firmware'];
|
|
313
313
|
}
|
|
314
|
-
if (!currentVersion || semver.lt(currentVersion, '
|
|
314
|
+
if (!currentVersion || semver.lt(currentVersion, '1.1.0')) {
|
|
315
315
|
return ['firmware-v8', 'firmware-v2', 'firmware'];
|
|
316
316
|
}
|
|
317
317
|
return ['firmware'];
|
package/src/utils/homescreen.ts
CHANGED
|
@@ -280,7 +280,7 @@ export const getHomeScreenDefaultList = (features: Features) => {
|
|
|
280
280
|
data = getTouchData();
|
|
281
281
|
break;
|
|
282
282
|
case EDeviceType.Core26:
|
|
283
|
-
if (semver.gte(deviceVersion, '
|
|
283
|
+
if (semver.gte(deviceVersion, '1.1.0')) {
|
|
284
284
|
data = getCore26Data();
|
|
285
285
|
} else {
|
|
286
286
|
data = Object.keys(getCore26Data())
|
|
@@ -292,7 +292,7 @@ export const getHomeScreenDefaultList = (features: Features) => {
|
|
|
292
292
|
}
|
|
293
293
|
break;
|
|
294
294
|
case EDeviceType.Core27Pro:
|
|
295
|
-
if (semver.gte(deviceVersion, '
|
|
295
|
+
if (semver.gte(deviceVersion, '1.1.0')) {
|
|
296
296
|
data = getCore26Data();
|
|
297
297
|
} else {
|
|
298
298
|
data = Object.keys(getCore26Data())
|