getStakes

abstract suspend fun getStakes(owner: AccountAddress, limit: Int? = null, cursor: String? = null): Result<GetStakesQuery.Data?, SuiError>

Fetches all StakedSui objects owned by a specific address.

Return

A Result which is either:

  • Ok: Containing a nullable GetStakesQuery.Data object with a list of stakes and a pagination cursor.

  • Err: Containing a SuiError object with a list of GraphQLErrors.

Parameters

owner

The AccountAddress that owns the staked objects.

limit

An optional integer to specify the maximum number of stakes to return per page.

cursor

An optional cursor string for pagination.