@onekeyfe/hd-core 1.2.0-alpha.2 → 1.2.0-alpha.3
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__/protocol-v2.test.ts +162 -106
- package/dist/api/GetPassphraseState.d.ts +4 -4
- package/dist/api/GetPassphraseState.d.ts.map +1 -1
- package/dist/api/protocol-v2/helpers.d.ts +2 -3
- package/dist/api/protocol-v2/helpers.d.ts.map +1 -1
- package/dist/constants/index.d.ts +2 -1
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/data-manager/connectSettings.d.ts.map +1 -1
- package/dist/device/Device.d.ts +1 -0
- package/dist/device/Device.d.ts.map +1 -1
- package/dist/deviceProfile/buildDeviceFeatures.d.ts.map +1 -1
- package/dist/deviceProfile/buildDeviceProfile.d.ts.map +1 -1
- package/dist/index.d.ts +12 -10
- package/dist/index.js +500 -477
- package/dist/protocols/protocol-v2/features.d.ts +2 -2
- package/dist/protocols/protocol-v2/features.d.ts.map +1 -1
- package/dist/types/api/getPassphraseState.d.ts +4 -4
- package/dist/types/api/getPassphraseState.d.ts.map +1 -1
- package/dist/types/api/protocolV2.d.ts +3 -3
- package/dist/types/api/protocolV2.d.ts.map +1 -1
- package/dist/types/settings.d.ts +1 -0
- package/dist/types/settings.d.ts.map +1 -1
- package/dist/utils/deviceFeaturesUtils.d.ts +2 -0
- package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
- package/dist/utils/patch.d.ts +1 -1
- package/dist/utils/patch.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/api/GetPassphraseState.ts +7 -4
- package/src/api/protocol-v2/DeviceReboot.ts +3 -3
- package/src/api/protocol-v2/helpers.ts +1 -26
- package/src/constants/index.ts +10 -1
- package/src/core/index.ts +2 -0
- package/src/data/messages/messages-protocol-v2.json +329 -323
- package/src/data-manager/connectSettings.ts +6 -0
- package/src/device/Device.ts +12 -1
- package/src/device/DevicePool.ts +6 -6
- package/src/deviceProfile/buildDeviceFeatures.ts +2 -1
- package/src/deviceProfile/buildDeviceProfile.ts +2 -3
- package/src/protocols/protocol-v2/features.ts +8 -7
- package/src/types/api/getPassphraseState.ts +4 -4
- package/src/types/api/protocolV2.ts +2 -3
- package/src/types/settings.ts +5 -0
- package/src/utils/deviceFeaturesUtils.ts +7 -1
package/src/constants/index.ts
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
export { safeThrowError } from './errors';
|
|
2
|
-
export {
|
|
2
|
+
export {
|
|
3
|
+
Messages as PROTO,
|
|
4
|
+
ResourceType,
|
|
5
|
+
TonSignDataType,
|
|
6
|
+
TonWalletVersion,
|
|
7
|
+
} from '@onekeyfe/hd-transport';
|
|
8
|
+
export type {
|
|
9
|
+
HDNodeType,
|
|
10
|
+
Success as DeviceSuccess,
|
|
11
|
+
} from '@onekeyfe/hd-transport';
|
package/src/core/index.ts
CHANGED
|
@@ -56,6 +56,7 @@ import TransportManager from '../data-manager/TransportManager';
|
|
|
56
56
|
import DeviceConnector from '../device/DeviceConnector';
|
|
57
57
|
import RequestQueue from './RequestQueue';
|
|
58
58
|
import { getSynchronize } from '../utils/getSynchronize';
|
|
59
|
+
import { setProtocolV2DeviceInfoMock } from '../protocols/protocol-v2/features';
|
|
59
60
|
|
|
60
61
|
import type { ConnectSettings, Features, KnownDevice } from '../types';
|
|
61
62
|
import type { CoreMessage, IFrameCallMessage, UiPromise, UiPromiseResponse } from '../events';
|
|
@@ -1438,6 +1439,7 @@ export const init = async (
|
|
|
1438
1439
|
try {
|
|
1439
1440
|
try {
|
|
1440
1441
|
await DataManager.load(settings);
|
|
1442
|
+
setProtocolV2DeviceInfoMock(settings.protocolV2DeviceInfoMockEnabled ?? false);
|
|
1441
1443
|
initTransport(Transport, plugin);
|
|
1442
1444
|
} catch {
|
|
1443
1445
|
Log.error('DataManager.load error');
|