Trait TransactionsApi

Source
pub trait TransactionsApi:
    Send
    + Sync
    + 'static {
    type GetTransactionsStream: Stream<Item = Result<TransactionResponse, Status>> + Send + 'static;
    type GetStateChangesStream: Stream<Item = Result<InvokeScriptResultResponse, Status>> + Send + 'static;
    type GetStatusesStream: Stream<Item = Result<TransactionStatus, Status>> + Send + 'static;
    type GetUnconfirmedStream: Stream<Item = Result<TransactionResponse, Status>> + Send + 'static;

    // Required methods
    fn get_transactions<'life0, 'async_trait>(
        &'life0 self,
        request: Request<TransactionsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetTransactionsStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_state_changes<'life0, 'async_trait>(
        &'life0 self,
        request: Request<TransactionsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetStateChangesStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_statuses<'life0, 'async_trait>(
        &'life0 self,
        request: Request<TransactionsByIdRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetStatusesStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_unconfirmed<'life0, 'async_trait>(
        &'life0 self,
        request: Request<TransactionsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetUnconfirmedStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn sign<'life0, 'async_trait>(
        &'life0 self,
        request: Request<SignRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<SignedTransaction>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn broadcast<'life0, 'async_trait>(
        &'life0 self,
        request: Request<SignedTransaction>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<SignedTransaction>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with TransactionsApiServer.

Required Associated Types§

Source

type GetTransactionsStream: Stream<Item = Result<TransactionResponse, Status>> + Send + 'static

Server streaming response type for the GetTransactions method.

Source

type GetStateChangesStream: Stream<Item = Result<InvokeScriptResultResponse, Status>> + Send + 'static

Server streaming response type for the GetStateChanges method.

Source

type GetStatusesStream: Stream<Item = Result<TransactionStatus, Status>> + Send + 'static

Server streaming response type for the GetStatuses method.

Source

type GetUnconfirmedStream: Stream<Item = Result<TransactionResponse, Status>> + Send + 'static

Server streaming response type for the GetUnconfirmed method.

Required Methods§

Source

fn get_transactions<'life0, 'async_trait>( &'life0 self, request: Request<TransactionsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetTransactionsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_state_changes<'life0, 'async_trait>( &'life0 self, request: Request<TransactionsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetStateChangesStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_statuses<'life0, 'async_trait>( &'life0 self, request: Request<TransactionsByIdRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetStatusesStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_unconfirmed<'life0, 'async_trait>( &'life0 self, request: Request<TransactionsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetUnconfirmedStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn sign<'life0, 'async_trait>( &'life0 self, request: Request<SignRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<SignedTransaction>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn broadcast<'life0, 'async_trait>( &'life0 self, request: Request<SignedTransaction>, ) -> Pin<Box<dyn Future<Output = Result<Response<SignedTransaction>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§