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

    Function extractOcfIdFromCreateArgs

    • Extract the OCF ID from contract create arguments.

      Uses the type's metadata to navigate to the ID field.

      Parameters

      • type: OcfObjectType

        The OCF object type

      • createArgs: unknown

        The contract's create arguments from a transaction tree

      Returns string | undefined

      The OCF ID string, or undefined if not found

        const args = { stakeholder_data: { id: 'sh-123', name: { legal_name: 'John' } } };
      extractOcfIdFromCreateArgs('STAKEHOLDER', args); // 'sh-123'