@onekeyfe/hd-core 0.1.33 → 0.1.36
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/evm/EVMSignTransaction.d.ts +1 -1
- package/dist/api/evm/EVMSignTransaction.d.ts.map +1 -1
- package/dist/device/DeviceConnector.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/package.json +4 -4
- package/src/api/evm/EVMSignTransaction.ts +2 -2
- package/src/device/DeviceConnector.ts +1 -0
- package/src/device/DevicePool.ts +1 -1
|
@@ -6,7 +6,7 @@ export default class EVMSignTransaction extends BaseMethod {
|
|
|
6
6
|
isEIP1559: boolean;
|
|
7
7
|
formattedTx: EVMTransaction | EVMTransactionEIP1559 | undefined;
|
|
8
8
|
init(): void;
|
|
9
|
-
processTxRequest: (request: EthereumTxRequest, data: string, chain_id
|
|
9
|
+
processTxRequest: (request: EthereumTxRequest, data: string, chain_id?: number | undefined) => Promise<EVMSignedTx>;
|
|
10
10
|
evmSignTx: (addressN: number[], tx: EVMTransaction) => Promise<EVMSignedTx>;
|
|
11
11
|
evmSignTxEip1559: (addressN: number[], tx: EVMTransactionEIP1559) => Promise<EVMSignedTx>;
|
|
12
12
|
getVersionRange(): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EVMSignTransaction.d.ts","sourceRoot":"","sources":["../../../src/api/evm/EVMSignTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAKlG,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EACL,WAAW,EAEX,cAAc,EACd,qBAAqB,EACtB,MAAM,oCAAoC,CAAC;AAI5C,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,UAAU;IACxD,QAAQ,EAAE,MAAM,EAAE,CAAM;IAExB,SAAS,UAAS;IAElB,WAAW,EAAE,cAAc,GAAG,qBAAqB,GAAG,SAAS,CAAC;IAEhE,IAAI;IAoCJ,gBAAgB,YACL,iBAAiB,QACpB,MAAM,
|
|
1
|
+
{"version":3,"file":"EVMSignTransaction.d.ts","sourceRoot":"","sources":["../../../src/api/evm/EVMSignTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAKlG,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EACL,WAAW,EAEX,cAAc,EACd,qBAAqB,EACtB,MAAM,oCAAoC,CAAC;AAI5C,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,UAAU;IACxD,QAAQ,EAAE,MAAM,EAAE,CAAM;IAExB,SAAS,UAAS;IAElB,WAAW,EAAE,cAAc,GAAG,qBAAqB,GAAG,SAAS,CAAC;IAEhE,IAAI;IAoCJ,gBAAgB,YACL,iBAAiB,QACpB,MAAM,aACD,MAAM,GAAG,SAAS,KAC5B,QAAQ,WAAW,CAAC,CA+BrB;IAEF,SAAS,aAAoB,MAAM,EAAE,MAAM,cAAc,0BAuCvD;IAEF,gBAAgB,aAAoB,MAAM,EAAE,MAAM,qBAAqB,0BAyCrE;IAEF,eAAe;;;;;IAeT,GAAG;CASV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceConnector.d.ts","sourceRoot":"","sources":["../../src/device/DeviceConnector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAIzF,OAAO,EAAc,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAMhE,MAAM,CAAC,OAAO,OAAO,eAAe;IAClC,SAAS,EAAE,SAAS,CAAC;IAErB,eAAe,SAAK;IAEpB,OAAO,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAQ;IAE1C,QAAQ,EAAE,gBAAgB,EAAE,CAAM;IAElC,SAAS,UAAS;;IAQZ,SAAS;IAWT,MAAM;IAiCZ,IAAI;IAIE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"DeviceConnector.d.ts","sourceRoot":"","sources":["../../src/device/DeviceConnector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAIzF,OAAO,EAAc,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAMhE,MAAM,CAAC,OAAO,OAAO,eAAe;IAClC,SAAS,EAAE,SAAS,CAAC;IAErB,eAAe,SAAK;IAEpB,OAAO,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAQ;IAE1C,QAAQ,EAAE,gBAAgB,EAAE,CAAM;IAElC,SAAS,UAAS;;IAQZ,SAAS;IAWT,MAAM;IAiCZ,IAAI;IAIE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAiB7C,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAS/C,oBAAoB;CAGrB"}
|
package/dist/index.js
CHANGED
|
@@ -10178,7 +10178,7 @@ class DevicePool extends events.exports {
|
|
|
10178
10178
|
static _sendDisconnectMessage() {
|
|
10179
10179
|
for (let i = this.disconnectPool.length - 1; i >= 0; i--) {
|
|
10180
10180
|
const descriptor = this.connectedPool[i];
|
|
10181
|
-
const device = this.getDeviceByPath(descriptor.path);
|
|
10181
|
+
const device = (descriptor === null || descriptor === void 0 ? void 0 : descriptor.path) ? this.getDeviceByPath(descriptor.path) : null;
|
|
10182
10182
|
if (device) {
|
|
10183
10183
|
this.emitter.emit(DEVICE.DISCONNECT, device);
|
|
10184
10184
|
}
|
|
@@ -12489,7 +12489,7 @@ class EVMSignTransaction extends BaseMethod {
|
|
|
12489
12489
|
})),
|
|
12490
12490
|
};
|
|
12491
12491
|
const response = yield this.device.commands.typedCall('EthereumSignTxEIP1559', 'EthereumTxRequest', message);
|
|
12492
|
-
return this.processTxRequest(response.message, rest
|
|
12492
|
+
return this.processTxRequest(response.message, rest);
|
|
12493
12493
|
});
|
|
12494
12494
|
}
|
|
12495
12495
|
init() {
|
|
@@ -13858,6 +13858,7 @@ class DeviceConnector {
|
|
|
13858
13858
|
return res;
|
|
13859
13859
|
}
|
|
13860
13860
|
catch (error) {
|
|
13861
|
+
Log$1.debug('acquire error: ', error.message);
|
|
13861
13862
|
safeThrowError(error);
|
|
13862
13863
|
}
|
|
13863
13864
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.36",
|
|
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": "^0.1.
|
|
29
|
-
"@onekeyfe/hd-transport": "^0.1.
|
|
28
|
+
"@onekeyfe/hd-shared": "^0.1.36",
|
|
29
|
+
"@onekeyfe/hd-transport": "^0.1.36",
|
|
30
30
|
"axios": "^0.27.2",
|
|
31
31
|
"bignumber.js": "^9.0.2",
|
|
32
32
|
"js-sha256": "^0.9.0",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"@types/parse-uri": "^1.0.0",
|
|
38
38
|
"@types/semver": "^7.3.9"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "46ed925a322c0717c74c6bb2e0bb5e7f5df21fcf"
|
|
41
41
|
}
|
|
@@ -60,7 +60,7 @@ export default class EVMSignTransaction extends BaseMethod {
|
|
|
60
60
|
processTxRequest = async (
|
|
61
61
|
request: EthereumTxRequest,
|
|
62
62
|
data: string,
|
|
63
|
-
chain_id
|
|
63
|
+
chain_id?: number | undefined
|
|
64
64
|
): Promise<EVMSignedTx> => {
|
|
65
65
|
if (!request.data_length) {
|
|
66
66
|
let v = request.signature_v;
|
|
@@ -175,7 +175,7 @@ export default class EVMSignTransaction extends BaseMethod {
|
|
|
175
175
|
message
|
|
176
176
|
);
|
|
177
177
|
|
|
178
|
-
return this.processTxRequest(response.message, rest
|
|
178
|
+
return this.processTxRequest(response.message, rest);
|
|
179
179
|
};
|
|
180
180
|
|
|
181
181
|
getVersionRange() {
|
package/src/device/DevicePool.ts
CHANGED
|
@@ -165,7 +165,7 @@ export class DevicePool extends EventEmitter {
|
|
|
165
165
|
static _sendDisconnectMessage() {
|
|
166
166
|
for (let i = this.disconnectPool.length - 1; i >= 0; i--) {
|
|
167
167
|
const descriptor = this.connectedPool[i];
|
|
168
|
-
const device = this.getDeviceByPath(descriptor.path);
|
|
168
|
+
const device = descriptor?.path ? this.getDeviceByPath(descriptor.path) : null;
|
|
169
169
|
if (device) {
|
|
170
170
|
this.emitter.emit(DEVICE.DISCONNECT, device);
|
|
171
171
|
}
|