Exemple #1
0
 def get_xpub(self, device_id, derivation, xtype, wizard):
     if xtype not in self.SUPPORTED_XTYPES:
         raise ScriptTypeNotSupported(_('This type of script is not supported with {}.').format(self.device))
     client = self.scan_and_create_client_for_device(device_id=device_id, wizard=wizard)
     xpub = client.get_xpub(derivation, xtype)
     client.used()
     return xpub
Exemple #2
0
 def get_xpub(self, device_id, derivation, xtype, wizard):
     if xtype not in self.SUPPORTED_XTYPES:
         raise ScriptTypeNotSupported(_('This type of script is not supported with {}.').format(self.device))
     devmgr = self.device_manager()
     client = devmgr.client_by_id(device_id)
     client.handler = wizard
     xpub = client.get_xpub(derivation, xtype)
     client.used()
     return xpub
Exemple #3
0
 def get_xpub(self, device_id, derivation, xtype, wizard):
     if xtype not in ('standard',):
         raise ScriptTypeNotSupported(_('This type of script is not supported with KeepKey.'))
     devmgr = self.device_manager()
     client = devmgr.client_by_id(device_id)
     client.handler = wizard
     xpub = client.get_xpub(derivation, xtype)
     client.used()
     return xpub
Exemple #4
0
 def get_xpub(self, device_id, derivation, xtype, wizard):
     if xtype not in self.SUPPORTED_XTYPES:
         raise ScriptTypeNotSupported(_('This type of script is not supported with {}.').format(self.device))
     if is_all_public_derivation(derivation):
         raise Exception(f"The {self.device} does not reveal xpubs corresponding to non-hardened paths. (path: {derivation})")
     client = self.scan_and_create_client_for_device(device_id=device_id, wizard=wizard)
     client.check_device_dialog()
     xpub = client.get_xpub(derivation, xtype)
     return xpub
Exemple #5
0
 def get_xpub(self, device_id, derivation, xtype, wizard):
     if xtype not in ('standard', 'p2wpkh-p2sh'):
         raise ScriptTypeNotSupported(_('This type of script is not supported with the Digital Bitbox.'))
     devmgr = self.device_manager()
     client = devmgr.client_by_id(device_id)
     client.handler = self.create_handler(wizard)
     client.check_device_dialog()
     xpub = client.get_xpub(derivation, xtype)
     return xpub
Exemple #6
0
    def get_xpub(self, device_id, derivation, xtype, wizard):
        # this seems to be part of the pairing process only, not during normal ops?
        # base_wizard:on_hw_derivation
        if xtype not in self.SUPPORTED_XTYPES:
            raise ScriptTypeNotSupported(_('This type of script is not supported with {}.').format(self.device))
        client = self.scan_and_create_client_for_device(device_id=device_id, wizard=wizard)
        client.ping_check()

        xpub = client.get_xpub(derivation, xtype)
        return xpub
Exemple #7
0
 def get_xpub(
     self, device_id: str, derivation: str, xtype: str, wizard: BaseWizard
 ):
     if xtype not in self.SUPPORTED_XTYPES:
         raise ScriptTypeNotSupported(
             _("This type of script is not supported with {}.").format(self.device)
         )
     client = self.scan_and_create_client_for_device(device_id=device_id, wizard=wizard)
     assert isinstance(client, BitBox02Client)
     assert client.bitbox02_device is not None
     return client.get_xpub(derivation, xtype)
    def get_xpub(self, device_id, derivation, xtype, wizard):
        # this seems to be part of the pairing process only, not during normal ops?
        # base_wizard:on_hw_derivation
        if xtype not in self.SUPPORTED_XTYPES:
            raise ScriptTypeNotSupported(_('This type of script is not supported with {}.').format(self.device))
        devmgr = self.device_manager()
        client = devmgr.client_by_id(device_id)
        client.handler = self.create_handler(wizard)
        client.ping_check()

        xpub = client.get_xpub(derivation, xtype)
        return xpub