@open-captable-protocol/canton 0.2.194 → 0.2.195
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.
- package/dist/functions/OpenCapTable/capTable/getCapTableState.d.ts +1 -1
- package/dist/functions/OpenCapTable/capTable/getCapTableState.js +1 -1
- package/dist/utils/replicationHelpers.d.ts +30 -26
- package/dist/utils/replicationHelpers.d.ts.map +1 -1
- package/dist/utils/replicationHelpers.js +50 -45
- package/dist/utils/replicationHelpers.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Query Canton for the current state of a CapTable contract.
|
|
3
3
|
*
|
|
4
4
|
* Provides a snapshot of all OCF entities currently on-chain for an issuer,
|
|
5
|
-
* enabling stateless replication by comparing against
|
|
5
|
+
* enabling stateless replication by comparing against a source of truth.
|
|
6
6
|
*
|
|
7
7
|
* @module getCapTableState
|
|
8
8
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Query Canton for the current state of a CapTable contract.
|
|
4
4
|
*
|
|
5
5
|
* Provides a snapshot of all OCF entities currently on-chain for an issuer,
|
|
6
|
-
* enabling stateless replication by comparing against
|
|
6
|
+
* enabling stateless replication by comparing against a source of truth.
|
|
7
7
|
*
|
|
8
8
|
* @module getCapTableState
|
|
9
9
|
*/
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Replication helpers for cap table synchronization.
|
|
3
3
|
*
|
|
4
4
|
* Provides utilities for:
|
|
5
|
-
* - Mapping
|
|
6
|
-
* - Computing replication diffs between
|
|
5
|
+
* - Mapping categorized OCF types to SDK entity types
|
|
6
|
+
* - Computing replication diffs between source and Canton state
|
|
7
7
|
* - Human-readable labels for display
|
|
8
8
|
*
|
|
9
9
|
* @module replicationHelpers
|
|
@@ -11,25 +11,29 @@
|
|
|
11
11
|
import type { OcfEntityType } from '../functions/OpenCapTable/capTable/batchTypes';
|
|
12
12
|
import type { CapTableState } from '../functions/OpenCapTable/capTable/getCapTableState';
|
|
13
13
|
/**
|
|
14
|
-
* Map
|
|
14
|
+
* Map categorized OCF type/subtype to OcfEntityType.
|
|
15
15
|
*
|
|
16
|
-
*
|
|
17
|
-
* - Direct types: STAKEHOLDER, STOCK_CLASS, STOCK_PLAN
|
|
18
|
-
* - Object subtypes:
|
|
19
|
-
* - Transaction subtypes:
|
|
16
|
+
* OCF data may be organized into categories:
|
|
17
|
+
* - Direct types: STAKEHOLDER, STOCK_CLASS, STOCK_PLAN as the category
|
|
18
|
+
* - Object subtypes: category='OBJECT', actual type in subtype
|
|
19
|
+
* - Transaction subtypes: category='TRANSACTION', actual type in subtype (TX_ prefix)
|
|
20
20
|
*
|
|
21
|
-
* @param
|
|
22
|
-
* @param
|
|
21
|
+
* @param categoryType - The OCF category (STAKEHOLDER, OBJECT, TRANSACTION, etc.)
|
|
22
|
+
* @param subtype - The subtype for OBJECT and TRANSACTION categories
|
|
23
23
|
* @returns The corresponding OcfEntityType, or null if not supported
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
26
|
* ```typescript
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
27
|
+
* mapCategorizedTypeToEntityType('STAKEHOLDER', null); // 'stakeholder'
|
|
28
|
+
* mapCategorizedTypeToEntityType('OBJECT', 'DOCUMENT'); // 'document'
|
|
29
|
+
* mapCategorizedTypeToEntityType('TRANSACTION', 'TX_STOCK_ISSUANCE'); // 'stockIssuance'
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
export declare function
|
|
32
|
+
export declare function mapCategorizedTypeToEntityType(categoryType: string, subtype: string | null): OcfEntityType | null;
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated Use `mapCategorizedTypeToEntityType` instead. This alias will be removed in a future version.
|
|
35
|
+
*/
|
|
36
|
+
export declare const mapDbTypeToEntityType: typeof mapCategorizedTypeToEntityType;
|
|
33
37
|
/**
|
|
34
38
|
* Get a human-readable label for an entity type with count.
|
|
35
39
|
*
|
|
@@ -46,7 +50,7 @@ export declare function mapDbTypeToEntityType(dbType: string, dbSubtype: string
|
|
|
46
50
|
*/
|
|
47
51
|
export declare function getEntityTypeLabel(type: OcfEntityType, count: number): string;
|
|
48
52
|
/**
|
|
49
|
-
* A single item to be synced
|
|
53
|
+
* A single item to be synced to Canton.
|
|
50
54
|
*/
|
|
51
55
|
export interface ReplicationItem {
|
|
52
56
|
/** OCF object ID */
|
|
@@ -59,14 +63,14 @@ export interface ReplicationItem {
|
|
|
59
63
|
data?: unknown;
|
|
60
64
|
}
|
|
61
65
|
/**
|
|
62
|
-
* Result of comparing
|
|
66
|
+
* Result of comparing source state (desired) to Canton state (actual).
|
|
63
67
|
*/
|
|
64
68
|
export interface ReplicationDiff {
|
|
65
|
-
/** Items in
|
|
69
|
+
/** Items in source but not in Canton - need to be created */
|
|
66
70
|
creates: ReplicationItem[];
|
|
67
71
|
/** Items in both - may need to be edited */
|
|
68
72
|
edits: ReplicationItem[];
|
|
69
|
-
/** Items in Canton but not in
|
|
73
|
+
/** Items in Canton but not in source - may need to be deleted */
|
|
70
74
|
deletes: ReplicationItem[];
|
|
71
75
|
/** Total number of operations */
|
|
72
76
|
total: number;
|
|
@@ -76,7 +80,7 @@ export interface ReplicationDiff {
|
|
|
76
80
|
*/
|
|
77
81
|
export interface ComputeReplicationDiffOptions {
|
|
78
82
|
/**
|
|
79
|
-
* Whether to include delete operations for items in Canton but not in
|
|
83
|
+
* Whether to include delete operations for items in Canton but not in source.
|
|
80
84
|
* Default: false (safer - doesn't delete data)
|
|
81
85
|
*/
|
|
82
86
|
syncDeletes?: boolean;
|
|
@@ -89,29 +93,29 @@ export interface ComputeReplicationDiffOptions {
|
|
|
89
93
|
alwaysEdit?: boolean;
|
|
90
94
|
}
|
|
91
95
|
/**
|
|
92
|
-
* Compute what needs to be synced
|
|
96
|
+
* Compute what needs to be synced to Canton.
|
|
93
97
|
*
|
|
94
|
-
* Compares a list of
|
|
98
|
+
* Compares a list of source items (desired state) against Canton state (actual state)
|
|
95
99
|
* and returns operations needed to synchronize them.
|
|
96
100
|
*
|
|
97
|
-
* @param
|
|
101
|
+
* @param sourceItems - OCF items from any source (desired state)
|
|
98
102
|
* @param cantonState - Current Canton state from getCapTableState()
|
|
99
103
|
* @param options - Sync options
|
|
100
104
|
* @returns Replication diff with creates, edits, and deletes
|
|
101
105
|
*
|
|
102
106
|
* @example
|
|
103
107
|
* ```typescript
|
|
104
|
-
* const
|
|
108
|
+
* const sourceItems = [
|
|
105
109
|
* { ocfId: 'stakeholder-1', entityType: 'stakeholder', data: {...} },
|
|
106
110
|
* { ocfId: 'stock-class-1', entityType: 'stockClass', data: {...} },
|
|
107
111
|
* ];
|
|
108
112
|
* const cantonState = await getCapTableState(client, issuerPartyId);
|
|
109
|
-
* const diff = computeReplicationDiff(
|
|
110
|
-
* // diff.creates = items in
|
|
111
|
-
* // diff.deletes = items in Canton but not
|
|
113
|
+
* const diff = computeReplicationDiff(sourceItems, cantonState, { syncDeletes: true });
|
|
114
|
+
* // diff.creates = items in source but not Canton
|
|
115
|
+
* // diff.deletes = items in Canton but not source
|
|
112
116
|
* ```
|
|
113
117
|
*/
|
|
114
|
-
export declare function computeReplicationDiff(
|
|
118
|
+
export declare function computeReplicationDiff(sourceItems: Array<{
|
|
115
119
|
ocfId: string;
|
|
116
120
|
entityType: OcfEntityType;
|
|
117
121
|
data: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replicationHelpers.d.ts","sourceRoot":"","sources":["../../src/utils/replicationHelpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qDAAqD,CAAC;AAqGzF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,
|
|
1
|
+
{"version":3,"file":"replicationHelpers.d.ts","sourceRoot":"","sources":["../../src/utils/replicationH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AM,CAAC;IAAC,UAAU,EAAE,aAAa,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC,EAC/E,WAAW,EAAE,aAAa,EAC1B,OAAO,GAAE,6BAAkC,GAC1C,eAAe,CAiFjB"}
|
|
@@ -3,23 +3,24 @@
|
|
|
3
3
|
* Replication helpers for cap table synchronization.
|
|
4
4
|
*
|
|
5
5
|
* Provides utilities for:
|
|
6
|
-
* - Mapping
|
|
7
|
-
* - Computing replication diffs between
|
|
6
|
+
* - Mapping categorized OCF types to SDK entity types
|
|
7
|
+
* - Computing replication diffs between source and Canton state
|
|
8
8
|
* - Human-readable labels for display
|
|
9
9
|
*
|
|
10
10
|
* @module replicationHelpers
|
|
11
11
|
*/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.mapDbTypeToEntityType =
|
|
13
|
+
exports.mapDbTypeToEntityType = void 0;
|
|
14
|
+
exports.mapCategorizedTypeToEntityType = mapCategorizedTypeToEntityType;
|
|
14
15
|
exports.getEntityTypeLabel = getEntityTypeLabel;
|
|
15
16
|
exports.computeReplicationDiff = computeReplicationDiff;
|
|
16
17
|
const planSecurityAliases_1 = require("./planSecurityAliases");
|
|
17
18
|
// ============================================================================
|
|
18
|
-
//
|
|
19
|
+
// Categorized Type Mapping
|
|
19
20
|
// ============================================================================
|
|
20
21
|
/**
|
|
21
|
-
* Direct
|
|
22
|
-
* These types
|
|
22
|
+
* Direct category type to OcfEntityType mappings.
|
|
23
|
+
* These types use the category directly as the type identifier.
|
|
23
24
|
*/
|
|
24
25
|
const DIRECT_TYPE_MAP = {
|
|
25
26
|
STAKEHOLDER: 'stakeholder',
|
|
@@ -28,7 +29,7 @@ const DIRECT_TYPE_MAP = {
|
|
|
28
29
|
};
|
|
29
30
|
/**
|
|
30
31
|
* OBJECT subtype to OcfEntityType mappings.
|
|
31
|
-
* These
|
|
32
|
+
* These use category='OBJECT' with the actual type in the subtype field.
|
|
32
33
|
*/
|
|
33
34
|
const OBJECT_SUBTYPE_MAP = {
|
|
34
35
|
DOCUMENT: 'document',
|
|
@@ -38,8 +39,8 @@ const OBJECT_SUBTYPE_MAP = {
|
|
|
38
39
|
};
|
|
39
40
|
/**
|
|
40
41
|
* TRANSACTION subtype to OcfEntityType mappings.
|
|
41
|
-
* These
|
|
42
|
-
*
|
|
42
|
+
* These use category='TRANSACTION' with the actual type in the subtype field.
|
|
43
|
+
* Subtypes use TX_ prefix with UPPER_SNAKE_CASE, SDK uses camelCase.
|
|
43
44
|
*/
|
|
44
45
|
const TRANSACTION_SUBTYPE_MAP = {
|
|
45
46
|
// Stock Transactions (9 types)
|
|
@@ -101,39 +102,43 @@ const TRANSACTION_SUBTYPE_MAP = {
|
|
|
101
102
|
TX_PLAN_SECURITY_RETRACTION: 'planSecurityRetraction',
|
|
102
103
|
};
|
|
103
104
|
/**
|
|
104
|
-
* Map
|
|
105
|
+
* Map categorized OCF type/subtype to OcfEntityType.
|
|
105
106
|
*
|
|
106
|
-
*
|
|
107
|
-
* - Direct types: STAKEHOLDER, STOCK_CLASS, STOCK_PLAN
|
|
108
|
-
* - Object subtypes:
|
|
109
|
-
* - Transaction subtypes:
|
|
107
|
+
* OCF data may be organized into categories:
|
|
108
|
+
* - Direct types: STAKEHOLDER, STOCK_CLASS, STOCK_PLAN as the category
|
|
109
|
+
* - Object subtypes: category='OBJECT', actual type in subtype
|
|
110
|
+
* - Transaction subtypes: category='TRANSACTION', actual type in subtype (TX_ prefix)
|
|
110
111
|
*
|
|
111
|
-
* @param
|
|
112
|
-
* @param
|
|
112
|
+
* @param categoryType - The OCF category (STAKEHOLDER, OBJECT, TRANSACTION, etc.)
|
|
113
|
+
* @param subtype - The subtype for OBJECT and TRANSACTION categories
|
|
113
114
|
* @returns The corresponding OcfEntityType, or null if not supported
|
|
114
115
|
*
|
|
115
116
|
* @example
|
|
116
117
|
* ```typescript
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
118
|
+
* mapCategorizedTypeToEntityType('STAKEHOLDER', null); // 'stakeholder'
|
|
119
|
+
* mapCategorizedTypeToEntityType('OBJECT', 'DOCUMENT'); // 'document'
|
|
120
|
+
* mapCategorizedTypeToEntityType('TRANSACTION', 'TX_STOCK_ISSUANCE'); // 'stockIssuance'
|
|
120
121
|
* ```
|
|
121
122
|
*/
|
|
122
|
-
function
|
|
123
|
+
function mapCategorizedTypeToEntityType(categoryType, subtype) {
|
|
123
124
|
// Direct mappings
|
|
124
|
-
if (
|
|
125
|
-
return DIRECT_TYPE_MAP[
|
|
125
|
+
if (categoryType in DIRECT_TYPE_MAP) {
|
|
126
|
+
return DIRECT_TYPE_MAP[categoryType];
|
|
126
127
|
}
|
|
127
128
|
// Object subtypes
|
|
128
|
-
if (
|
|
129
|
-
return OBJECT_SUBTYPE_MAP[
|
|
129
|
+
if (categoryType === 'OBJECT' && subtype) {
|
|
130
|
+
return OBJECT_SUBTYPE_MAP[subtype] ?? null;
|
|
130
131
|
}
|
|
131
132
|
// Transaction subtypes
|
|
132
|
-
if (
|
|
133
|
-
return TRANSACTION_SUBTYPE_MAP[
|
|
133
|
+
if (categoryType === 'TRANSACTION' && subtype) {
|
|
134
|
+
return TRANSACTION_SUBTYPE_MAP[subtype] ?? null;
|
|
134
135
|
}
|
|
135
136
|
return null;
|
|
136
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* @deprecated Use `mapCategorizedTypeToEntityType` instead. This alias will be removed in a future version.
|
|
140
|
+
*/
|
|
141
|
+
exports.mapDbTypeToEntityType = mapCategorizedTypeToEntityType;
|
|
137
142
|
// ============================================================================
|
|
138
143
|
// Human-Readable Labels
|
|
139
144
|
// ============================================================================
|
|
@@ -232,39 +237,39 @@ function getEntityTypeLabel(type, count) {
|
|
|
232
237
|
return `${count} ${count === 1 ? singular : plural}`;
|
|
233
238
|
}
|
|
234
239
|
/**
|
|
235
|
-
* Compute what needs to be synced
|
|
240
|
+
* Compute what needs to be synced to Canton.
|
|
236
241
|
*
|
|
237
|
-
* Compares a list of
|
|
242
|
+
* Compares a list of source items (desired state) against Canton state (actual state)
|
|
238
243
|
* and returns operations needed to synchronize them.
|
|
239
244
|
*
|
|
240
|
-
* @param
|
|
245
|
+
* @param sourceItems - OCF items from any source (desired state)
|
|
241
246
|
* @param cantonState - Current Canton state from getCapTableState()
|
|
242
247
|
* @param options - Sync options
|
|
243
248
|
* @returns Replication diff with creates, edits, and deletes
|
|
244
249
|
*
|
|
245
250
|
* @example
|
|
246
251
|
* ```typescript
|
|
247
|
-
* const
|
|
252
|
+
* const sourceItems = [
|
|
248
253
|
* { ocfId: 'stakeholder-1', entityType: 'stakeholder', data: {...} },
|
|
249
254
|
* { ocfId: 'stock-class-1', entityType: 'stockClass', data: {...} },
|
|
250
255
|
* ];
|
|
251
256
|
* const cantonState = await getCapTableState(client, issuerPartyId);
|
|
252
|
-
* const diff = computeReplicationDiff(
|
|
253
|
-
* // diff.creates = items in
|
|
254
|
-
* // diff.deletes = items in Canton but not
|
|
257
|
+
* const diff = computeReplicationDiff(sourceItems, cantonState, { syncDeletes: true });
|
|
258
|
+
* // diff.creates = items in source but not Canton
|
|
259
|
+
* // diff.deletes = items in Canton but not source
|
|
255
260
|
* ```
|
|
256
261
|
*/
|
|
257
|
-
function computeReplicationDiff(
|
|
262
|
+
function computeReplicationDiff(sourceItems, cantonState, options = {}) {
|
|
258
263
|
const { syncDeletes = false, alwaysEdit = false } = options;
|
|
259
264
|
const creates = [];
|
|
260
265
|
const edits = [];
|
|
261
266
|
const deletes = [];
|
|
262
|
-
// Track
|
|
263
|
-
const
|
|
267
|
+
// Track source items by type for delete detection
|
|
268
|
+
const sourceIdsByType = new Map();
|
|
264
269
|
// Track seen items to prevent duplicate create/edit operations
|
|
265
270
|
const seenItems = new Set();
|
|
266
|
-
// Process each
|
|
267
|
-
for (const item of
|
|
271
|
+
// Process each source item
|
|
272
|
+
for (const item of sourceItems) {
|
|
268
273
|
// Skip duplicate items (same ocfId + entityType)
|
|
269
274
|
const itemKey = `${item.entityType}:${item.ocfId}`;
|
|
270
275
|
if (seenItems.has(itemKey)) {
|
|
@@ -275,17 +280,17 @@ function computeReplicationDiff(dbItems, cantonState, options = {}) {
|
|
|
275
280
|
// Canton stores planSecurity items under equity_compensation_* fields
|
|
276
281
|
const normalizedType = (0, planSecurityAliases_1.normalizeEntityType)(item.entityType);
|
|
277
282
|
// Track for delete detection (using normalized type to match Canton's storage)
|
|
278
|
-
let typeIds =
|
|
283
|
+
let typeIds = sourceIdsByType.get(normalizedType);
|
|
279
284
|
if (!typeIds) {
|
|
280
285
|
typeIds = new Set();
|
|
281
|
-
|
|
286
|
+
sourceIdsByType.set(normalizedType, typeIds);
|
|
282
287
|
}
|
|
283
288
|
typeIds.add(item.ocfId);
|
|
284
289
|
// Check if exists in Canton (using normalized type)
|
|
285
290
|
const cantonIds = cantonState.entities.get(normalizedType) ?? new Set();
|
|
286
291
|
const existsInCanton = cantonIds.has(item.ocfId);
|
|
287
292
|
if (!existsInCanton) {
|
|
288
|
-
// Item in
|
|
293
|
+
// Item in source but not Canton → CREATE
|
|
289
294
|
creates.push({
|
|
290
295
|
ocfId: item.ocfId,
|
|
291
296
|
entityType: item.entityType,
|
|
@@ -304,13 +309,13 @@ function computeReplicationDiff(dbItems, cantonState, options = {}) {
|
|
|
304
309
|
}
|
|
305
310
|
// If not alwaysEdit and exists in Canton, skip (already synced)
|
|
306
311
|
}
|
|
307
|
-
// Detect deletes (in Canton but not in
|
|
312
|
+
// Detect deletes (in Canton but not in source)
|
|
308
313
|
if (syncDeletes) {
|
|
309
314
|
for (const [entityType, cantonIds] of cantonState.entities) {
|
|
310
|
-
const
|
|
315
|
+
const sourceIds = sourceIdsByType.get(entityType) ?? new Set();
|
|
311
316
|
for (const cantonId of cantonIds) {
|
|
312
|
-
if (!
|
|
313
|
-
// Item in Canton but not
|
|
317
|
+
if (!sourceIds.has(cantonId)) {
|
|
318
|
+
// Item in Canton but not source → DELETE
|
|
314
319
|
deletes.push({
|
|
315
320
|
ocfId: cantonId,
|
|
316
321
|
entityType,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replicationHelpers.js","sourceRoot":"","sources":["../../src/utils/replicationHelpers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG
|
|
1
|
+
{"version":3,"file":"replicationHelpers.js","sourceRoot":"","sources":["../../src/utils/replicationHelpers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AA2HH,wEAiBC;AA8GD,gDAIC;AA4ED,wDAqFC;AA3ZD,+DAA4D;AAE5D,+EAA+E;AAC/E,2BAA2B;AAC3B,+EAA+E;AAE/E;;;GAGG;AACH,MAAM,eAAe,GAAkC;IACrD,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,YAAY;IACzB,UAAU,EAAE,WAAW;CACxB,CAAC;AAEF;;;GAGG;AACH,MAAM,kBAAkB,GAAkC;IACxD,QAAQ,EAAE,UAAU;IACpB,aAAa,EAAE,cAAc;IAC7B,qBAAqB,EAAE,qBAAqB;IAC5C,SAAS,EAAE,WAAW;CACvB,CAAC;AAEF;;;;GAIG;AACH,MAAM,uBAAuB,GAAkC;IAC7D,+BAA+B;IAC/B,iBAAiB,EAAE,eAAe;IAClC,qBAAqB,EAAE,mBAAmB;IAC1C,iBAAiB,EAAE,eAAe;IAClC,mBAAmB,EAAE,iBAAiB;IACtC,mBAAmB,EAAE,iBAAiB;IACtC,mBAAmB,EAAE,iBAAiB;IACtC,mBAAmB,EAAE,iBAAiB;IACtC,mBAAmB,EAAE,iBAAiB;IACtC,sBAAsB,EAAE,oBAAoB;IAE5C,gCAAgC;IAChC,+BAA+B,EAAE,4BAA4B;IAC7D,mCAAmC,EAAE,gCAAgC;IACrE,+BAA+B,EAAE,4BAA4B;IAC7D,iCAAiC,EAAE,8BAA8B;IACjE,+BAA+B,EAAE,4BAA4B;IAC7D,8BAA8B,EAAE,2BAA2B;IAC3D,gCAAgC,EAAE,6BAA6B;IAC/D,iCAAiC,EAAE,8BAA8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C;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,OAAO;QACP,KAAK;QACL,OAAO;QACP,KAAK,EAAE,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;KACtD,CAAC;AACJ,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.195",
|
|
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",
|