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>:
status—nonewhenever the filtered active-contract scan finds nothing (current,current === null), orcurrentwhen exactly one row matches (classification.currentincludescapTableContractId,templateId,systemOperatorPartyId,issuermap handles, archive-related metadata surfaced for downstream teardown flows).- When
current, callers can hydrateIssuerCapTablecontext for teardown utilities such asgetSystemOperatorPartyId(package export).
Errors & caveats
- Contract shape drift relative to Canton packages →
SCHEMA_MISMATCH(contractReadDiagnosticsfamily). - This API answers only pinned-template lineage queries—coordinate with Canton ops before creating a second
CapTable.