use bitcoind_client::simple_http::{self, Auth};
const URL: &str = "http://127.0.0.1:38332";
const COOKIE_FILE: &str = ".bitcoin/signet/.cookie";
fn main() -> anyhow::Result<()> {
let cookie_file = std::env::var("RPC_COOKIE").unwrap_or(COOKIE_FILE.to_string());
let client = simple_http::Client::new(URL, Auth::CookieFile(cookie_file.into()))?;
println!("{:#?}", client.get_blockchain_info()?);
Ok(())
}