| Crates.io | rustywallet-mempool |
| lib.rs | rustywallet-mempool |
| version | 0.2.0 |
| created_at | 2026-01-02 09:33:52.719354+00 |
| updated_at | 2026-01-02 23:43:09.74258+00 |
| description | Mempool.space API client for fee estimation, address info, and transaction tracking |
| homepage | |
| repository | https://github.com/nirvagold/rustywallet |
| max_upload_size | |
| id | 2018238 |
| size | 102,584 |
Mempool.space API client for fee estimation, address info, and transaction tracking.
use rustywallet_mempool::MempoolClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = MempoolClient::new();
// Get fee estimates
let fees = client.get_fees().await?;
println!("Next block: {} sat/vB", fees.fastest_fee);
println!("1 hour: {} sat/vB", fees.hour_fee);
// Get address balance
let info = client.get_address("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa").await?;
println!("Balance: {} sats", info.confirmed_balance());
// Get UTXOs
let utxos = client.get_utxos("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa").await?;
println!("UTXOs: {}", utxos.len());
Ok(())
}
use rustywallet_mempool::MempoolClient;
// Mainnet (default)
let mainnet = MempoolClient::new();
// Testnet
let testnet = MempoolClient::testnet();
// Signet
let signet = MempoolClient::signet();
// Custom endpoint
let custom = MempoolClient::with_base_url("https://my-mempool.example.com/api");
get_fees() - Get recommended fee rates (fastest, half_hour, hour, economy, minimum)get_address(address) - Get address info (balance, tx count)get_utxos(address) - Get UTXOs for addressget_address_txs(address) - Get transaction historyget_tx(txid) - Get transaction detailsget_tx_hex(txid) - Get raw transaction hexbroadcast(hex) - Broadcast signed transactionget_block_height() - Get current block heightget_block_hash(height) - Get block hash by heightget_block(hash) - Get block detailsMIT