Unlock seed once at startup, pass identity to all commands
- main.rs unlocks seed once, prompts passphrase once per app launch - Identity passed as parameter to send, recv, register, chat - No more redundant load_seed() calls (was prompting passphrase multiple times) - info command uses pre-unlocked identity directly Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,16 +1 @@
|
||||
use crate::keystore;
|
||||
|
||||
pub fn run() -> anyhow::Result<()> {
|
||||
let seed = keystore::load_seed()?;
|
||||
let identity = seed.derive_identity();
|
||||
let pub_id = identity.public_identity();
|
||||
|
||||
println!("Fingerprint: {}", pub_id.fingerprint);
|
||||
println!("Signing key: {}", hex::encode(pub_id.signing.as_bytes()));
|
||||
println!(
|
||||
"Encryption key: {}",
|
||||
hex::encode(pub_id.encryption.as_bytes())
|
||||
);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
// Info is now handled directly in main.rs with the pre-unlocked identity.
|
||||
|
||||
Reference in New Issue
Block a user