Expand description
Configuration management.
Handles loading, merging, and validation of configuration from multiple sources (CLI args, environment variables, config files).
§Configuration Management
This module handles loading, merging, and validating configuration from multiple sources with the following priority (highest to lowest):
- CLI arguments
- Environment variables (
SCOPE_*prefix) - User config file (
~/.config/scope/config.yaml) - Built-in defaults
§Configuration File Format
chains:
# EVM-compatible chains
ethereum_rpc: "https://mainnet.infura.io/v3/YOUR_KEY"
bsc_rpc: "https://bsc-dataseed.binance.org"
# Non-EVM chains
solana_rpc: "https://api.mainnet-beta.solana.com"
tron_api: "https://api.trongrid.io"
api_keys:
etherscan: "YOUR_API_KEY"
bscscan: "YOUR_API_KEY"
solscan: "YOUR_API_KEY"
tronscan: "YOUR_API_KEY"
output:
format: table # table, json, csv, markdown
color: true
address_book:
data_dir: "~/.local/share/scope"
ghola:
enabled: false # route HTTP through Ghola sidecar
stealth: false # apply temporal drift + ghost signing
buffer_size: 4096 # read buffer for large response headers§Error Handling
Configuration errors are wrapped in ScopeError::Config and include
context about which source caused the failure.
Structs§
- Address
Book Config - Address book configuration.
- Alert
Config - Alert configuration for price and whale detection.
- Chains
Config - Blockchain client configuration.
- Config
- Application configuration.
- Export
Config - CSV export configuration.
- Ghola
Config - Ghola sidecar configuration.
- Monitor
Config - Monitor-specific configuration.
- Output
Config - Output formatting configuration.
- WebConfig
- Web server configuration.
- Widget
Visibility - Controls which widgets are visible in the monitor.
Enums§
- Color
Scheme - Color scheme for the monitor TUI.
- Layout
Preset - Layout preset for the monitor TUI.
- Output
Format - Available output formats for analysis results.
- Scale
Mode - Y-axis scaling mode for price charts.
Constants§
- DEFAULT_
MONITOR_ REFRESH_ SECS - Default refresh interval in seconds.