mirror of
https://github.com/Routstr/routstr-core.git
synced 2026-08-09 19:04:47 +00:00
Encryption of the Nostr identity at rest is mandatory. When a legacy nsec is present (env or blob) but no ROUTSTR_SECRET_KEY is set, bootstrap previously fell into vault.encrypt and surfaced its generic "key not set" error. Raise an explicit, nsec-contextual error first so the boot failure is intentional and actionable — it names the missing key and prints the generation command — rather than relying on vault throwing incidentally. No secret is dropped: the node refuses to start until the operator sets the key. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>