• Verify the dataset with embedded proof graph(s).

    If the anchor is present, the proof graphs are identified by the object terms of the corresponding proof quads. Otherwise, the type relationship to DataIntegrityProof are considered. Note that if no anchor is provided, this second choice may lead to erroneous results because some of the embedded proof graphs are not meant to be a proof for the full dataset. (This may be the case in a "Verifiable Presentation" style datasets.)

    The validity result is the conjunction of the validation result for each proof graphs separately.

    The following checks are also made.

    1. There should be exactly one proof value
    2. There should be exactly one verification method, which should be a separate resource containing the key (either in JWK or in Multikey)
    3. The key's (optional) expiration and revocation dates are checked and compared to the current time which should be "before"
    4. The proof's creation date must be before the current time
    5. The proof purpose(s) must be set, and the values are either authentication or verification

    If any of those errors occur, the overall validity result is false. The error reports themselves, with some more details, are part of the verification result structure.

    Parameters

    • dataset: DatasetCore<Quad, Quad>
    • Optional anchor: Quad_Subject

    Returns Promise<VerificationResult>