38 Commits

Author SHA1 Message Date
227e9cc356 fix(frontend): harden dev startup against ELECTRON_RUN_AS_NODE and sync lockfile name
Unset ELECTRON_RUN_AS_NODE in frontend dev script so Electron runs correctly even when the env var is globally exported.

Align package-lock metadata name from bitcoin-address-generator to wallet-gen.
2026-03-10 13:39:43 +01:00
9115faa6c8 fix(packaging): harden PyInstaller CLI bundling on Linux and Windows
- Add explicit hidden imports/collect rules for coincurve, bip_utils and src modules
- Introduce Docker smoke tests for hd_generate and p2pkh to fail fast on missing runtime deps
- Refactor cli.py to lazy-load command modules and avoid global startup crashes from optional deps
- Use pseudo-TTY script wrapper for Wine smoke tests to prevent Invalid handle failures
2026-03-10 12:26:19 +01:00
2833c96d51 fix(windows): stabilize Wine build and ship installer + portable exe
- Run Wine as non-root with dedicated WINEPREFIX and tolerate winetricks vcrun2019 failures
- Switch to Python embeddable + offline wheelhouse install for reproducible Windows packaging
- Update PyInstaller flags to bundle coincurve cffi backend and bip_utils data files (HD wallet runtime fix)
- Build both NSIS installer and portable executable; update build output messaging
2026-03-10 11:25:35 +01:00
079ec730db fix(docker): add wine32 to enable 32-bit Wine support for winetricks
winetricks vcrun2019 invokes syswow64/regedit.exe (32-bit PE) which
requires wine32; without it Wine returns c0000135 (STATUS_DLL_NOT_FOUND).
i386 architecture is already added so wine32 installs cleanly
2026-03-10 10:06:15 +01:00
8f399f2194 fix(docker): install winetricks from script, not apt (not in bookworm)
winetricks was removed from Debian bookworm apt repositories;
download it directly from the official GitHub source instead.
Replace winetricks apt package with cabextract (its runtime dep)
2026-03-10 09:48:07 +01:00
f7c108c77f fix(docker): install vcrun2019 via winetricks to fix python.exe c0000135
Python 3.11 requires VCRUNTIME140.dll (VC++ 2019 runtime) which is
not present in the default Wine prefix; without it python.exe fails
with STATUS_DLL_NOT_FOUND (exit code 53).
2026-03-10 09:46:06 +01:00
23e7d70720 fix(docker): add xauth to Windows build image to fix xvfb-run
xvfb-run requires xauth to create the virtual display cookie;
without it the Wine/Python installer step fails with exit code 3
2026-03-10 09:42:42 +01:00
c98d4db711 test: expand test suite to 194 tests across all modules
Add tests/test_crypto.py (22 tests) and tests/test_single_wallet.py
(46 tests) for previously uncovered modules; extend existing test files
with WIF format checks, error/validation cases, BIP39 passphrase,
account index, words_num, and redeem script structure tests
2026-03-10 09:40:01 +01:00
301b7ef0ae feat: add Docker build for Windows NSIS installer via Wine
- contrib/windows/Dockerfile: cross-compile using Wine + xvfb;
  installs Python 3.11 for Windows, builds cli.exe with PyInstaller,
  packages Electron app as NSIS installer
- contrib/windows/build.sh: convenience script to run the Docker build
- frontend/electron/main.cjs: resolve cli.exe on win32, cli on other platforms
- frontend/package.json: add win/nsis target; change extraResources to
  bundle resources/ dir so each platform picks its own binary
2026-03-10 09:24:35 +01:00
2c89a4cfd3 feat(ui): simplify receiving addresses table to show path and address only 2026-03-10 09:16:38 +01:00
d9422f3a08 feat(hd-wallet): add BIP-39 mnemonic length selector (12/15/18/21/24)
- src/hd_wallet.py: add words_num parameter to generate_hd_wallet(),
  mapped to Bip39WordsNum; default 12 words
- frontend/src/components/HDWallet.jsx: add mnemonic length select
  with options 12/15/18/21/24 (default 12); disabled when mnemonic
  is provided manually
2026-03-10 09:12:18 +01:00
0a81f0db23 feat(linux): bundle Python CLI and fix Electron packaged build
- contrib/linux/Dockerfile: add libpython3.11 + PyInstaller to build
  standalone cli binary; fix venv isolation via .dockerignore
