Commit Graph

21 Commits

Author SHA1 Message Date
ThomasV
79941529d2 simplify plugin logic: remove install/uninstall buttons
external plugins are enabled iff authorized
2025-05-18 12:24:38 +02:00
f321x
abc50a97e1 plugins: add functionality to allow setting plugin pubkey from gui
Adds functionality that allows the user to store the plugin authorization pubkey without having to edit files/registry manually.
On Linux systems it spawns the commands in a subprocess with pkexec which will trigger a OS prompt to execute the commands as root.
The user sees the executed commands and can either authorize with the root password or decline.
On windows it uses the windows `ShellExecuteExW` api to edit the registry, this also triggers a OS dialog to accept or decline (UAC dialog).
There is also functionality to reset the key again, which works in the same way.
2025-05-09 13:34:09 +02:00
ThomasV
9ce21173ec Merge pull request #9770 from f321x/plugin_update
plugins: handle updating plugins from plugin manager
2025-04-30 14:17:01 +02:00
f321x
3bfe1d2d28 handle loading plugins with same name as installed plugin (update) 2025-04-29 15:30:26 +02:00
f321x
84632f53d2 fix: bring dialog to front after reloading
When reloading the windows, e.g. after enabling or disabling a plugin,
the plugins dialog vanished behind the main window. By using a
Timer its possible to bring the Dialog back in front after the windows
have reloaded.
2025-04-29 13:09:19 +02:00
f321x
eed944368c fix: download_plugin_dialog has no access to run_coroutine_dialog
download_plugin_dialog tried to run the zip download with
self.window.run_coroutine_dialog, but self has no window,
instanciating a RunCoroutineDialog directly fixes this.
2025-04-29 13:09:19 +02:00
f321x
1cce216c1f fix: prevent PluginsDialog from getting in bad state
If the plugin file got already deleted while being in the installation
dialog, trying to delete it again will raise an exception.
This is fixed by catching the exception.

If the user tries to install an external plugin that is already
installed, and then closes the PluginDialog, the PluginsDialog will
get into a bad state, throwing an exeption when opening it. This
happens because the add_plugin_dialog deletes the zipfile if the
user closes or cancels the installation dialog.
This is fixed by checking if the plugin is already existing,
instead of trying to install an already existing plugin.
2025-04-29 13:09:19 +02:00
ThomasV
c0ddce4586 plugins: rename plugin nostr cosigner, minor tweaks 2025-04-16 10:08:55 +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
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
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
a500d5194d make plugins dialog available in tray
This makes it possible to install a third-party plugin from
the wizard, before creating a wallet, e.g. for a hardware wallet.
2025-04-11 10:27:34 +02:00
ThomasV
737417fb80 Userspace plugins:
- Allow plugins saved as zipfiles in user data dir
 - plugins are authorized with a user chosen password
 - pubkey derived from password is saved with admin permissions
2025-04-11 08:45:28 +02:00
Sander van Grieken
19cd408f98 organize import, whitespace 2025-01-23 12:58:28 +01:00
f321x
ea10c7cfc1 add filehash of external plugins to PluginDialog
remove hashlib import

add filehash of external plugins to PluginDialog

add emptyline

add filehash of external plugins to PluginDialog
2025-01-09 18:15:12 +01:00
ThomasV
333b3db8ea Unix: Import external plugins from /opt/electrum_plugins 2024-10-08 10:32:37 +02:00
ThomasV
7c6ff6757c plugins dialog: show description and enable buttons in the same dialog 2024-10-02 11:16:59 +02: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
c9820aeca0 Qt: add download_plugin_dialog 2024-04-13 11:35:49 +02:00
ThomasV
858d999d31 Allow external plugins
- borrows code brom ElectronCash
 - external plugins are imported as zip files
 - check hash from plugins.json file
2024-04-13 11:35:49 +02:00
ThomasV
ee10b0bf3e qt: move plugins dialog to own module 2023-12-11 10:19:36 +01:00