Socket
Socket
Sign inDemoInstall

@onekeyfe/hd-core

Package Overview
Dependencies
Maintainers
0
Versions
249
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onekeyfe/hd-core - npm Package Compare versions

Comparing version 1.0.10-alpha.1 to 1.0.10-alpha.2

dist/api/allnetwork/AllNetworkGetAddress.d.ts

6

dist/api/index.d.ts

@@ -0,1 +1,2 @@

export { default as testInitializeDeviceDuration } from './test/TestInitializeDeviceDuration';
export { default as searchDevices } from './SearchDevices';

@@ -28,2 +29,6 @@ export { default as getFeatures } from './GetFeatures';

export { default as deviceUpdateBootloader } from './device/DeviceUpdateBootloader';
export { default as deviceLock } from './device/DeviceLock';
export { default as deviceCancel } from './device/DeviceCancel';
export { default as setU2FCounter } from './u2f/SetU2FCounter';
export { default as getNextU2FCounter } from './u2f/GetNextU2FCounter';
export { default as firmwareUpdate } from './FirmwareUpdate';

@@ -33,2 +38,3 @@ export { default as firmwareUpdateV2 } from './FirmwareUpdateV2';

export { default as cipherKeyValue } from './CipherKeyValue';
export { default as allNetworkGetAddress } from './allnetwork/AllNetworkGetAddress';
export { default as btcGetAddress } from './btc/BTCGetAddress';

@@ -35,0 +41,0 @@ export { default as btcGetPublicKey } from './btc/BTCGetPublicKey';

1

dist/types/api/export.d.ts

@@ -16,2 +16,3 @@ export type { BTCAddress, BTCGetAddressParams } from './btcGetAddress';

export type { FirmwareUpdateParams, FirmwareUpdateBinaryParams } from './firmwareUpdate';
export type { AllNetworkAddressParams, AllNetworkGetAddressParams } from './allNetworkGetAddress';
export type { EVMAddress, EVMGetAddressParams } from './evmGetAddress';

@@ -18,0 +19,0 @@ export type { EVMPublicKey, EVMGetPublicKeyParams } from './evmGetPublicKey';

import { off, on, removeAllListeners } from './event';
import { uiResponse } from './uiResponse';
import { init, updateSettings } from './init';
import { testInitializeDeviceDuration } from './testInitializeDeviceDuration';
import { getLogs } from './getLogs';

@@ -33,3 +34,8 @@ import { checkTransportRelease } from './checkTransportRelease';

import { deviceUpdateBootloader } from './deviceUpdateBootloader';
import { deviceLock } from './deviceLock';
import { deviceCancel } from './deviceCancel';
import { getNextU2FCounter } from './getNextU2FCounter';
import { setU2FCounter } from './setU2FCounter';
import { cipherKeyValue } from './cipherKeyValue';
import { allNetworkGetAddress } from './allNetworkGetAddress';
import { evmGetAddress } from './evmGetAddress';

@@ -120,2 +126,3 @@ import { evmGetPublicKey } from './evmGetPublicKey';

getLogs: typeof getLogs;
testInitializeDeviceDuration: typeof testInitializeDeviceDuration;
checkAllFirmwareRelease: typeof checkAllFirmwareRelease;

@@ -146,2 +153,6 @@ checkTransportRelease: typeof checkTransportRelease;

deviceUpdateBootloader: typeof deviceUpdateBootloader;
deviceLock: typeof deviceLock;
deviceCancel: typeof deviceCancel;
getNextU2FCounter: typeof getNextU2FCounter;
setU2FCounter: typeof setU2FCounter;
checkFirmwareRelease: typeof checkFirmwareRelease;

@@ -152,2 +163,3 @@ checkBLEFirmwareRelease: typeof checkBLEFirmwareRelease;

cipherKeyValue: typeof cipherKeyValue;
allNetworkGetAddress: typeof allNetworkGetAddress;
evmGetAddress: typeof evmGetAddress;

@@ -154,0 +166,0 @@ evmGetPublicKey: typeof evmGetPublicKey;

8

package.json
{
"name": "@onekeyfe/hd-core",
"version": "1.0.10-alpha.1",
"version": "1.0.10-alpha.2",
"description": "> TODO: description",

@@ -28,4 +28,4 @@ "author": "OneKey",

"dependencies": {
"@onekeyfe/hd-shared": "^1.0.10-alpha.1",
"@onekeyfe/hd-transport": "^1.0.10-alpha.1",
"@onekeyfe/hd-shared": "^1.0.10-alpha.2",
"@onekeyfe/hd-transport": "^1.0.10-alpha.2",
"axios": "^0.27.2",

@@ -48,3 +48,3 @@ "bignumber.js": "^9.0.2",

},
"gitHead": "94a221c9ed5d860d021b0321fbe8c89055006d9e"
"gitHead": "f31e120face0f0edf7e705cc27f9fc91cc13b03b"
}

@@ -6,3 +6,9 @@ import semver from 'semver';

import { Success } from '@onekeyfe/hd-transport';
import { wait, getDeviceBootloaderVersion, getDeviceType } from '../../utils';
import {
wait,
getDeviceBootloaderVersion,
getDeviceType,
LoggerNames,
getLogger,
} from '../../utils';
import { DEVICE, CoreMessage, createUiMessage, UI_REQUEST } from '../../events';

@@ -20,2 +26,4 @@ import { PROTO } from '../../constants';

