Closed edilmedeiros closed 5 months ago
There is a nice example in rust-bitcoincore-rpc/client/examples/test_against_node.rs
We can start with creating an rpc client that will be further used to call all API functions like so:
// Creates an rpc client used as a base to communicate with the API methods
fn rpc(url: &str, user: &str, passwd: &str) -> Result<(), Error> {
let url = url.to_string()
let auth = Auth::UserPass(user.to_string(), passwd.to_string());
Client::new(url, auth)
}
Done with 946a4ec, but waiting for more input from nasser.
Build a minimal example of an RPC call in Rust to understand how to use the bitcoincore-rpc crate.