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

    Function detectOcfObjectType

    • Detect the OCF object type from an unknown value.

      This is useful when you receive data that could be any OCF type and need to determine which type it is before processing.

      Parameters

      • value: unknown

      Returns DetectedOcfType

        const type = detectOcfObjectType(data);
      switch (type) {
      case 'ISSUER':
      // Handle issuer
      break;
      case 'STAKEHOLDER':
      // Handle stakeholder
      break;
      // ...
      }