const Log = getLogger(LoggerNames.Core);
const postConfirmationMessage = (device: Device) => {

@@ -240,3 +248,3 @@ // only if firmware is already installed. fresh device does not require button confirmation

} catch (error) {
console.error(`emmcWrite error: `, error);
Log.error(`emmcWrite error: `, error);
retryCount--;

@@ -243,0 +251,0 @@ if (retryCount === 0) {

@@ -0,1 +1,3 @@

export { default as testInitializeDeviceDuration } from './test/TestInitializeDeviceDuration';
export { default as searchDevices } from './SearchDevices';

@@ -28,3 +30,8 @@ export { default as getFeatures } from './GetFeatures';

export { default as deviceUpdateBootloader } from './device/DeviceUpdateBootloader';
export { default as deviceLock } from './device/DeviceLock';
export { default as deviceCancel } from './device/DeviceCancel';
export { default as setU2FCounter } from './u2f/SetU2FCounter';
export { default as getNextU2FCounter } from './u2f/GetNextU2FCounter';
export { default as firmwareUpdate } from './FirmwareUpdate';

@@ -36,2 +43,4 @@ export { default as firmwareUpdateV2 } from './FirmwareUpdateV2';

export { default as allNetworkGetAddress } from './allnetwork/AllNetworkGetAddress';
export { default as btcGetAddress } from './btc/BTCGetAddress';

@@ -38,0 +47,0 @@ export { default as btcGetPublicKey } from './btc/BTCGetPublicKey';

@@ -47,2 +47,16 @@ import semver from 'semver';

function hasDeriveCardano(method: BaseMethod): boolean {
if (
method.name.startsWith('allNetworkGetAddress') &&
method.payload &&
method.payload.bundle &&
// @ts-expect-error
method.payload.bundle.some(net => net && net.network === 'ada')
) {
return true;
}
return method.name.startsWith('cardano') || method.payload?.deriveCardano;
}
const parseInitOptions = (method?: BaseMethod): InitOptions => ({

@@ -52,3 +66,3 @@ initSession: method?.payload.initSession,

deviceId: method?.payload.deviceId,
deriveCardano: method?.name.startsWith('cardano') || method?.payload?.deriveCardano,
deriveCardano: method && hasDeriveCardano(method),
});

@@ -288,2 +302,3 @@

try {
console.log('=====>>>>>>Call API - Inner Running method', method.payload);
const response: object = await method.run();

@@ -290,0 +305,0 @@ Log.debug('Call API - Inner Method Run: ');

@@ -116,2 +116,5 @@ import { EventEmitter } from 'events';

testInitializeDeviceDuration: (connectId, params) =>
call({ ...params, connectId, method: 'testInitializeDeviceDuration' }),
deviceBackup: connectId => call({ connectId, method: 'deviceBackup' }),

@@ -137,3 +140,12 @@ deviceChangePin: (connectId, params) => call({ ...params, connectId, method: 'deviceChangePin' }),

call({ ...params, connectId, method: 'getPassphraseState' }),
deviceCancel: (connectId, params) => call({ ...params, connectId, method: 'deviceCancel' }),
deviceLock: (connectId, params) => call({ ...params, connectId, method: 'deviceLock' }),
getNextU2FCounter: (connectId, params) =>
call({ ...params, connectId, method: 'getNextU2FCounter' }),
setU2FCounter: (connectId, params) => call({ ...params, connectId, method: 'setU2FCounter' }),
allNetworkGetAddress: (connectId, deviceId, params) =>
call({ ...params, connectId, deviceId, method: 'allNetworkGetAddress' }),
evmGetAddress: (connectId, deviceId, params) =>

@@ -140,0 +152,0 @@ call({ ...params, connectId, deviceId, method: 'evmGetAddress' }),

@@ -26,2 +26,4 @@ export type { BTCAddress, BTCGetAddressParams } from './btcGetAddress';

export type { AllNetworkAddressParams, AllNetworkGetAddressParams } from './allNetworkGetAddress';
export type { EVMAddress, EVMGetAddressParams } from './evmGetAddress';

@@ -28,0 +30,0 @@ export type { EVMPublicKey, EVMGetPublicKeyParams } from './evmGetPublicKey';

@@ -5,2 +5,4 @@ import { off, on, removeAllListeners } from './event';

import { testInitializeDeviceDuration } from './testInitializeDeviceDuration';
import { getLogs } from './getLogs';

@@ -37,5 +39,12 @@ import { checkTransportRelease } from './checkTransportRelease';

import { deviceUpdateBootloader } from './deviceUpdateBootloader';
import { deviceLock } from './deviceLock';
import { deviceCancel } from './deviceCancel';
import { getNextU2FCounter } from './getNextU2FCounter';
import { setU2FCounter } from './setU2FCounter';
import { cipherKeyValue } from './cipherKeyValue';
import { allNetworkGetAddress } from './allNetworkGetAddress';
import { evmGetAddress } from './evmGetAddress';

@@ -156,2 +165,7 @@ import { evmGetPublicKey } from './evmGetPublicKey';

/**
* Test function
*/
testInitializeDeviceDuration: typeof testInitializeDeviceDuration;
/**
* Core function

@@ -188,2 +202,6 @@ */

deviceUpdateBootloader: typeof deviceUpdateBootloader;
deviceLock: typeof deviceLock;
deviceCancel: typeof deviceCancel;
getNextU2FCounter: typeof getNextU2FCounter;
setU2FCounter: typeof setU2FCounter;
checkFirmwareRelease: typeof checkFirmwareRelease;

@@ -197,2 +215,7 @@ checkBLEFirmwareRelease: typeof checkBLEFirmwareRelease;

/**
* All network function
*/
allNetworkGetAddress: typeof allNetworkGetAddress;
/**
* EVM function

@@ -199,0 +222,0 @@ */

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc