Trait MempoolApiServer

Source
pub trait MempoolApiServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn get_raw_mempool(
        &self,
        verbose: Option<bool>,
        mempool_sequence: Option<bool>,
    ) -> Result<Value, Error>;
    fn get_mempool_info(&self) -> Result<GetMempoolInfo, Error>;
    fn get_mempool_entry(&self, txid: Txid) -> Result<GetMempoolEntry, Error>;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description

Server trait implementation for the MempoolApi RPC API.

Required Methods§

Source

fn get_raw_mempool( &self, verbose: Option<bool>, mempool_sequence: Option<bool>, ) -> Result<Value, Error>

Returns all transaction ids in memory pool.

If verbose is false (default), returns array of transaction ids. If verbose is true, returns a JSON object with txid -> mempool entry.

Source

fn get_mempool_info(&self) -> Result<GetMempoolInfo, Error>

Returns details on the active state of the TX memory pool.

Source

fn get_mempool_entry(&self, txid: Txid) -> Result<GetMempoolEntry, Error>

Returns mempool data for given transaction.

Provided Methods§

Source

fn into_rpc(self) -> RpcModule<Self>

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§