output.ts defines OcfIssuerOutput, OcfStakeholderOutput, transaction outputs like OcfStockIssuanceOutput, and dozens of other WithObjectType<..., 'TX_…'> aliases. The OcfObject union aggregates:
- Objects — issuer, stakeholder, stock classes, plans, vesting terms, valuations, documents, financing
- Issuances / transfers / cancellations / exercises / conversions / acceptances / retractions / repricing
- Adjustments & splits — authorized shares, ratio adjustments, stock class splits, plan pool adjustments
- Plan security legacy aliases (
TX_PLAN_SECURITY_*) - Other — repurchase, consolidation, reissuance
- Vesting — start, event, acceleration
- Stakeholder events — relationship & status changes
Pattern
import type { OcfObject } from '@open-captable-protocol/canton';
function label(entity: OcfObject) {
switch (entity.object_type) {
case 'ISSUER':
return entity.legal_name;
case 'STAKEHOLDER':
return entity.name.legal_name;
default:
return entity.id;
}
}
object_type literals match OCF enums (ISSUER, TX_STOCK_ISSUANCE, …).
See also
- common.md —
ContractResult<T>whereTis typically anOcf*Output.