-
Notifications
You must be signed in to change notification settings - Fork 0
OpenCapTable Module
This module contains the Open Cap Table Protocol (OpenCapTable) DAML implementation for the Canton Network. It mirrors the concepts and schema defined by the Open Cap Format (OCF) and is organized around the same core building blocks: objects and transactions using the schema's types and enums.
For shared coding guidelines that apply to all OCP DAML packages, see the Home wiki page.
Current version: OpenCapTable-v34
Companion NFT packages (NftApi-v01, NftReference-v01, OpenCapTableNftIface-v01, OpenCapTableNft-v01) live alongside the cap table; see Contract-Diagram for how they relate to the core factory chain.
See Contract-Diagram for visual documentation of the contract hierarchy and relationships.
Key components:
-
OcpFactory→IssuerAuthorization→CapTable(factory chain) -
CapTablemaintainsMap Text (ContractId T)for all OCF objects (O(1) lookup) - All OCF contracts use dual signatories:
issuer+system_operator
The single source of truth for all data structures is the JSON Schema under Open-Cap-Format-OCF/schema/ (@schema).
- Strict adherence: All models, types, events, and files must strictly match the schema definitions
- No drift: Do not introduce fields, values, or shapes that are not defined in the schema
- Validation first: Any produced or ingested JSON must validate against the relevant schema
- Deprecated fields: Exclude deprecated schema fields from DAML. The SDK is responsible for mapping deprecated inputs to the latest standard.
- Signatories: All OCP objects must use both the issuer and system operator as signatories.
-
Required numbers may be zero: A required numeric field may validly be
0unless the schema specifies otherwise. -
Code comments: Each non-test file starts with a one-line summary; the OCF object block (title, description, raw
$idURL) sits immediately aftermodule ... where, before imports. Field-level comments follow Home (DAML coding standards).
- In DAML we exclude the
object_typefield since it is implied from the template used. - In
StockIssuance, the schema requiresstock_legend_idswithminItems: 1. Our implementation temporarily allows an empty array forstock_legend_idsto support existing data that lacks legends.
All types/records in this package must follow the field ordering rule:
data Example = Example
with
-- Identifier for the object
id: Text
-- Required fields (alphabetical)
---------------------------------
required_a: Text
required_b: Int
-- Arrays (alphabetical)
---------------------------------
items: [Text]
-- Optional fields (alphabetical)
---------------------------------
optional_a: Optional Text
optional_b: Optional Int
deriving (Eq, Show)
After imports, use: template block first, then the main OCF data record for that template, then subtype/helper data and validators. See Home for the full header/import layout.
For every field, add high-signal comments derived from the schema: field title, then description, then $comment if present. Include constraints like -- minItems: 1 for arrays when relevant.
Example for ObjectReference:
-- Type - Object Reference
-- A type representing a reference to any kind of OCF object
-- OCF: https://raw.githubusercontent.com/Open-Cap-Table-Coalition/Open-Cap-Format-OCF/main/schema/types/ObjectReference.schema.json
data OcfObjectReference = OcfObjectReference
with
-- Identifier of the referenced object
object_id: Text
-- Type of the referenced object
object_type: OcfObjectType
deriving (Eq, Show)
For every Optional Text field, validate with validateOptionalText in the record validator. This ensures that when a value is provided it is non-empty.
- Issuer Management: The Issuer object is the primary object for managing the cap table.
-
Edits: When an object needs to be edited, the original contract(s) should be archived with
ArchiveByIssuerchoice and then a new contract should be created with the new data. Ideally both commands are bundled into a single transaction so that the edit is atomic.
Develop
Decisions
Releases
- Releases (index)
- Package tag release process
- 2026-06-22 — OCP v35 conversion mechanism validation
- 2026-06-22 — OCP v35 SDK scaffold
- 2026-05-04 — OCP v34 major upgrade
- 2026-05-04 — DAML extraction / fairmint-daml
- 2026-03-05 — OCP v32 PPS-based conversion rename
- 2026-02-17 — OCP v31 ArchiveCapTable
- 2026-02-12 — OCP v31 vesting zero portion
Other Fairmint DAML
Documentation for CantonPayments, NFT, Reports, CouponMinter, equity certificate, proof-of-ownership, and related deployment playbooks lives with fairmint/daml and @fairmint/daml-js — not in this wiki.