pub trait TransactionApiServer<Hash: Clone>: Sized + Send + Sync + 'static {
    // Required method
    fn submit_and_watch(
        &self,
        subscription_sink: SubscriptionSink,
        bytes: Bytes
    ) -> SubscriptionResult;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self>
       where Hash: Send + Sync + 'static + Serialize { ... }
}
Expand description

Server trait implementation for the TransactionApi RPC API.

Required Methods§

source

fn submit_and_watch( &self, subscription_sink: SubscriptionSink, bytes: Bytes ) -> SubscriptionResult

Submit an extrinsic to watch.

See TransactionEvent for details on transaction life cycle.

Provided Methods§

source

fn into_rpc(self) -> RpcModule<Self>where Hash: Send + Sync + 'static + Serialize,

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

Implementors§

source§

impl<Pool, Client> TransactionApiServer<<<Pool as TransactionPool>::Block as Block>::Hash> for Transaction<Pool, Client>where Pool: TransactionPool + Sync + Send + 'static, Pool::Hash: Unpin, <Pool::Block as BlockT>::Hash: Unpin, Client: HeaderBackend<Pool::Block> + ProvideRuntimeApi<Pool::Block> + Send + Sync + 'static,