def enumerate(self): devices = self.transport_handler.enumerate_devices() return [Device(path=d.get_path(), interface_number=-1, id_=d.get_path(), product_key='Safe-T mini', usage_page=0, transport_ui_string=d.get_path()) for d in devices]
def enumerate(self): devices = trezorlib.transport.enumerate_devices() return [ Device(path=d.get_path(), interface_number=-1, id_=d.get_path(), product_key=TREZOR_PRODUCT_KEY, usage_page=0, transport_ui_string=d.get_path()) for d in devices ]
def enumerate(self): from keepkeylib.transport_webusb import WebUsbTransport results = [] for dev in WebUsbTransport.enumerate(): path = self._dev_to_str(dev) results.append( Device(path=path, interface_number=-1, id_=path, product_key=(dev.getVendorID(), dev.getProductID()), usage_page=0, transport_ui_string=f"webusb:{path}")) return results
def create_device_from_hid_enumeration(self, d: dict, *, product_key) -> Optional['Device']: # Older versions of hid don't provide interface_number interface_number = d.get('interface_number', -1) usage_page = d['usage_page'] id_ = d['serial_number'] if len(id_) == 0: id_ = str(d['path']) id_ += str(interface_number) + str(usage_page) device = Device(path=d['path'], interface_number=interface_number, id_=id_, product_key=product_key, usage_page=usage_page, transport_ui_string='hid') return device
def enumerate(self): # If there is a bridge, prefer that. # On Windows, the bridge runs as Admin (and Electrum usually does not), # so the bridge has better chances of finding devices. see #5420 # This also avoids duplicate entries. if self.is_bridge_available(): devices = BridgeTransport.enumerate() else: devices = trezorlib.transport.enumerate_devices() return [Device(path=d.get_path(), interface_number=-1, id_=d.get_path(), product_key=TREZOR_PRODUCT_KEY, usage_page=0, transport_ui_string=d.get_path()) for d in devices]
def enumerate(self): devices = self.transport_handler.enumerate_devices() return [Device(d.get_path(), -1, d.get_path(), 'TREZOR', 0) for d in devices]