checkSigchainHashAsync method

Future<SealdCheckSigchainResponse> checkSigchainHashAsync(
  1. String userId,
  2. String expectedHash, {
  3. int position = -1,
})

Verify if a given hash is included in the recipient's sigchain. Use the position option to check the hash of a specific sigchain transaction.

userId - The Seald ID of the concerned user. expectedHash - The expected sigchain hash. position - Position of the sigchain transaction against which to check the hash. -1 to check if the hash exist in the sigchain. Default to -1. Returns a SealdCheckSigchainResponse instance.

Implementation

Future<SealdCheckSigchainResponse> checkSigchainHashAsync(
    String userId, String expectedHash,
    {int position = -1}) {
  return compute(
      (Map<String, dynamic> args) => checkSigchainHash(
          args["userId"], args["expectedHash"],
          position: args["position"]),
      {"userId": userId, "expectedHash": expectedHash, "position": position});
}