pub struct MempoolSignetRpc { /* private fields */ }Expand description
Real Bitcoin Signet RPC client backed by mempool.space REST API
Implementations§
Source§impl MempoolSignetRpc
impl MempoolSignetRpc
Sourcepub fn with_url(base_url: String) -> Self
pub fn with_url(base_url: String) -> Self
Create with a custom base URL (for self-hosted mempool instances)
Sourcepub fn get_block_info(
&self,
block_hash: &str,
) -> Result<BlockInfo, Box<dyn Error + Send + Sync>>
pub fn get_block_info( &self, block_hash: &str, ) -> Result<BlockInfo, Box<dyn Error + Send + Sync>>
Get block info (height, tx count, etc.)
Sourcepub fn get_tx_status(
&self,
txid: &str,
) -> Result<TxStatus, Box<dyn Error + Send + Sync>>
pub fn get_tx_status( &self, txid: &str, ) -> Result<TxStatus, Box<dyn Error + Send + Sync>>
Get transaction status (confirmed/unconfirmed, block height, hash)
Sourcepub fn get_tx(
&self,
txid: &str,
) -> Result<TxDetail, Box<dyn Error + Send + Sync>>
pub fn get_tx( &self, txid: &str, ) -> Result<TxDetail, Box<dyn Error + Send + Sync>>
Get full transaction details (inputs, outputs, fee, etc.)
Sourcepub fn get_tx_hex(
&self,
txid: &str,
) -> Result<String, Box<dyn Error + Send + Sync>>
pub fn get_tx_hex( &self, txid: &str, ) -> Result<String, Box<dyn Error + Send + Sync>>
Get raw transaction hex
Sourcepub fn get_block_txids(
&self,
block_hash: &str,
) -> Result<Vec<String>, Box<dyn Error + Send + Sync>>
pub fn get_block_txids( &self, block_hash: &str, ) -> Result<Vec<String>, Box<dyn Error + Send + Sync>>
Get block txids for Merkle proof extraction
Trait Implementations§
Source§impl BitcoinRpc for MempoolSignetRpc
impl BitcoinRpc for MempoolSignetRpc
fn get_block_count(&self) -> Result<u64, Box<dyn Error + Send + Sync>>
fn get_block_hash( &self, height: u64, ) -> Result<[u8; 32], Box<dyn Error + Send + Sync>>
fn is_utxo_unspent( &self, txid: [u8; 32], vout: u32, ) -> Result<bool, Box<dyn Error + Send + Sync>>
fn send_raw_transaction( &self, tx_bytes: Vec<u8>, ) -> Result<[u8; 32], Box<dyn Error + Send + Sync>>
fn get_tx_confirmations( &self, txid: [u8; 32], ) -> Result<u64, Box<dyn Error + Send + Sync>>
Auto Trait Implementations§
impl Freeze for MempoolSignetRpc
impl !RefUnwindSafe for MempoolSignetRpc
impl Send for MempoolSignetRpc
impl Sync for MempoolSignetRpc
impl Unpin for MempoolSignetRpc
impl UnsafeUnpin for MempoolSignetRpc
impl !UnwindSafe for MempoolSignetRpc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more