@open-captable-protocol/canton 0.2.272 → 0.2.273

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +15 -23
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -117,36 +117,28 @@ Environment toggles: `CANTON_LOCALNET_FAST_START` (default: true),
117
117
 
118
118
  ### OCF Schema Validation
119
119
 
120
- This SDK includes automated validation of all OCF data against the official
121
- [Open Cap Format JSON schemas](https://github.com/Open-Cap-Table-Coalition/Open-Cap-Format-OCF).
120
+ The SDK enforces schema alignment and validation through dedicated test suites and an auditable
121
+ report flow:
122
122
 
123
- **Setup:**
123
+ - `test/schemaAlignment/*` guards SDK type/interface + enum alignment with OCF schemas, including
124
+ converter coverage for mapped enums.
125
+ - `test/validation/*` verifies fail-fast required-field validation and converter output validity.
126
+ - `scripts/audit-ocf-schema-alignment.ts` regenerates `audit-field-report.md` from current SDK types
127
+ vs OCF schema definitions.
128
+
129
+ **Schema-alignment workflow:**
124
130
 
125
131
  ```bash
126
- # Initialize/update the OCF schema submodule
127
132
  git submodule update --init --recursive
133
+ npx jest test/schemaAlignment --runInBand
134
+ npx jest test/validation --runInBand
135
+ npx ts-node scripts/audit-ocf-schema-alignment.ts
128
136
  ```
129
137
 
130
- **Usage in tests:**
131
-
132
- ```typescript
133
- import { validateOcfObject } from './test/utils/ocfSchemaValidator';
134
-
135
- // Validate any OCF object
136
- await validateOcfObject({
137
- object_type: 'ISSUER',
138
- id: '...',
139
- legal_name: 'Example Inc.',
140
- // ... other fields
141
- });
142
- ```
143
-
144
- The validator automatically validates both:
145
-
146
- - Input fixtures (`fixture.db`) - Data being sent to Canton
147
- - Output results - Data returned from `get*AsOcf` methods
138
+ **Validation guarantee:**
148
139
 
149
- All 78+ test fixtures pass validation for both input and output data.
140
+ - Invalid or incomplete payloads should fail with explicit validation errors.
141
+ - OCF-facing outputs are continuously checked against official OCF schemas in test suites.
150
142
 
151
143
  ### LocalNet
152
144
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-captable-protocol/canton",
3
- "version": "0.2.272",
3
+ "version": "0.2.273",
4
4
  "description": "A TypeScript SDK for interacting with the Open CapTable Protocol (OCP) Factory contract on Canton blockchain",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",