mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-08 07:18:47 +00:00
Add fingerprint management commands and API
This commit is contained in:
@@ -94,6 +94,9 @@ Manage seed profiles (fingerprints).
|
||||
| Action | Command | Examples |
|
||||
| :--- | :--- | :--- |
|
||||
| List all profiles | `fingerprint list` | `seedpass fingerprint list` |
|
||||
| Add a profile | `fingerprint add` | `seedpass fingerprint add` |
|
||||
| Remove a profile | `fingerprint remove` | `seedpass fingerprint remove <fp>` |
|
||||
| Switch profile | `fingerprint switch` | `seedpass fingerprint switch <fp>` |
|
||||
|
||||
### Utility Commands
|
||||
|
||||
@@ -158,6 +161,9 @@ Code: 123456
|
||||
### `fingerprint` Commands
|
||||
|
||||
- **`seedpass fingerprint list`** – List available profiles by fingerprint.
|
||||
- **`seedpass fingerprint add`** – Create a new seed profile.
|
||||
- **`seedpass fingerprint remove <fp>`** – Delete the specified profile.
|
||||
- **`seedpass fingerprint switch <fp>`** – Switch the active profile.
|
||||
|
||||
### `util` Commands
|
||||
|
||||
|
@@ -24,6 +24,9 @@ Keep this token secret. Every request must include it in the `Authorization` hea
|
||||
- `POST /api/v1/entry/{id}/unarchive` – Unarchive an entry.
|
||||
- `GET /api/v1/config/{key}` – Return the value for a configuration key.
|
||||
- `GET /api/v1/fingerprint` – List available seed fingerprints.
|
||||
- `POST /api/v1/fingerprint` – Add a new seed fingerprint.
|
||||
- `DELETE /api/v1/fingerprint/{fp}` – Remove a fingerprint.
|
||||
- `POST /api/v1/fingerprint/select` – Switch the active fingerprint.
|
||||
- `GET /api/v1/nostr/pubkey` – Fetch the Nostr public key for the active seed.
|
||||
- `POST /api/v1/shutdown` – Stop the server gracefully.
|
||||
|
||||
@@ -81,6 +84,17 @@ curl -X PUT http://127.0.0.1:8000/api/v1/config/inactivity_timeout \
|
||||
-d '{"value": 300}'
|
||||
```
|
||||
|
||||
### Switching Fingerprints
|
||||
|
||||
Change the active seed profile via `POST /api/v1/fingerprint/select`:
|
||||
|
||||
```bash
|
||||
curl -X POST http://127.0.0.1:8000/api/v1/fingerprint/select \
|
||||
-H "Authorization: Bearer <token>" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"fingerprint": "abc123"}'
|
||||
```
|
||||
|
||||
### Enabling CORS
|
||||
|
||||
Cross‑origin requests are disabled by default. Set `SEEDPASS_CORS_ORIGINS` to a comma‑separated list of allowed origins before starting the API:
|
||||
|
Reference in New Issue
Block a user