diff --git a/README.md b/README.md index 92cb53c..8ead95c 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,13 @@ SeedPass now uses the `portalocker` library for cross-platform file locking. No - **Auto‑Lock on Inactivity:** Vault locks after a configurable timeout for additional security. - **Secret Mode:** Copy retrieved passwords directly to your clipboard and automatically clear it after a delay. - **Tagging Support:** Organize entries with optional tags and find them quickly via search. +- **Manual Vault Export/Import:** Create encrypted backups or restore them using the CLI or API. +- **Parent Seed Backup:** Securely save an encrypted copy of the master seed. +- **Manual Vault Locking:** Instantly clear keys from memory when needed. +- **Vault Statistics:** View counts for entries and other profile metrics. +- **Change Master Password:** Rotate your encryption password at any time. +- **Checksum Verification Utilities:** Verify or regenerate the script checksum. +- **Relay Management:** List, add, remove or reset configured Nostr relays. ## Prerequisites diff --git a/docs/advanced_cli.md b/docs/advanced_cli.md index 0148aa5..cbc2511 100644 --- a/docs/advanced_cli.md +++ b/docs/advanced_cli.md @@ -74,6 +74,7 @@ Manage the entire vault for a profile. | Change the master password | `vault change-password` | `seedpass vault change-password` | | Lock the vault | `vault lock` | `seedpass vault lock` | | Show profile statistics | `vault stats` | `seedpass vault stats` | +| Reveal or back up the parent seed | `vault reveal-parent-seed` | `seedpass vault reveal-parent-seed --file backup.enc` | ### Nostr Commands @@ -161,6 +162,7 @@ Code: 123456 - **`seedpass vault change-password`** – Change the master password used for encryption. - **`seedpass vault lock`** – Clear sensitive data from memory and require reauthentication. - **`seedpass vault stats`** – Display statistics about the active seed profile. +- **`seedpass vault reveal-parent-seed`** – Print the parent seed or write an encrypted backup with `--file`. ### `nostr` Commands diff --git a/docs/api_reference.md b/docs/api_reference.md index 1be8d34..64e4c7a 100644 --- a/docs/api_reference.md +++ b/docs/api_reference.md @@ -121,7 +121,106 @@ Change the active seed profile via `POST /api/v1/fingerprint/select`: curl -X POST http://127.0.0.1:8000/api/v1/fingerprint/select \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ - -d '{"fingerprint": "abc123"}' + -d '{"fingerprint": "abc123"}' +``` + +### Exporting the Vault + +Download an encrypted vault backup via `POST /api/v1/vault/export`: + +```bash +curl -X POST http://127.0.0.1:8000/api/v1/vault/export \ + -H "Authorization: Bearer " \ + -o backup.json +``` + +### Importing a Vault + +Restore a backup with `POST /api/v1/vault/import`. Use `-F` to upload a file: + +```bash +curl -X POST http://127.0.0.1:8000/api/v1/vault/import \ + -H "Authorization: Bearer " \ + -F file=@backup.json +``` + +### Locking the Vault + +Clear sensitive data from memory using `/api/v1/vault/lock`: + +```bash +curl -X POST http://127.0.0.1:8000/api/v1/vault/lock \ + -H "Authorization: Bearer " +``` + +### Backing Up the Parent Seed + +Trigger an encrypted seed backup with `/api/v1/vault/backup-parent-seed`: + +```bash +curl -X POST http://127.0.0.1:8000/api/v1/vault/backup-parent-seed \ + -H "Authorization: Bearer " \ + -H "Content-Type: application/json" \ + -d '{"path": "seed_backup.enc"}' +``` + +### Retrieving Vault Statistics + +Get profile stats such as entry counts with `GET /api/v1/stats`: + +```bash +curl -H "Authorization: Bearer " \ + http://127.0.0.1:8000/api/v1/stats +``` + +### Changing the Master Password + +Update the vault password via `POST /api/v1/change-password`: + +```bash +curl -X POST http://127.0.0.1:8000/api/v1/change-password \ + -H "Authorization: Bearer " +``` + +### Verifying the Script Checksum + +Check that the running script matches the stored checksum: + +```bash +curl -X POST http://127.0.0.1:8000/api/v1/checksum/verify \ + -H "Authorization: Bearer " +``` + +### Updating the Script Checksum + +Regenerate the stored checksum using `/api/v1/checksum/update`: + +```bash +curl -X POST http://127.0.0.1:8000/api/v1/checksum/update \ + -H "Authorization: Bearer " +``` + +### Managing Relays + +List, add, or remove Nostr relays: + +```bash +# list +curl -H "Authorization: Bearer " http://127.0.0.1:8000/api/v1/relays + +# add +curl -X POST http://127.0.0.1:8000/api/v1/relays \ + -H "Authorization: Bearer " \ + -H "Content-Type: application/json" \ + -d '{"url": "wss://relay.example.com"}' + +# remove first relay +curl -X DELETE http://127.0.0.1:8000/api/v1/relays/1 \ + -H "Authorization: Bearer " + +# reset to defaults +curl -X POST http://127.0.0.1:8000/api/v1/relays/reset \ + -H "Authorization: Bearer " ``` ### Enabling CORS