Commit graph

21 commits

Author SHA1 Message Date
SomberNight
a7199696d3
json_db: exempt keystore from StoredDict conversion
The keystore logic would need to be significantly changed to nicely
interoperate with StoredDict/json_db logic.
(just see KeyStore.__init__() and KeyStore.dump())
For now we exempt the keystore from the recursive StoredDict conversion, as
it is a smaller change that is also easier to review for correctness.

fixes #6066
fixes #6401

also reverts 2d3c2eeea9 (which was an even hackier workaround for #6066)
2020-09-04 16:11:01 +02:00
Marko Bencun
061305cd97
bitbox02: add fingerprint to label
See comment in commit.
2020-07-15 15:41:27 +02:00
Marko Bencun
c0ad40b562
bitbox02: implement label()
So the device can be identified more easily in dialogs.
2020-07-15 15:41:27 +02:00
Marko Bencun
5457abfab5
bitbox02: drop unused wizard argument 2020-07-15 15:41:25 +02:00
Marko Bencun
106688ea54
bitbox02: implement get_soft_device_id so multisig runs more smoothly
Without it, if you have say a 1-of-2 multisig with two BitBox02s, you
would run into trouble if the first keystore would try to match to the
wrong inserted BitBox02 (wrong order, or the first one is not
inserted, etc. ).

With the soft device id, the device manager can figure it on its own
which keystore belongs to which connected bb02.
2020-07-15 15:41:09 +02:00
Marko Bencun
b1e756ac96
plugins/bitbox02: fix compatibility with bitbox02-4.0.0 2020-07-01 17:49:53 +02:00
SomberNight
db5cf22ff4
bitbox02: get prev tx from psbt instead of wallet db
- for symmetry with other plugins
- and because this is a superset. txin.utxo gets populated from the wallet db (or network);
  but the wallet db does not import txs from txin.utxo (so if a psbt already had an
  unknown tx there, it will not get imported)
2020-06-04 19:41:34 +02:00
Marko Bencun
b9b08b768f
plugins/bitbox02: fix min version check
Inform the user that they need to upgrade if their firmware version is
out of date.

The previous `check_device_firmware_version()` was dead code, and the
bb02 function called inside also does not exist.
2020-06-03 15:36:15 +02:00
Marko Bencun
b863150fe3
plugins/bitbox02: fix compatibility with bitbox02-3.0.0 2020-06-03 15:35:43 +02:00
SomberNight
2cfa3bd6c8
hww hidapi usage: try to mitigate some thread-safety issues
related: #6097
2020-04-17 19:53:39 +02:00
SomberNight
98d2ab5bd6
hww: fix HardwareClientBase not having reference to plugin
it was incorrectly documented that it did (previously only for some plugins)
2020-04-17 19:53:35 +02:00
SomberNight
10c358dd38
bitbox02: rm plugin.get_client method: just use default impl 2020-04-12 15:34:19 +02:00
SomberNight
dda20583c2
bitbox02: rm BitBox02Client.label override
if placeholder anyway, just use base impl
(alternatively we should list it in electrum.plugin.PLACEHOLDER_HW_CLIENT_LABELS)
2020-04-12 15:34:19 +02:00
SomberNight
e830ef309f
hww: factor out part of hid scan code to HW_PluginBase
so that bitbox02 can override it
2020-04-12 15:34:19 +02:00
SomberNight
66c264f613
bitcoin.py: change API of address_to_hash 2020-04-12 15:34:19 +02:00
SomberNight
cc4aa1812d
rm some unused imports 2020-04-12 15:34:19 +02:00
SomberNight
ffe3cef21a
bitbox02: don't run show_xpub on GUI thread 2020-04-12 15:34:19 +02:00
SomberNight
0268b63fcb
bitbox02: rm some dead code 2020-04-12 15:34:19 +02:00
SomberNight
15102855c1
bitbox02: fix pairing_dialog 2020-04-12 15:34:19 +02:00
SomberNight
c0c3627bd2
bitbox02: adapt to updated master 2020-04-12 15:34:19 +02:00
TheCharlatan
a4fe14bb82
BitBox02 Electrum plugin support
This commit adds support for the BitBox02 hardware wallet.
It supports both single and multisig for the electrum gui wallet.

To use the plugin a local installation of the BitBox02 python library is
required. It can be found on PiPy under the name 'bitbox02' and can be
installed from the bitbox02-firmware repository in the py/bitbox02
directory.

All communication to and from the BitBox02 is noise encrypted, the keys
required for this are stored in the wallet config file under the
bitbox02 key.

The BitBox02 registers a multisig configuration before allowing
transaction signing. This multisig configuration includes the threshold,
cosigner xpubs, keypath, a variable to indicate for mainnet and testnet,
and a name that the user can choose during configuration registration.
The user is asked to register the multisig configuration either during
address verification or during transaction signing.

The check the xpub of the BitBox02 for other hardware wallets, a button
is added in the wallet info dialog.

The wallet encryption key is fetched in a separate api call, requiring a
slightly tweaked override version of the wallet encryption password.
2020-04-12 15:34:37 +02:00