• Checks if a given object is a DID Verification Method.

    A DidVerificationMethod in the context of DID resources must include the properties id, type, and controller.

    Parameters

    • obj: unknown

      The object to be checked.

    Returns obj is DidVerificationMethod

    true if obj is a DidVerificationMethod; otherwise, false.

    Example

    const resource = {
    id : "did:example:123#0",
    type : "JsonWebKey2020",
    controller : "did:example:123",
    publicKeyJwk : { ... }
    };

    if (isDidVerificationMethod(resource)) {
    console.log('The resource is a DidVerificationMethod');
    } else {
    console.log('The resource is not a DidVerificationMethod');
    }