Skip to main content

Crate hashtree_config

Crate hashtree_config 

Source
Expand description

Shared configuration for hashtree tools

Reads from ~/.hashtree/config.toml

Structs§

BlossomConfig
File server (blossom) configuration
Config
Top-level config structure
KeyEntry
A stored key entry from the keys file
NostrConfig
Nostr relay configuration
S3Config
S3-compatible storage configuration
ServerConfig
Server configuration
StorageConfig
Storage configuration
SyncConfig
Background sync configuration

Enums§

StorageBackend
Storage backend type

Constants§

DEFAULT_READ_SERVERS
Default read-only file servers
DEFAULT_RELAYS
Default nostr relays
DEFAULT_WRITE_SERVERS
Default write-enabled file servers

Functions§

detect_local_daemon_url
Detect a local hashtree daemon on localhost and return its Blossom base URL.
detect_local_relay_urls
Detect local Nostr relay URLs (e.g., hashtree daemon or local relay on common ports).
get_aliases_path
Get the public alias file path (~/.hashtree/aliases)
get_auth_cookie_path
Get the auth cookie path (~/.hashtree/auth.cookie)
get_config_path
Get the config file path (~/.hashtree/config.toml)
get_data_dir
Get the data directory from config (defaults to ~/.hashtree/data) Can be overridden with HTREE_DATA_DIR environment variable
get_hashtree_dir
Get the hashtree directory (~/.hashtree)
get_keys_path
Get the keys file path (~/.hashtree/keys)
parse_keys_file
Parse the keys file content into key entries Format: <identity> [alias] per line Lines starting with # are comments
read_first_key
Read and parse keys file, returning the first key’s secret Returns None if file doesn’t exist or is empty
resolve_relays
Resolve relays using environment overrides and optional local relay discovery.