Skip to main content

MempoolSignetRpc

Struct MempoolSignetRpc 

Source
pub struct MempoolSignetRpc { /* private fields */ }
Expand description

Real Bitcoin Signet RPC client backed by mempool.space REST API

Implementations§

Source§

impl MempoolSignetRpc

Source

pub fn new() -> Self

Create a new RPC client for Signet (default: mempool.space)

Source

pub fn with_url(base_url: String) -> Self

Create with a custom base URL (for self-hosted mempool instances)

Source

pub fn get_block_info( &self, block_hash: &str, ) -> Result<BlockInfo, Box<dyn Error + Send + Sync>>

Get block info (height, tx count, etc.)

Source

pub fn get_tx_status( &self, txid: &str, ) -> Result<TxStatus, Box<dyn Error + Send + Sync>>

Get transaction status (confirmed/unconfirmed, block height, hash)

Source

pub fn get_tx( &self, txid: &str, ) -> Result<TxDetail, Box<dyn Error + Send + Sync>>

Get full transaction details (inputs, outputs, fee, etc.)

Source

pub fn get_tx_hex( &self, txid: &str, ) -> Result<String, Box<dyn Error + Send + Sync>>

Get raw transaction hex

Source

pub fn get_block_txids( &self, block_hash: &str, ) -> Result<Vec<String>, Box<dyn Error + Send + Sync>>

Get block txids for Merkle proof extraction

Source

pub fn wait_for_confirmation( &self, txid: [u8; 32], required_confirmations: u64, timeout_secs: u64, ) -> Result<u64, Box<dyn Error + Send + Sync>>

Wait for transaction to reach required confirmations

Source

pub fn extract_merkle_proof( &self, txid: [u8; 32], block_hash: [u8; 32], ) -> Result<BitcoinInclusionProof, Box<dyn Error + Send + Sync>>

Extract Merkle proof for a transaction from its containing block

Trait Implementations§

Source§

impl BitcoinRpc for MempoolSignetRpc

Source§

fn get_block_count(&self) -> Result<u64, Box<dyn Error + Send + Sync>>

Source§

fn get_block_hash( &self, height: u64, ) -> Result<[u8; 32], Box<dyn Error + Send + Sync>>

Source§

fn is_utxo_unspent( &self, txid: [u8; 32], vout: u32, ) -> Result<bool, Box<dyn Error + Send + Sync>>

Source§

fn send_raw_transaction( &self, tx_bytes: Vec<u8>, ) -> Result<[u8; 32], Box<dyn Error + Send + Sync>>

Source§

fn get_tx_confirmations( &self, txid: [u8; 32], ) -> Result<u64, Box<dyn Error + Send + Sync>>

Source§

impl Default for MempoolSignetRpc

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more