Electrs Query
Request information from an Electrs Server
This library provides helpful functions to query common information about an Electrs server.
⚠️ This is experimental. Please use at your own risk.⚠️
Install
Add package to Cargo.toml file
-query = "0.1.2"
electrs
Usage:
use ;
// setup
let address = "127.0.0.1:50001";
let client = new;
// get realy fee
let relay_fee = get_relay_fee;
println!;
let p2pkh_address = "mv7RvNNQ7HpQf2diQai5hgpeuzkFoAQP9G".to_string;
// get balance for p2pkh address
let address_balance = get_balance_for_address;
println!;
// get utxo for p2pkh address
let address_utxos = get_utxos_for_address;
println!;
// get historical transactions for p2pkh address
let historical_transactions = get_historical_transactions_for_address;
println!;
let p2sh_address = "2MzBNKyJjx44BDJfwEevVzS3Q9Z5kSEYUZB".to_string;
// get balance for p2sh address
let address_balance = get_balance_for_address;
println!;
// get utxos for p2sh address
let address_utxos = get_utxos_for_address;
println!;
// get historical transactions for p2sh address
let historical_transactions = get_historical_transactions_for_address;
println!;
let p2wpkh_address = "tb1qphdqqxupe6dzkz3z58twy5l4s0v24mle5gkp99".to_string;
// get balance for p2wpkh address
let address_balance = get_balance_for_address;
println!;
// get utxos for p2wpkh address
let address_utxos = get_utxos_for_address;
println!;
// get historical transactions for p2wpkh address
let historical_transactions = get_historical_transactions_for_address;
println!;
API
Find a list of all the functions available in the documentation
Related
- electrs-request - Type-safe wrapper around electrs RPC commands
- bitcoin-node-query - Query Bitcoin Node for information
- bitcoind-request - Type-safe wrapper around bitcoind RPC commands
- bitcoin-terminal-dashboard - Bitcoin Dashboard in the terminal
License
MIT © Joe Gesualdo