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

    Function convertToOcf

    • Convert DAML entity data to native OCF format based on entity type.

      This is the inverse of convertToDaml() - it transforms DAML contract data back into native OCF format for reads.

      Type Parameters

      Parameters

      • type: T

        The OCF entity type

      • damlData: Record<string, unknown>

        The DAML contract data (from createArgument)

      Returns OcfDataTypeFor<T>

      The native OCF data object

      OcpParseError if the entity type is not supported

      const damlData = contract.createArgument.acceptance_data;
      const native = convertToOcf('stockAcceptance', damlData);