get Number Of Delegators For All Pools
open suspend override fun getNumberOfDelegatorsForAllPools(sortOrder: List<ActiveDelegatorPerPoolOrder>?, minimumLedgerVersion: Long?): Result<GetNumberOfDelegatorsQuery.Data?, AptosIndexerError>
Queries the current number of delegators across all staking pools.
This function can wait for the indexer to be synchronized to a specific ledger version before querying.
Usage
val resolution = aptos.getNumberOfDelegatorsForAllPools()
when (resolution) {
is Result.Ok -> {
val data = resolution.value
println("Successfully retrieved delegator data for all pools: $data")
}
is Result.Err -> {
println("Error querying delegators for all pools: ${resolution.error.message}")
}
}Content copied to clipboard
Return
A Result which is either Result.Ok containing the query data, or Result.Err containing an AptosIndexerError.
Parameters
sort Order
An optional list of sorting options for the results.
minimum Ledger Version
An optional ledger version. The function will wait for the indexer to be at or beyond this version before querying.