Extract the OCF ID from contract create arguments.
Uses the type's metadata to navigate to the ID field.
The OCF object type
The contract's create arguments from a transaction tree
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' Copy
const args = { stakeholder_data: { id: 'sh-123', name: { legal_name: 'John' } } }; extractOcfIdFromCreateArgs('STAKEHOLDER', args); // 'sh-123'
Extract the OCF ID from contract create arguments.
Uses the type's metadata to navigate to the ID field.