Skip to content

Reference

capTable.archive — issuer + CapTable teardown

ocp.OpenCapTable.capTable.archive exercises ArchiveCapTable via the system-operator party after deleting every mutable row through UpdateCapTable.

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 include system_operator per deployment policy (validator / intellect personas in Fairmint infra).
  • readAs (optional).

Returns

Promise<{ updateId: string }> referencing Canton transaction id (audit handle).


Errors

  • Missing capTableContractId / actAsOcpValidationError.
  • Non-empty embedded maps ⇒ Canton rejects ArchiveCapTable ⇒ surfaced as Canton client error (often CHOICE_FAILED).
  • Incorrect signer ⇒ authorization errors from Canton.


Source