Trait BitcoinRpcExt

Source
pub trait BitcoinRpcExt: RpcApi {
    // Provided methods
    fn custom_get_raw_transaction_info(
        &self,
        txid: &Txid,
        block_hash: Option<&BlockHash>,
    ) -> RpcResult<Option<GetRawTransactionResult>> { ... }
    fn broadcast_tx(&self, tx: &Transaction) -> Result<(), Error> { ... }
    fn tip(&self) -> Result<BlockRef, Error> { ... }
    fn deep_tip(&self) -> Result<BlockRef, Error> { ... }
    fn get_block_by_height(
        &self,
        height: BlockHeight,
    ) -> Result<BlockRef, Error> { ... }
    fn tx_status(&self, txid: &Txid) -> Result<TxStatus, Error> { ... }
    fn submit_package(
        &self,
        txs: &[impl Borrow<Transaction>],
    ) -> Result<SubmitPackageResult, Error> { ... }
    fn get_mempool_spending_tx(
        &self,
        outpoint: OutPoint,
    ) -> Result<Option<Txid>, Error> { ... }
    fn estimate_mempool_feerate(&self, txid: Txid) -> RpcResult<Option<FeeRate>> { ... }
}

Provided Methods§

Source

fn custom_get_raw_transaction_info( &self, txid: &Txid, block_hash: Option<&BlockHash>, ) -> RpcResult<Option<GetRawTransactionResult>>

Source

fn broadcast_tx(&self, tx: &Transaction) -> Result<(), Error>

Source

fn tip(&self) -> Result<BlockRef, Error>

Source

fn deep_tip(&self) -> Result<BlockRef, Error>

Source

fn get_block_by_height(&self, height: BlockHeight) -> Result<BlockRef, Error>

Source

fn tx_status(&self, txid: &Txid) -> Result<TxStatus, Error>

Source

fn submit_package( &self, txs: &[impl Borrow<Transaction>], ) -> Result<SubmitPackageResult, Error>

Source

fn get_mempool_spending_tx( &self, outpoint: OutPoint, ) -> Result<Option<Txid>, Error>

Get the transaction currently spending a given outpoint from the mempool.

Returns None if the outpoint is not being spent by any mempool transaction.

Source

fn estimate_mempool_feerate(&self, txid: Txid) -> RpcResult<Option<FeeRate>>

Estimate the effective feerate of a mempool transaction.

Returns the effective feerate considering ancestors and CPFP from direct descendants. Returns None if the transaction is not in the mempool.

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§