| Crates.io | brk_rpc |
| lib.rs | brk_rpc |
| version | 0.1.0-beta.0 |
| created_at | 2025-12-18 22:16:47.090757+00 |
| updated_at | 2026-01-25 13:21:34.416644+00 |
| description | A thin wrapper around bitcoincore-rpc |
| homepage | https://bitcoinresearchkit.org |
| repository | https://github.com/bitcoinresearchkit/brk |
| max_upload_size | |
| id | 1993655 |
| size | 46,644 |
Thread-safe Bitcoin Core RPC client with automatic retries.
Query a Bitcoin Core node for blocks, transactions, mempool data, and chain state. Handles connection failures gracefully with configurable retry logic.
get_closest_valid_height finds main chain after reorgwait_for_synced_node blocks until node catches uplet client = Client::new("http://localhost:8332", Auth::CookieFile(cookie_path))?;
let height = client.get_last_height()?;
let hash = client.get_block_hash(height)?;
let block = client.get_block(&hash)?;
// Mempool
let txids = client.get_raw_mempool()?;
let entries = client.get_raw_mempool_verbose()?;
get_block, get_block_hash, get_block_header_infoget_transaction, get_mempool_transaction, get_tx_outget_raw_mempool, get_raw_mempool_verboseget_blockchain_info, get_last_heightis_in_main_chain, get_closest_valid_heightbrk_error for error handlingbrk_logger for debug loggingbrk_types for Height, BlockHash, Txid, MempoolEntryInfo