- frontend/electron/main.cjs: use bundled cli binary in prod via
  process.resourcesPath, fallback to venv/python3 in dev
- frontend/package.json: add extraResources for cli binary,
  set output dir to release/
- frontend/vite.config.js: set base './' for file:// protocol in prod
- .dockerignore: exclude venv/, node_modules/, dist/, .git/
- .gitignore: ignore release/ output directories
2026-03-10 09:00:27 +01:00
9475e444ba chore: remove setDesktopName call
No longer needed without an installed .desktop file
2026-03-10 00:30:14 +01:00
995c665aa0 feat: add app icon and electron-builder config for Linux
- Set icon.png on BrowserWindow for taskbar display
- Register app with setDesktopName() for Wayland compositor matching
- Remove macOS-only activate handler (unused on Linux)
- Add electron-builder build config with AppImage target for Linux
- Add dist script: vite build && electron-builder
2026-03-10 00:25:14 +01:00
d3659114d0 chore: remove orphaned and unused files
- Delete src/api.py (FastAPI backend replaced by Electron IPC)
- Delete frontend/src/components/DecryptWallet.jsx (replaced by WalletViewer)
- Delete frontend/public/vite.svg and src/assets/react.svg (Vite/React scaffolding defaults)
- Simplify root package.json (remove unused concurrently devDependency)
2026-03-09 23:23:51 +01:00
0962c9545f feat(ui): responsive mobile overhaul, single-column save forms, and wallet viewer polish 2026-03-09 23:18:24 +01:00
55284f95b7 feat(wallet): add wallet viewer, secure file reads, and enforce save validation
- Introduce Wallet Viewer with HD/Single list, read, and decrypt support
- Add single_decrypt backend command and IPC bridge methods
- Require filename on save and add password confirm + visibility toggle"
2026-03-09 16:16:27 +01:00
aad81e1cf3 feat(storage): save HD to ~/.wallet-generator/hdwallet and single to ~/.wallet-generator/single 2026-03-09 15:34:56 +01:00
c7ad9d114d refactor(frontend): simplify wallet type labels in HD and single addresses 2026-03-09 15:03:44 +01:00
73ce43637d feat(single-address): require filename and add optional encrypted JSON export
- Add single-encrypt IPC/CLI flow for private key field encryption
- Keep filename empty after generation and validate it on save
- Reorder single-address tabs to p2pk, p2pkh, p2sh, p2wpkh, p2tr
2026-03-09 14:57:15 +01:00
506741c559 refactor(frontend): simplify wallet navigation and remove emoji labels
- Keep only HD Wallet and Single Addresses in sidebar
- Route single addresses through internal tabs
- Replace emoji/button glyphs with plain text labels
2026-03-09 14:43:36 +01:00
ca133132f6 feat: rename app to Wallet Generator and add wallet save to disk
- Rename app to 'Wallet Generator' (index.html, window title, sidebar, package.json)
- Add ~/.wallet-generator/wallet/ as save directory for all generated wallets
- Add save-wallet and get-wallet-dir IPC handlers in Electron main process
- Expose saveWallet/getWalletDir via preload contextBridge
- HDWallet: save JSON to disk with optional encryption, show saved path
- SingleAddress: add Save card with editable filename for all address types
2026-03-09 14:31:40 +01:00
aeda67f72a chore: update deps and scripts for Electron-only architecture
- Add electron, concurrently, wait-on, cross-env to frontend devDependencies
- Set "main": "electron/main.cjs" in frontend/package.json
- Simplify root package.json dev script
- Remove fastapi and uvicorn from requirements.txt
2026-03-09 14:24:16 +01:00
9ce830eb6d refactor: replace fetch() calls with window.electronAPI in React components
- HDWallet, SingleAddress, DecryptWallet now call window.electronAPI.*
- Remove Vite proxy (no more HTTP backend)
2026-03-09 14:24:04 +01:00
944b30126d feat: replace HTTP API with Electron IPC + Python CLI dispatcher
- Add src/cli.py: dispatches commands to Python functions, returns JSON
- Add frontend/electron/main.cjs: ipcMain handlers call Python via execFile
- Add frontend/electron/preload.cjs: exposes window.electronAPI to renderer
- No uvicorn/FastAPI server needed — Python called directly per request
2026-03-09 14:23:35 +01:00
cbbc34071c chore: add root npm workspace and update gitignore
- Root package.json with npm run dev (concurrently API + Vite)
- Add node_modules/, frontend/dist/ to .gitignore
- Whitelist package.json and package-lock.json
2026-03-09 14:09:12 +01:00
eaf3eb6801 feat: add React web frontend with dark Electrum-like UI
- Vite + React app with dark Bitcoin-orange theme
- HD Wallet: generate, display seed/xpub/addresses, save with encryption
- Single addresses: P2PKH, P2WPKH, P2TR, P2PK, P2SH (multisig)
- Decrypt: load encrypted JSON wallet and reveal private data
- Bitcoin SVG icon in public/icons/
- Vite proxy /api → localhost:8000
2026-03-09 14:09:07 +01:00
f9c35678a5 feat: add FastAPI REST backend
Expose all address generation functions as HTTP endpoints:
- POST /api/hd/generate, /api/hd/encrypt, /api/hd/decrypt
- POST /api/p2pk, /api/p2pkh, /api/p2sh, /api/p2wpkh, /api/p2tr
- Add fastapi and uvicorn to requirements.txt
2026-03-09 14:08:59 +01:00
54d282a36b feat: add Electrum-compatible wallet encryption
- Add src/crypto.py with AES-256-CBC pw_encode/pw_decode
  using double SHA256 key derivation (Electrum standard)
