sui_json_rpc_api

Trait ExtendedApiServer

Source
pub trait ExtendedApiServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn get_epochs<'life0, 'async_trait>(
        &'life0 self,
        cursor: Option<BigInt<u64>>,
        limit: Option<usize>,
        descending_order: Option<bool>,
    ) -> Pin<Box<dyn Future<Output = RpcResult<EpochPage>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_current_epoch<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = RpcResult<EpochInfo>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn query_objects<'life0, 'async_trait>(
        &'life0 self,
        query: SuiObjectResponseQuery,
        cursor: Option<CheckpointedObjectID>,
        limit: Option<usize>,
    ) -> Pin<Box<dyn Future<Output = RpcResult<QueryObjectsPage>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_total_transactions<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = RpcResult<BigInt<u64>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

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

Server trait implementation for the ExtendedApi RPC API.

Required Methods§

Source

fn get_epochs<'life0, 'async_trait>( &'life0 self, cursor: Option<BigInt<u64>>, limit: Option<usize>, descending_order: Option<bool>, ) -> Pin<Box<dyn Future<Output = RpcResult<EpochPage>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return a list of epoch info

Source

fn get_current_epoch<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = RpcResult<EpochInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return current epoch info

Source

fn query_objects<'life0, 'async_trait>( &'life0 self, query: SuiObjectResponseQuery, cursor: Option<CheckpointedObjectID>, limit: Option<usize>, ) -> Pin<Box<dyn Future<Output = RpcResult<QueryObjectsPage>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return the list of queried objects. Note that this is an enhanced full node only api.

Source

fn get_total_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = RpcResult<BigInt<u64>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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§