Expand description
Deciding how to unlock an identity, and then unlocking it.
Everything comes from the environment; the CLI never prompts for secrets.
Resolution (see resolve_unlock_method):
- Neither
HASHIVERSE_KEYPHRASEnorHASHIVERSE_PROFILEset → read-only guest (the empty keyphrase,GUEST_CLIENT_ID). Reading posts and trending hashtags needs no identity;crate::commands::postrefuses for guests. - Both set → error: they name potentially different identities.
- Exactly one set →
HASHIVERSE_PASSWORDmust also be set (an empty value is allowed, but the variable must exist), otherwise it is an error.HASHIVERSE_KEYPHRASE→ derive the key from the keyphrase and save it to the data dir encrypted with the password, so later runs can useHASHIVERSE_PROFILE.HASHIVERSE_PROFILE/--profile→ load that stored key, decrypting with the password.
Enums§
Functions§
- is_
guest - resolve_
unlock_ method - unlock
- Builds a
Hashiverseclient for the resolved identity.