This is the canonical API reference for @open-captable-protocol/canton. Every page below documents one entry point on OcpClient (or one package-level export), with a copy-pasteable example, parameter and return shapes, errors, and a source link.
The sidebar groups the surface into eleven sections; pick any to drill in. Newcomers usually start with OcpClient → CapTableBatch → an entity reader under Open Cap Table.
API surface
OcpClient
The single facade you instantiate per process. Holds the Canton ledger / validator clients, exposes namespaced helpers, and owns process-local context (FeaturedAppRight, issuer party, cap-table contract id).
- OcpClient — constructor dependencies, namespaces,
contextcache,createBatch.
Open Cap Table
Per-entity reads (get returns ContractResult<T>) plus the issuer creation builder. The matrix page links each OCF entity to its read page.
- Entity matrix
- issuer.get · issuer.buildCreate
- All other entity readers: stakeholder, stockClass, stockPlan, vestingTerms, valuation, document, plus every issuance / transfer / cancellation / acceptance / conversion / exercise / adjustment / vesting / status-change record. See the sidebar for the full alphabetical list.
Cap Table Batch
Fluent UpdateCapTable builder for atomic OCF creates / edits / deletes against a single CapTable contract.
Issuer Authorization
Factory-rooted choices that whitelist or revoke an issuer party for the OCP factory.
Cap Table
Lifecycle operations on the pinned CapTable contract — classification, state inventories, fluent updates, archive teardown, and standalone helpers exported from the package root.
- classify
- getState
- update
- archive
- archiveFullCapTable
- buildUpdateCapTableCommand
- getSystemOperatorPartyId
Reports
Builder + submit helpers for CompanyValuationReport contracts via the network’s ReportsFactory.
- companyValuationReport —
buildCreate,create,addObservers,update.
Coupon Minter
Off-ledger TPS rate-limit utilities mirroring the MintCoupons DAML pacing policy.
Payments
Amulet-era airdrop command builders — full Airdrop lifecycle plus the lighter SimpleAirdrop.
Payment Streams
Factory → proposed → active stream lifecycle, plus change proposals, party migration, and validator-backed disclosure helpers.
- Overview
- Factory
- Proposed stream
- Active stream
- Change proposals
- Party migration
- Utils (disclosure & payment context)
Errors
Structured Ocp*Error hierarchy for narrow instanceof handling, plus non-Ocp* helpers used by waits and branded id conversion.
Types
Branded id types, Command / DisclosedContract re-exports, and OCF output discriminants.
Utils
Validators, converters, OCF helpers, replication, transactions, diagnostics, and zod schemas.
- Canton OCF extractor
- Contract read diagnostics
- Entity validators
- Enum conversions
- OCF comparison
- OCF helpers
- OCF metadata
- OCF zod schemas
- Plan security aliases
- Read scope
- Replication helpers
- Template identity
- Transaction helpers
- Type conversions
- Type guards
- Validation
Underlying transports — Canton Node SDK
@open-captable-protocol/canton does not invent its own ledger transport: every read, exercise, and submission flows through the Canton Node SDK clients you inject on new OcpClient({ ledger, validator? }). The transport-level reference (LedgerJsonApiClient, ValidatorApiClient, JWT scopes, network discovery, request signing) lives on its own docs site.
Peer SDK
Canton Node SDK reference →
sdk.canton.fairmint.com — `@fairmint/canton-node-sdk` API reference. Required for `OcpClient` construction; configure once and pass `canton.ledger` (and optionally `canton.validator`) into this SDK.
The link is intentionally one-direction: this reference depends on the Canton Node SDK reference, not the other way around.