Governance

class Governance(val config: SuiConfig) : Governance

The concrete implementation of the Governance interface.

Parameters

config

The SuiConfig object specifying the RPC endpoint and connection settings.

Constructors

Link copied to clipboard
constructor(config: SuiConfig)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open suspend override fun getCommitteeInfo(epochId: Long?, after: String?): Result<GetCommitteeInfoQuery.Data?, SuiError>

Fetches the committee of validators for a specific epoch.

Link copied to clipboard
open suspend override fun getStakes(owner: AccountAddress, limit: Int?, cursor: String?): Result<GetStakesQuery.Data?, SuiError>

Fetches all StakedSui objects owned by a specific address.

Link copied to clipboard
open suspend override fun getStakesByIds(ids: List<String>, limit: Int?, cursor: String?): Result<GetStakesByIdsQuery.Data?, SuiError>

Fetches a list of StakedSui objects by their unique IDs.

Link copied to clipboard
open suspend override fun getValidatorApy(): Result<GetValidatorsApyQuery.Data?, SuiError>

Fetches the Annual Percentage Yield (APY) for all active validators.