use jsonrpsee::proc_macros::rpc;
use crate::msgs::{
CheckpointedObjectId, EpochInfo, EpochPage, QueryObjectsPage, SuiObjectResponseQuery,
};
use crate::serde::BigInt;
#[rpc(client, namespace = "suix")]
pub trait ExtendedApi {
#[method(name = "getEpochs")]
async fn get_epochs(
&self,
cursor: Option<BigInt<u64>>,
limit: Option<usize>,
descending_order: Option<bool>,
) -> RpcResult<EpochPage>;
#[method(name = "getCurrentEpoch")]
async fn get_current_epoch(&self) -> RpcResult<EpochInfo>;
#[method(name = "queryObjects")]
async fn query_objects(
&self,
query: SuiObjectResponseQuery,
cursor: Option<CheckpointedObjectId>,
limit: Option<usize>,
) -> RpcResult<QueryObjectsPage>;
#[method(name = "getTotalTransactions")]
async fn get_total_transactions(&self) -> RpcResult<BigInt<u64>>;
}