Skip to content

Reference

OpenCapTable — namespace overview

The OpenCapTable namespace on OcpClient exposes typed get readers that return OCF objects and cap table transactions from Canton by contract id.

Everything under ocp.OpenCapTable.* reads OCF data from Canton. Each reader takes a contract id and returns a typed ContractResult<T>{ data, contractId } — where data is the OCF payload carrying its own object_type discriminant.

import { OcpClient, toContractId } from '@open-captable-protocol/canton';

const { data } = await ocp.OpenCapTable.stockClass.get({
  contractId: toContractId('STOCK_CLASS_CONTRACT_ID'),
});
// data.object_type === 'STOCK_CLASS'

All readers accept an optional readAs array to widen ledger visibility, and surface OcpParseError / OcpContractError / OcpValidationError on malformed or missing contracts.

Objects

The company, its stakeholders, and the instruments and records they hold.

ReaderReturns
issuer.getThe company at the root of the cap table.
stakeholder.getAn individual or entity holding securities.
stockClass.getA class of stock (common, preferred, etc.).
stockPlan.getAn equity incentive plan.
stockLegendTemplate.getA stock legend template.
valuation.getA company valuation record.
vestingTerms.getVesting schedule terms.
document.getA document attached to the cap table.

Transactions

Every transaction follows the same get pattern and returns its OCF transaction object.

Stock

Convertibles

Equity compensation

Warrants

Vesting

Stakeholder & issuer events

See also