getBondedValidators method
Implementation
Future<List<Validator>> getBondedValidators(String delegator) async {
String rootPath =
"${TerraClientConfiguration.blockchainResourcePath}${CosmosBaseConstants.COSMOS_STAKING_DELEGATORS_BASE}/$delegator/${CosmosStakingConstants.VALIDATORS}";
// if (options != null)
// {
// rootPath += PaginationOptionExtensions.GetPaginationRules(options);
// }
var response = await apiRequester.getAsync<StakingCommonJson>(rootPath);
if (response.successful!) {
var result = StakingCommonJson.fromJson(response.result!);
return result.validators.map((w) => Validator.fromJSON(w)).toList();
}
throw Exception("");
}