verify method

Future<bool> verify()

Implementation

Future<bool> verify() async {
  final rootHash = await reconstruct(cert.tree!);
  final derKey = await _checkDelegation(cert.delegation);
  final sig = cert.signature;
  final key = extractDER(derKey);
  final msg = u8aConcat([domainSep('ic-state-root'), rootHash]);
  var res = kIsWeb
      ? await bls.blsVerify(key, sig!, msg)
      : bls.blsVerifySync(key, sig!, msg);
  verified = res;
  return res;
}