Skip to main content

ethos_bitcoind/
config.rs

1//! Configuration interface for Bitcoin RPC clients
2
3use std::fmt;
4
5#[derive(Clone)]
6pub struct Config {
7    /// The RPC URL endpoint for the Bitcoin Core daemon
8    pub rpc_url: String,
9    /// Username for RPC authentication
10    pub rpc_user: String,
11    /// Password for RPC authentication
12    pub rpc_password: String,
13}
14
15impl fmt::Debug for Config {
16    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
17        f.debug_struct("Config")
18            .field("rpc_url", &self.rpc_url)
19            .field("rpc_user", &"[redacted]")
20            .field("rpc_password", &"[redacted]")
21            .finish()
22    }
23}