feat(identity): persist a stable node identity across launches
iroh otherwise mints a fresh keypair every run, so a peer's EndpointId changed on each launch. The friends system (in progress) identifies people by that id — the public key already embedded in every share code — so it has to stay stable across launches and across roles. Add common::identity: load-or-create an ed25519 secret key stored as hex in a 0600 ~/.config/pixelpass/identity.key, separate from config.toml so a config reset or hand-edit can't clobber it. A malformed file is a hard error rather than a silent regenerate, since quietly minting a new identity would orphan every existing friend. endpoint::bind() now feeds this key to the builder, so host and viewer share one stable EndpointId. Verified end-to-end: two launches against the same config dir emit byte-identical tickets; a fresh dir differs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@ pub mod bandwidth;
|
||||
pub mod config;
|
||||
pub mod deps;
|
||||
pub mod endpoint;
|
||||
pub mod identity;
|
||||
pub mod display;
|
||||
pub mod output;
|
||||
pub mod process;
|
||||
|
||||
Reference in New Issue
Block a user