Module config

Module config 

Source

Structs§

BlossomConfig
Config
NostrConfig
S3Config
S3-compatible storage configuration (works with AWS S3, Cloudflare R2, MinIO, etc.)
ServerConfig
StorageConfig
SyncConfig

Functions§

ensure_auth_cookie
Generate and save auth cookie if it doesn’t exist
ensure_nsec
Ensure nsec exists, generating one if not present Returns (Keys, was_generated)
ensure_nsec_string
Get nsec string, ensuring it exists (generate if needed) Returns (nsec_string, was_generated)
generate_auth_cookie
Generate new random auth cookie
generate_nsec
Generate new nsec and save to file
get_auth_cookie_path
Get the auth cookie path (~/.hashtree/auth.cookie)
get_config_path
Get the config file path (~/.hashtree/config.toml)
get_hashtree_dir
Get the hashtree directory (~/.hashtree)
get_nsec_path
Get the nsec file path (~/.hashtree/nsec)
parse_npub
Parse npub to 32-byte pubkey
pubkey_bytes
Get 32-byte pubkey bytes from Keys (for nostrdb)
read_auth_cookie
Read existing auth cookie
read_nsec
Read existing nsec