• A factory for a CType loader that caches a CType definition once it has been loaded. Used in validating the credentialSubject of a KiltCredentialV1 against the Claim Type referenced in its type field.

    Parameters

    • initialCTypes: ICType[] = []

      An array of CTypes with which the cache is to be initialized.

    Returns CTypeLoader

    A function that takes a CType id and looks up a CType definition in an internal cache, and if not found, tries to fetch it from the KILT blochchain.