Open Cap Table Protocol Canton SDK - v0.2.224
    Preparing search index...

    Variable mapDbTypeToEntityTypeConst

    mapDbTypeToEntityType: (
        categoryType: string,
        subtype: string | null,
    ) => OcfEntityType | null = mapCategorizedTypeToEntityType

    Type Declaration

      • (categoryType: string, subtype: string | null): OcfEntityType | null
      • Map categorized OCF type/subtype to OcfEntityType.

        OCF data may be organized into categories:

        • Direct types: STAKEHOLDER, STOCK_CLASS, STOCK_PLAN as the category
        • Object subtypes: category='OBJECT', actual type in subtype
        • Transaction subtypes: category='TRANSACTION', actual type in subtype (TX_ prefix)

        Parameters

        • categoryType: string

          The OCF category (STAKEHOLDER, OBJECT, TRANSACTION, etc.)

        • subtype: string | null

          The subtype for OBJECT and TRANSACTION categories

        Returns OcfEntityType | null

        The corresponding OcfEntityType, or null if not supported

        mapCategorizedTypeToEntityType('STAKEHOLDER', null); // 'stakeholder'
        mapCategorizedTypeToEntityType('DOCUMENT', null); // 'document' (direct type)
        mapCategorizedTypeToEntityType('OBJECT', 'DOCUMENT'); // 'document' (categorized)
        mapCategorizedTypeToEntityType('TRANSACTION', 'TX_STOCK_ISSUANCE'); // 'stockIssuance'

    Use mapCategorizedTypeToEntityType instead. This alias will be removed in a future version.