@open-captable-protocol/canton 0.2.179 → 0.2.180
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.
|
@@ -6,6 +6,46 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module ocfComparison
|
|
8
8
|
*/
|
|
9
|
+
/**
|
|
10
|
+
* Default internal fields added by the database/SDK that should be ignored during comparison.
|
|
11
|
+
* These are not part of the OCF specification.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DEFAULT_INTERNAL_FIELDS: readonly ["__v", "_id", "_source", "issuer", "tx_hash", "createdAt", "updatedAt", "is_onchain_synced", "vestings"];
|
|
14
|
+
/**
|
|
15
|
+
* Deprecated OCF fields that may differ between source and round-tripped data.
|
|
16
|
+
* These fields may be upgraded or removed during processing.
|
|
17
|
+
*/
|
|
18
|
+
export declare const DEFAULT_DEPRECATED_FIELDS: readonly ["option_grant_type"];
|
|
19
|
+
/**
|
|
20
|
+
* Options for OCF comparison.
|
|
21
|
+
*/
|
|
22
|
+
export interface OcfComparisonOptions {
|
|
23
|
+
/**
|
|
24
|
+
* Fields to ignore during comparison. Defaults to empty array (compare all fields).
|
|
25
|
+
* Use DEFAULT_INTERNAL_FIELDS to ignore internal database/SDK fields.
|
|
26
|
+
*/
|
|
27
|
+
ignoredFields?: readonly string[];
|
|
28
|
+
/**
|
|
29
|
+
* Deprecated fields that may differ between source and destination.
|
|
30
|
+
* Defaults to empty array (compare all fields).
|
|
31
|
+
* Use DEFAULT_DEPRECATED_FIELDS to ignore deprecated OCF fields.
|
|
32
|
+
*/
|
|
33
|
+
deprecatedFields?: readonly string[];
|
|
34
|
+
/**
|
|
35
|
+
* Whether to report differences for debugging. When true, differences are logged to console.
|
|
36
|
+
* Default: false
|
|
37
|
+
*/
|
|
38
|
+
reportDifferences?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Result of an OCF comparison with details about any differences found.
|
|
42
|
+
*/
|
|
43
|
+
export interface OcfComparisonResult {
|
|
44
|
+
/** Whether the objects are semantically equal. */
|
|
45
|
+
equal: boolean;
|
|
46
|
+
/** List of paths where differences were found. */
|
|
47
|
+
differences: string[];
|
|
48
|
+
}
|
|
9
49
|
/**
|
|
10
50
|
* Deep equality comparison for OCF objects with normalization.
|
|
11
51
|
*
|
|
@@ -15,10 +55,41 @@
|
|
|
15
55
|
* - Treats empty arrays/objects as equivalent to undefined
|
|
16
56
|
* - Trims string whitespace
|
|
17
57
|
* - Recursively compares nested objects
|
|
58
|
+
* - Optionally ignores internal/deprecated fields
|
|
18
59
|
*
|
|
19
60
|
* @param a - First OCF object
|
|
20
61
|
* @param b - Second OCF object
|
|
62
|
+
* @param options - Comparison options
|
|
21
63
|
* @returns True if objects are semantically equal
|
|
22
64
|
*/
|
|
23
|
-
export declare function ocfDeepEqual(a: unknown, b: unknown): boolean;
|
|
65
|
+
export declare function ocfDeepEqual(a: unknown, b: unknown, options?: OcfComparisonOptions): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Compare two OCF objects and return detailed results.
|
|
68
|
+
*
|
|
69
|
+
* @param a - First OCF object (typically the source/expected value)
|
|
70
|
+
* @param b - Second OCF object (typically the result/actual value)
|
|
71
|
+
* @param options - Comparison options
|
|
72
|
+
* @returns Comparison result with equality status and list of differences
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const result = ocfCompare(sourceFixture, readBackData, {
|
|
77
|
+
* ignoredFields: DEFAULT_INTERNAL_FIELDS,
|
|
78
|
+
* reportDifferences: true
|
|
79
|
+
* });
|
|
80
|
+
*
|
|
81
|
+
* if (!result.equal) {
|
|
82
|
+
* console.log('Differences found:', result.differences);
|
|
83
|
+
* }
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
export declare function ocfCompare(a: unknown, b: unknown, options?: OcfComparisonOptions): OcfComparisonResult;
|
|
87
|
+
/**
|
|
88
|
+
* Strip internal and deprecated fields from an OCF object for cleaner comparison.
|
|
89
|
+
*
|
|
90
|
+
* @param obj - The OCF object to clean
|
|
91
|
+
* @param fieldsToRemove - Fields to remove (defaults to DEFAULT_INTERNAL_FIELDS + DEFAULT_DEPRECATED_FIELDS)
|
|
92
|
+
* @returns A new object with the specified fields removed
|
|
93
|
+
*/
|
|
94
|
+
export declare function stripInternalFields<T extends Record<string, unknown>>(obj: T, fieldsToRemove?: readonly string[]): Partial<T>;
|
|
24
95
|
//# sourceMappingURL=ocfComparison.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ocfComparison.d.ts","sourceRoot":"","sources":["../../src/utils/ocfComparison.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"ocfComparison.d.ts","sourceRoot":"","sources":["../../src/utils/ocfComparison.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,eAAO,MAAM,uBAAuB,oHAU1B,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,yBAAyB,gCAE5B,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAElC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAErC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,kDAAkD;IAClD,KAAK,EAAE,OAAO,CAAC;IACf,kDAAkD;IAClD,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AA8FD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAG5F;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,mBAAmB,CA4GtG;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnE,GAAG,EAAE,CAAC,EACN,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,GACjC,OAAO,CAAC,CAAC,CAAC,CA6BZ"}
|
|
@@ -8,7 +8,32 @@
|
|
|
8
8
|
* @module ocfComparison
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.DEFAULT_DEPRECATED_FIELDS = exports.DEFAULT_INTERNAL_FIELDS = void 0;
|
|
11
12
|
exports.ocfDeepEqual = ocfDeepEqual;
|
|
13
|
+
exports.ocfCompare = ocfCompare;
|
|
14
|
+
exports.stripInternalFields = stripInternalFields;
|
|
15
|
+
/**
|
|
16
|
+
* Default internal fields added by the database/SDK that should be ignored during comparison.
|
|
17
|
+
* These are not part of the OCF specification.
|
|
18
|
+
*/
|
|
19
|
+
exports.DEFAULT_INTERNAL_FIELDS = [
|
|
20
|
+
'__v', // MongoDB version key
|
|
21
|
+
'_id', // MongoDB document ID
|
|
22
|
+
'_source', // Fixture source marker
|
|
23
|
+
'issuer', // Internal issuer reference
|
|
24
|
+
'tx_hash', // Blockchain transaction hash
|
|
25
|
+
'createdAt', // Database timestamp
|
|
26
|
+
'updatedAt', // Database timestamp
|
|
27
|
+
'is_onchain_synced', // Sync status flag
|
|
28
|
+
'vestings', // Computed vesting schedule (derived data)
|
|
29
|
+
];
|
|
30
|
+
/**
|
|
31
|
+
* Deprecated OCF fields that may differ between source and round-tripped data.
|
|
32
|
+
* These fields may be upgraded or removed during processing.
|
|
33
|
+
*/
|
|
34
|
+
exports.DEFAULT_DEPRECATED_FIELDS = [
|
|
35
|
+
'option_grant_type', // Deprecated in favor of compensation_type
|
|
36
|
+
];
|
|
12
37
|
/**
|
|
13
38
|
* Normalize a value for OCF comparison.
|
|
14
39
|
*
|
|
@@ -111,50 +136,162 @@ function isUndefinedLike(value) {
|
|
|
111
136
|
* - Treats empty arrays/objects as equivalent to undefined
|
|
112
137
|
* - Trims string whitespace
|
|
113
138
|
* - Recursively compares nested objects
|
|
139
|
+
* - Optionally ignores internal/deprecated fields
|
|
114
140
|
*
|
|
115
141
|
* @param a - First OCF object
|
|
116
142
|
* @param b - Second OCF object
|
|
143
|
+
* @param options - Comparison options
|
|
117
144
|
* @returns True if objects are semantically equal
|
|
118
145
|
*/
|
|
119
|
-
function ocfDeepEqual(a, b) {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
146
|
+
function ocfDeepEqual(a, b, options) {
|
|
147
|
+
const result = ocfCompare(a, b, options);
|
|
148
|
+
return result.equal;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Compare two OCF objects and return detailed results.
|
|
152
|
+
*
|
|
153
|
+
* @param a - First OCF object (typically the source/expected value)
|
|
154
|
+
* @param b - Second OCF object (typically the result/actual value)
|
|
155
|
+
* @param options - Comparison options
|
|
156
|
+
* @returns Comparison result with equality status and list of differences
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```typescript
|
|
160
|
+
* const result = ocfCompare(sourceFixture, readBackData, {
|
|
161
|
+
* ignoredFields: DEFAULT_INTERNAL_FIELDS,
|
|
162
|
+
* reportDifferences: true
|
|
163
|
+
* });
|
|
164
|
+
*
|
|
165
|
+
* if (!result.equal) {
|
|
166
|
+
* console.log('Differences found:', result.differences);
|
|
167
|
+
* }
|
|
168
|
+
* ```
|
|
169
|
+
*/
|
|
170
|
+
function ocfCompare(a, b, options) {
|
|
171
|
+
const ignoredFields = new Set(options?.ignoredFields ?? []);
|
|
172
|
+
const deprecatedFields = new Set(options?.deprecatedFields ?? []);
|
|
173
|
+
const allIgnored = new Set([...ignoredFields, ...deprecatedFields]);
|
|
174
|
+
const reportDifferences = options?.reportDifferences ?? false;
|
|
175
|
+
const differences = [];
|
|
176
|
+
function compare(valA, valB, path) {
|
|
177
|
+
// Consider empty arrays equivalent to undefined
|
|
178
|
+
if (isUndefinedLike(valA) && isUndefinedLike(valB))
|
|
179
|
+
return true;
|
|
180
|
+
// Handle null/undefined
|
|
181
|
+
if (valA === valB)
|
|
182
|
+
return true;
|
|
183
|
+
if (valA == null || valB == null) {
|
|
184
|
+
differences.push(`${path}: ${JSON.stringify(valA)} !== ${JSON.stringify(valB)}`);
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
// Handle different types
|
|
188
|
+
if (typeof valA !== typeof valB) {
|
|
189
|
+
differences.push(`${path}: type mismatch (${typeof valA} vs ${typeof valB})`);
|
|
190
|
+
return false;
|
|
191
|
+
}
|
|
192
|
+
// Handle objects and arrays
|
|
193
|
+
if (typeof valA === 'object' && typeof valB === 'object') {
|
|
194
|
+
const objA = valA;
|
|
195
|
+
const objB = valB;
|
|
196
|
+
// Handle arrays
|
|
197
|
+
if (Array.isArray(valA) && Array.isArray(valB)) {
|
|
198
|
+
if (valA.length !== valB.length) {
|
|
199
|
+
// Check if difference is just undefined-like elements
|
|
200
|
+
const filteredA = valA.filter((v) => !isUndefinedLike(v));
|
|
201
|
+
const filteredB = valB.filter((v) => !isUndefinedLike(v));
|
|
202
|
+
if (filteredA.length !== filteredB.length) {
|
|
203
|
+
differences.push(`${path}: array length mismatch (${valA.length} vs ${valB.length})`);
|
|
204
|
+
return false;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
let allMatch = true;
|
|
208
|
+
const maxLen = Math.max(valA.length, valB.length);
|
|
209
|
+
for (let i = 0; i < maxLen; i++) {
|
|
210
|
+
if (!compare(valA[i], valB[i], `${path}[${i}]`)) {
|
|
211
|
+
allMatch = false;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return allMatch;
|
|
215
|
+
}
|
|
216
|
+
// Get all keys, excluding ignored fields
|
|
217
|
+
const keysA = Object.keys(objA).filter((k) => !allIgnored.has(k));
|
|
218
|
+
const keysB = Object.keys(objB).filter((k) => !allIgnored.has(k));
|
|
219
|
+
const allKeys = Array.from(new Set([...keysA, ...keysB]));
|
|
220
|
+
let allMatch = true;
|
|
221
|
+
// Check if all keys match
|
|
222
|
+
for (const key of allKeys) {
|
|
223
|
+
const childValA = objA[key];
|
|
224
|
+
const childValB = objB[key];
|
|
225
|
+
const childPath = path ? `${path}.${key}` : key;
|
|
226
|
+
// Treat empty arrays as undefined-like and skip if both are undefined-like
|
|
227
|
+
if (isUndefinedLike(childValA) && isUndefinedLike(childValB))
|
|
228
|
+
continue;
|
|
229
|
+
// If one is undefined-like and the other isn't, they don't match
|
|
230
|
+
if (isUndefinedLike(childValA) !== isUndefinedLike(childValB)) {
|
|
231
|
+
differences.push(`${childPath}: one side is empty/undefined`);
|
|
232
|
+
allMatch = false;
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
// Recursively compare values
|
|
236
|
+
if (!compare(childValA, childValB, childPath)) {
|
|
237
|
+
allMatch = false;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return allMatch;
|
|
241
|
+
}
|
|
242
|
+
// Handle primitive values with normalization
|
|
243
|
+
const normalizedA = normalizeOcfValue(valA);
|
|
244
|
+
const normalizedB = normalizeOcfValue(valB);
|
|
245
|
+
if (normalizedA !== normalizedB) {
|
|
246
|
+
differences.push(`${path}: ${JSON.stringify(valA)} !== ${JSON.stringify(valB)}`);
|
|
247
|
+
return false;
|
|
152
248
|
}
|
|
153
249
|
return true;
|
|
154
250
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
251
|
+
const equal = compare(a, b, '');
|
|
252
|
+
if (reportDifferences && differences.length > 0) {
|
|
253
|
+
// eslint-disable-next-line no-console
|
|
254
|
+
console.log('OCF comparison differences:');
|
|
255
|
+
for (const diff of differences) {
|
|
256
|
+
// eslint-disable-next-line no-console
|
|
257
|
+
console.log(` - ${diff}`);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return { equal, differences };
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Strip internal and deprecated fields from an OCF object for cleaner comparison.
|
|
264
|
+
*
|
|
265
|
+
* @param obj - The OCF object to clean
|
|
266
|
+
* @param fieldsToRemove - Fields to remove (defaults to DEFAULT_INTERNAL_FIELDS + DEFAULT_DEPRECATED_FIELDS)
|
|
267
|
+
* @returns A new object with the specified fields removed
|
|
268
|
+
*/
|
|
269
|
+
function stripInternalFields(obj, fieldsToRemove) {
|
|
270
|
+
const toRemove = new Set(fieldsToRemove ?? [...exports.DEFAULT_INTERNAL_FIELDS, ...exports.DEFAULT_DEPRECATED_FIELDS]);
|
|
271
|
+
// Helper to process array items (handles nested arrays recursively)
|
|
272
|
+
const processArrayItem = (item) => {
|
|
273
|
+
if (!item || typeof item !== 'object') {
|
|
274
|
+
return item;
|
|
275
|
+
}
|
|
276
|
+
if (Array.isArray(item)) {
|
|
277
|
+
return item.map(processArrayItem);
|
|
278
|
+
}
|
|
279
|
+
return stripInternalFields(item, fieldsToRemove);
|
|
280
|
+
};
|
|
281
|
+
const result = {};
|
|
282
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
283
|
+
if (toRemove.has(key))
|
|
284
|
+
continue;
|
|
285
|
+
if (value && typeof value === 'object' && !Array.isArray(value)) {
|
|
286
|
+
result[key] = stripInternalFields(value, fieldsToRemove);
|
|
287
|
+
}
|
|
288
|
+
else if (Array.isArray(value)) {
|
|
289
|
+
result[key] = value.map(processArrayItem);
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
result[key] = value;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
return result;
|
|
159
296
|
}
|
|
160
297
|
//# sourceMappingURL=ocfComparison.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ocfComparison.js","sourceRoot":"","sources":["../../src/utils/ocfComparison.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG
|
|
1
|
+
{"version":3,"file":"ocfComparison.js","sourceRoot":"","sources":["../../src/utils/ocfComparison.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAwKH,oCAGC;AAsBD,gCA4GC;AASD,kDAgCC;AApVD;;;GAGG;AACU,QAAA,uBAAuB,GAAG;IACrC,KAAK,EAAE,sBAAsB;IAC7B,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,wBAAwB;IACnC,QAAQ,EAAE,4BAA4B;IACtC,SAAS,EAAE,8BAA8B;IACzC,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,qBAAqB;IAClC,mBAAmB,EAAE,mBAAmB;IACxC,UAAU,EAAE,2CAA2C;CAC/C,CAAC;AAEX;;;GAGG;AACU,QAAA,yBAAyB,GAAG;IACvC,mBAAmB,EAAE,2CAA2C;CACxD,CAAC;AAoCX;;;;;;;;;;GAUG;AACH,SAAS,iBAAiB,CAAC,KAAc;IACvC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,qEAAqE;QACrE,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QAE7B,0CAA0C;QAC1C,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,EAAE,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D,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YACtC,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACxB,OAAO,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QACpC,CAAC;QACD,OAAO,mBAAmB,CAAC,IAA+B,EAAE,cAAc,CAAC,CAAC;IAC9E,CAAC,CAAC;IAEF,MAAM,MAAM,GAA4B,EAAE,CAAC;IAE3C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/C,IAAI,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,SAAS;QAEhC,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAChE,MAAM,CAAC,GAAG,CAAC,GAAG,mBAAmB,CAAC,KAAgC,EAAE,cAAc,CAAC,CAAC;QACtF,CAAC;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAChC,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAC5C,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACtB,CAAC;IACH,CAAC;IAED,OAAO,MAAoB,CAAC;AAC9B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-captable-protocol/canton",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.180",
|
|
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",
|