Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
d633bc6
Harden cap table batch typing
HardlyDifficult Jul 9, 2026
797f4b9
Discriminate canonical OCF entities
HardlyDifficult Jul 10, 2026
68a5c5c
Validate generated DAML batch operations
HardlyDifficult Jul 10, 2026
5ea3468
Route client reads through validated dispatch
HardlyDifficult Jul 10, 2026
9b0bdd4
Keep stock issuance readback schema valid
HardlyDifficult Jul 10, 2026
a9e68d6
Merge discriminated OCF reader updates
HardlyDifficult Jul 10, 2026
1c01ea1
Keep declaration smoke tests lintable
HardlyDifficult Jul 10, 2026
1d6e182
Merge declaration lint fix
HardlyDifficult Jul 10, 2026
51f7778
Validate OCF date boundaries
HardlyDifficult Jul 10, 2026
b54502c
Reject year zero in OCF dates
HardlyDifficult Jul 10, 2026
e543619
Merge validated batch operation stack
HardlyDifficult Jul 10, 2026
fec5409
Curate strict public SDK declarations
HardlyDifficult Jul 10, 2026
ecf2f6d
Merge validated OCF dates
HardlyDifficult Jul 10, 2026
7224534
Model canonical OCF conditional shapes
HardlyDifficult Jul 10, 2026
3dcbe68
Merge curated public SDK
HardlyDifficult Jul 10, 2026
9a0cf6a
Keep schema parser test behind public boundary
HardlyDifficult Jul 10, 2026
af64851
Fix canonical stock plan quickstart fixtures
HardlyDifficult Jul 10, 2026
4400af9
Merge commit 'af64851' into codex/validated-daml-batch-operations
HardlyDifficult Jul 10, 2026
6ec8b4b
Merge branch 'codex/validated-daml-batch-operations' into codex/valid…
HardlyDifficult Jul 10, 2026
3957ed4
Merge branch 'codex/validated-ocf-dates' into codex/curated-public-sdk
HardlyDifficult Jul 10, 2026
cbe626a
Merge branch 'codex/curated-public-sdk' into codex/schema-shaped-core…
HardlyDifficult Jul 10, 2026
3b3cde6
Enforce canonical OCF ingestion
HardlyDifficult Jul 10, 2026
8698e3e
Cover every schema-supported PlanSecurity wrapper
HardlyDifficult Jul 10, 2026
365067b
Reject non-object normalization input cleanly
HardlyDifficult Jul 10, 2026
bfc9f56
Limit RFC3339 fractional seconds
HardlyDifficult Jul 10, 2026
9e80fac
Route authorization response through public types
HardlyDifficult Jul 10, 2026
de68023
Keep authorization boundary test focused
HardlyDifficult Jul 10, 2026
e50ffff
Reject null and empty core fields
HardlyDifficult Jul 10, 2026
6898be8
Merge remote-tracking branch 'origin/main' into codex/discriminated-o…
HardlyDifficult Jul 10, 2026
c18f192
Format restacked type contracts
HardlyDifficult Jul 10, 2026
fb41fb5
Merge remote-tracking branch 'origin/codex/discriminated-ocf-inputs' …
HardlyDifficult Jul 10, 2026
dd8c212
Merge remote-tracking branch 'origin/codex/validated-daml-batch-opera…
HardlyDifficult Jul 10, 2026
229568b
Reject null vesting and empty subdivisions
HardlyDifficult Jul 10, 2026
cbb254d
Merge remote-tracking branch 'origin/codex/validated-ocf-dates' into …
HardlyDifficult Jul 10, 2026
435e805
Auto-fix: build changes
github-actions[bot] Jul 10, 2026
00c74e3
Merge remote-tracking branch 'origin/codex/curated-public-sdk' into c…
HardlyDifficult Jul 10, 2026
2919049
docs: clarify entity guard export
HardlyDifficult Jul 10, 2026
cf8877e
fix: harden curated package exports
HardlyDifficult Jul 10, 2026
595e47f
Merge remote-tracking branch 'origin/codex/curated-public-sdk' into c…
HardlyDifficult Jul 10, 2026
d7ef4f1
Align date conversion types with validation
HardlyDifficult Jul 10, 2026
bbf7d95
Merge remote-tracking branch 'origin/codex/validated-ocf-dates' into …
HardlyDifficult Jul 10, 2026
b2504fd
Merge remote-tracking branch 'origin/codex/curated-public-sdk' into c…
HardlyDifficult Jul 10, 2026
a21d3fa
Validate issuance approval dates on read
HardlyDifficult Jul 10, 2026
e422b02
Reject blank issuer subdivisions
HardlyDifficult Jul 10, 2026
cf98eb6
Validate optional trigger dates on read
HardlyDifficult Jul 10, 2026
846945f
Merge remote-tracking branch 'origin/codex/validated-ocf-dates' into …
HardlyDifficult Jul 10, 2026
00a01cb
Classify optional subdivision validation
HardlyDifficult Jul 10, 2026
ea9dac1
Validate present optional dates
HardlyDifficult Jul 10, 2026
6c55274
Merge remote-tracking branch 'origin/codex/validated-ocf-dates' into …
HardlyDifficult Jul 10, 2026
de8b391
Report convertible issuance date context
HardlyDifficult Jul 10, 2026
baab60d
Enforce contextual OCF date boundaries
HardlyDifficult Jul 10, 2026
10f05f0
Merge remote-tracking branch 'origin/codex/validated-ocf-dates' into …
HardlyDifficult Jul 10, 2026
2b3043d
Merge remote-tracking branch 'origin/codex/curated-public-sdk' into c…
HardlyDifficult Jul 10, 2026
a0a5398
Enforce OCF trigger discriminators
HardlyDifficult Jul 10, 2026
6233888
Merge remote-tracking branch 'origin/codex/validated-ocf-dates' into …
HardlyDifficult Jul 10, 2026
1a1b8b4
Merge remote-tracking branch 'origin/codex/curated-public-sdk' into c…
HardlyDifficult Jul 10, 2026
e9dc120
fix: address typed OCF review findings
HardlyDifficult Jul 10, 2026
0cc6a29
fix: keep operation converter internal
HardlyDifficult Jul 10, 2026
960216f
Merge commit '0cc6a29940f810eeea8b25789cf80d4fab14cb9d' into codex/va…
HardlyDifficult Jul 10, 2026
cfb1e7a
Merge validated batch fixes into date boundaries
HardlyDifficult Jul 10, 2026
96ce3cf
Merge validated date boundaries into curated public API
HardlyDifficult Jul 10, 2026
d3e230f
Merge curated SDK updates into core schema types
HardlyDifficult Jul 11, 2026
b85ff8f
fix: accept null inactive document locations
HardlyDifficult Jul 11, 2026
1d4c624
fix: accept numeric vesting quantities
HardlyDifficult Jul 11, 2026
fd11df5
fix: harden typed document and numeric boundaries
HardlyDifficult Jul 11, 2026
2847d80
fix: enforce exact vesting numeric bounds
HardlyDifficult Jul 11, 2026
3cddede
fix: align document guards and numeric grammar
HardlyDifficult Jul 11, 2026
8ca8b76
fix: seal core schema read boundaries
HardlyDifficult Jul 11, 2026
be84650
fix: validate ledger read payloads
HardlyDifficult Jul 11, 2026
5a6cf6c
Merge commit 'be846500fe3ebb04426d5431861e8957676cf7a0' into codex/va…
HardlyDifficult Jul 11, 2026
016ed34
Merge commit '5a6cf6cef4efe3f1294f5a9fc7cc06976f09f906' into codex/va…
HardlyDifficult Jul 11, 2026
dcb7e31
Merge commit '016ed3489892747d160d8d6bf0521d4ead3a0833' into codex/cu…
HardlyDifficult Jul 11, 2026
2e66780
Merge commit 'dcb7e316a051acd71bf6a78cadd24fe3893ae25f' into codex/sc…
HardlyDifficult Jul 11, 2026
3d11550
fix: validate vesting quantity writes
HardlyDifficult Jul 11, 2026
16a3232
fix: index nested date validation paths
HardlyDifficult Jul 11, 2026
5453fea
fix: address exact date review feedback
HardlyDifficult Jul 11, 2026
2487c1c
Merge branch 'codex/validated-ocf-dates' into codex/curated-public-sdk
HardlyDifficult Jul 11, 2026
a41fb16
fix: freeze public entity mapping
HardlyDifficult Jul 11, 2026
6dc0a30
Merge branch 'codex/curated-public-sdk' into codex/schema-shaped-core…
HardlyDifficult Jul 11, 2026
194ff0e
fix: harden conditional schema boundaries
HardlyDifficult Jul 11, 2026
9613739
fix: harden conditional core reads
HardlyDifficult Jul 11, 2026
6fb3252
fix: close core schema audit gaps
HardlyDifficult Jul 11, 2026
144b68d
fix: harden core schema conversion boundaries
HardlyDifficult Jul 11, 2026
fad3812
fix: harden generated DAML read boundaries
HardlyDifficult Jul 11, 2026
d70c951
refactor: share batch operation decoding
HardlyDifficult Jul 11, 2026
917cf42
fix: seal core schema runtime boundaries
HardlyDifficult Jul 11, 2026
179c41f
fix: bound primitive diagnostics
HardlyDifficult Jul 11, 2026
389ede7
test: omit undefined integration fixture fields
HardlyDifficult Jul 11, 2026
4dffc37
fix: accept omitted DAML optional relationships
HardlyDifficult Jul 11, 2026
13fabbb
fix: validate ratio adjustment wrappers
HardlyDifficult Jul 11, 2026
6e8b7f6
fix: enforce exact trigger and date boundaries
HardlyDifficult Jul 11, 2026
aa523cc
Merge latest validated batch operations into date boundaries
HardlyDifficult Jul 11, 2026
7e2a757
fix: make stock class conversion rights schema exact
HardlyDifficult Jul 11, 2026
6f396ca
fix: reject lossy stock class conversion reads
HardlyDifficult Jul 11, 2026
9c9b388
Merge PR #411 into curated public API
HardlyDifficult Jul 11, 2026
dd50ee6
Merge prepared PR #412 into schema-shaped core types
HardlyDifficult Jul 11, 2026
02bb2a1
fix: address exact-head review feedback
HardlyDifficult Jul 11, 2026
f094c35
fix: preserve vesting amount diagnostic indexes
HardlyDifficult Jul 11, 2026
7507f8a
Merge latest validated date hardening into curated public API
HardlyDifficult Jul 11, 2026
44b9013
Merge latest prepared PR #412 into schema-shaped core types
HardlyDifficult Jul 11, 2026
82649ce
fix: decode ratio adjustment contract wrappers
HardlyDifficult Jul 11, 2026
d9c6080
fix: isolate malformed manifest transactions
HardlyDifficult Jul 11, 2026
351c666
refactor: centralize generated operation building
HardlyDifficult Jul 11, 2026
8780203
Merge branch 'codex/validated-ocf-dates' into codex/curated-public-sdk
HardlyDifficult Jul 11, 2026
c267e67
refactor: correlate generated operation builders
HardlyDifficult Jul 11, 2026
11ceb81
Merge branch 'codex/curated-public-sdk' into codex/schema-shaped-core…
HardlyDifficult Jul 11, 2026
ff234d4
Merge branch 'codex/curated-public-sdk' into codex/schema-shaped-core…
HardlyDifficult Jul 11, 2026
306ca74
fix: validate vesting element shapes
HardlyDifficult Jul 11, 2026
2e2c65e
Merge commit '306ca74277fab09107e969e4faa435e067cb7128' into codex/cu…
HardlyDifficult Jul 11, 2026
d27a0c6
Merge commit '2e2c65eb3cc388d52927f4df1e71199593dec777' into codex/sc…
HardlyDifficult Jul 11, 2026
de8198c
fix: validate warrant vesting shapes
HardlyDifficult Jul 11, 2026
ac336cc
Merge commit 'de8198cbc21d2ad6d1d5d61f1ba2061f57d4c09c' into codex/cu…
HardlyDifficult Jul 11, 2026
3c54895
Merge commit 'ac336cc03258cb9827251bde612d52b3351847b2' into codex/sc…
HardlyDifficult Jul 11, 2026
a37e1f5
fix: harden nested DAML collections
HardlyDifficult Jul 11, 2026
601af5e
Merge commit 'a37e1f58f47ed0349d45a03d61ddebc52a4cc74c' into codex/cu…
HardlyDifficult Jul 11, 2026
430d77d
Merge commit '601af5e63c197369827205679548dc4a1d45cbac' into codex/sc…
HardlyDifficult Jul 11, 2026
9d459b2
fix: validate nested write records
HardlyDifficult Jul 11, 2026
f625fbb
Merge commit '9d459b27f3894265e49bb90f9ddc945d8e18bcc3' into codex/cu…
HardlyDifficult Jul 11, 2026
88d3031
Merge commit 'f625fbba64d1c02641d338024082ce718886c016' into codex/sc…
HardlyDifficult Jul 11, 2026
746ae52
fix: validate vesting graphs and relationships
HardlyDifficult Jul 11, 2026
3a9a2f8
fix: address schema review feedback
HardlyDifficult Jul 12, 2026
29aa8dc
fix: tighten schema review edge cases
HardlyDifficult Jul 12, 2026
1844974
fix: enforce exact schema boundaries
HardlyDifficult Jul 12, 2026
4904142
fix: harden exact schema boundaries
HardlyDifficult Jul 12, 2026
0776a33
Harden generated vesting and status readers
HardlyDifficult Jul 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const eslintConfig = [
languageOptions: {
parser: typescriptEslintParser,
parserOptions: {
project: ['./tsconfig.json', './tsconfig.tests.json'],
project: ['./tsconfig.json', './tsconfig.tests.json', './tsconfig.declaration-tests.json'],
ecmaVersion: 2020,
sourceType: 'module',
},
Expand Down
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
"url": "https://github.com/Fairmint/ocp-canton-sdk.git"
},
"license": "GPL-3.0-only",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.js",
"default": "./dist/index.js"
},
"./package.json": "./package.json"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
Expand Down
43 changes: 36 additions & 7 deletions scripts/check-declarations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import ts from 'typescript';
const projectRoot = process.cwd();
const configPath = path.join(projectRoot, 'tsconfig.json');
const declarationEntryPoint = path.join(projectRoot, 'dist', 'index.d.ts');
const strictConsumerEntryPoint = path.join(projectRoot, 'test', 'declarations', 'publicApi.types.ts');
const declarationRoot = `${path.dirname(declarationEntryPoint)}${path.sep}`;
const generatedDamlPackage = '@fairmint/open-captable-protocol-daml-js';
const cantonTransactionTreeOperationsModule = '@fairmint/canton-node-sdk/build/src/clients/ledger-json-api/operations';
const commonTypesDeclaration = path.join(declarationRoot, 'types', 'common.d.ts');
const diagnosticHost: ts.FormatDiagnosticsHost = {
getCanonicalFileName: (fileName) => fileName,
getCurrentDirectory: () => projectRoot,
Expand All @@ -30,16 +34,41 @@ if (parsedConfig.errors.length > 0) {
}

const program = ts.createProgram({
rootNames: [declarationEntryPoint],
options: parsedConfig.options,
rootNames: [declarationEntryPoint, strictConsumerEntryPoint],
options: { ...parsedConfig.options, rootDir: projectRoot },
});

const sdkDiagnostics = ts
.getPreEmitDiagnostics(program)
.filter((diagnostic) => diagnostic.file?.fileName.startsWith(declarationRoot));
const diagnostics = ts.getPreEmitDiagnostics(program);

if (sdkDiagnostics.length > 0) {
if (diagnostics.length > 0) {
throw new Error(
`SDK declaration validation failed:\n${ts.formatDiagnosticsWithColorAndContext(sdkDiagnostics, diagnosticHost)}`
`Strict consumer declaration validation failed:\n${ts.formatDiagnosticsWithColorAndContext(diagnostics, diagnosticHost)}`
);
}

const generatedDamlLeaks = program
.getSourceFiles()
.filter((sourceFile) => sourceFile.fileName.startsWith(declarationRoot))
.filter((sourceFile) => sourceFile.text.includes(generatedDamlPackage))
.map((sourceFile) => path.relative(projectRoot, sourceFile.fileName));

if (generatedDamlLeaks.length > 0) {
throw new Error(
`Public declaration graph references ${generatedDamlPackage}:\n${generatedDamlLeaks.map((file) => `- ${file}`).join('\n')}`
);
}

const duplicatedTransactionTreeResponseImports = program
.getSourceFiles()
.filter((sourceFile) => sourceFile.fileName.startsWith(declarationRoot))
.filter((sourceFile) => sourceFile.fileName !== commonTypesDeclaration)
.filter((sourceFile) => sourceFile.text.includes(cantonTransactionTreeOperationsModule))
.map((sourceFile) => path.relative(projectRoot, sourceFile.fileName));

if (duplicatedTransactionTreeResponseImports.length > 0) {
throw new Error(
`Public declarations must import transaction-tree response types through src/types/common:\n${duplicatedTransactionTreeResponseImports
.map((file) => `- ${file}`)
.join('\n')}`
);
}
Loading