Skip to content

Reference

capTable.getState — inventories on the pinned CapTable row

ocp.OpenCapTable.capTable.getState materializes replicated entity inventories for the pinned-template CapTable, or returns null when classification is none on that package line.

getCapTableState layers on classifyIssuerCapTables: once the ledger yields a current CapTable, the SDK trims archive-only metadata (systemOperatorPartyId / template handles) while keeping all embedded OCF map inventories (stakeholders, stock classes, issuances…). Returned shape matches CapTableState for replication/export jobs. null means classifyIssuerCapTables found no pinned row—mirror the caveats on classify concerning other package deployments.


Import and receiver

const state = await ocp.OpenCapTable.capTable.getState('issuer::namespace');
if (!state) {
  // Either no pinned CapTable, or Canton rejected the packaged query—see classify docs.
}

const { entities, contractIds, securityIds } = state!;

Parameters

  • issuerPartyId (required) — Canton issuer owning the CapTable contract.

Returns

Promise<CapTableState | null>

  • null when classify returns none.
  • Otherwise keyed entity collections (ids/strings) aligning with CapTable maps so automation can diff vs off-chain warehouses.

Throws mirror classifyIssuerCapTables / ledger read instrumentation (SCHEMA_MISMATCH, contractReadDiagnostics, etc.).



Source