@onekeyfe/hd-transport-http 1.2.0-alpha.2 → 1.2.0-alpha.20

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAA8B,MAAM,wBAAwB,CAAC;AAMpE,OAAO,KAAK,EACV,YAAY,EACZ,2BAA2B,EAC3B,YAAY,EACb,MAAM,wBAAwB,CAAC;AAIhC,KAAK,wBAAwB,GAAG;IAC9B,IAAI,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC;IACrD,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,aAAa;IAChC,SAAS,EAAE,UAAU,CAAC,OAAO,SAAS,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC;IAEnE,IAAI,SAAmB;IAEvB,UAAU,UAAS;IAEnB,OAAO,UAAS;IAEhB,GAAG,EAAE,MAAM,CAAC;IAEZ,GAAG,CAAC,EAAE,GAAG,CAAC;IAGV,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY;gBAIhC,GAAG,CAAC,EAAE,MAAM;IAIxB,KAAK,CAAC,OAAO,EAAE,wBAAwB;IAWjC,IAAI,CAAC,MAAM,EAAE,GAAG;IAMhB,WAAW;IAUjB,SAAS,CAAC,UAAU,EAAE,GAAG;IAMnB,MAAM,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,2BAA2B,CAAC;IAY/C,SAAS;;;;;;;IAMf,aAAa,CAAC,KAAK,EAAE,YAAY;IAS3B,OAAO,CAAC,KAAK,EAAE,YAAY;IAK3B,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAUzC,IAAI,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;;;;;;IAMf,aAAa,CAAC,KAAK,EAAE,YAAY;IAS3B,OAAO,CAAC,KAAK,EAAE,YAAY;IAK3B,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAUzC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAqBjE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAYjE,IAAI,CAAC,OAAO,EAAE,MAAM;IAe1B,aAAa;IAKb,IAAI;IAIJ,MAAM;CAGP"}
package/dist/index.js CHANGED
@@ -216,12 +216,7 @@ class HttpTransport {
216
216
  throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.TransportNotConfigured);
217
217
  }
218
218
  const messages = this._messages;
219
- if (transport.LogBlockCommand.has(name)) {
220
- this.Log.debug('call-', ' name: ', name);
221
- }
222
- else {
223
- this.Log.debug('call-', ' name: ', name, ' data: ', data);
224
- }
219
+ this.Log.debug('transport call', { name, protocol: 'V1' });
225
220
  const o = ProtocolV1.encodeEnvelope(messages, name, data);
226
221
  const outData = o.toString('hex');
227
222
  const resData = yield this._post({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/hd-transport-http",
3
- "version": "1.2.0-alpha.2",
3
+ "version": "1.2.0-alpha.20",
4
4
  "description": "hardware http transport",
5
5
  "author": "OneKey",
6
6
  "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
@@ -24,10 +24,10 @@
24
24
  "url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
25
25
  },
26
26
  "dependencies": {
27
- "@onekeyfe/hd-shared": "1.2.0-alpha.2",
28
- "@onekeyfe/hd-transport": "1.2.0-alpha.2",
27
+ "@onekeyfe/hd-shared": "1.2.0-alpha.20",
28
+ "@onekeyfe/hd-transport": "1.2.0-alpha.20",
29
29
  "axios": "1.15.2",
30
30
  "secure-json-parse": "^4.0.0"
31
31
  },
32
- "gitHead": "6c183b7f7027f4b4d3db4f427f6360351a6c6680"
32
+ "gitHead": "5fbc1ada90fd3cfda7e5ef08be368cb452018733"
33
33
  }
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- import transport, { LogBlockCommand } from '@onekeyfe/hd-transport';
1
+ import transport from '@onekeyfe/hd-transport';
2
2
  import { ERRORS, HardwareErrorCode } from '@onekeyfe/hd-shared';
3
3
 
4
4
  import { request as http } from './http';
@@ -120,11 +120,7 @@ export default class HttpTransport {
120
120
  throw ERRORS.TypedError(HardwareErrorCode.TransportNotConfigured);
121
121
  }
122
122
  const messages = this._messages;
123
- if (LogBlockCommand.has(name)) {
124
- this.Log.debug('call-', ' name: ', name);
125
- } else {
126
- this.Log.debug('call-', ' name: ', name, ' data: ', data);
127
- }
123
+ this.Log.debug('transport call', { name, protocol: 'V1' });
128
124
 
129
125
  const o = ProtocolV1.encodeEnvelope(messages, name, data);
130
126
  const outData = o.toString('hex');