Sander van Grieken
3c9c6a286c
imports, whitespace, type hints, copyright headers
2025-06-12 14:32:00 +02:00
SomberNight
3e4601c61d
base64.b64decode: always set validate=True
...
Notably verifymessage and decrypt(message) were silently ignoring trailing garbage
or inserted non-base64 characters present in signatures/ciphertext.
(both the CLI commands and in the GUI)
I think it is much cleaner and preferable to treat such signatures/ciphertext as invalid.
In fact I find it surprising that base64.b64decode(validate=False) is the default.
Perhaps we should create a helper function for it that set validate=True and use that.
2025-06-03 18:58:05 +00:00
Sander van Grieken
c89e8f6f03
qt,qml: move TaskThread to common_qt
2025-04-23 15:24:02 +02:00
ThomasV
1162f45bd5
plugins: minor tweaks
...
- add icon to PluginDialog
- add icon to psbt_nosr
- rename 'PSBT Nostr' as 'Nostr Multisig'
2025-04-15 12:23:03 +02:00
ThomasV
a92e65c561
plugins: add plugin icon to menu in init_menubar
2025-04-15 10:33:14 +02:00
ThomasV
dcf632ed1e
add icons for nwc and labels plugins
2025-04-15 10:23:05 +02:00
ThomasV
0831fc3b80
plugins: move wallet-related settings to the wallet menu
...
Plugins should use the init_menubar hook.
References are kept to the various menu objects.
2025-04-15 10:01:00 +02:00
ThomasV
8c028f7528
Add/remove plugins from GUI
...
- both internal and external plugins require GUI install
(except internal HW plugins, which are 'auto-loaded' and hidden)
- remove init_qt hook
- in Qt, reload wallet windows if plugin enabled/disabled
- add 'uninstall' button to PluginDialog
- add 'add plugins' button to wizard hw screen
- add icons to the plugin list
2025-04-15 08:35:10 +02:00
ThomasV
c93b13f6d9
Make it possible to create zip plugins from internal plugins
...
specifically:
- add 'name' field to manifest.json
- make 'version' optional in contrib/make_plugin
- fix import in jade plugin
2025-04-14 11:54:04 +02:00
ThomasV
eff8b65355
Plugins: pass wallet to settings_dialog
...
Also, remove settings_widget method.
The widget should always be a button.
nwc: is_initialized -> initialized
2025-04-12 11:09:15 +02:00
ThomasV
e67cb560f6
Commands: add option documentation in docstring.
...
This allows plugins to document the commands they add.
The docstring is parsed as a regular expression:
arg:<type>:<name>:<description>\n
Types are defined in commands.arg_types.
Note that this commit removes support for single letter
shortcuts in command options.
If a command is not properly documented, a warning is issued
with print(), because no logger is available at this point.
2025-03-19 13:03:38 +01:00
f321x
a9f8048251
use manifest.json instead of loading init file for plugin registration
2025-03-19 10:38:20 +01:00
f321x
e74029c880
move plugin commands to init file of plugin
2025-03-18 09:37:07 +01:00
ThomasV
9d1ffe0c37
support for arguments to plugin commands:
...
- add a simple parser that only figures out where the config is,
and does not complain if args are unknown
2025-03-16 15:01:22 +01:00
ThomasV
d2fa404e06
plugin commands: load the plugin in func_wrapper
2025-03-16 12:26:31 +01:00
ThomasV
a474b8674d
plugin commands:
...
- make plugin commands start with plugin name + underscore
- plugin_name must be passed to the plugin_command decorator
- fixes:
- remove plugin_commands (unneeded)
- func_wrapper must await func()
- setattr(Commands, name, func_wrapper)
- add push/pull commands to labels plugin
2025-03-16 11:53:34 +01:00
SomberNight
cfe8502f96
qt desktop gui: upgrade qt5->qt6
...
closes https://github.com/spesmilo/electrum/issues/8007
2024-09-18 15:48:38 +00:00
ThomasV
14ec36dba1
Merge pull request #8741 from accumulator/labels_update
...
add labels_received callback and update labels even when set for item
2024-01-11 16:05:04 +01:00
SomberNight
1d4a5052ef
labels plugin: add FIXMEs. don't roll your own crypto...
...
```
23.76 | I | plugins.labels.qt.Plugin | set test_segwit_2 nonce to 180
set_label. label='a1'. item='444dffaf758a1b17893cbc8dda4032f9b6e9f61115e7c1a6d486a0950de50c11'. bundle['encryptedLabel']='WzqTZD+cnoQEUrfYsBz0rg=='
28.10 | I | plugins.labels.qt.Plugin | set test_segwit_2 nonce to 181
set_label. label='a1'. item='4812e9844c958a913a71a5a728ea6d73e42d0618f96a4259bad1895b4f427f8e'. bundle['encryptedLabel']='WzqTZD+cnoQEUrfYsBz0rg=='
set_label. label='a1'. item='c5daddf7972e16e25c1362d492888a8bbf3d8dcfc789342d71dc83d9a8faaa6c'. bundle['encryptedLabel']='WzqTZD+cnoQEUrfYsBz0rg=='
36.51 | I | plugins.labels.qt.Plugin | set test_segwit_2 nonce to 182
set_label. label='a1'. item='be5973ddf9b6ae6949e544c3cf43a16e2a8719dcf14a1171ec94cfa25d4a3325'. bundle['encryptedLabel']='WzqTZD+cnoQEUrfYsBz0rg=='
45.68 | I | plugins.labels.qt.Plugin | set test_segwit_2 nonce to 183
set_label. label=''. item='444dffaf758a1b17893cbc8dda4032f9b6e9f61115e7c1a6d486a0950de50c11'. bundle['encryptedLabel']='yErvsmjQUEt4Ry8c55S3Mg=='
55.99 | I | plugins.labels.qt.Plugin | set test_segwit_2 nonce to 184
58.69 | I | plugins.labels.qt.Plugin | set test_segwit_2 nonce to 185
set_label. label=''. item='4812e9844c958a913a71a5a728ea6d73e42d0618f96a4259bad1895b4f427f8e'. bundle['encryptedLabel']='yErvsmjQUEt4Ry8c55S3Mg=='
set_label. label=''. item='c5daddf7972e16e25c1362d492888a8bbf3d8dcfc789342d71dc83d9a8faaa6c'. bundle['encryptedLabel']='yErvsmjQUEt4Ry8c55S3Mg=='
60.98 | I | plugins.labels.qt.Plugin | set test_segwit_2 nonce to 186
set_label. label=''. item='be5973ddf9b6ae6949e544c3cf43a16e2a8719dcf14a1171ec94cfa25d4a3325'. bundle['encryptedLabel']='yErvsmjQUEt4Ry8c55S3Mg=='
62.80 | I | plugins.labels.qt.Plugin | set test_segwit_2 nonce to 187
```
2023-12-19 01:24:17 +00:00
Sander van Grieken
3a22cb9c48
labels: emit callback when labels received.
...
write labels regardless if there's already a label set for an ID.
2023-12-12 16:24:13 +01:00
Sander van Grieken
6270eae5c9
qml: port PyQt5 to PyQt6
2023-11-07 10:16:18 +01:00
Sander van Grieken
1c7da01dae
rename qt_common to common_qt
2023-09-20 14:34:31 +02:00
Sander van Grieken
571d16314f
qt: introduce electrum/gui/qt_common, implement remaining trustedcoin views,
...
unify most qml and qt wizard code for trustedcoin,
separate non-GUI trustedcoin wizard definition to trustedcoin.py
2023-09-20 14:34:31 +02:00
SomberNight
b45c84f24f
remove the kivy gui
...
We now use the qml gui on Android, and haven't been maintaining
the kivy GUI for a while.
2023-08-30 16:47:37 +00:00
SomberNight
a187210f90
labels plugin: don't log received data
...
this log line is 120 KB for one of my wallets (not even cherry-picking a large one)
2023-08-10 14:31:15 +00:00
Sander van Grieken
b6863b4854
qml: add LabelSync toggle
2023-07-11 12:51:37 +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
Sander van Grieken
6bbd18dc78
qml: fix flake errors
2022-09-09 19:58:48 +02:00
Sander van Grieken
27999a9583
qml: clean up, generalize plugin gui base, enumerate plugins in gui
...
(still quite crude impl, dynamic enable/disable plugin gui is misaligned
with backend)
2022-09-08 15:15:46 +02:00
Sander van Grieken
32a81d8ee7
qml: initial plugin support, with labelsync mostly implemented
2022-09-08 12:19:38 +02:00
SomberNight
7b095158bf
wallet: add get_label_for_address, and make get_label private
...
fixes https://github.com/spesmilo/electrum/issues/7919
In the past, when creating payment requests, we keyed them by on-chain address,
and set/saved the msg of the request as label for the address.
Many places in the code were calling wallet.get_label(addr) with the expectation that
relevant payment requests are found and their message/description (if any) is considered.
wallet.get_label(key) is now made private, and instead the explicit non-polymorphic
wallet.get_label_for_{address,rhash,txid} alternatives should be used.
2022-08-09 17:21:14 +02:00
ThomasV
ad9030bd15
labels plugin: handle setting a label to None
2022-07-29 09:38:15 +02:00
SomberNight
c616c3bfad
plugins/labels: better error message when using imported wallets
...
see #6703
2020-11-05 01:59:19 +01:00
SomberNight
4b6c86ecbe
wallet: make labels private, and access to need lock
...
e.g. labels plugin iterated over wallet.labels on asyncio thread while user could trigger an edit from Qt thread
2020-10-13 18:57:55 +02:00
SomberNight
24221f8fca
plugins: fix labels plugin FIXME re "just enabled plugin"
2020-05-25 17:31:13 +02:00
ThomasV
e1ce3aace7
Separate db from storage
...
- storage is content-agnostic
- db and storage are passed to wallet contructor
2020-02-10 17:45:23 +01:00
ThomasV
dbceed2647
Restructure wallet storage:
...
- Perform json deserializations in wallet_db
- use StoredDict class that keeps tracks of its modifications
2020-02-04 13:35:58 +01: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
3385a94753
logging: basics
2019-05-02 15:19:03 +02:00
SomberNight
8c3ab63504
labels: don't dump trace if failed to connect to server
2019-03-22 17:24:52 +01:00
SomberNight
1f7b56b455
labels plugin: no need for 'proxy_set' callback
2019-03-09 17:13:06 +01:00
SomberNight
026448837f
no more "import *"
...
fixes #5101
fixes #5105
2019-02-11 20:21:24 +01:00
SomberNight
0294844c11
labels plugin qt: only update corresponding window; disconnect signal
2018-12-08 06:56:18 +01:00
Janus
ec5f406f49
plugins: labels: dump response if malformed sync server response
2018-11-30 19:16:07 +01:00
SomberNight
e3b372946a
rm aiosafe decorator. instead: log_exceptions and ignore_exceptions
2018-10-12 18:36:48 +02:00
SomberNight
c4f3fbaca0
labels: fix potential threading issues
...
also handle --offline
2018-09-25 21:23:44 +02:00
Janus
617103bb2a
labels: fix saving single label
2018-09-06 18:30:24 +02:00
ThomasV
8fe066707a
rm import
2018-09-06 17:47:10 +02:00
Janus
6e80ba7b4f
asyncio: labels, crash_reporter, fx: migrate requests use to aiohttp
2018-09-06 16:18:45 +02:00
Janus
097ac144d9
file reorganization with top-level module
2018-07-13 14:01:37 +02:00