getElections method

Lists the consensus group transactions in which the given hotspot was involved.

address is the B58 address of the hotspot.

Implementation

Future<HeliumPagedResponse<List<HeliumTransactionConsensusGroupV1>>>
    getElections(String address) async {
  return _client._doPagedRequest(HeliumPagedRequest(
    path: '/v1/hotspots/$address/elections',
    extractResponse: (json) => HeliumRequest.mapDataList(
        json, (t) => HeliumTransactionConsensusGroupV1.fromJson(t)),
  ));
}