newBlockFilter method

Future<int> newBlockFilter ()

New block filter Creates a filter in the node, to notify when a new block arrives. To check if the state has changed, call getFilterChanges. Returns a filter id.

Implementation

Future<int> newBlockFilter() async {
  final List params = [];
  final String method = MoacRpcMethods.newBlockFilter;
  final res = await rpcClient.request(method, params);
  if (res != null && res.containsKey(moacResultKey)) {
    return MoacUtilities.hexToInt(res[moacResultKey]);
  }
  _processError(method, res);
  return null;
}