From 27cd82ba647af6190b8c5ecddc460f1f233c15b5 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Sun, 6 Jul 2025 16:34:00 -0400 Subject: [PATCH] Fix test profile sync fingerprint --- README.md | 6 ++++-- scripts/generate_test_profile.py | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 30cfe1e..6e0e9b6 100644 --- a/README.md +++ b/README.md @@ -364,8 +364,10 @@ python scripts/generate_test_profile.py --profile my_profile --count 100 ``` This command creates `~/.seedpass/my_profile` if needed and adds 100 example entries. -After populating the vault, the script now automatically publishes the encrypted -index to Nostr so the data can be retrieved on other devices. +After populating the vault, the script prints the derived **fingerprint** and +automatically publishes the encrypted index to Nostr under that fingerprint. +Use the same seed phrase when loading SeedPass so it can retrieve the data from +Nostr. ### Automatically Updating the Script Checksum diff --git a/scripts/generate_test_profile.py b/scripts/generate_test_profile.py index 3ab575f..1f5212b 100644 --- a/scripts/generate_test_profile.py +++ b/scripts/generate_test_profile.py @@ -30,6 +30,7 @@ from password_manager.config_manager import ConfigManager from password_manager.backup import BackupManager from password_manager.entry_management import EntryManager from nostr.client import NostrClient +from utils.fingerprint import generate_fingerprint import asyncio DEFAULT_PASSWORD = "testpassword" @@ -125,8 +126,11 @@ def main() -> None: args = parser.parse_args() seed, entry_mgr, dir_path = initialize_profile(args.profile) + fingerprint = generate_fingerprint(seed) print(f"Using profile directory: {dir_path}") print(f"Parent seed: {seed}") + if fingerprint: + print(f"Fingerprint: {fingerprint}") populate(entry_mgr, seed, args.count) print(f"Added {args.count} entries.") @@ -134,7 +138,7 @@ def main() -> None: if encrypted: client = NostrClient( entry_mgr.vault.encryption_manager, - dir_path.name, + fingerprint or dir_path.name, parent_seed=seed, ) asyncio.run(client.publish_snapshot(encrypted))