Commit Graph

707 Commits

Author SHA1 Message Date
SomberNight
f091f23776 follow-up moving some funcs from ecc.py to bitcoin.py (no. 2)
follow-up 2f3d89f415
2024-09-06 17:05:23 +00:00
Jamie C. Driver
2cba0708d5 jade: use Jade's native PSBT signing and remove massaging into legacy format 2024-09-05 08:40:45 +01:00
Jamie C. Driver
11f5ba31ce jade: update Jade api to 1.0.31
This extends the serial api to recognise recently supported hardware.
2024-09-05 08:40:45 +01:00
SomberNight
a674a22155 follow-up moving some funcs from ecc.py to bitcoin.py
follow-up 2f3d89f415
2024-09-03 16:58:41 +00:00
SomberNight
5ad8c97c1d hww: ledger: update udev rules and model ids
see https://github.com/bitcoin-core/HWI/pull/746

maybe closes https://github.com/spesmilo/electrum/issues/9179
2024-09-02 13:50:35 +00:00
ghost43
d7014c361d Merge pull request #9141 from dlitz/fixes-for-trezorlib-0.13.9
trezor: Fix for trezor library version 0.13.9
2024-08-14 20:15:10 +00:00
shangchenglumetro
4064686359 chore: fix some comments 2024-07-26 01:41:36 +08:00
Darsey Litzenberger
8ae2a7868e trezor: Fix for trezor library version 0.13.9
This enables support for the Trezor Safe 5.
2024-07-18 23:22:07 -06:00
Sander van Grieken
295ea97f1f digitalbitbox: follow-up 2f3d89f415 2024-07-03 10:53:16 +02:00
SomberNight
3d6198eff0 trustedcoin: Wallet_2fa.make_unsigned_transaction to use **kwargs
We often forget updating the method signature of Wallet_2fa.make_unsigned_transaction
when changing Abstract_Wallet.make_unsigned_transaction.
2024-06-17 16:55:23 +00:00
SomberNight
2eb51bcbe6 trustedcoin: sanitize error messages coming from 2fa server
related https://github.com/spesmilo/electrum/issues/9096
2024-06-17 16:52:26 +00:00
SomberNight
09e0413d38 trustedcoin: rm dead code (unused server method transfer_credit) 2024-06-17 14:44:42 +00:00
SomberNight
20d22d26b3 trustedcoin: rm dead code 2024-06-10 20:27:15 +00:00
SomberNight
a2d5e31838 mnemonic: rename seed_type() fn
Some functions have an argument named "seed_type" in which it was annoying to call the seed_type() fn.
(especially for functions inside the same module)
2024-06-10 20:00:52 +00:00
ThomasV
912e1a3a5b reintroduce 'unlock' command
- the unlock command was replaced by an option to load_wallet,
because some applications (the swapserver plugin) need to be
executed with an unlocked password. Now the swapserver plugin
waits until the wallet is unlocked.
- wallet.unlock now checks password unconditionally, see #8799
2024-06-08 11:10:33 +02:00
SomberNight
13e2949088 rm some legacy cruft for old python versions 2024-06-05 14:55:48 +00:00
SomberNight
7827be17d1 qt wizard: fix offline 2fa wallet creation in some cases
fixes https://github.com/spesmilo/electrum/issues/9037
2024-05-28 15:31:37 +00:00
Sander van Grieken
cea9055a65 wizard: fix wrong icon and icon disappearing when resuming unfinished wallet 2024-05-16 00:08:07 +02:00
hugehope
c0a2ed5dd3 chore: fix some typos
Signed-off-by: hugehope <cmm7@sina.cn>
2024-05-15 20:41:01 +08:00
ThomasV
fd672fed9f submarine swaps: separate server logic from transport 2024-05-07 09:01:33 +02: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
goodmost
9a7345a0dd jade.py: fix some typos
Signed-off-by: goodmost <zhaohaiyang@outlook.com>
2024-04-28 18:12:32 +08: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
Jamie C. Driver
17508086aa jade: update Jade api to 1.0.29
Updates cbor dependency to cbor2, required for modern linux/python
versions.
2024-04-15 12:10:06 +01:00
ThomasV
8759928ec0 Merge pull request #9000 from SomberNight/202404_ecc_schnorr
ecc: add bindings for schnorr sign/verify, and refactor
2024-04-15 11:57:29 +02:00
ThomasV
ff07a77cfc move virtualkeyboard plugin to other repo
add plugin metadata to electrum/plugins.json
2024-04-13 11:35:49 +02:00
ThomasV
3e7d4749cf turn classmethod 'find_all_plugins' into an instance method.
change 'use_' prefix to 'enable_plugin_'
2024-04-13 11:35:49 +02:00
SomberNight
bd9d0ccc33 ecc: refactor/clean-up sign/verify APIs 2024-04-11 15:25:45 +00:00
accumulator
1c673884bf Merge pull request #8971 from nkuttler/8970_bitbox02_pairing
Call pairing dialog when necessary, fixes #8970
2024-04-08 16:12:30 +02:00
snoppy
81c943ae83 chore: fix typos 2024-03-29 10:16:47 +08:00
Nicolas Kuttler
519437f46f Call pairing dialog when necessary, fixes #8970 2024-03-21 21:32:42 +01:00
Soren Stoutner
fd421e234d Change copyright email address to soren@debian.org. 2024-03-16 13:13:58 -07:00
ThomasV
f6312366e6 swapserver: raise exception if client uses deprecated API 2024-03-01 17:25:37 +01:00
SomberNight
85ea2dfc48 trezor: add_slip_19_ownership_proofs_to_tx to not skip complete inputs
closes https://github.com/spesmilo/electrum/issues/8910
2024-02-23 12:50:25 +00:00
SomberNight
b4712397cc logging: (trivial) use repr() of seed_type
for more obvious empty string

