@onekeyfe/hd-transport-emulator 1.2.0-alpha.11 → 1.2.0-alpha.111
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/index.d.ts.map +1 -1
- package/dist/index.js +0 -7
- package/package.json +4 -4
- package/src/http.ts +0 -1
- package/src/index.ts +1 -7
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAM/C,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,iBAAiB;IACpC,SAAS,EAAE,UAAU,CAAC,OAAO,SAAS,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC;IAEnE,IAAI,SAAuB;IAE3B,OAAO,SAAW;IAElB,UAAU,UAAS;IAEnB,OAAO,UAAS;IAEhB,UAAU,UAAS;IAGnB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY;IAI5C,GAAG,EAAE,MAAM,CAAC;IAEZ,GAAG,CAAC,EAAE,GAAG,CAAC;gBAEE,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,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAmBjE,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
|
@@ -102,7 +102,6 @@ axios__default["default"].interceptors.request.use((config) => {
|
|
|
102
102
|
}
|
|
103
103
|
if ((_a = config.url) === null || _a === void 0 ? void 0 : _a.startsWith('http://localhost:21333')) {
|
|
104
104
|
if (!config.headers.get('Origin')) {
|
|
105
|
-
console.log('set node request origin');
|
|
106
105
|
config.headers.set('Origin', 'https://jssdk.onekey.so');
|
|
107
106
|
}
|
|
108
107
|
}
|
|
@@ -202,12 +201,6 @@ class EmulatorTransport {
|
|
|
202
201
|
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.TransportNotConfigured);
|
|
203
202
|
}
|
|
204
203
|
const messages = this._messages;
|
|
205
|
-
if (transport.LogBlockCommand.has(name)) {
|
|
206
|
-
this.Log.debug('call-', ' name: ', name);
|
|
207
|
-
}
|
|
208
|
-
else {
|
|
209
|
-
this.Log.debug('call-', ' name: ', name, ' data: ', data);
|
|
210
|
-
}
|
|
211
204
|
const o = ProtocolV1.encodeEnvelope(messages, name, data);
|
|
212
205
|
const outData = o.toString('hex');
|
|
213
206
|
const resData = yield this._post({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-transport-emulator",
|
|
3
|
-
"version": "1.2.0-alpha.
|
|
3
|
+
"version": "1.2.0-alpha.111",
|
|
4
4
|
"description": "hardware emulator 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.
|
|
28
|
-
"@onekeyfe/hd-transport": "1.2.0-alpha.
|
|
27
|
+
"@onekeyfe/hd-shared": "1.2.0-alpha.111",
|
|
28
|
+
"@onekeyfe/hd-transport": "1.2.0-alpha.111",
|
|
29
29
|
"axios": "1.15.2",
|
|
30
30
|
"secure-json-parse": "^4.0.0"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "7619f316471ad423fb83f68e82e1aec89f34ac0a"
|
|
33
33
|
}
|
package/src/http.ts
CHANGED
|
@@ -75,7 +75,6 @@ axios.interceptors.request.use((config: InternalAxiosRequestConfig) => {
|
|
|
75
75
|
// node environment
|
|
76
76
|
if (config.url?.startsWith('http://localhost:21333')) {
|
|
77
77
|
if (!config.headers.get('Origin')) {
|
|
78
|
-
console.log('set node request origin');
|
|
79
78
|
// add Origin field for request headers
|
|
80
79
|
config.headers.set('Origin', 'https://jssdk.onekey.so');
|
|
81
80
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import 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';
|
|
@@ -124,12 +124,6 @@ export default class EmulatorTransport {
|
|
|
124
124
|
throw ERRORS.TypedError(HardwareErrorCode.TransportNotConfigured);
|
|
125
125
|
}
|
|
126
126
|
const messages = this._messages;
|
|
127
|
-
if (LogBlockCommand.has(name)) {
|
|
128
|
-
this.Log.debug('call-', ' name: ', name);
|
|
129
|
-
} else {
|
|
130
|
-
this.Log.debug('call-', ' name: ', name, ' data: ', data);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
127
|
const o = ProtocolV1.encodeEnvelope(messages, name, data);
|
|
134
128
|
const outData = o.toString('hex');
|
|
135
129
|
const resData = await this._post({
|