diff --git a/README.md b/README.md new file mode 100644 index 0000000..4354e86 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# pyhdwallet v1.0.2 + +A secure, offline command-line tool for generating and recovering BIP39 HD wallets with support for Ethereum, Solana, and Bitcoin. + +## Purpose + +pyhdwallet helps you create new wallets or recover from existing mnemonics/seeds, with built-in PGP encryption for secure storage. It's designed for privacy-conscious users who want offline, auditable wallet management. + +## Installation + +1. Ensure Python 3.11+ is installed. +2. Clone/download the repo. +3. Create a virtual environment: `python -m venv .venv && source .venv/bin/activate` +4. Install dependencies: `pip install -r requirements.txt` + +## Basic Usage + +Run the tool with a subcommand. For help, use `-h`. + +- Generate a wallet: `python ./src/pyhdwallet.py gen --chains ethereum --addresses 3` +- Recover from mnemonic: `python ./src/pyhdwallet.py recover --mnemonic "your words" --chains bitcoin` +- Fetch PGP key: `python ./src/pyhdwallet.py fetchkey "https://example.com/key.asc"` +- Run tests: `python ./src/pyhdwallet.py test` + +For detailed examples and security tips, see `playbook.md`. + +## Security + +- Operates offline by default. +- Use `--secure-mode` for high-security operations. +- Always verify PGP keys and run on trusted systems. diff --git a/playbook.md b/playbook.md index 4422029..e8d5158 100644 --- a/playbook.md +++ b/playbook.md @@ -2,6 +2,8 @@ A command-line tool for generating and recovering HD wallets (BIP39) with support for Ethereum, Solana, and Bitcoin. Features offline operation, PGP encryption, and multi-chain address derivation. +**Note**: This tool requires a subcommand (e.g., `gen`, `recover`). Running without one displays help. Use ` -h` for detailed options. + ## Table of Contents - [Features](#features) diff --git a/src/pyhdwallet.py b/src/pyhdwallet.py index 59df260..62baf9c 100644 --- a/src/pyhdwallet.py +++ b/src/pyhdwallet.py @@ -8,8 +8,8 @@ Commands: - recover (offline): derive addresses from mnemonic/seed; optionally encrypt payload to PGP pubkey - test (offline): minimal self-test -Usability fix: - - If you run without a subcommand (e.g. --mnemonic ...), it behaves like "recover". +Usability: + - Run with a subcommand (e.g., 'gen', 'recover'). Use -h for details. Security: - gen/recover/test block network I/O via NetworkGuard. @@ -667,11 +667,7 @@ def main(): cmd_test(args) return - # No subcommand: treat as recover if user provided recover inputs - if args.mnemonic or args.seed or args.interactive: - cmd_recover(args) - return - + # No subcommand: Always show help and exit parser.print_help() sys.exit(2)