Sync test profile data to nostr

This commit is contained in:
thePR0M3TH3AN
2025-07-06 16:23:01 -04:00
parent 20b5020d6e
commit 1e8e418890
2 changed files with 16 additions and 0 deletions

View File

@@ -29,6 +29,8 @@ from password_manager.vault import Vault
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
import asyncio
DEFAULT_PASSWORD = "testpassword"
@@ -128,6 +130,18 @@ def main() -> None:
populate(entry_mgr, seed, args.count)
print(f"Added {args.count} entries.")
encrypted = entry_mgr.vault.get_encrypted_index()
if encrypted:
client = NostrClient(
entry_mgr.vault.encryption_manager,
dir_path.name,
parent_seed=seed,
)
asyncio.run(client.publish_snapshot(encrypted))
print("[+] Data synchronized to Nostr.")
else:
print("[-] No encrypted index found to sync.")
if __name__ == "__main__":
main()