Commit graph

32 commits

Author SHA1 Message Date
SomberNight
bafe8a2fff
integrate PSBT support natively. WIP 2019-11-04 22:24:36 +01:00
SomberNight
ab76a1fe5b
wallet.add_hw_info: also store "is_change" in output_info
as it seems every consumer wants to know this and has its own hacks to
figure it out
2019-09-03 14:34:10 +02:00
SomberNight
f60f690ca9
change many str(e) to repr(e) as some exceptions were cryptic
it's often valuable to see the type of the exception
(especially as for some exceptions str(e) == '')
2019-07-17 20:12:52 +02:00
SomberNight
fb76fcc886
trezor: use only Bridge when available
fixes #5420
2019-07-02 21:21:39 +02:00
SomberNight
371e1a6ebf
hw: allow bypassing "too old firmware" error when using hw wallets
The framework here is generic enough that it can be used for any hw plugin,
however atm only Trezor is implemented.

closes #5391
2019-05-31 04:09:03 +02:00
SomberNight
3385a94753
logging: basics 2019-05-02 15:19:03 +02:00
ghost43
6617307730
Merge pull request #5118 from SomberNight/trezor_init_20190213
Trezor: implement "seedless" mode
2019-02-22 18:59:52 +01:00
SomberNight
85a7aa291e
bip32: refactor whole module. clean-up. 2019-02-22 18:50:24 +01:00
SomberNight
7bbec04a06
trezor: implement "seedless" mode (option during initialization) 2019-02-13 20:35:23 +01:00
SomberNight
0f0cee422e
trezor and clones: sign tx version too 2019-01-30 12:03:52 +01:00
SomberNight
8c3920a0db
hw: check_libraries_available now gets version of incompatible libs
previously we would return early and the user would
just see "missing libraries"
2018-12-06 19:39:58 +01:00
SomberNight
20fa7fc2f7
trezor: fix sign_transaction prev_tx 2018-12-06 19:37:12 +01:00
SomberNight
9e86bc586c
trezor: only confirm passphrase when creating wallet
but not when decrypting
2018-12-06 19:37:11 +01:00
matejcik
8e681c1723 trezor: update name (TREZOR -> Trezor) 2018-12-05 15:44:24 +01:00
matejcik
43acd09df8 trezor: support outdated firmware notifications
Outdated firmware error messages were originally raised from
create_client, which would mean that a client for an outdated device
would not be created.

This had a number of undesirable outcomes due to "client does not exist"
being conflated with "no device is connected".

Instead, we raise in setup_client (which prevents creating new wallets
with outdated devices, BUT shows them in device list), and python-trezor
also raises on most calls (which gives us an error message when opening
wallet and/or trying to do basically anything with it).

This is still suboptimal - i.e., there's currently no way for Electrum to
claim higher version requirement than the underlying python-trezor, and
so minimum_firmware property is pretty much useless ATM.
2018-12-05 14:26:19 +01:00
matejcik
8571cafcc8 trezor: call get_xpub with correct argument
`creating` indicates that this is a new wallet. Which is always the case
in `setup_device`
2018-12-05 14:24:32 +01:00
matejcik
c33c907330 trezor: update to trezor 0.11.0 2018-11-27 15:34:19 +01:00
SomberNight
32af83b7ae
wizard/hw: show transport type when listing HWDs 2018-11-16 19:03:25 +01:00
SomberNight
bd32b88f62
introduce UserFacingException
we should not raise generic Exception when wanting to communicate with
the user. it makes distinguishing programming errors and messages hard,
as the caller will necessarily need to catch all Exceptions then
2018-11-08 19:46:15 +01:00
SomberNight
dace2e5495
trezor: don't let bridge transport failing block all other transports
[trezor] connecting to device at bridge:hid...
[trezor] connected to device at bridge:hid...
Traceback (most recent call last):
  File "...\electrum\electrum\base_wizard.py", line 255, in choose_hw_device
    u = devmgr.unpaired_device_infos(None, plugin, devices=scanned_devices)
  File "...\electrum\electrum\plugin.py", line 501, in unpaired_device_infos
    client = self.create_client(device, handler, plugin)
  File "...\electrum\electrum\plugin.py", line 374, in create_client
    client = plugin.create_client(device, handler)
  File "...\electrum\electrum\plugins\trezor\trezor.py", line 124, in create_client
    client = self.client_class(transport, handler, self)
  File "...\electrum\electrum\plugins\trezor\client.py", line 7, in __init__
    ProtocolMixin.__init__(self, transport=transport)
  File "...\Python36-32\lib\site-packages\trezorlib\client.py", line 444, in __init__
    self.init_device()
  File "...\Python36-32\lib\site-packages\trezorlib\client.py", line 454, in init_device
    self.features = expect(proto.Features)(self.call)(init_msg)
  File "...\Python36-32\lib\site-packages\trezorlib\client.py", line 115, in wrapped_f
    ret = f(*args, **kwargs)
  File "...\Python36-32\lib\site-packages\trezorlib\client.py", line 129, in wrapped_f
    client.transport.session_begin()
  File "...\Python36-32\lib\site-packages\trezorlib\transport\__init__.py", line 42, in session_begin
    self.open()
  File "...\Python36-32\lib\site-packages\trezorlib\transport\bridge.py", line 69, in open
    raise TransportException('trezord: Could not acquire session' + get_error(r))
trezorlib.transport.TransportException: trezord: Could not acquire session (error=400 str=wrong previous session)
[DeviceMgr] error getting device infos for trezor: trezord: Could not acquire session (error=400 str=wrong previous session)
2018-11-08 17:07:05 +01:00
SomberNight
a88a2dea82
split bip32 from bitcoin.py 2018-10-25 22:20:33 +02:00
SomberNight
ab1ec57429
trezor and clones: rm dead code
see Electron-Cash/Electron-Cash#872
see Electron-Cash/Electron-Cash#874
2018-09-30 02:10:17 +02:00
SomberNight
8aebb8249a
keepkey: full segwit support
ported from trezor plugin
needs new fw to work (5.8??)

fixes #3462
2018-09-30 01:29:27 +02:00
SomberNight
91c369e392
hw wallets: generalise 'minimum_library' for those that provide a version number 2018-08-23 18:31:14 +02:00
SomberNight
88fc62e8f7
fix #4626 2018-08-14 19:38:19 +02:00
SomberNight
5f3408dd70
transaction.py: introduce TxOutputHwInfo namedtuple 2018-08-14 19:15:15 +02:00
SomberNight
2eb72d496f
transaction: introduce TxOutput namedtuple 2018-08-01 19:10:08 +02:00
SomberNight
c9c8b7656d
follow-up prev. sanity check OP_RETURN outputs
based on 86c63a3a08
2018-07-31 13:03:34 +02:00
SomberNight
e1b2195cf7
fix #4591: pay to OP_RETURN on trezor 2018-07-31 12:30:43 +02:00
SomberNight
8f17f38b02
trezor/kk: when using old fw, wizard did not display instructions properly 2018-07-18 20:17:03 +02:00
Yura Pakhuchiy
27b36486df Trezor: fix spending coinbase outputs (#4565)
Attempt to spend coinbase output results in error:
a bytes-like object is required, not 'str'
2018-07-18 17:39:32 +02:00
Janus
097ac144d9 file reorganization with top-level module 2018-07-13 14:01:37 +02:00
Renamed from plugins/trezor/trezor.py (Browse further)