ArchiveCapTable asserts embedded entity maps are empty, archives the Issuer contract referenced from the CapTable, then consumes the CapTable. Precondition callers must delete every non-issuer row using CapTableBatch (issuer-signed UpdateCapTable sweeps**) before invoking archive. Signing parties must satisfy DAML system_operator authority.
Import and receiver
const { updateId } = await ocp.OpenCapTable.capTable.archive({
capTableContractId: 'CID',
capTableContractDetails: { templateId: 'optional-hash-specific' },
actAs: [SYSTEM_OPERATOR_PARTY],
readAs: optionalReaders,
});
Same parameters are accepted by archiveCapTable(ledgerClient, params), the standalone export from @open-captable-protocol/canton (functionally identical).
Receiver on OcpClient: ocp.OpenCapTable.capTable.archive.
Parameters
Matches `ArchiveCapTableParams:
- capTableContractId (required) — Target CapTable contract id (string Canton form).
- capTableContractDetails (optional) —
{ templateId }pairing when Canton echoes a differing template hash. - actAs (required, non-empty) —
string[]that must includesystem_operatorper deployment policy (validator / intellect personas in Fairmint infra). - readAs (optional).
Returns
Promise<{ updateId: string }> referencing Canton transaction id (audit handle).
Errors
- Missing capTableContractId / actAs ⇒
OcpValidationError. - Non-empty embedded maps ⇒ Canton rejects
ArchiveCapTable⇒ surfaced as Canton client error (oftenCHOICE_FAILED). - Incorrect signer ⇒ authorization errors from Canton.