- Add encrypt_wallet() and decrypt_wallet() to src/hd_wallet.py
- Prompt for encryption password when saving HD wallet to file
- Add 13 encryption/decryption tests to tests/test_hd_wallet.py
- Add pycryptodome to requirements.txt
2026-03-09 13:35:33 +01:00
44e60383cf Update README.md 2026-03-09 12:17:07 +01:00
040a72c378 chore: translate all source files to English
- Translate docstrings, comments, print statements, input prompts
  and error messages across all src/ scripts and __main__.py
- Update LICENSE copyright holder to Davide Grilli (2026)
- p2pk: input prompt changed from s/n to y/n for compressed key selection
2026-03-09 12:14:11 +01:00
2727844ec8 feat: add HD wallet generator with BIP-44/49/84/86 support
- Add src/hd_wallet.py with deterministic key derivation (BIP-32/39)
- Support P2PKH (BIP-44), P2SH-P2WPKH (BIP-49), P2WPKH (BIP-84), P2TR (BIP-86)
- JSON output aligned to Electrum wallet format (keystore, xpub/xprv, derivation path, root fingerprint)
- Add tests/test_hd_wallet.py with 34 tests (structure, prefixes, determinism, SecretScan)
- Add bip-utils to requirements.txt
- Add option 6 to __main__.py menu
2026-03-09 12:04:43 +01:00
409669e000 test: add tests/ folder with SecretScan verification links
- Add pytest test suite for all 5 address types (P2PK, P2PKH, P2SH, P2WPKH, P2TR)
- Test output fields, address prefixes per network, key lengths and uniqueness
- Each test file prints the SecretScan URL for manual address verification
- Add pytest to requirements.txt
2026-03-09 11:11:41 +01:00
290c371169 refactor: reorganize project into src/ structure
- Move all scripts (p2pk, p2pkh, p2sh, p2wpkh, p2tr) into src/
- Rename main.py to __main__.py to allow running with `python .`
- Update script paths in __main__.py
- Translate README to English and update launch instructions
- Add __pycache__, *.pyc, *.json to .gitignore
2026-03-09 11:07:03 +01:00
f9cc995f93 Create LICENSE 2025-11-10 16:51:28 +01:00
63048d5b18 Aggiunge le istruzioni al file README.md
Aggiungi comandi PowerShell per gli utenti Windows per creare un ambiente virtuale e attivarlo, rendendo le istruzioni di installazione più complete per diversi sistemi operativi
2025-11-10 16:22:10 +01:00
1b3291c821 Aggiunge ambienti virtuali Python a gitignore 2025-11-10 16:18:24 +01:00
61788ce312 feat: prima implementazione del generatore di indirizzi Bitcoin 2025-11-10 16:12:36 +01:00