sui_jsonrpc/api/
extended.rs1use jsonrpsee::proc_macros::rpc;
5
6use crate::msgs::{
7 CheckpointedObjectId,
8 EpochInfo,
9 EpochPage,
10 QueryObjectsPage,
11 SuiObjectResponseQuery,
12};
13use crate::serde::BigInt;
14
15#[rpc(client, namespace = "suix")]
16pub trait ExtendedApi {
17 #[method(name = "getEpochs")]
19 async fn get_epochs(
20 &self,
21 cursor: Option<BigInt<u64>>,
22 limit: Option<usize>,
23 descending_order: Option<bool>,
24 ) -> RpcResult<EpochPage>;
25
26 #[method(name = "getCurrentEpoch")]
28 async fn get_current_epoch(&self) -> RpcResult<EpochInfo>;
29
30 #[method(name = "queryObjects")]
32 async fn query_objects(
33 &self,
34 query: SuiObjectResponseQuery,
35 cursor: Option<CheckpointedObjectId>,
36 limit: Option<usize>,
37 ) -> RpcResult<QueryObjectsPage>;
38
39 #[method(name = "getTotalTransactions")]
40 async fn get_total_transactions(&self) -> RpcResult<BigInt<u64>>;
41}