verifyDocument
open suspend override fun verifyDocument(document: DidDocument, resolutionMetadata: DidResolutionMetadata): VerificationResult
Verify DID document integrity and authenticity.
Return
Verification result with validity status and any errors/warnings
Parameters
document
The DID document to verify
resolutionMetadata
Resolution metadata (may contain digest for integrity check)
open suspend override fun verifyDocument(document: DidDocument, resolutionMetadata: DidResolutionMetadata, expectedDid: String?): VerificationResult
Like verifyDocument, and additionally checks that the document is the one for expectedDid: document.id must equal it exactly. A resolver that returns another subject's document for the requested DID must not pass verification.
The default implementation delegates to verifyDocument and adds the id check, so existing implementations keep working; DefaultDidDocumentVerificationService overrides it.
Parameters
expectedDid
the DID the caller asked to resolve; null skips the id check