Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update of USB protocol for Specter-DIY #188

Merged
merged 11 commits into from
Jul 4, 2020
12 changes: 6 additions & 6 deletions src/cryptoadvance/specter/devices/specter.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import hashlib
from .sd_card_device import SDCardDevice
from .hwi_device import HWIDevice
from hwilib.serializations import PSBT


class Specter(SDCardDevice):
class Specter(HWIDevice):
def __init__(self, name, alias, device_type, keys, fullpath, manager):
SDCardDevice.__init__(self, name, alias, 'specter', keys, fullpath, manager)
super().__init__(name, alias, 'specter', keys, fullpath, manager)
self.exportable_to_wallet = True
self.sd_card_support = False
self.qr_code_support = True
self.wallet_export_type = 'qr'
self.supports_hwi_multisig_display_address = True

def create_psbts(self, base64_psbt, wallet):
psbts = SDCardDevice.create_psbts(self, base64_psbt, wallet)
# spected doesn't support non-witness utxo yet
psbts["hwi"] = base64_psbt
psbts = super().create_psbts(base64_psbt, wallet)
qr_psbt = PSBT()
qr_psbt.deserialize(base64_psbt)
for inp in qr_psbt.inputs + qr_psbt.outputs:
Expand Down
Loading