mismatchReason

fun mismatchReason(requestedDid: String, documentId: String, allowCanonicalOfLongForm: Boolean = false): String?

Returns null when documentId is acceptable for requestedDid, otherwise a human-readable reason.

Parameters

requestedDid

the DID passed to the resolver

documentId

the id of the document the source returned

allowCanonicalOfLongForm

for Sidetree methods (ion, orb): a long-form request did:<m>:<suffix>:<initial-state> may be answered with the canonical short form did:<m>:<suffix>. Any other difference is still a mismatch.