コード例 #1
0
ファイル: keepkey.py プロジェクト: MasterMB2/electrum-nmc
 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
コード例 #2
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))
        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