Пример #1
0
 def __init__(self, parent, config, name):
     HW_PluginBase.__init__(self, parent, config, name)
     if not self.libraries_available:
         return
     # to support legacy devices and legacy firmwares
     self.device_manager().register_devices(self.DEVICE_IDS, plugin=self)
     # to support modern firmware
     self.device_manager().register_vendor_ids(self.VENDOR_IDS, plugin=self)
Пример #2
0
    def __init__(self, parent, config, name):
        HW_PluginBase.__init__(self, parent, config, name)

        try:
            from electroncash_plugins.keepkey import client
            import keepkeylib
            import keepkeylib.ckd_public
            import keepkeylib.transport_hid
            import keepkeylib.transport_webusb
            from usb1 import USBContext
            self.client_class = client.KeepKeyClient
            self.ckd_public = keepkeylib.ckd_public
            self.types = keepkeylib.client.types
            self.DEVICE_IDS = (keepkeylib.transport_hid.DEVICE_IDS +
                               keepkeylib.transport_webusb.DEVICE_IDS)
            self.device_manager().register_devices(self.DEVICE_IDS)
            self.device_manager().register_enumerate_func(self.enumerate)
            self.usb_context = USBContext()
            self.usb_context.open()
            self.libraries_available = True
        except ImportError:
            self.libraries_available = False
Пример #3
0
 def __init__(self, parent, config, name):
     HW_PluginBase.__init__(self, parent, config, name)
     if self.libraries_available:
         self.device_manager().register_devices(self.DEVICE_IDS)