1
0

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
This commit is contained in:
ThomasV
2025-04-14 11:41:57 +02:00
parent eff8b65355
commit c93b13f6d9
19 changed files with 33 additions and 19 deletions

View File

@@ -18,7 +18,7 @@ if source_dir.endswith('/'):
source_dir = source_dir[:-1]
plugin_name = os.path.basename(source_dir)
dest_dir = os.path.dirname(source_dir)
dest_dir = os.getcwd()
zip_path = os.path.join(dest_dir, plugin_name + '.zip')
# remove old zipfile
@@ -42,14 +42,11 @@ try:
except FileNotFoundError:
raise Exception(f"plugin doesn't contain manifest.json")
if not version:
raise Exception('version not set')
versioned_plugin_name = plugin_name + '-' + version + '.zip'
zip_path_with_version = os.path.join(dest_dir, versioned_plugin_name)
# rename zip file
os.rename(zip_path, zip_path_with_version)
print(f'Created {zip_path_with_version}')
if version:
versioned_plugin_name = plugin_name + '-' + version + '.zip'
zip_path_with_version = os.path.join(dest_dir, versioned_plugin_name)
# rename zip file
os.rename(zip_path, zip_path_with_version)
print(f'Created {zip_path_with_version}')
else:
print(f'Created {zip_path}')

View File

@@ -1,6 +1,7 @@
{
"name": "audio_modem",
"fullname": "Audio MODEM",
"description": "Provides support for air-gapped transaction signing.",
"requires": [["amodem", "http://github.com/romanz/amodem/"]],
"available_for": ["qt"]
}
}

View File

@@ -1,7 +1,8 @@
{
"name": "bitbox02",
"fullname": "BitBox02",
"description": "Provides support for the BitBox02 hardware wallet",
"requires": [["bitbox02", "https://github.com/digitalbitbox/bitbox02-firmware/tree/master/py/bitbox02"]],
"registers_keystore": ["hardware", "bitbox02", "BitBox02"],
"available_for": ["qt"]
}
}

View File

@@ -1,7 +1,8 @@
{
"name": "coldcard",
"fullname": "Coldcard Wallet",
"description": "Provides support for the Coldcard hardware wallet from Coinkite",
"requires": [["ckcc-protocol", "github.com/Coldcard/ckcc-protocol"]],
"registers_keystore": ["hardware", "coldcard", "Coldcard Wallet"],
"available_for": ["qt", "cmdline"]
}
}

View File

@@ -1,4 +1,5 @@
{
"name": "digitalbitbox",
"fullname": "Digital Bitbox",
"description": "Provides support for Digital Bitbox hardware wallet",
"registers_keystore": ["hardware", "digitalbitbox", "Digital Bitbox wallet"],

View File

@@ -33,6 +33,7 @@ _logger = get_logger(__name__)
try:
# Do imports
from .jadepy import jade
from .jadepy.jade import JadeAPI
from .jadepy.jade_serial import JadeSerialImpl
from serial.tools import list_ports

View File

@@ -1,4 +1,5 @@
{
"name": "jade",
"fullname": "Blockstream Jade Wallet",
"description": "Provides support for the Blockstream Jade hardware wallet",
"registers_keystore": ["hardware", "jade", "Jade wallet"],

View File

@@ -1,4 +1,5 @@
{
"name": "keepkey",
"fullname": "KeepKey",
"description": "Provides support for KeepKey hardware wallet",
"requires": [["keepkeylib", "github.com/keepkey/python-keepkey"]],

View File

@@ -1,5 +1,6 @@
{
"name": "labels",
"fullname": "LabelSync",
"description": "Save your wallet labels on a remote server, and synchronize them across multiple devices where you use Electrum. Labels, transactions IDs and addresses are encrypted before they are sent to the remote server.",
"available_for": ["qt", "qml", "cmdline"]
}
}

View File

@@ -1,4 +1,5 @@
{
"name": "ledger",
"fullname": "Ledger Wallet",
"description": "Provides support for Ledger hardware wallet",
"requires": [["ledger_bitcoin", "github.com/LedgerHQ/app-bitcoin-new"]],

View File

@@ -1,6 +1,6 @@
{
"fullname": "Nostr Wallet Connect",
"name": "nwc",
"fullname": "Nostr Wallet Connect",
"description": "This plugin allows remote control of Electrum lightning wallets via Nostr NIP-47.",
"author": "The Electrum Developers",
"available_for": ["cmdline", "qt"],

View File

@@ -1,4 +1,5 @@
{
"name": "payserver",
"fullname": "PayServer",
"description": "run a HTTP server for receiving payments",
"available_for": ["cmdline"]

View File

@@ -1,4 +1,5 @@
{
"name": "psbt_nostr",
"fullname": "PSBT over Nostr",
"description": "This plugin facilitates the use of multi-signatures wallets. It sends and receives partially signed transactions from/to your cosigner wallet. PSBTs are sent and retrieved from Nostr relays.",
"author": "The Electrum Developers",

View File

@@ -1,5 +1,6 @@
{
"name": "revealer",
"fullname": "Revealer Backup Utility",
"description": "<br/><b>Do you have something to hide ?</b><br/><br/>This plug-in allows you to create a visually encrypted backup of your wallet seeds, or of custom alphanumeric secrets.<br/>",
"description": "This plug-in allows you to create a visually encrypted backup of your wallet seeds, or of custom alphanumeric secrets.",
"available_for": ["qt"]
}

View File

@@ -1,7 +1,8 @@
{
"name": "safe_t",
"fullname": "Safe-T mini Wallet",
"description": "Provides support for Safe-T mini hardware wallet",
"requires": [["safetlib", "github.com/archos-safe-t/python-safet"]],
"registers_keystore": ["hardware", "safe_t", "Safe-T mini wallet"],
"available_for": ["qt", "cmdline"]
}
}

View File

@@ -1,4 +1,5 @@
{
"name": "swapserver",
"fullname": "SwapServer",
"description": "Submarine swap server for an Electrum daemon.\n\nExample setup:\n\n electrum -o setconfig enable_plugin_swapserver True\n electrum -o setconfig swapserver_port 5455\n electrum daemon -v\n\n",
"available_for": ["cmdline"]

View File

@@ -1,4 +1,5 @@
{
"name": "trezor",
"fullname": "Trezor Wallet",
"description": "Provides support for Trezor hardware wallet",
"requires": [["trezorlib","pypi.org/project/trezor/"]],

View File

@@ -1,4 +1,5 @@
{
"name": "trustedcoin",
"fullname": "Two Factor Authentication",
"description": "This plugin adds two-factor authentication to your wallet.<br/>For more information, visit <a href=\"https://api.trustedcoin.com/#/electrum-help\">https://api.trustedcoin.com/#/electrum-help</a>",
"requires_wallet_type": ["2fa"],

View File

@@ -1,4 +1,5 @@
{
"name": "watchtower",
"fullname": "Watchtower",
"description": "A watchtower is a daemon that watches your channels and prevents the other party from stealing funds by broadcasting an old state.\n\nExample:\n\ndaemon setup:\n\n electrum -o setconfig enable_plugin_watchtower True\n electrum -o setconfig watchtower_user wtuser\n electrum -o setconfig watchtower_password wtpassword\n electrum -o setconfig watchtower_port 12345\n electrum daemon -v\n\nclient setup:\n\n electrum -o setconfig watchtower_url http://wtuser:wtpassword@127.0.0.1:12345\n\n",
"available_for": ["cmdline"]