@trezor/transport
Advanced tools
Comparing version 1.1.6 to 1.1.7
@@ -0,1 +1,5 @@ | ||
# 1.1.7 | ||
- Code cleanup, sharing constants with @trezor/connect | ||
# 1.1.6 | ||
@@ -2,0 +6,0 @@ |
@@ -6,2 +6,3 @@ import BridgeTransportV2 from './bridge/v2'; | ||
export type { Transport, AcquireInput, TrezorDeviceInfoWithSession, MessageFromTrezor, } from './types'; | ||
export { TREZOR_DESCS } from './constants'; | ||
export { Messages } from './types'; | ||
@@ -8,0 +9,0 @@ declare const _default: { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Messages = void 0; | ||
exports.Messages = exports.TREZOR_DESCS = void 0; | ||
const v2_1 = require("./bridge/v2"); | ||
@@ -12,2 +12,4 @@ const withSharedConnections_1 = require("./lowlevel/withSharedConnections"); | ||
protobuf.configure(); | ||
var constants_1 = require("./constants"); | ||
Object.defineProperty(exports, "TREZOR_DESCS", { enumerable: true, get: function () { return constants_1.TREZOR_DESCS; } }); | ||
var types_1 = require("./types"); | ||
@@ -14,0 +16,0 @@ Object.defineProperty(exports, "Messages", { enumerable: true, get: function () { return types_1.Messages; } }); |
@@ -13,8 +13,4 @@ "use strict"; | ||
const events_1 = require("events"); | ||
const constants_1 = require("../constants"); | ||
const T1HID_VENDOR = 0x534c; | ||
const TREZOR_DESCS = [ | ||
{ vendorId: 0x534c, productId: 0x0001 }, | ||
{ vendorId: 0x1209, productId: 0x53c0 }, | ||
{ vendorId: 0x1209, productId: 0x53c1 }, | ||
]; | ||
const CONFIGURATION_ID = 1; | ||
@@ -69,3 +65,3 @@ const INTERFACE_ID = 0; | ||
const trezorDevices = devices.filter(dev => { | ||
const isTrezor = TREZOR_DESCS.some(desc => dev.vendorId === desc.vendorId && dev.productId === desc.productId); | ||
const isTrezor = constants_1.TREZOR_DESCS.some(desc => dev.vendorId === desc.vendorId && dev.productId === desc.productId); | ||
return isTrezor; | ||
@@ -193,3 +189,3 @@ }); | ||
return __awaiter(this, void 0, void 0, function* () { | ||
yield this.usb.requestDevice({ filters: TREZOR_DESCS }); | ||
yield this.usb.requestDevice({ filters: constants_1.TREZOR_DESCS }); | ||
}); | ||
@@ -196,0 +192,0 @@ } |
@@ -22,3 +22,3 @@ export * as Messages from './messages'; | ||
acquire(input: AcquireInput, debugLink: boolean): Promise<string>; | ||
release(session: string, onclose: boolean, debugLink: boolean): Promise<void>; | ||
release(session: string, onclose: boolean, debugLink?: boolean): Promise<void>; | ||
configure(signedData: JSON | string): Promise<void>; | ||
@@ -25,0 +25,0 @@ call(session: string, name: string, data: Record<string, unknown>, debugLink: boolean): Promise<MessageFromTrezor>; |
{ | ||
"name": "@trezor/transport", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"description": "Low level library facilitating protocol buffers based communication with Trezor devices", | ||
@@ -50,3 +50,3 @@ "npmPublishAccess": "public", | ||
"dependencies": { | ||
"@trezor/utils": "^9.0.4", | ||
"@trezor/utils": "^9.0.5", | ||
"bytebuffer": "^5.0.1", | ||
@@ -56,4 +56,4 @@ "json-stable-stringify": "^1.0.2", | ||
"prettier": "2.8.0", | ||
"protobufjs": "^7.1.2" | ||
"protobufjs": "^6.11.3" | ||
} | ||
} |
439209
55
12601
+ Added@types/long@4.0.2(transitive)
+ Addedprotobufjs@6.11.4(transitive)
- Removedlong@5.3.1(transitive)
- Removedprotobufjs@7.4.0(transitive)
Updated@trezor/utils@^9.0.5
Updatedprotobufjs@^6.11.3