☠️⚠️ Work In Progress ⚠️☠️
Bitcoind Request
Send RPC commands to a bitcoind server.
This library provides typesafe functions over raw RPC bitcoind commands to easily and safely retrieve information from a bitcoin node.
As this library only provides typesafety over raw RPC commands, functions will be mapped 1:1 to RPC commands. See bitcoin core docs for a list of all commands and what they return.
If you're looking for additional information about the Bitcoin Network (i.e. time since last block, etc) , take a look at bitcoin-node-query, which provides additional functions to query bitcoin network data.
Install
Add package to Cargo.toml file
bitcoind-request = "0.1.9"
Usage:
use ;
// Create a Client.
let bitcoind_password: &str = ...
let bitcoind_username: &str = ...
let bitcoind_url = "127.0.0.1:8332"
let client = new.expect;
// Get the estimated size of the block and undo files on disk.
// Note: this calls "getblockchaininfo" bitcoin core rpc command under the hood.
let blockchain_info = new.call;
println!;
// Compute statistics about the total number and rate of transactions in the chain.
// Note: this calls "getchaintxstats" bitcoin core rpc command under the hood.
let chain_tx_stats = new
.set_n_blocks
.call;
println!;
Commands
List of all bitcoind commands can be found at bitcoin.org
They can also be found in the bitcoin-cli docs:
Related
- bitcoin-node-query - Query Bitcoin Node for information
- bitcoin-terminal-dashboard - Bitcoin Dashboard in the terminal
License
MIT © Joe Gesualdo