Skip to content

Reference

capTable.classify — pinned-template CapTable probe

ocp.OpenCapTable.capTable.classify resolves whether the issuer has a CapTable contract on the SDK’s pinned OpenCapTable package line only.

Use ocp.OpenCapTable.capTable.classify(issuerPartyId) when onboarding or migration logic must know whether the current package line already created a CapTable. The helper filters ledger responses with the symbolic template id OCP_TEMPLATES.capTable, so it does not inspect other package versions—a none result means “no row on this line,” not “issuer has zero tables anywhere.” Rows that fail package-name or module validation throw OcpContractError (SCHEMA_MISMATCH, sometimes RESULT_NOT_FOUND during diagnostics).


Import and receiver

const classification = await ocp.OpenCapTable.capTable.classify('issuer::namespace');

if (classification.status === 'current' && classification.current) {
  console.log(classification.current.capTableContractId);
}

Receiver: ocp.OpenCapTable.capTable.classify.


Parameters

  • issuerPartyId (string, required) — Party id for the issuer you are classifying against Canton.

Returns

Promise<IssuerCapTableClassification>:

  • statusnone whenever the filtered active-contract scan finds nothing (current, current === null), or current when exactly one row matches (classification.current includes capTableContractId, templateId, systemOperatorPartyId, issuer map handles, archive-related metadata surfaced for downstream teardown flows).
  • When current, callers can hydrate IssuerCapTable context for teardown utilities such as getSystemOperatorPartyId (package export).

Errors & caveats

  • Contract shape drift relative to Canton packages → SCHEMA_MISMATCH (contractReadDiagnostics family).
  • This API answers only pinned-template lineage queries—coordinate with Canton ops before creating a second CapTable.


Source