• Validates the claims in the VC's credentialSubject against a CType definition.

    Parameters

    • credential: Pick<KiltCredentialV1, "type" | "credentialSubject">

      A KiltCredentialV1 type verifiable credential.

    • options: {
          cTypes?: ICType[];
          loadCTypes?: false | CTypeLoader;
      } = {}

      Options map.

      • Optional cTypes?: ICType[]

        One or more CType definitions to be used for validation. If loadCTypes is set to false, validation will fail if the definition of the credential's CType is not given.

      • Optional loadCTypes?: false | CTypeLoader

        A function to load CType definitions that are not in cTypes. Defaults to using the CachingCTypeLoader. If set to false or undefined, no additional CTypes will be loaded.

    Returns Promise<void>