use jsonrpsee::proc_macros::rpc;
use sui_sdk_types::Address;
use crate::msgs::{DelegatedStake, SuiCommittee, SuiSystemStateSummary, ValidatorApys};
use crate::serde::BigInt;
#[rpc(client, namespace = "suix")]
pub trait GovernanceReadApi {
#[method(name = "getStakesByIds")]
async fn get_stakes_by_ids(
&self,
staked_sui_ids: Vec<Address>,
) -> RpcResult<Vec<DelegatedStake>>;
#[method(name = "getStakes")]
async fn get_stakes(&self, owner: Address) -> RpcResult<Vec<DelegatedStake>>;
#[method(name = "getCommitteeInfo")]
async fn get_committee_info(&self, epoch: Option<BigInt<u64>>) -> RpcResult<SuiCommittee>;
#[method(name = "getLatestSuiSystemState")]
async fn get_latest_sui_system_state(&self) -> RpcResult<SuiSystemStateSummary>;
#[method(name = "getReferenceGasPrice")]
async fn get_reference_gas_price(&self) -> RpcResult<BigInt<u64>>;
#[method(name = "getValidatorsApy")]
async fn get_validators_apy(&self) -> RpcResult<ValidatorApys>;
}