pub trait RawTransactionApiServer:
Sized
+ Send
+ Sync
+ 'static {
// Required methods
fn get_raw_transaction<'life0, 'async_trait>(
&'life0 self,
txid: Txid,
verbose: Option<bool>,
blockhash: Option<BlockHash>,
) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_raw_transaction<'life0, 'async_trait>(
&'life0 self,
hexstring: String,
maxfeerate: Option<f64>,
) -> Pin<Box<dyn Future<Output = Result<SendTransactionResult, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn decode_raw_transaction(
&self,
hexstring: String,
iswitness: Option<bool>,
) -> Result<Value, Error>;
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}Expand description
Server trait implementation for the RawTransactionApi RPC API.
Required Methods§
Sourcefn get_raw_transaction<'life0, 'async_trait>(
&'life0 self,
txid: Txid,
verbose: Option<bool>,
blockhash: Option<BlockHash>,
) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_raw_transaction<'life0, 'async_trait>(
&'life0 self,
txid: Txid,
verbose: Option<bool>,
blockhash: Option<BlockHash>,
) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the raw transaction data.
By default, this call only returns a transaction if it is in the mempool. If -txindex is enabled, it also returns the transaction if it is found in a block.
If verbose is false (default), returns hex-encoded serialized transaction. If verbose is true, returns a JSON object with transaction info.
Sourcefn send_raw_transaction<'life0, 'async_trait>(
&'life0 self,
hexstring: String,
maxfeerate: Option<f64>,
) -> Pin<Box<dyn Future<Output = Result<SendTransactionResult, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_raw_transaction<'life0, 'async_trait>(
&'life0 self,
hexstring: String,
maxfeerate: Option<f64>,
) -> Pin<Box<dyn Future<Output = Result<SendTransactionResult, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Submit a raw transaction (serialized, hex-encoded) to local node and network.
Returns the transaction hash in hex.
Provided Methods§
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.