Expand description
Configuration types for the TxGate signing service.
This module provides the configuration structures for defining the behavior
of the TxGate daemon, including server settings, key storage configuration,
and policy rules.
§Configuration File
Configuration is stored in TOML format at ~/.txgate/config.toml.
§Examples
use txgate_core::config::{Config, ServerConfig, KeysConfig};
// Create a default configuration
let config = Config::default();
assert_eq!(config.server.socket_path, "~/.txgate/txgate.sock");
assert_eq!(config.server.timeout_secs, 30);
// Generate default TOML
let toml_str = Config::default_toml();
println!("{}", toml_str);§Default TOML Output
[server]
socket_path = "~/.txgate/txgate.sock"
timeout_secs = 30
[keys]
directory = "~/.txgate/keys"
default_key = "default"
[policy]
whitelist_enabled = false
whitelist = []
blacklist = []
[policy.transaction_limits]
# ETH = "1000000000000000000" # 1 ETHStructs§
- Config
- Top-level configuration for the
TxGatesigning service. - Config
Builder - Builder for creating customized
Configinstances. - Keys
Config - Key storage configuration for the
TxGatesigning service. - Policy
Config - Policy configuration for transaction approval rules.
- Server
Config - Server configuration for the
TxGatedaemon.