• Creates a new ICType object from a set of atomic claims and a title. The CType id will be automatically generated.

    Parameters

    • title: string

      The new CType's title as a string.

    • properties: {
          [key: string]: BooleanPattern | NumberPattern | StringPattern | ArrayPattern | RefPattern;
      }

      Key-value pairs describing the admissible atomic claims for a credential with this CType. The value of each property is a json-schema (for example { "type": "number" }) used to validate that property.

      • [key: string]: BooleanPattern | NumberPattern | StringPattern | ArrayPattern | RefPattern
    • version: "draft-01" | "V1" = 'V1'

      Use 'V1' to create a CType according to the latest metaschema version (default) and 'draft-01' to produce a legacy CType. Included for backwards-compatibility.

    Returns ICType

    A complete JSON schema (CType) with an $id derived from the hashed schema. Each CType references a meta schema that applies to it via the $schema property; its value depends on the version parameter.