getRewardTotal method
Returns the total rewards earned for a given hotspot over a given time range.
The block that contains the maxTime
timestamp is excluded from the
result.
address
is the B58 address of the hotspot.
Implementation
Future<HeliumResponse<HeliumHotspotRewardTotal>> getRewardTotal(
String address, DateTime minTime, DateTime maxTime) async {
return _client._doRequest(HeliumRequest(
path: '/v1/hotspots/$address/rewards/sum',
parameters: {
'min_time': minTime,
'max_time': maxTime,
},
extractResponse: (json) =>
HeliumHotspotRewardTotal.fromJson(json['data']),
));
}