mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-08 15:28:44 +00:00
Sync from Nostr on profile selection
This commit is contained in:
@@ -366,7 +366,8 @@ python scripts/generate_test_profile.py --profile demo_profile --count 100
|
|||||||
The script now determines the fingerprint from the generated seed and stores the
|
The script now determines the fingerprint from the generated seed and stores the
|
||||||
vault under `~/.seedpass/<fingerprint>`. It also prints the fingerprint after
|
vault under `~/.seedpass/<fingerprint>`. It also prints the fingerprint after
|
||||||
creation and publishes the encrypted index to Nostr. Use that same seed phrase
|
creation and publishes the encrypted index to Nostr. Use that same seed phrase
|
||||||
to load SeedPass so it can automatically retrieve the data from Nostr.
|
to load SeedPass. The app checks Nostr on startup and pulls any newer snapshot
|
||||||
|
so your vault stays in sync across machines.
|
||||||
|
|
||||||
### Automatically Updating the Script Checksum
|
### Automatically Updating the Script Checksum
|
||||||
|
|
||||||
|
@@ -302,7 +302,7 @@ class PasswordManager:
|
|||||||
# Initialize BIP85 and other managers
|
# Initialize BIP85 and other managers
|
||||||
self.initialize_bip85()
|
self.initialize_bip85()
|
||||||
self.initialize_managers()
|
self.initialize_managers()
|
||||||
self.sync_index_from_nostr_if_missing()
|
self.sync_index_from_nostr()
|
||||||
print(
|
print(
|
||||||
colored(
|
colored(
|
||||||
f"Seed profile {fingerprint} selected and managers initialized.",
|
f"Seed profile {fingerprint} selected and managers initialized.",
|
||||||
@@ -432,7 +432,7 @@ class PasswordManager:
|
|||||||
# Initialize BIP85 and other managers
|
# Initialize BIP85 and other managers
|
||||||
self.initialize_bip85()
|
self.initialize_bip85()
|
||||||
self.initialize_managers()
|
self.initialize_managers()
|
||||||
self.sync_index_from_nostr_if_missing()
|
self.sync_index_from_nostr()
|
||||||
print(colored(f"Switched to seed profile {selected_fingerprint}.", "green"))
|
print(colored(f"Switched to seed profile {selected_fingerprint}.", "green"))
|
||||||
|
|
||||||
# Re-initialize NostrClient with the new fingerprint
|
# Re-initialize NostrClient with the new fingerprint
|
||||||
@@ -616,7 +616,7 @@ class PasswordManager:
|
|||||||
|
|
||||||
self.initialize_bip85()
|
self.initialize_bip85()
|
||||||
self.initialize_managers()
|
self.initialize_managers()
|
||||||
self.sync_index_from_nostr_if_missing()
|
self.sync_index_from_nostr()
|
||||||
return fingerprint # Return the generated or added fingerprint
|
return fingerprint # Return the generated or added fingerprint
|
||||||
else:
|
else:
|
||||||
logging.error("Invalid BIP-85 seed phrase. Exiting.")
|
logging.error("Invalid BIP-85 seed phrase. Exiting.")
|
||||||
@@ -757,7 +757,7 @@ class PasswordManager:
|
|||||||
|
|
||||||
self.initialize_bip85()
|
self.initialize_bip85()
|
||||||
self.initialize_managers()
|
self.initialize_managers()
|
||||||
self.sync_index_from_nostr_if_missing()
|
self.sync_index_from_nostr()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(f"Failed to encrypt and save parent seed: {e}", exc_info=True)
|
logging.error(f"Failed to encrypt and save parent seed: {e}", exc_info=True)
|
||||||
print(colored(f"Error: Failed to encrypt and save parent seed: {e}", "red"))
|
print(colored(f"Error: Failed to encrypt and save parent seed: {e}", "red"))
|
||||||
|
Reference in New Issue
Block a user