related: https://github.com/spesmilo/electrum/issues/4326#issuecomment-1903747632
2024-02-22 11:45:18 +00:00
SomberNight
96f28607f2 keystore: "old"-type seeds cannot have a passphrase
related: https://github.com/spesmilo/electrum/pull/8906
2024-02-21 14:30:13 +00:00
Sander van Grieken
da1727b2f7 trustedcoin: validate numeric format of OTP user entry (fixes #8905) 2024-02-21 13:33:46 +01:00
ThomasV
e2db5ca2ef Merge pull request #8871 from SomberNight/202402_slip19_trezor
support SLIP-19 ownership proofs, for trezor-based Standard_Wallets
2024-02-21 13:06:28 +01:00
SomberNight
0925f15280 wallet/keystore: add apis for "add_slip_19_ownership_proofs_to_tx"
- implement it specifically for the "singlesig trezor" case
- aimed to be generic enough that support for more complex scripts
  and other keystores could be added later
2024-02-21 11:56:13 +00:00
Sander van Grieken
643fbecc15 wizard: fix co-signing hardware wallets data incorrectly referenced 2024-02-14 12:42:15 +01:00
SomberNight
6172898a03 trezor: minor things for better model "safe 3" support 2024-02-14 09:48:13 +00:00
SomberNight
fffbc178cd qt wizard: hww dialogs: log some exceptions more aggressively
sort of related: https://github.com/spesmilo/electrum/issues/8892
2024-02-14 09:05:21 +00:00
SomberNight
130baf13c8 trezor: show descriptive error if trying to init device without fw
closes https://github.com/spesmilo/electrum/issues/8892
2024-02-14 08:52:23 +00:00
SomberNight
7cf22d4b9f coldcard: wallet info dlg: fix missing "Export for Coldcard" btn
regression from 711a325085

```
 47.97 | E | plugin | Plugin error. plugin: coldcard, hook: wallet_info_buttons
Traceback (most recent call last):
  File "...\electrum\electrum\plugin.py", line 261, in run_hook
    r = f(*args)
  File "...\electrum\electrum\plugins\hw_wallet\plugin.py", line 344, in wrapper
    return func(self, *args, **kwargs)
  File "...\electrum\electrum\plugins\coldcard\qt.py", line 51, in wallet_info_buttons
    wallet = main_window.wallet
AttributeError: 'WalletInfoDialog' object has no attribute 'wallet'
```
2024-02-13 13:35:19 +00:00
Sander van Grieken
2882c4be46 qt: consistency HWW wizard page translations 2024-02-06 10:59:59 +01:00
Sander van Grieken
0a2a22b822 qt: use selected_key instead of selected_item[0] for ChoiceWidgets 2024-02-05 14:39:03 +01:00
SomberNight
87214c004e trezor: don't try to sign non-ismine inputs
progress towards coinjoin

related https://github.com/spesmilo/electrum/issues/8868
2024-02-05 07:21:28 +00:00
SomberNight
3e81cd1f1d trezor: fix regression in sign_transaction for trezor one for multisig
fixes https://github.com/spesmilo/electrum/issues/8813
regression from eef9680743

We started setting the witness field in above commit to be able to provide the witnesses for already pre-signed
external inputs to the device, e.g. for a coinjoin.

Trezor One fw has pretty strict limits on the witness field: max 109 bytes,
probably because that's a ~tight upper bound for a p2wpkh witness:
  <num_witness_items> <len(sig)> <sig> <len(pubkey)> <pubkey>, it comes out to 3+73(high-S and high-R)+33.
ed1785a985/legacy/firmware/protob/messages-bitcoin.options (L35)

Trezor model T seems to have higher limits.

tx_inputs is called for the tx being signed (for_sig=True), and for its parents/prev_txes (for_sig=False).
The witness is only useful for the tx being signed, I think.

Users reported seeing a "DataError: bytes overflow" exception when using a Trezor One to sign 2of3 p2wsh multisig txs.
There were no external inputs involved so for the tx being signed all witnesses were None, however we were also
setting the witness for the inputs of prev_txes.
The witness for a 2of3 pw2sh multisig input is around ~253 bytes.

To sidestep the problem, we now only set the witness in the for_sig=True case.
Note that this means if someone tries to do a coinjoin with a Trezor One involving non-trivial external inputs,
they will run into the same limit and exception.
2024-02-04 00:14:59 +00:00
Sander van Grieken
28042c61c1 qml: trustedcoin: remove redundant slot parameter in createKeystore 2024-01-22 13:32:59 +01:00