Ejemplo n.º 1
0
 def on_hardware_account_id(self, hw_type, device_info, account_id):
     from keystore import hardware_keystore, bip44_derivation
     derivation = bip44_derivation(int(account_id))
     plugin = self.plugins.get_plugin(hw_type)
     xpub = plugin.setup_device(device_info, derivation, self)
     # create keystore
     d = {
         'type': 'hardware',
         'hw_type': hw_type,
         'derivation': derivation,
         'xpub': xpub,
     }
     k = hardware_keystore(hw_type, d)
     self.on_keystore(k, None)
Ejemplo n.º 2
0
 def on_hw_derivation(self, name, device_info, derivation):
     from keystore import hardware_keystore
     xpub = self.plugin.get_xpub(device_info.device.id_, derivation, self)
     if xpub is None:
         self.show_error('Cannot read xpub from device')
         return
     d = {
         'type': 'hardware',
         'hw_type': name,
         'derivation': derivation,
         'xpub': xpub,
         'label': device_info.label,
     }
     k = hardware_keystore(d)
     self.on_keystore(k)
Ejemplo n.º 3
0
 def on_hw_derivation(self, name, device_info, derivation):
     from keystore import hardware_keystore
     xpub = self.plugin.get_xpub(device_info.device.id_, derivation, self)
     if xpub is None:
         self.show_error('Cannot read xpub from device')
         return
     d = {
         'type': 'hardware',
         'hw_type': name,
         'derivation': derivation,
         'xpub': xpub,
         'label': device_info.label,
     }
     k = hardware_keystore(d)
     self.on_keystore(k)