|
@ -96,7 +96,7 @@ class DigitalBitbox_Client(): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_xpub(self, bip32_path, xtype): |
|
|
def get_xpub(self, bip32_path, xtype): |
|
|
assert xtype in ('standard', 'p2wpkh-p2sh', 'p2wpkh') |
|
|
assert xtype in self.plugin.SUPPORTED_XTYPES |
|
|
reply = self._get_xpub(bip32_path) |
|
|
reply = self._get_xpub(bip32_path) |
|
|
if reply: |
|
|
if reply: |
|
|
xpub = reply['xpub'] |
|
|
xpub = reply['xpub'] |
|
@ -664,6 +664,7 @@ class DigitalBitboxPlugin(HW_PluginBase): |
|
|
DEVICE_IDS = [ |
|
|
DEVICE_IDS = [ |
|
|
(0x03eb, 0x2402) # Digital Bitbox |
|
|
(0x03eb, 0x2402) # Digital Bitbox |
|
|
] |
|
|
] |
|
|
|
|
|
SUPPORTED_XTYPES = ('standard', 'p2wpkh-p2sh', 'p2wpkh', 'p2wsh-p2sh', 'p2wsh') |
|
|
|
|
|
|
|
|
def __init__(self, parent, config, name): |
|
|
def __init__(self, parent, config, name): |
|
|
HW_PluginBase.__init__(self, parent, config, name) |
|
|
HW_PluginBase.__init__(self, parent, config, name) |
|
@ -723,8 +724,8 @@ class DigitalBitboxPlugin(HW_PluginBase): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_xpub(self, device_id, derivation, xtype, wizard): |
|
|
def get_xpub(self, device_id, derivation, xtype, wizard): |
|
|
if xtype not in ('standard', 'p2wpkh-p2sh', 'p2wpkh'): |
|
|
if xtype not in self.SUPPORTED_XTYPES: |
|
|
raise ScriptTypeNotSupported(_('This type of script is not supported with the Digital Bitbox.')) |
|
|
raise ScriptTypeNotSupported(_('This type of script is not supported with {}.').format(self.device)) |
|
|
devmgr = self.device_manager() |
|
|
devmgr = self.device_manager() |
|
|
client = devmgr.client_by_id(device_id) |
|
|
client = devmgr.client_by_id(device_id) |
|
|
client.handler = self.create_handler(wizard) |
|
|
client.handler = self.create_handler(wizard) |
|
|