getStateRootHash method

Future<GetStateRootHashResult> getStateRootHash([
  1. BlockId? blockId
])

Requests the state root hash of the node. If specified, requests the state root hash of the block identified by blockId.

Implementation

Future<GetStateRootHashResult> getStateRootHash([BlockId? blockId]) async {
  if (blockId == null) {
    return _nodeClient.getStateRootHash();
  } else {
    return _nodeClient.getStateRootHash(GetStateRootHashParams(blockId));
  }
}