SomberNight
0c33994d70
plugins: hardware: HardwareHandlerBase.show_error() takes str, not exc
...
This is just a minor conceptual clean-up,
runtime behaviour is not being changed, as ultimately, much later in the exec flow,
the msg object being passed around is cast to str already.
(e.g. see str(text) at https://github.com/spesmilo/electrum/blob/4f7b6e897710338e8a4cfb8fa97c305218bdff88/electrum/gui/qt/util.py#L375-L379 )
2026-02-12 17:04:20 +00:00
SomberNight
2172dadf62
hw plugins: coldcard: fix compat with ckcc-protocol v1.5.0
...
fixes https://github.com/spesmilo/electrum/issues/10386
2026-01-05 16:28:23 +00:00
SomberNight
f1f4fc0939
hw plugins: coldcard: log error when I forget to set udev rules
...
so that next time I check that before changing cables, usb hubs, and VMs o.O
2026-01-05 16:06:24 +00:00
ThomasV
6e087950cf
move hw_wallet.py from plugins to electrum library
2025-04-10 10:19:15 +02:00
scgbckbone
4f5a732fef
fix Coldcard msg signing for segwit v0 address types
2025-02-06 16:41:17 +01:00
SomberNight
2f1095510c
bitcoin.py/transaction.py: API changes: rm most hex usage
...
Instead of some functions operating with hex strings,
and others using bytes, this consolidates most things to use bytes.
This mainly focuses on bitcoin.py and transaction.py,
and then adapts the API usages in other files.
Notably,
- scripts,
- pubkeys,
- signatures
should be bytes in almost all places now.
2024-04-29 17:10:26 +00:00
fuyangpengqi
91de8e70e5
chore: fix some typos in comments ( #9014 )
...
Signed-off-by: fuyangpengqi <995764973@qq.com >
2024-04-18 13:59:39 +00:00
CoolCu
3f95ceab60
chore: fix some typos in comments
...
Signed-off-by: CoolCu <coolcui@qq.com >
2024-04-16 15:54:25 +08:00
SomberNight
bd9d0ccc33
ecc: refactor/clean-up sign/verify APIs
2024-04-11 15:25:45 +00:00
Sander van Grieken
6222b5ad40
followup 94a6f6cd0e
2023-09-25 16:10:19 +02:00
Sander van Grieken
94a6f6cd0e
coldcard: don't raise when get_soft_device_id can't get xpub.
...
This allows uninitialized coldcards to show up in the device list.
2023-09-25 16:07:18 +02:00
Sander van Grieken
22d3a5edbb
wizard: fix trezor initialisation/recover not setting page valid to True
...
add auto-proceed to next page after init to trezor, safe_t, keepkey
2023-09-20 14:34:31 +02:00
SomberNight
1a91da67ea
coldcard: factor out manipulate_keystore_dict_during_wizard_setup
2023-09-20 14:34:31 +02:00
Sander van Grieken
087718f3a7
hww: mark device_model_name(self) as @abstractmethod and override in hww clients that did not define it.
2023-09-20 14:34:31 +02:00
Sander van Grieken
0aebc1a31e
qt+plugins: cleanup. remove all old wizard code
2023-09-20 14:34:31 +02:00
Sander van Grieken
656442ce64
wizard: add missing imports
2023-09-20 14:34:31 +02:00
Sander van Grieken
31ffeaf95f
wizard: add coldcard
2023-09-20 14:34:31 +02:00
SomberNight
312f2641e7
don't use bare except
...
use "except Exception", or if really needed explicitly "except BaseException"
2023-04-24 12:58:01 +00:00
SomberNight
373db76ac9
util: kill bh2u
...
no longer useful, and the name is so confusing...
2023-02-17 11:43:11 +00:00
SomberNight
01b5e3f8e0
flake8: enable more mandatory tests
2022-10-31 16:13:22 +00:00
SomberNight
b5d3f1458a
hww: impl get_client in Hardware_KeyStore instead of subclasses
2022-06-03 17:14:44 +02:00
Jeremy Rand
1aa444e0f8
Fix "== None" linter fails
...
Credit to Zoltan Konder for pointing me to this issue.
2022-05-24 02:39:11 +00:00
SomberNight
7f876e46fb
hw plugins: (follow-up) rm some more dead code
...
follow-up https://github.com/spesmilo/electrum/commit/30623c352907d80dab421cbfb3dabf9c3847ac57
2022-05-11 19:41:25 +02:00
SomberNight
6c50d3b0a3
hw plugins: (cleanup) rm no-op clear_client argument from keystore.give_error
...
The keystore does not have a "client" field.
One is supposed to use the "get_client" method instead (the generic API is `plugin.get_client(keystore)`)
Remnants of old code.
2022-05-11 19:30:14 +02:00
SomberNight
9599254d43
hw: rm dead code from Hardware_KeyStore subclasses
...
- force_watching_only is long since unused
- comment was just duplicated from the base class
2022-05-09 20:09:10 +02:00
SomberNight
376fc01b27
keystore.sign_message: add optional script_type argument
...
this is used by trezor
(and also by bitbox02, which was using a workaround previously)
fixes https://github.com/spesmilo/electrum/issues/7670
2022-02-22 19:20:03 +01:00
SomberNight
4f9e4c520f
ecc: API changes: verify_message_hash to return bool instead of raising
...
verify_message_hash and verify_message_for_address now return bool
instead of raising Exceptions on bad signatures.
2022-02-16 19:24:38 +01:00
Benoit Verret
f731c38293
Minor style changes
2021-03-21 00:36:23 -04:00
SomberNight
2eb02931ae
hw plugins: log exception at import time (but only if interesting)
...
related: https://github.com/spesmilo/electrum/issues/6928
2021-01-11 00:05:23 +01:00
Peter D. Gray
e829f2a0bc
plugins/coldcard/coldcard.py: include derivation path for each part of multisig (for v3.2.1 of firmware)
2021-01-08 13:16:54 -05:00
SomberNight
f3c1313a4f
coldcard: avoid creating keystore with testnet/mainnet mixed up
...
fixes #6722
2020-11-18 00:47:20 +01:00
ghost43
21c3572600
hardware devices: run all device communication on dedicated thread ( #6561 )
...
hidapi/libusb etc are not thread-safe.
related: #6554
2020-09-08 15:52:53 +00:00
aaronisme
3ed5f32c6c
fix the coldcard multi-sig show address issue
2020-08-18 15:42:39 +08:00
SomberNight
41aa50a3f3
coldcard: log exception traceback in create_client
...
related: https://github.com/Coldcard/ckcc-protocol/pull/9
2020-05-13 18:11:53 +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
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
4b1d835304
wizard hww: scan devices fewer times and move away from GUI thread
2020-04-09 19:45:31 +02:00
SomberNight
4ef313a1ac
hww: smarter auto-selection of which device to pair with
...
scenario1:
- 2of2 multisig wallet with trezor1 and trezor2 keystores
- only trezor2 connected
- previously we would pair first keystore with connected device and then display error.
now we will pair the device with the correct keystore on the first try
scenario2:
- standard wallet with trezor1 keystore
- trezor2 connected (different device)
- previously we would pair trezor2 with the keystore and then display error.
now we will prompt the user to select which device to pair with (out of one)
related: #5789
2020-04-08 17:53:33 +02:00
SomberNight
81fc3fcce2
hww: rm some code duplication: add "scan_and_create_client_for_device"
2020-04-01 21:09:14 +02:00
SomberNight
7f1c7955dc
DeviceMgr: clean-up locks a bit
2020-04-01 21:09:00 +02:00
SomberNight
fcd9752f19
keystore: change derive_pubkey API to return bytes
2019-12-10 20:41:47 +01:00
SomberNight
0ab88b821c
keystore: use abstract base classes, introduce MPKMixin
2019-12-10 00:31:01 +01:00
SomberNight
f8c84fbb1e
hardware wallets: create base class for HW Clients. add some type hints
2019-11-11 17:04:12 +01:00
SomberNight
d872be7f6b
psbt: don't put xpubs and full paths into tx by def; only while signing
2019-11-04 22:25:02 +01:00
SomberNight
e6c841d05f
psbt: put fake xpubs into globals. keystores handle xfp/der_prefix missing
2019-11-04 22:24:59 +01:00
SomberNight
bafe8a2fff
integrate PSBT support natively. WIP
2019-11-04 22:24:36 +01:00
SomberNight
1236b07abf
coldcard: show multisig address: more intuitive error msg
...
cause of error is probably almost always what msg says
2019-09-18 18:29:32 +02:00
SomberNight
4e6cc93746
coldcard: do link_wallet in load_wallet hook instead
...
make_unsigned_transaction might not run in some code paths
(e.g. when user uses "Load transaction" UI function)
2019-09-18 18:29:31 +02:00
SomberNight
47c3ac6f1b
coldcard: follow-up prev
2019-09-18 18:29:31 +02:00