getPredicted method

Returns a list of times when the Oracle Price is expected to change.

The blockchain operates in "block-time" meaning that blocks can come out at some schedule close to 1 per minute. Oracles report in "wall-clock-time", meaning they report what they believe the price should be. If this method returns one or more prices and times, it indicates that the chain is expected to adjust the price (based on Oracle reports) no earlier than the indicated time to the returned price.

A prediction may not be seen in the blockchain if they are close together (within 10 blocks) since block times may cause the blockchain to skip to a next predicted price.

If no predictions are returned, the current HNT Oracle Price is valid for at least 1 hour.

Implementation

Future<HeliumResponse<List<HeliumOraclePricePrediction>>> getPredicted() {
  return _client._doRequest(HeliumPagedRequest(
    path: '/v1/oracle/predictions',
    extractResponse: (json) => HeliumRequest.mapDataList(
        json, (p) => HeliumOraclePricePrediction.fromJson(p)),
  ));
}