@ottochain/sdk 1.6.0 → 1.7.0-beta.2

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 (78) hide show
  1. package/dist/cjs/apps/contracts/index.js +18 -13
  2. package/dist/cjs/apps/contracts/state-machines/index.js +139 -7
  3. package/dist/cjs/apps/corporate/index.js +18 -20
  4. package/dist/cjs/apps/corporate/state-machines/index.js +535 -6336
  5. package/dist/cjs/apps/governance/index.js +32 -31
  6. package/dist/cjs/apps/governance/state-machines/index.js +498 -2315
  7. package/dist/cjs/apps/identity/constants.js +28 -14
  8. package/dist/cjs/apps/identity/index.js +54 -23
  9. package/dist/cjs/apps/identity/state-machines/index.js +516 -4
  10. package/dist/cjs/apps/index.js +15 -13
  11. package/dist/cjs/apps/markets/index.js +23 -10
  12. package/dist/cjs/apps/markets/state-machines/index.js +1904 -230
  13. package/dist/cjs/generated/google/protobuf/struct.js +1 -1
  14. package/dist/cjs/generated/google/protobuf/timestamp.js +1 -1
  15. package/dist/cjs/generated/index.js +19 -22
  16. package/dist/cjs/generated/ottochain/apps/contracts/v1/contract.js +1 -1
  17. package/dist/cjs/generated/ottochain/apps/corporate/v1/corporate.js +1 -1
  18. package/dist/cjs/generated/ottochain/apps/governance/v1/governance.js +1 -1
  19. package/dist/cjs/generated/ottochain/apps/identity/v1/attestation.js +12 -12
  20. package/dist/cjs/generated/ottochain/apps/identity/v1/identity.js +1689 -0
  21. package/dist/cjs/generated/ottochain/apps/markets/v1/market.js +1 -1
  22. package/dist/cjs/generated/ottochain/v1/common.js +1 -1
  23. package/dist/cjs/generated/ottochain/v1/fiber.js +1 -1
  24. package/dist/cjs/generated/ottochain/v1/messages.js +1 -1
  25. package/dist/cjs/generated/ottochain/v1/records.js +1 -1
  26. package/dist/esm/apps/contracts/index.js +16 -13
  27. package/dist/esm/apps/contracts/state-machines/index.js +138 -6
  28. package/dist/esm/apps/corporate/index.js +14 -20
  29. package/dist/esm/apps/corporate/state-machines/index.js +534 -6335
  30. package/dist/esm/apps/governance/index.js +26 -30
  31. package/dist/esm/apps/governance/state-machines/index.js +497 -2314
  32. package/dist/esm/apps/identity/constants.js +27 -13
  33. package/dist/esm/apps/identity/index.js +32 -15
  34. package/dist/esm/apps/identity/state-machines/index.js +515 -3
  35. package/dist/esm/apps/index.js +14 -12
  36. package/dist/esm/apps/markets/index.js +19 -10
  37. package/dist/esm/apps/markets/state-machines/index.js +1903 -229
  38. package/dist/esm/generated/google/protobuf/struct.js +1 -1
  39. package/dist/esm/generated/google/protobuf/timestamp.js +1 -1
  40. package/dist/esm/generated/index.js +2 -3
  41. package/dist/esm/generated/ottochain/apps/contracts/v1/contract.js +1 -1
  42. package/dist/esm/generated/ottochain/apps/corporate/v1/corporate.js +1 -1
  43. package/dist/esm/generated/ottochain/apps/governance/v1/governance.js +1 -1
  44. package/dist/esm/generated/ottochain/apps/identity/v1/attestation.js +2 -2
  45. package/dist/esm/generated/ottochain/apps/identity/v1/identity.js +1677 -0
  46. package/dist/esm/generated/ottochain/apps/markets/v1/market.js +1 -1
  47. package/dist/esm/generated/ottochain/v1/common.js +1 -1
  48. package/dist/esm/generated/ottochain/v1/fiber.js +1 -1
  49. package/dist/esm/generated/ottochain/v1/messages.js +1 -1
  50. package/dist/esm/generated/ottochain/v1/records.js +1 -1
  51. package/dist/types/apps/contracts/index.d.ts +661 -9
  52. package/dist/types/apps/contracts/state-machines/index.d.ts +109 -6
  53. package/dist/types/apps/corporate/index.d.ts +4015 -7
  54. package/dist/types/apps/corporate/state-machines/index.d.ts +472 -5587
  55. package/dist/types/apps/governance/index.d.ts +2151 -12
  56. package/dist/types/apps/governance/state-machines/index.d.ts +462 -1875
  57. package/dist/types/apps/identity/constants.d.ts +10 -5
  58. package/dist/types/apps/identity/index.d.ts +620 -12
  59. package/dist/types/apps/identity/state-machines/index.d.ts +393 -3
  60. package/dist/types/apps/index.d.ts +14 -12
  61. package/dist/types/apps/markets/index.d.ts +1690 -7
  62. package/dist/types/apps/markets/state-machines/index.d.ts +1416 -184
  63. package/dist/types/generated/index.d.ts +1 -2
  64. package/dist/types/generated/ottochain/apps/identity/v1/attestation.d.ts +1 -1
  65. package/dist/types/generated/ottochain/apps/identity/v1/identity.d.ts +208 -0
  66. package/package.json +1 -1
  67. package/dist/cjs/apps/oracles/index.js +0 -59
  68. package/dist/cjs/apps/oracles/state-machines/index.js +0 -415
  69. package/dist/cjs/generated/ottochain/apps/identity/v1/agent.js +0 -619
  70. package/dist/cjs/generated/ottochain/apps/oracles/v1/oracle.js +0 -1223
  71. package/dist/esm/apps/oracles/index.js +0 -42
  72. package/dist/esm/apps/oracles/state-machines/index.js +0 -412
  73. package/dist/esm/generated/ottochain/apps/identity/v1/agent.js +0 -610
  74. package/dist/esm/generated/ottochain/apps/oracles/v1/oracle.js +0 -1217
  75. package/dist/types/apps/oracles/index.d.ts +0 -34
  76. package/dist/types/apps/oracles/state-machines/index.d.ts +0 -312
  77. package/dist/types/generated/ottochain/apps/identity/v1/agent.d.ts +0 -94
  78. package/dist/types/generated/ottochain/apps/oracles/v1/oracle.d.ts +0 -150
@@ -9,19 +9,4027 @@
9
9
  * EntityType,
10
10
  * EntityState,
11
11
  * CorporateEntity,
12
- * getCorporateDefinition
12
+ * getCorporateDefinition,
13
+ * CORPORATE_DEFINITIONS
13
14
  * } from '@ottochain/sdk/apps/corporate';
14
15
  *
15
- * const entityDef = getCorporateDefinition('Entity');
16
- * const boardDef = getCorporateDefinition('Board');
16
+ * const entityDef = getCorporateDefinition('entity');
17
+ * const boardDef = getCorporateDefinition('board');
17
18
  * ```
18
19
  *
19
20
  * @packageDocumentation
20
21
  */
21
22
  export { EntityType, EntityState, DirectorStatus, OfficerStatus, BoardMeetingType, ResolutionStatus, Jurisdiction, ShareClass, CorporateEntity, RegisteredAgent, Incorporator, ShareStructure, CorporateBoard, Director, SeatInfo, QuorumRules, BoardMeeting, MeetingAttendee, CorporateOfficers, Officer, OfficerAction, CorporateShareholders, Shareholder, ShareHolding, CorporateResolution, ResolutionVote, CorporateSecurities, SecurityIssuance, SecurityTransfer, CorporateCompliance, FilingRecord, ComplianceRequirement, CreateEntityRequest, AppointDirectorRequest, IssueSharesRequest, ProposeResolutionRequest, entityTypeFromJSON, entityTypeToJSON, entityStateFromJSON, entityStateToJSON, directorStatusFromJSON, directorStatusToJSON, officerStatusFromJSON, officerStatusToJSON, boardMeetingTypeFromJSON, boardMeetingTypeToJSON, resolutionStatusFromJSON, resolutionStatusToJSON, } from '../../generated/ottochain/apps/corporate/v1/corporate.js';
22
- export type CorporateDefinitionType = 'Entity' | 'Board' | 'Shareholders' | 'Officers' | 'Securities' | 'Compliance' | 'Bylaws' | 'Committee' | 'Proxy' | 'Resolution';
23
- export declare const CORPORATE_DEFINITIONS: Record<CorporateDefinitionType, unknown>;
23
+ import { corpEntityDef, corpBoardDef, corpShareholdersDef, corpSecuritiesDef } from './state-machines/index.js';
24
+ export { corpEntityDef, corpBoardDef, corpShareholdersDef, corpSecuritiesDef, };
25
+ /** All corporate state machine definitions */
26
+ export declare const CORPORATE_DEFINITIONS: {
27
+ readonly entity: {
28
+ readonly $schema: "https://ottochain.dev/schemas/state-machine-v1.json";
29
+ readonly name: "CorpEntity";
30
+ readonly version: "1.0.0";
31
+ readonly category: "corporate-governance";
32
+ readonly description: "Master corporate record tracking the lifecycle of a business entity from incorporation through dissolution. Manages legal identity, share structure, and corporate status.";
33
+ readonly context: {
34
+ readonly entityId: {
35
+ readonly type: "string";
36
+ readonly description: "Unique identifier for this corporate entity";
37
+ };
38
+ readonly legalName: {
39
+ readonly type: "string";
40
+ readonly description: "Full legal name of the corporation";
41
+ };
42
+ readonly tradeName: {
43
+ readonly type: "string";
44
+ readonly nullable: true;
45
+ readonly description: "DBA or trade name if different";
46
+ };
47
+ readonly entityType: {
48
+ readonly type: "string";
49
+ readonly enum: readonly ["C_CORP", "S_CORP", "B_CORP", "LLC", "LP", "LLP"];
50
+ readonly description: "Legal entity type";
51
+ };
52
+ readonly jurisdiction: {
53
+ readonly type: "object";
54
+ readonly properties: {
55
+ readonly state: {
56
+ readonly type: "string";
57
+ readonly description: "State of incorporation (e.g., DE, NV, WY)";
58
+ };
59
+ readonly country: {
60
+ readonly type: "string";
61
+ readonly default: "USA";
62
+ };
63
+ readonly foreignQualifications: {
64
+ readonly type: "array";
65
+ readonly items: {
66
+ readonly type: "string";
67
+ };
68
+ readonly description: "States where foreign qualified to do business";
69
+ };
70
+ };
71
+ };
72
+ readonly formationDate: {
73
+ readonly type: "string";
74
+ readonly format: "date";
75
+ readonly description: "Date of incorporation";
76
+ };
77
+ readonly fiscalYearEnd: {
78
+ readonly type: "string";
79
+ readonly description: "Fiscal year end (MM-DD format)";
80
+ };
81
+ readonly registeredAgent: {
82
+ readonly type: "object";
83
+ readonly properties: {
84
+ readonly name: {
85
+ readonly type: "string";
86
+ };
87
+ readonly address: {
88
+ readonly type: "object";
89
+ };
90
+ readonly phone: {
91
+ readonly type: "string";
92
+ };
93
+ readonly email: {
94
+ readonly type: "string";
95
+ };
96
+ readonly effectiveDate: {
97
+ readonly type: "string";
98
+ readonly format: "date";
99
+ };
100
+ };
101
+ };
102
+ readonly principalOffice: {
103
+ readonly type: "object";
104
+ readonly properties: {
105
+ readonly street: {
106
+ readonly type: "string";
107
+ };
108
+ readonly city: {
109
+ readonly type: "string";
110
+ };
111
+ readonly state: {
112
+ readonly type: "string";
113
+ };
114
+ readonly zip: {
115
+ readonly type: "string";
116
+ };
117
+ readonly country: {
118
+ readonly type: "string";
119
+ readonly default: "USA";
120
+ };
121
+ };
122
+ };
123
+ readonly shareStructure: {
124
+ readonly type: "object";
125
+ readonly properties: {
126
+ readonly classes: {
127
+ readonly type: "array";
128
+ readonly items: {
129
+ readonly type: "object";
130
+ readonly properties: {
131
+ readonly className: {
132
+ readonly type: "string";
133
+ readonly description: "e.g., Common, Series A Preferred";
134
+ };
135
+ readonly classId: {
136
+ readonly type: "string";
137
+ };
138
+ readonly authorized: {
139
+ readonly type: "integer";
140
+ readonly description: "Total shares authorized";
141
+ };
142
+ readonly issued: {
143
+ readonly type: "integer";
144
+ readonly description: "Shares currently issued";
145
+ };
146
+ readonly outstanding: {
147
+ readonly type: "integer";
148
+ readonly description: "Issued minus treasury";
149
+ };
150
+ readonly treasury: {
151
+ readonly type: "integer";
152
+ readonly description: "Shares held by company";
153
+ };
154
+ readonly parValue: {
155
+ readonly type: "number";
156
+ readonly description: "Par value per share";
157
+ };
158
+ readonly votingRights: {
159
+ readonly type: "boolean";
160
+ readonly description: "Whether class has voting rights";
161
+ };
162
+ readonly votesPerShare: {
163
+ readonly type: "number";
164
+ readonly default: 1;
165
+ };
166
+ readonly liquidationPreference: {
167
+ readonly type: "number";
168
+ readonly nullable: true;
169
+ readonly description: "Liquidation preference multiple";
170
+ };
171
+ readonly dividendRate: {
172
+ readonly type: "number";
173
+ readonly nullable: true;
174
+ readonly description: "Annual dividend rate %";
175
+ };
176
+ readonly convertible: {
177
+ readonly type: "boolean";
178
+ readonly default: false;
179
+ };
180
+ readonly conversionRatio: {
181
+ readonly type: "number";
182
+ readonly nullable: true;
183
+ };
184
+ readonly antidilution: {
185
+ readonly type: "string";
186
+ readonly enum: readonly ["NONE", "BROAD_BASED", "NARROW_BASED", "FULL_RATCHET"];
187
+ readonly nullable: true;
188
+ };
189
+ };
190
+ };
191
+ };
192
+ readonly totalAuthorized: {
193
+ readonly type: "integer";
194
+ readonly description: "Sum of all authorized shares";
195
+ };
196
+ readonly totalIssued: {
197
+ readonly type: "integer";
198
+ };
199
+ readonly totalOutstanding: {
200
+ readonly type: "integer";
201
+ };
202
+ };
203
+ };
204
+ readonly incorporators: {
205
+ readonly type: "array";
206
+ readonly items: {
207
+ readonly type: "object";
208
+ readonly properties: {
209
+ readonly name: {
210
+ readonly type: "string";
211
+ };
212
+ readonly address: {
213
+ readonly type: "object";
214
+ };
215
+ readonly signatureDate: {
216
+ readonly type: "string";
217
+ readonly format: "date";
218
+ };
219
+ };
220
+ };
221
+ };
222
+ readonly ein: {
223
+ readonly type: "string";
224
+ readonly nullable: true;
225
+ readonly description: "Federal EIN";
226
+ };
227
+ readonly stateIds: {
228
+ readonly type: "object";
229
+ readonly additionalProperties: {
230
+ readonly type: "string";
231
+ };
232
+ readonly description: "State-specific entity IDs keyed by state code";
233
+ };
234
+ readonly suspensionReason: {
235
+ readonly type: "string";
236
+ readonly nullable: true;
237
+ };
238
+ readonly suspensionDate: {
239
+ readonly type: "string";
240
+ readonly format: "date";
241
+ readonly nullable: true;
242
+ };
243
+ readonly dissolutionDate: {
244
+ readonly type: "string";
245
+ readonly format: "date";
246
+ readonly nullable: true;
247
+ };
248
+ readonly dissolutionReason: {
249
+ readonly type: "string";
250
+ readonly nullable: true;
251
+ };
252
+ readonly charterAmendments: {
253
+ readonly type: "array";
254
+ readonly items: {
255
+ readonly type: "object";
256
+ readonly properties: {
257
+ readonly amendmentId: {
258
+ readonly type: "string";
259
+ };
260
+ readonly description: {
261
+ readonly type: "string";
262
+ };
263
+ readonly effectiveDate: {
264
+ readonly type: "string";
265
+ readonly format: "date";
266
+ };
267
+ readonly resolutionRef: {
268
+ readonly type: "string";
269
+ readonly description: "Reference to approving resolution";
270
+ };
271
+ readonly filedDate: {
272
+ readonly type: "string";
273
+ readonly format: "date";
274
+ };
275
+ };
276
+ };
277
+ };
278
+ readonly createdAt: {
279
+ readonly type: "string";
280
+ readonly format: "date-time";
281
+ };
282
+ readonly updatedAt: {
283
+ readonly type: "string";
284
+ readonly format: "date-time";
285
+ };
286
+ };
287
+ readonly states: {
288
+ readonly INCORPORATING: {
289
+ readonly description: "Initial state during formation process. Articles filed but not yet approved by state.";
290
+ readonly metadata: null;
291
+ };
292
+ readonly ACTIVE: {
293
+ readonly description: "Corporation is in good standing and authorized to conduct business.";
294
+ readonly metadata: null;
295
+ };
296
+ readonly SUSPENDED: {
297
+ readonly description: "Corporate powers suspended due to compliance failure (tax, filings, etc). Can be reinstated.";
298
+ readonly metadata: null;
299
+ };
300
+ readonly DISSOLVED: {
301
+ readonly description: "Corporation has been legally dissolved. Terminal state.";
302
+ readonly metadata: null;
303
+ readonly terminal: true;
304
+ };
305
+ };
306
+ readonly initialState: "INCORPORATING";
307
+ readonly transitions: {
308
+ readonly incorporate: {
309
+ readonly from: "INCORPORATING";
310
+ readonly to: "ACTIVE";
311
+ readonly description: "State approves articles of incorporation, corporation comes into existence";
312
+ readonly event: {
313
+ readonly name: "incorporate";
314
+ readonly payload: {
315
+ readonly approvalDate: {
316
+ readonly type: "string";
317
+ readonly format: "date";
318
+ readonly required: true;
319
+ };
320
+ readonly stateFileNumber: {
321
+ readonly type: "string";
322
+ readonly required: true;
323
+ };
324
+ readonly certificateOfIncorporation: {
325
+ readonly type: "string";
326
+ readonly description: "Document reference";
327
+ };
328
+ };
329
+ };
330
+ readonly guards: readonly [{
331
+ readonly name: "hasRequiredFormationDocs";
332
+ readonly description: "Articles of incorporation filed, incorporators signed, registered agent designated";
333
+ readonly expression: "context.legalName != null && context.jurisdiction.state != null && context.registeredAgent != null && context.incorporators.length > 0";
334
+ }, {
335
+ readonly name: "hasAuthorizedShares";
336
+ readonly description: "At least one share class authorized";
337
+ readonly expression: "context.shareStructure.classes.length > 0 && context.shareStructure.totalAuthorized > 0";
338
+ }];
339
+ readonly effects: readonly [{
340
+ readonly type: "SET_CONTEXT";
341
+ readonly path: "formationDate";
342
+ readonly value: "{{ event.approvalDate }}";
343
+ }, {
344
+ readonly type: "SET_CONTEXT";
345
+ readonly path: "stateIds.{{ context.jurisdiction.state }}";
346
+ readonly value: "{{ event.stateFileNumber }}";
347
+ }, {
348
+ readonly type: "SET_CONTEXT";
349
+ readonly path: "updatedAt";
350
+ readonly value: "{{ now() }}";
351
+ }, {
352
+ readonly type: "EMIT_EVENT";
353
+ readonly eventType: "CORPORATION_FORMED";
354
+ readonly payload: {
355
+ readonly entityId: "{{ context.entityId }}";
356
+ readonly legalName: "{{ context.legalName }}";
357
+ readonly jurisdiction: "{{ context.jurisdiction.state }}";
358
+ readonly formationDate: "{{ event.approvalDate }}";
359
+ };
360
+ }];
361
+ };
362
+ readonly amend_charter: {
363
+ readonly from: "ACTIVE";
364
+ readonly to: "ACTIVE";
365
+ readonly description: "Amend the certificate/articles of incorporation (requires shareholder approval for most amendments)";
366
+ readonly event: {
367
+ readonly name: "amend_charter";
368
+ readonly payload: {
369
+ readonly amendmentId: {
370
+ readonly type: "string";
371
+ readonly required: true;
372
+ };
373
+ readonly description: {
374
+ readonly type: "string";
375
+ readonly required: true;
376
+ };
377
+ readonly amendmentType: {
378
+ readonly type: "string";
379
+ readonly enum: readonly ["NAME_CHANGE", "SHARE_AUTHORIZATION", "PURPOSE_CHANGE", "OTHER"];
380
+ readonly required: true;
381
+ };
382
+ readonly resolutionRef: {
383
+ readonly type: "string";
384
+ readonly required: true;
385
+ readonly description: "Reference to board/shareholder resolution";
386
+ };
387
+ readonly effectiveDate: {
388
+ readonly type: "string";
389
+ readonly format: "date";
390
+ readonly required: true;
391
+ };
392
+ readonly filedDate: {
393
+ readonly type: "string";
394
+ readonly format: "date";
395
+ readonly required: true;
396
+ };
397
+ readonly newShareAuthorization: {
398
+ readonly type: "object";
399
+ readonly nullable: true;
400
+ readonly description: "If increasing/changing authorized shares";
401
+ };
402
+ readonly newLegalName: {
403
+ readonly type: "string";
404
+ readonly nullable: true;
405
+ };
406
+ };
407
+ };
408
+ readonly guards: readonly [{
409
+ readonly name: "hasApprovedResolution";
410
+ readonly description: "Charter amendment must be backed by an executed resolution";
411
+ readonly expression: "event.resolutionRef != null";
412
+ readonly crossMachine: {
413
+ readonly machine: "corporate-resolution";
414
+ readonly instanceRef: "{{ event.resolutionRef }}";
415
+ readonly requiredState: "EXECUTED";
416
+ };
417
+ }];
418
+ readonly effects: readonly [{
419
+ readonly type: "APPEND_ARRAY";
420
+ readonly path: "charterAmendments";
421
+ readonly value: {
422
+ readonly amendmentId: "{{ event.amendmentId }}";
423
+ readonly description: "{{ event.description }}";
424
+ readonly effectiveDate: "{{ event.effectiveDate }}";
425
+ readonly resolutionRef: "{{ event.resolutionRef }}";
426
+ readonly filedDate: "{{ event.filedDate }}";
427
+ };
428
+ }, {
429
+ readonly type: "CONDITIONAL";
430
+ readonly condition: "event.newLegalName != null";
431
+ readonly then: {
432
+ readonly type: "SET_CONTEXT";
433
+ readonly path: "legalName";
434
+ readonly value: "{{ event.newLegalName }}";
435
+ };
436
+ }, {
437
+ readonly type: "SET_CONTEXT";
438
+ readonly path: "updatedAt";
439
+ readonly value: "{{ now() }}";
440
+ }, {
441
+ readonly type: "EMIT_EVENT";
442
+ readonly eventType: "CHARTER_AMENDED";
443
+ readonly payload: {
444
+ readonly entityId: "{{ context.entityId }}";
445
+ readonly amendmentId: "{{ event.amendmentId }}";
446
+ readonly amendmentType: "{{ event.amendmentType }}";
447
+ };
448
+ }];
449
+ };
450
+ readonly update_share_class: {
451
+ readonly from: "ACTIVE";
452
+ readonly to: "ACTIVE";
453
+ readonly description: "Update authorized shares for an existing class or add new class (requires charter amendment)";
454
+ readonly event: {
455
+ readonly name: "update_share_class";
456
+ readonly payload: {
457
+ readonly classId: {
458
+ readonly type: "string";
459
+ readonly required: true;
460
+ };
461
+ readonly className: {
462
+ readonly type: "string";
463
+ readonly required: true;
464
+ };
465
+ readonly authorized: {
466
+ readonly type: "integer";
467
+ readonly required: true;
468
+ };
469
+ readonly parValue: {
470
+ readonly type: "number";
471
+ readonly required: true;
472
+ };
473
+ readonly votingRights: {
474
+ readonly type: "boolean";
475
+ readonly required: true;
476
+ };
477
+ readonly votesPerShare: {
478
+ readonly type: "number";
479
+ readonly default: 1;
480
+ };
481
+ readonly liquidationPreference: {
482
+ readonly type: "number";
483
+ readonly nullable: true;
484
+ };
485
+ readonly dividendRate: {
486
+ readonly type: "number";
487
+ readonly nullable: true;
488
+ };
489
+ readonly convertible: {
490
+ readonly type: "boolean";
491
+ readonly default: false;
492
+ };
493
+ readonly charterAmendmentRef: {
494
+ readonly type: "string";
495
+ readonly required: true;
496
+ };
497
+ };
498
+ };
499
+ readonly guards: readonly [{
500
+ readonly name: "charterAmended";
501
+ readonly description: "Share class changes require charter amendment to be filed";
502
+ readonly expression: "context.charterAmendments.some(a => a.amendmentId === event.charterAmendmentRef)";
503
+ }];
504
+ readonly effects: readonly [{
505
+ readonly type: "UPSERT_ARRAY";
506
+ readonly path: "shareStructure.classes";
507
+ readonly matchKey: "classId";
508
+ readonly matchValue: "{{ event.classId }}";
509
+ readonly value: {
510
+ readonly classId: "{{ event.classId }}";
511
+ readonly className: "{{ event.className }}";
512
+ readonly authorized: "{{ event.authorized }}";
513
+ readonly issued: 0;
514
+ readonly outstanding: 0;
515
+ readonly treasury: 0;
516
+ readonly parValue: "{{ event.parValue }}";
517
+ readonly votingRights: "{{ event.votingRights }}";
518
+ readonly votesPerShare: "{{ event.votesPerShare }}";
519
+ readonly liquidationPreference: "{{ event.liquidationPreference }}";
520
+ readonly dividendRate: "{{ event.dividendRate }}";
521
+ readonly convertible: "{{ event.convertible }}";
522
+ };
523
+ }, {
524
+ readonly type: "COMPUTE";
525
+ readonly path: "shareStructure.totalAuthorized";
526
+ readonly expression: "context.shareStructure.classes.reduce((sum, c) => sum + c.authorized, 0)";
527
+ }];
528
+ };
529
+ readonly update_registered_agent: {
530
+ readonly from: "ACTIVE";
531
+ readonly to: "ACTIVE";
532
+ readonly description: "Change the registered agent on file with the state";
533
+ readonly event: {
534
+ readonly name: "update_registered_agent";
535
+ readonly payload: {
536
+ readonly name: {
537
+ readonly type: "string";
538
+ readonly required: true;
539
+ };
540
+ readonly address: {
541
+ readonly type: "object";
542
+ readonly required: true;
543
+ };
544
+ readonly phone: {
545
+ readonly type: "string";
546
+ };
547
+ readonly email: {
548
+ readonly type: "string";
549
+ };
550
+ readonly effectiveDate: {
551
+ readonly type: "string";
552
+ readonly format: "date";
553
+ readonly required: true;
554
+ };
555
+ readonly filingConfirmation: {
556
+ readonly type: "string";
557
+ readonly description: "State filing confirmation number";
558
+ };
559
+ };
560
+ };
561
+ readonly effects: readonly [{
562
+ readonly type: "SET_CONTEXT";
563
+ readonly path: "registeredAgent";
564
+ readonly value: {
565
+ readonly name: "{{ event.name }}";
566
+ readonly address: "{{ event.address }}";
567
+ readonly phone: "{{ event.phone }}";
568
+ readonly email: "{{ event.email }}";
569
+ readonly effectiveDate: "{{ event.effectiveDate }}";
570
+ };
571
+ }, {
572
+ readonly type: "EMIT_EVENT";
573
+ readonly eventType: "REGISTERED_AGENT_CHANGED";
574
+ readonly payload: {
575
+ readonly entityId: "{{ context.entityId }}";
576
+ readonly newAgent: "{{ event.name }}";
577
+ readonly effectiveDate: "{{ event.effectiveDate }}";
578
+ };
579
+ }];
580
+ };
581
+ readonly suspend: {
582
+ readonly from: "ACTIVE";
583
+ readonly to: "SUSPENDED";
584
+ readonly description: "State suspends corporate powers (typically for tax/filing noncompliance)";
585
+ readonly event: {
586
+ readonly name: "suspend";
587
+ readonly payload: {
588
+ readonly reason: {
589
+ readonly type: "string";
590
+ readonly enum: readonly ["FRANCHISE_TAX_DELINQUENT", "ANNUAL_REPORT_MISSING", "REGISTERED_AGENT_LAPSE", "ADMINISTRATIVE", "OTHER"];
591
+ readonly required: true;
592
+ };
593
+ readonly suspensionDate: {
594
+ readonly type: "string";
595
+ readonly format: "date";
596
+ readonly required: true;
597
+ };
598
+ readonly stateNotice: {
599
+ readonly type: "string";
600
+ readonly description: "Reference to state notice";
601
+ };
602
+ readonly cureDeadline: {
603
+ readonly type: "string";
604
+ readonly format: "date";
605
+ readonly nullable: true;
606
+ };
607
+ };
608
+ };
609
+ readonly effects: readonly [{
610
+ readonly type: "SET_CONTEXT";
611
+ readonly path: "suspensionReason";
612
+ readonly value: "{{ event.reason }}";
613
+ }, {
614
+ readonly type: "SET_CONTEXT";
615
+ readonly path: "suspensionDate";
616
+ readonly value: "{{ event.suspensionDate }}";
617
+ }, {
618
+ readonly type: "EMIT_EVENT";
619
+ readonly eventType: "CORPORATION_SUSPENDED";
620
+ readonly payload: {
621
+ readonly entityId: "{{ context.entityId }}";
622
+ readonly reason: "{{ event.reason }}";
623
+ readonly cureDeadline: "{{ event.cureDeadline }}";
624
+ };
625
+ }];
626
+ };
627
+ readonly reinstate: {
628
+ readonly from: "SUSPENDED";
629
+ readonly to: "ACTIVE";
630
+ readonly description: "Cure deficiencies and reinstate corporate powers";
631
+ readonly event: {
632
+ readonly name: "reinstate";
633
+ readonly payload: {
634
+ readonly reinstatementDate: {
635
+ readonly type: "string";
636
+ readonly format: "date";
637
+ readonly required: true;
638
+ };
639
+ readonly curativeActions: {
640
+ readonly type: "array";
641
+ readonly items: {
642
+ readonly type: "string";
643
+ };
644
+ readonly description: "List of actions taken to cure";
645
+ readonly required: true;
646
+ };
647
+ readonly stateConfirmation: {
648
+ readonly type: "string";
649
+ readonly required: true;
650
+ };
651
+ readonly penaltiesPaid: {
652
+ readonly type: "number";
653
+ readonly nullable: true;
654
+ };
655
+ };
656
+ };
657
+ readonly effects: readonly [{
658
+ readonly type: "SET_CONTEXT";
659
+ readonly path: "suspensionReason";
660
+ readonly value: null;
661
+ }, {
662
+ readonly type: "SET_CONTEXT";
663
+ readonly path: "suspensionDate";
664
+ readonly value: null;
665
+ }, {
666
+ readonly type: "EMIT_EVENT";
667
+ readonly eventType: "CORPORATION_REINSTATED";
668
+ readonly payload: {
669
+ readonly entityId: "{{ context.entityId }}";
670
+ readonly reinstatementDate: "{{ event.reinstatementDate }}";
671
+ };
672
+ }];
673
+ };
674
+ readonly dissolve_voluntary: {
675
+ readonly from: "ACTIVE";
676
+ readonly to: "DISSOLVED";
677
+ readonly description: "Voluntary dissolution approved by board and shareholders";
678
+ readonly event: {
679
+ readonly name: "dissolve_voluntary";
680
+ readonly payload: {
681
+ readonly dissolutionDate: {
682
+ readonly type: "string";
683
+ readonly format: "date";
684
+ readonly required: true;
685
+ };
686
+ readonly boardResolutionRef: {
687
+ readonly type: "string";
688
+ readonly required: true;
689
+ };
690
+ readonly shareholderResolutionRef: {
691
+ readonly type: "string";
692
+ readonly required: true;
693
+ };
694
+ readonly windingUpPlan: {
695
+ readonly type: "string";
696
+ readonly description: "Reference to winding up plan";
697
+ };
698
+ readonly certificateOfDissolution: {
699
+ readonly type: "string";
700
+ };
701
+ };
702
+ };
703
+ readonly guards: readonly [{
704
+ readonly name: "boardApproved";
705
+ readonly description: "Board must approve dissolution";
706
+ readonly crossMachine: {
707
+ readonly machine: "corporate-resolution";
708
+ readonly instanceRef: "{{ event.boardResolutionRef }}";
709
+ readonly requiredState: "EXECUTED";
710
+ };
711
+ }, {
712
+ readonly name: "shareholdersApproved";
713
+ readonly description: "Shareholders must approve dissolution (typically majority or supermajority)";
714
+ readonly crossMachine: {
715
+ readonly machine: "corporate-resolution";
716
+ readonly instanceRef: "{{ event.shareholderResolutionRef }}";
717
+ readonly requiredState: "EXECUTED";
718
+ };
719
+ }];
720
+ readonly effects: readonly [{
721
+ readonly type: "SET_CONTEXT";
722
+ readonly path: "dissolutionDate";
723
+ readonly value: "{{ event.dissolutionDate }}";
724
+ }, {
725
+ readonly type: "SET_CONTEXT";
726
+ readonly path: "dissolutionReason";
727
+ readonly value: "VOLUNTARY";
728
+ }, {
729
+ readonly type: "EMIT_EVENT";
730
+ readonly eventType: "CORPORATION_DISSOLVED";
731
+ readonly payload: {
732
+ readonly entityId: "{{ context.entityId }}";
733
+ readonly dissolutionType: "VOLUNTARY";
734
+ readonly dissolutionDate: "{{ event.dissolutionDate }}";
735
+ };
736
+ }];
737
+ };
738
+ readonly dissolve_administrative: {
739
+ readonly from: "SUSPENDED";
740
+ readonly to: "DISSOLVED";
741
+ readonly description: "Administrative dissolution by state after prolonged suspension";
742
+ readonly event: {
743
+ readonly name: "dissolve_administrative";
744
+ readonly payload: {
745
+ readonly dissolutionDate: {
746
+ readonly type: "string";
747
+ readonly format: "date";
748
+ readonly required: true;
749
+ };
750
+ readonly stateOrder: {
751
+ readonly type: "string";
752
+ readonly required: true;
753
+ };
754
+ readonly reason: {
755
+ readonly type: "string";
756
+ readonly required: true;
757
+ };
758
+ };
759
+ };
760
+ readonly effects: readonly [{
761
+ readonly type: "SET_CONTEXT";
762
+ readonly path: "dissolutionDate";
763
+ readonly value: "{{ event.dissolutionDate }}";
764
+ }, {
765
+ readonly type: "SET_CONTEXT";
766
+ readonly path: "dissolutionReason";
767
+ readonly value: "ADMINISTRATIVE: {{ event.reason }}";
768
+ }, {
769
+ readonly type: "EMIT_EVENT";
770
+ readonly eventType: "CORPORATION_DISSOLVED";
771
+ readonly payload: {
772
+ readonly entityId: "{{ context.entityId }}";
773
+ readonly dissolutionType: "ADMINISTRATIVE";
774
+ readonly dissolutionDate: "{{ event.dissolutionDate }}";
775
+ };
776
+ }];
777
+ };
778
+ };
779
+ readonly crossMachineRefs: {
780
+ readonly board: {
781
+ readonly machine: "corporate-board";
782
+ readonly description: "Board of directors for this entity";
783
+ readonly foreignKey: "entityId";
784
+ };
785
+ readonly officers: {
786
+ readonly machine: "corporate-officers";
787
+ readonly description: "Executive officers for this entity";
788
+ readonly foreignKey: "entityId";
789
+ };
790
+ readonly bylaws: {
791
+ readonly machine: "corporate-bylaws";
792
+ readonly description: "Governing bylaws for this entity";
793
+ readonly foreignKey: "entityId";
794
+ };
795
+ readonly shareholders: {
796
+ readonly machine: "corporate-shareholders";
797
+ readonly description: "Shareholder meeting instances";
798
+ readonly foreignKey: "entityId";
799
+ };
800
+ readonly securities: {
801
+ readonly machine: "corporate-securities";
802
+ readonly description: "Stock issuance records";
803
+ readonly foreignKey: "entityId";
804
+ };
805
+ readonly compliance: {
806
+ readonly machine: "corporate-compliance";
807
+ readonly description: "Regulatory compliance tracking";
808
+ readonly foreignKey: "entityId";
809
+ };
810
+ };
811
+ readonly metadata: {
812
+ readonly author: "OttoChain";
813
+ readonly license: "MIT";
814
+ readonly tags: readonly ["corporate", "governance", "entity", "formation"];
815
+ readonly documentation: "https://ottochain.dev/docs/corporate/entity";
816
+ };
817
+ };
818
+ readonly board: {
819
+ readonly $schema: "https://ottochain.dev/schemas/state-machine-v1.json";
820
+ readonly name: "CorpBoard";
821
+ readonly version: "1.0.0";
822
+ readonly category: "corporate-governance";
823
+ readonly description: "Board of directors state machine managing director seats, meetings, quorum, and formal board actions. Supports staggered boards with classified directors.";
824
+ readonly context: {
825
+ readonly boardId: {
826
+ readonly type: "string";
827
+ readonly description: "Unique identifier for this board instance";
828
+ };
829
+ readonly entityId: {
830
+ readonly type: "string";
831
+ readonly description: "Reference to parent corporate-entity";
832
+ };
833
+ readonly directors: {
834
+ readonly type: "array";
835
+ readonly items: {
836
+ readonly type: "object";
837
+ readonly properties: {
838
+ readonly directorId: {
839
+ readonly type: "string";
840
+ };
841
+ readonly name: {
842
+ readonly type: "string";
843
+ };
844
+ readonly email: {
845
+ readonly type: "string";
846
+ };
847
+ readonly termStart: {
848
+ readonly type: "string";
849
+ readonly format: "date";
850
+ };
851
+ readonly termEnd: {
852
+ readonly type: "string";
853
+ readonly format: "date";
854
+ };
855
+ readonly class: {
856
+ readonly type: "string";
857
+ readonly enum: readonly ["CLASS_I", "CLASS_II", "CLASS_III", "UNCLASSIFIED"];
858
+ readonly description: "For staggered boards";
859
+ };
860
+ readonly status: {
861
+ readonly type: "string";
862
+ readonly enum: readonly ["ACTIVE", "RESIGNED", "REMOVED", "TERM_EXPIRED"];
863
+ };
864
+ readonly isIndependent: {
865
+ readonly type: "boolean";
866
+ readonly description: "Independence under applicable rules";
867
+ };
868
+ readonly isChair: {
869
+ readonly type: "boolean";
870
+ readonly default: false;
871
+ };
872
+ readonly isLeadIndependent: {
873
+ readonly type: "boolean";
874
+ readonly default: false;
875
+ };
876
+ readonly committees: {
877
+ readonly type: "array";
878
+ readonly items: {
879
+ readonly type: "string";
880
+ };
881
+ readonly description: "Committee memberships by committee ID";
882
+ };
883
+ readonly electedBy: {
884
+ readonly type: "string";
885
+ readonly description: "Resolution reference for election";
886
+ };
887
+ readonly compensationAgreementRef: {
888
+ readonly type: "string";
889
+ readonly nullable: true;
890
+ };
891
+ };
892
+ };
893
+ };
894
+ readonly seats: {
895
+ readonly type: "object";
896
+ readonly properties: {
897
+ readonly authorized: {
898
+ readonly type: "integer";
899
+ readonly description: "Number of board seats authorized by bylaws";
900
+ };
901
+ readonly filled: {
902
+ readonly type: "integer";
903
+ };
904
+ readonly vacant: {
905
+ readonly type: "integer";
906
+ };
907
+ };
908
+ };
909
+ readonly boardStructure: {
910
+ readonly type: "object";
911
+ readonly properties: {
912
+ readonly isClassified: {
913
+ readonly type: "boolean";
914
+ readonly description: "Whether board has staggered terms";
915
+ };
916
+ readonly termYears: {
917
+ readonly type: "integer";
918
+ readonly default: 1;
919
+ readonly description: "Director term length";
920
+ };
921
+ readonly classTerms: {
922
+ readonly type: "object";
923
+ readonly properties: {
924
+ readonly CLASS_I: {
925
+ readonly type: "integer";
926
+ };
927
+ readonly CLASS_II: {
928
+ readonly type: "integer";
929
+ };
930
+ readonly CLASS_III: {
931
+ readonly type: "integer";
932
+ };
933
+ };
934
+ };
935
+ };
936
+ };
937
+ readonly quorumRules: {
938
+ readonly type: "object";
939
+ readonly properties: {
940
+ readonly type: {
941
+ readonly type: "string";
942
+ readonly enum: readonly ["MAJORITY", "SUPERMAJORITY", "FIXED_NUMBER"];
943
+ readonly default: "MAJORITY";
944
+ };
945
+ readonly threshold: {
946
+ readonly type: "number";
947
+ readonly description: "Fraction for majority/super, or count for fixed";
948
+ };
949
+ readonly minimumRequired: {
950
+ readonly type: "integer";
951
+ readonly description: "Absolute minimum regardless of formula";
952
+ };
953
+ };
954
+ };
955
+ readonly votingRules: {
956
+ readonly type: "object";
957
+ readonly properties: {
958
+ readonly standardApproval: {
959
+ readonly type: "string";
960
+ readonly enum: readonly ["MAJORITY_PRESENT", "MAJORITY_FULL_BOARD"];
961
+ readonly default: "MAJORITY_PRESENT";
962
+ };
963
+ readonly supermajorityMatters: {
964
+ readonly type: "array";
965
+ readonly items: {
966
+ readonly type: "string";
967
+ };
968
+ readonly description: "Action types requiring supermajority";
969
+ };
970
+ readonly supermajorityThreshold: {
971
+ readonly type: "number";
972
+ readonly default: 0.6667;
973
+ };
974
+ };
975
+ };
976
+ readonly currentMeeting: {
977
+ readonly type: "object";
978
+ readonly nullable: true;
979
+ readonly properties: {
980
+ readonly meetingId: {
981
+ readonly type: "string";
982
+ };
983
+ readonly type: {
984
+ readonly type: "string";
985
+ readonly enum: readonly ["REGULAR", "SPECIAL", "ANNUAL", "ORGANIZATIONAL"];
986
+ };
987
+ readonly scheduledDate: {
988
+ readonly type: "string";
989
+ readonly format: "date-time";
990
+ };
991
+ readonly location: {
992
+ readonly type: "string";
993
+ };
994
+ readonly isVirtual: {
995
+ readonly type: "boolean";
996
+ };
997
+ readonly calledBy: {
998
+ readonly type: "string";
999
+ };
1000
+ readonly noticeDate: {
1001
+ readonly type: "string";
1002
+ readonly format: "date";
1003
+ };
1004
+ readonly agenda: {
1005
+ readonly type: "array";
1006
+ readonly items: {
1007
+ readonly type: "string";
1008
+ };
1009
+ };
1010
+ readonly attendees: {
1011
+ readonly type: "array";
1012
+ readonly items: {
1013
+ readonly type: "object";
1014
+ readonly properties: {
1015
+ readonly directorId: {
1016
+ readonly type: "string";
1017
+ };
1018
+ readonly present: {
1019
+ readonly type: "boolean";
1020
+ };
1021
+ readonly arrivedAt: {
1022
+ readonly type: "string";
1023
+ readonly format: "date-time";
1024
+ readonly nullable: true;
1025
+ };
1026
+ readonly departedAt: {
1027
+ readonly type: "string";
1028
+ readonly format: "date-time";
1029
+ readonly nullable: true;
1030
+ };
1031
+ readonly viaProxy: {
1032
+ readonly type: "boolean";
1033
+ readonly default: false;
1034
+ };
1035
+ };
1036
+ };
1037
+ };
1038
+ readonly quorumPresent: {
1039
+ readonly type: "boolean";
1040
+ };
1041
+ readonly quorumCount: {
1042
+ readonly type: "integer";
1043
+ };
1044
+ readonly openedAt: {
1045
+ readonly type: "string";
1046
+ readonly format: "date-time";
1047
+ readonly nullable: true;
1048
+ };
1049
+ readonly closedAt: {
1050
+ readonly type: "string";
1051
+ readonly format: "date-time";
1052
+ readonly nullable: true;
1053
+ };
1054
+ readonly minutesRef: {
1055
+ readonly type: "string";
1056
+ readonly nullable: true;
1057
+ };
1058
+ };
1059
+ };
1060
+ readonly meetingHistory: {
1061
+ readonly type: "array";
1062
+ readonly items: {
1063
+ readonly type: "object";
1064
+ readonly properties: {
1065
+ readonly meetingId: {
1066
+ readonly type: "string";
1067
+ };
1068
+ readonly type: {
1069
+ readonly type: "string";
1070
+ };
1071
+ readonly date: {
1072
+ readonly type: "string";
1073
+ readonly format: "date";
1074
+ };
1075
+ readonly quorumAchieved: {
1076
+ readonly type: "boolean";
1077
+ };
1078
+ readonly attendeeCount: {
1079
+ readonly type: "integer";
1080
+ };
1081
+ readonly resolutionsPassed: {
1082
+ readonly type: "array";
1083
+ readonly items: {
1084
+ readonly type: "string";
1085
+ };
1086
+ };
1087
+ readonly minutesRef: {
1088
+ readonly type: "string";
1089
+ };
1090
+ };
1091
+ };
1092
+ };
1093
+ readonly createdAt: {
1094
+ readonly type: "string";
1095
+ readonly format: "date-time";
1096
+ };
1097
+ readonly updatedAt: {
1098
+ readonly type: "string";
1099
+ readonly format: "date-time";
1100
+ };
1101
+ };
1102
+ readonly states: {
1103
+ readonly ACTIVE: {
1104
+ readonly description: "Board is constituted and able to conduct business. Default state between meetings.";
1105
+ readonly metadata: null;
1106
+ };
1107
+ readonly IN_MEETING: {
1108
+ readonly description: "Board meeting is in session with quorum present. Can take formal actions.";
1109
+ readonly metadata: null;
1110
+ };
1111
+ readonly QUORUM_LOST: {
1112
+ readonly description: "Meeting in progress but quorum lost due to departures. No further action until quorum restored or adjourned.";
1113
+ readonly metadata: null;
1114
+ };
1115
+ };
1116
+ readonly initialState: "ACTIVE";
1117
+ readonly transitions: {
1118
+ readonly elect_director: {
1119
+ readonly from: "ACTIVE";
1120
+ readonly to: "ACTIVE";
1121
+ readonly description: "Add a new director to the board (election typically done at shareholder meeting or by board to fill vacancy)";
1122
+ readonly event: {
1123
+ readonly name: "elect_director";
1124
+ readonly payload: {
1125
+ readonly directorId: {
1126
+ readonly type: "string";
1127
+ readonly required: true;
1128
+ };
1129
+ readonly name: {
1130
+ readonly type: "string";
1131
+ readonly required: true;
1132
+ };
1133
+ readonly email: {
1134
+ readonly type: "string";
1135
+ };
1136
+ readonly termStart: {
1137
+ readonly type: "string";
1138
+ readonly format: "date";
1139
+ readonly required: true;
1140
+ };
1141
+ readonly termEnd: {
1142
+ readonly type: "string";
1143
+ readonly format: "date";
1144
+ readonly required: true;
1145
+ };
1146
+ readonly class: {
1147
+ readonly type: "string";
1148
+ readonly enum: readonly ["CLASS_I", "CLASS_II", "CLASS_III", "UNCLASSIFIED"];
1149
+ };
1150
+ readonly isIndependent: {
1151
+ readonly type: "boolean";
1152
+ readonly required: true;
1153
+ };
1154
+ readonly electionResolutionRef: {
1155
+ readonly type: "string";
1156
+ readonly required: true;
1157
+ readonly description: "Shareholder or board resolution";
1158
+ };
1159
+ readonly isFillingVacancy: {
1160
+ readonly type: "boolean";
1161
+ readonly default: false;
1162
+ };
1163
+ };
1164
+ };
1165
+ readonly guards: readonly [{
1166
+ readonly name: "hasAvailableSeat";
1167
+ readonly description: "Must have vacant seat or be filling expired term";
1168
+ readonly expression: "context.seats.vacant > 0 || event.isFillingVacancy";
1169
+ }, {
1170
+ readonly name: "hasElectionResolution";
1171
+ readonly description: "Must have valid election resolution (shareholder for annual, board for vacancy fill)";
1172
+ readonly expression: "event.electionResolutionRef != null";
1173
+ }, {
1174
+ readonly name: "notAlreadyDirector";
1175
+ readonly description: "Person not already serving on board";
1176
+ readonly expression: "!context.directors.some(d => d.directorId === event.directorId && d.status === 'ACTIVE')";
1177
+ }];
1178
+ readonly effects: readonly [{
1179
+ readonly type: "APPEND_ARRAY";
1180
+ readonly path: "directors";
1181
+ readonly value: {
1182
+ readonly directorId: "{{ event.directorId }}";
1183
+ readonly name: "{{ event.name }}";
1184
+ readonly email: "{{ event.email }}";
1185
+ readonly termStart: "{{ event.termStart }}";
1186
+ readonly termEnd: "{{ event.termEnd }}";
1187
+ readonly class: "{{ event.class }}";
1188
+ readonly status: "ACTIVE";
1189
+ readonly isIndependent: "{{ event.isIndependent }}";
1190
+ readonly isChair: false;
1191
+ readonly isLeadIndependent: false;
1192
+ readonly committees: readonly [];
1193
+ readonly electedBy: "{{ event.electionResolutionRef }}";
1194
+ };
1195
+ }, {
1196
+ readonly type: "INCREMENT";
1197
+ readonly path: "seats.filled";
1198
+ readonly amount: 1;
1199
+ }, {
1200
+ readonly type: "DECREMENT";
1201
+ readonly path: "seats.vacant";
1202
+ readonly amount: 1;
1203
+ }, {
1204
+ readonly type: "EMIT_EVENT";
1205
+ readonly eventType: "DIRECTOR_ELECTED";
1206
+ readonly payload: {
1207
+ readonly boardId: "{{ context.boardId }}";
1208
+ readonly directorId: "{{ event.directorId }}";
1209
+ readonly name: "{{ event.name }}";
1210
+ readonly termEnd: "{{ event.termEnd }}";
1211
+ };
1212
+ }];
1213
+ };
1214
+ readonly resign_director: {
1215
+ readonly from: readonly ["ACTIVE", "IN_MEETING"];
1216
+ readonly to: "ACTIVE";
1217
+ readonly description: "Director resigns from the board";
1218
+ readonly event: {
1219
+ readonly name: "resign_director";
1220
+ readonly payload: {
1221
+ readonly directorId: {
1222
+ readonly type: "string";
1223
+ readonly required: true;
1224
+ };
1225
+ readonly effectiveDate: {
1226
+ readonly type: "string";
1227
+ readonly format: "date";
1228
+ readonly required: true;
1229
+ };
1230
+ readonly reason: {
1231
+ readonly type: "string";
1232
+ };
1233
+ readonly resignationLetter: {
1234
+ readonly type: "string";
1235
+ readonly description: "Document reference";
1236
+ };
1237
+ };
1238
+ };
1239
+ readonly guards: readonly [{
1240
+ readonly name: "isActiveDirector";
1241
+ readonly expression: "context.directors.some(d => d.directorId === event.directorId && d.status === 'ACTIVE')";
1242
+ }];
1243
+ readonly effects: readonly [{
1244
+ readonly type: "UPDATE_ARRAY_ITEM";
1245
+ readonly path: "directors";
1246
+ readonly matchKey: "directorId";
1247
+ readonly matchValue: "{{ event.directorId }}";
1248
+ readonly updates: {
1249
+ readonly status: "RESIGNED";
1250
+ readonly termEnd: "{{ event.effectiveDate }}";
1251
+ };
1252
+ }, {
1253
+ readonly type: "DECREMENT";
1254
+ readonly path: "seats.filled";
1255
+ readonly amount: 1;
1256
+ }, {
1257
+ readonly type: "INCREMENT";
1258
+ readonly path: "seats.vacant";
1259
+ readonly amount: 1;
1260
+ }, {
1261
+ readonly type: "EMIT_EVENT";
1262
+ readonly eventType: "DIRECTOR_RESIGNED";
1263
+ readonly payload: {
1264
+ readonly boardId: "{{ context.boardId }}";
1265
+ readonly directorId: "{{ event.directorId }}";
1266
+ readonly effectiveDate: "{{ event.effectiveDate }}";
1267
+ };
1268
+ }];
1269
+ };
1270
+ readonly remove_for_cause: {
1271
+ readonly from: "ACTIVE";
1272
+ readonly to: "ACTIVE";
1273
+ readonly description: "Remove a director for cause (requires board or shareholder action depending on bylaws)";
1274
+ readonly event: {
1275
+ readonly name: "remove_for_cause";
1276
+ readonly payload: {
1277
+ readonly directorId: {
1278
+ readonly type: "string";
1279
+ readonly required: true;
1280
+ };
1281
+ readonly cause: {
1282
+ readonly type: "string";
1283
+ readonly required: true;
1284
+ };
1285
+ readonly removalResolutionRef: {
1286
+ readonly type: "string";
1287
+ readonly required: true;
1288
+ };
1289
+ readonly effectiveDate: {
1290
+ readonly type: "string";
1291
+ readonly format: "date";
1292
+ readonly required: true;
1293
+ };
1294
+ };
1295
+ };
1296
+ readonly guards: readonly [{
1297
+ readonly name: "isActiveDirector";
1298
+ readonly expression: "context.directors.some(d => d.directorId === event.directorId && d.status === 'ACTIVE')";
1299
+ }, {
1300
+ readonly name: "hasRemovalResolution";
1301
+ readonly crossMachine: {
1302
+ readonly machine: "corporate-resolution";
1303
+ readonly instanceRef: "{{ event.removalResolutionRef }}";
1304
+ readonly requiredState: "EXECUTED";
1305
+ };
1306
+ }];
1307
+ readonly effects: readonly [{
1308
+ readonly type: "UPDATE_ARRAY_ITEM";
1309
+ readonly path: "directors";
1310
+ readonly matchKey: "directorId";
1311
+ readonly matchValue: "{{ event.directorId }}";
1312
+ readonly updates: {
1313
+ readonly status: "REMOVED";
1314
+ readonly termEnd: "{{ event.effectiveDate }}";
1315
+ };
1316
+ }, {
1317
+ readonly type: "DECREMENT";
1318
+ readonly path: "seats.filled";
1319
+ readonly amount: 1;
1320
+ }, {
1321
+ readonly type: "INCREMENT";
1322
+ readonly path: "seats.vacant";
1323
+ readonly amount: 1;
1324
+ }, {
1325
+ readonly type: "EMIT_EVENT";
1326
+ readonly eventType: "DIRECTOR_REMOVED";
1327
+ readonly payload: {
1328
+ readonly boardId: "{{ context.boardId }}";
1329
+ readonly directorId: "{{ event.directorId }}";
1330
+ readonly cause: "{{ event.cause }}";
1331
+ };
1332
+ }];
1333
+ };
1334
+ readonly designate_chair: {
1335
+ readonly from: "ACTIVE";
1336
+ readonly to: "ACTIVE";
1337
+ readonly description: "Designate a director as board chair";
1338
+ readonly event: {
1339
+ readonly name: "designate_chair";
1340
+ readonly payload: {
1341
+ readonly directorId: {
1342
+ readonly type: "string";
1343
+ readonly required: true;
1344
+ };
1345
+ readonly resolutionRef: {
1346
+ readonly type: "string";
1347
+ readonly required: true;
1348
+ };
1349
+ };
1350
+ };
1351
+ readonly guards: readonly [{
1352
+ readonly name: "isActiveDirector";
1353
+ readonly expression: "context.directors.some(d => d.directorId === event.directorId && d.status === 'ACTIVE')";
1354
+ }];
1355
+ readonly effects: readonly [{
1356
+ readonly type: "UPDATE_ARRAY_ALL";
1357
+ readonly path: "directors";
1358
+ readonly updates: {
1359
+ readonly isChair: false;
1360
+ };
1361
+ }, {
1362
+ readonly type: "UPDATE_ARRAY_ITEM";
1363
+ readonly path: "directors";
1364
+ readonly matchKey: "directorId";
1365
+ readonly matchValue: "{{ event.directorId }}";
1366
+ readonly updates: {
1367
+ readonly isChair: true;
1368
+ };
1369
+ }];
1370
+ };
1371
+ readonly call_meeting: {
1372
+ readonly from: "ACTIVE";
1373
+ readonly to: "ACTIVE";
1374
+ readonly description: "Schedule a board meeting (can be called by chair, CEO, or directors per bylaws)";
1375
+ readonly event: {
1376
+ readonly name: "call_meeting";
1377
+ readonly payload: {
1378
+ readonly meetingId: {
1379
+ readonly type: "string";
1380
+ readonly required: true;
1381
+ };
1382
+ readonly type: {
1383
+ readonly type: "string";
1384
+ readonly enum: readonly ["REGULAR", "SPECIAL", "ANNUAL", "ORGANIZATIONAL"];
1385
+ readonly required: true;
1386
+ };
1387
+ readonly scheduledDate: {
1388
+ readonly type: "string";
1389
+ readonly format: "date-time";
1390
+ readonly required: true;
1391
+ };
1392
+ readonly location: {
1393
+ readonly type: "string";
1394
+ };
1395
+ readonly isVirtual: {
1396
+ readonly type: "boolean";
1397
+ readonly default: false;
1398
+ };
1399
+ readonly calledBy: {
1400
+ readonly type: "string";
1401
+ readonly required: true;
1402
+ readonly description: "Director ID or officer title";
1403
+ };
1404
+ readonly noticeDate: {
1405
+ readonly type: "string";
1406
+ readonly format: "date";
1407
+ readonly required: true;
1408
+ };
1409
+ readonly agenda: {
1410
+ readonly type: "array";
1411
+ readonly items: {
1412
+ readonly type: "string";
1413
+ };
1414
+ };
1415
+ readonly waiverOfNotice: {
1416
+ readonly type: "boolean";
1417
+ readonly default: false;
1418
+ readonly description: "If all directors waive notice";
1419
+ };
1420
+ };
1421
+ };
1422
+ readonly guards: readonly [{
1423
+ readonly name: "sufficientNotice";
1424
+ readonly description: "Must provide notice per bylaws (typically 2-10 days for special, less for regular)";
1425
+ readonly expression: "event.waiverOfNotice || (new Date(event.scheduledDate) - new Date(event.noticeDate)) >= 2 * 24 * 60 * 60 * 1000";
1426
+ }, {
1427
+ readonly name: "noConflictingMeeting";
1428
+ readonly description: "No other meeting currently scheduled/in progress";
1429
+ readonly expression: "context.currentMeeting == null || context.currentMeeting.closedAt != null";
1430
+ }];
1431
+ readonly effects: readonly [{
1432
+ readonly type: "SET_CONTEXT";
1433
+ readonly path: "currentMeeting";
1434
+ readonly value: {
1435
+ readonly meetingId: "{{ event.meetingId }}";
1436
+ readonly type: "{{ event.type }}";
1437
+ readonly scheduledDate: "{{ event.scheduledDate }}";
1438
+ readonly location: "{{ event.location }}";
1439
+ readonly isVirtual: "{{ event.isVirtual }}";
1440
+ readonly calledBy: "{{ event.calledBy }}";
1441
+ readonly noticeDate: "{{ event.noticeDate }}";
1442
+ readonly agenda: "{{ event.agenda }}";
1443
+ readonly attendees: readonly [];
1444
+ readonly quorumPresent: false;
1445
+ readonly quorumCount: 0;
1446
+ };
1447
+ }, {
1448
+ readonly type: "EMIT_EVENT";
1449
+ readonly eventType: "BOARD_MEETING_SCHEDULED";
1450
+ readonly payload: {
1451
+ readonly boardId: "{{ context.boardId }}";
1452
+ readonly meetingId: "{{ event.meetingId }}";
1453
+ readonly scheduledDate: "{{ event.scheduledDate }}";
1454
+ };
1455
+ }];
1456
+ };
1457
+ readonly record_attendance: {
1458
+ readonly from: "ACTIVE";
1459
+ readonly to: "ACTIVE";
1460
+ readonly description: "Record a director's attendance before meeting opens";
1461
+ readonly event: {
1462
+ readonly name: "record_attendance";
1463
+ readonly payload: {
1464
+ readonly directorId: {
1465
+ readonly type: "string";
1466
+ readonly required: true;
1467
+ };
1468
+ readonly present: {
1469
+ readonly type: "boolean";
1470
+ readonly required: true;
1471
+ };
1472
+ readonly arrivedAt: {
1473
+ readonly type: "string";
1474
+ readonly format: "date-time";
1475
+ };
1476
+ };
1477
+ };
1478
+ readonly guards: readonly [{
1479
+ readonly name: "hasPendingMeeting";
1480
+ readonly expression: "context.currentMeeting != null && context.currentMeeting.openedAt == null";
1481
+ }, {
1482
+ readonly name: "isActiveDirector";
1483
+ readonly expression: "context.directors.some(d => d.directorId === event.directorId && d.status === 'ACTIVE')";
1484
+ }];
1485
+ readonly effects: readonly [{
1486
+ readonly type: "APPEND_ARRAY";
1487
+ readonly path: "currentMeeting.attendees";
1488
+ readonly value: {
1489
+ readonly directorId: "{{ event.directorId }}";
1490
+ readonly present: "{{ event.present }}";
1491
+ readonly arrivedAt: "{{ event.arrivedAt }}";
1492
+ readonly viaProxy: false;
1493
+ };
1494
+ }, {
1495
+ readonly type: "COMPUTE";
1496
+ readonly path: "currentMeeting.quorumCount";
1497
+ readonly expression: "context.currentMeeting.attendees.filter(a => a.present).length";
1498
+ }, {
1499
+ readonly type: "COMPUTE";
1500
+ readonly path: "currentMeeting.quorumPresent";
1501
+ readonly expression: "context.currentMeeting.attendees.filter(a => a.present).length >= Math.ceil(context.seats.filled * 0.5)";
1502
+ }];
1503
+ };
1504
+ readonly open_meeting: {
1505
+ readonly from: "ACTIVE";
1506
+ readonly to: "IN_MEETING";
1507
+ readonly description: "Officially open the board meeting once quorum is established";
1508
+ readonly event: {
1509
+ readonly name: "open_meeting";
1510
+ readonly payload: {
1511
+ readonly openedAt: {
1512
+ readonly type: "string";
1513
+ readonly format: "date-time";
1514
+ readonly required: true;
1515
+ };
1516
+ readonly chairPresiding: {
1517
+ readonly type: "string";
1518
+ readonly description: "Director ID presiding";
1519
+ };
1520
+ };
1521
+ };
1522
+ readonly guards: readonly [{
1523
+ readonly name: "hasPendingMeeting";
1524
+ readonly expression: "context.currentMeeting != null && context.currentMeeting.openedAt == null";
1525
+ }, {
1526
+ readonly name: "quorumPresent";
1527
+ readonly description: "Cannot open meeting without quorum";
1528
+ readonly expression: "context.currentMeeting.quorumPresent === true";
1529
+ }];
1530
+ readonly effects: readonly [{
1531
+ readonly type: "SET_CONTEXT";
1532
+ readonly path: "currentMeeting.openedAt";
1533
+ readonly value: "{{ event.openedAt }}";
1534
+ }, {
1535
+ readonly type: "EMIT_EVENT";
1536
+ readonly eventType: "BOARD_MEETING_OPENED";
1537
+ readonly payload: {
1538
+ readonly boardId: "{{ context.boardId }}";
1539
+ readonly meetingId: "{{ context.currentMeeting.meetingId }}";
1540
+ readonly quorumCount: "{{ context.currentMeeting.quorumCount }}";
1541
+ };
1542
+ }];
1543
+ };
1544
+ readonly director_departs: {
1545
+ readonly from: "IN_MEETING";
1546
+ readonly to: "IN_MEETING";
1547
+ readonly description: "Record a director leaving the meeting (may affect quorum)";
1548
+ readonly event: {
1549
+ readonly name: "director_departs";
1550
+ readonly payload: {
1551
+ readonly directorId: {
1552
+ readonly type: "string";
1553
+ readonly required: true;
1554
+ };
1555
+ readonly departedAt: {
1556
+ readonly type: "string";
1557
+ readonly format: "date-time";
1558
+ readonly required: true;
1559
+ };
1560
+ };
1561
+ };
1562
+ readonly effects: readonly [{
1563
+ readonly type: "UPDATE_ARRAY_ITEM";
1564
+ readonly path: "currentMeeting.attendees";
1565
+ readonly matchKey: "directorId";
1566
+ readonly matchValue: "{{ event.directorId }}";
1567
+ readonly updates: {
1568
+ readonly present: false;
1569
+ readonly departedAt: "{{ event.departedAt }}";
1570
+ };
1571
+ }, {
1572
+ readonly type: "COMPUTE";
1573
+ readonly path: "currentMeeting.quorumCount";
1574
+ readonly expression: "context.currentMeeting.attendees.filter(a => a.present).length";
1575
+ }, {
1576
+ readonly type: "COMPUTE";
1577
+ readonly path: "currentMeeting.quorumPresent";
1578
+ readonly expression: "context.currentMeeting.attendees.filter(a => a.present).length >= Math.ceil(context.seats.filled * 0.5)";
1579
+ }];
1580
+ };
1581
+ readonly quorum_lost: {
1582
+ readonly from: "IN_MEETING";
1583
+ readonly to: "QUORUM_LOST";
1584
+ readonly description: "Automatic transition when quorum is lost during meeting";
1585
+ readonly event: {
1586
+ readonly name: "quorum_lost";
1587
+ readonly payload: {
1588
+ readonly lostAt: {
1589
+ readonly type: "string";
1590
+ readonly format: "date-time";
1591
+ readonly required: true;
1592
+ };
1593
+ };
1594
+ };
1595
+ readonly guards: readonly [{
1596
+ readonly name: "noLongerQuorate";
1597
+ readonly expression: "context.currentMeeting.quorumPresent === false";
1598
+ }];
1599
+ readonly effects: readonly [{
1600
+ readonly type: "EMIT_EVENT";
1601
+ readonly eventType: "BOARD_QUORUM_LOST";
1602
+ readonly payload: {
1603
+ readonly boardId: "{{ context.boardId }}";
1604
+ readonly meetingId: "{{ context.currentMeeting.meetingId }}";
1605
+ readonly remainingDirectors: "{{ context.currentMeeting.quorumCount }}";
1606
+ };
1607
+ }];
1608
+ };
1609
+ readonly quorum_restored: {
1610
+ readonly from: "QUORUM_LOST";
1611
+ readonly to: "IN_MEETING";
1612
+ readonly description: "Quorum restored after additional director(s) join";
1613
+ readonly event: {
1614
+ readonly name: "quorum_restored";
1615
+ readonly payload: {
1616
+ readonly restoredAt: {
1617
+ readonly type: "string";
1618
+ readonly format: "date-time";
1619
+ readonly required: true;
1620
+ };
1621
+ readonly directorId: {
1622
+ readonly type: "string";
1623
+ readonly required: true;
1624
+ readonly description: "Joining director";
1625
+ };
1626
+ };
1627
+ };
1628
+ readonly guards: readonly [{
1629
+ readonly name: "nowQuorate";
1630
+ readonly expression: "context.currentMeeting.quorumPresent === true";
1631
+ }];
1632
+ readonly effects: readonly [{
1633
+ readonly type: "EMIT_EVENT";
1634
+ readonly eventType: "BOARD_QUORUM_RESTORED";
1635
+ readonly payload: {
1636
+ readonly boardId: "{{ context.boardId }}";
1637
+ readonly meetingId: "{{ context.currentMeeting.meetingId }}";
1638
+ };
1639
+ }];
1640
+ };
1641
+ readonly adjourn: {
1642
+ readonly from: readonly ["IN_MEETING", "QUORUM_LOST"];
1643
+ readonly to: "ACTIVE";
1644
+ readonly description: "Adjourn the board meeting";
1645
+ readonly event: {
1646
+ readonly name: "adjourn";
1647
+ readonly payload: {
1648
+ readonly closedAt: {
1649
+ readonly type: "string";
1650
+ readonly format: "date-time";
1651
+ readonly required: true;
1652
+ };
1653
+ readonly minutesRef: {
1654
+ readonly type: "string";
1655
+ readonly description: "Reference to meeting minutes document";
1656
+ };
1657
+ readonly resolutionsPassed: {
1658
+ readonly type: "array";
1659
+ readonly items: {
1660
+ readonly type: "string";
1661
+ };
1662
+ };
1663
+ readonly adjournedTo: {
1664
+ readonly type: "string";
1665
+ readonly format: "date-time";
1666
+ readonly nullable: true;
1667
+ readonly description: "If adjourning to later date";
1668
+ };
1669
+ };
1670
+ };
1671
+ readonly effects: readonly [{
1672
+ readonly type: "SET_CONTEXT";
1673
+ readonly path: "currentMeeting.closedAt";
1674
+ readonly value: "{{ event.closedAt }}";
1675
+ }, {
1676
+ readonly type: "SET_CONTEXT";
1677
+ readonly path: "currentMeeting.minutesRef";
1678
+ readonly value: "{{ event.minutesRef }}";
1679
+ }, {
1680
+ readonly type: "APPEND_ARRAY";
1681
+ readonly path: "meetingHistory";
1682
+ readonly value: {
1683
+ readonly meetingId: "{{ context.currentMeeting.meetingId }}";
1684
+ readonly type: "{{ context.currentMeeting.type }}";
1685
+ readonly date: "{{ context.currentMeeting.scheduledDate }}";
1686
+ readonly quorumAchieved: "{{ context.currentMeeting.quorumPresent }}";
1687
+ readonly attendeeCount: "{{ context.currentMeeting.attendees.filter(a => a.present).length }}";
1688
+ readonly resolutionsPassed: "{{ event.resolutionsPassed }}";
1689
+ readonly minutesRef: "{{ event.minutesRef }}";
1690
+ };
1691
+ }, {
1692
+ readonly type: "SET_CONTEXT";
1693
+ readonly path: "currentMeeting";
1694
+ readonly value: null;
1695
+ }, {
1696
+ readonly type: "EMIT_EVENT";
1697
+ readonly eventType: "BOARD_MEETING_ADJOURNED";
1698
+ readonly payload: {
1699
+ readonly boardId: "{{ context.boardId }}";
1700
+ readonly meetingId: "{{ context.currentMeeting.meetingId }}";
1701
+ readonly resolutionsPassed: "{{ event.resolutionsPassed }}";
1702
+ };
1703
+ }];
1704
+ };
1705
+ readonly update_seats: {
1706
+ readonly from: "ACTIVE";
1707
+ readonly to: "ACTIVE";
1708
+ readonly description: "Change the number of authorized board seats (requires bylaw amendment)";
1709
+ readonly event: {
1710
+ readonly name: "update_seats";
1711
+ readonly payload: {
1712
+ readonly newAuthorizedSeats: {
1713
+ readonly type: "integer";
1714
+ readonly required: true;
1715
+ };
1716
+ readonly bylawAmendmentRef: {
1717
+ readonly type: "string";
1718
+ readonly required: true;
1719
+ };
1720
+ };
1721
+ };
1722
+ readonly guards: readonly [{
1723
+ readonly name: "seatsNotLessThanFilled";
1724
+ readonly description: "Cannot reduce below current filled seats";
1725
+ readonly expression: "event.newAuthorizedSeats >= context.seats.filled";
1726
+ }];
1727
+ readonly effects: readonly [{
1728
+ readonly type: "SET_CONTEXT";
1729
+ readonly path: "seats.authorized";
1730
+ readonly value: "{{ event.newAuthorizedSeats }}";
1731
+ }, {
1732
+ readonly type: "COMPUTE";
1733
+ readonly path: "seats.vacant";
1734
+ readonly expression: "event.newAuthorizedSeats - context.seats.filled";
1735
+ }];
1736
+ };
1737
+ };
1738
+ readonly crossMachineRefs: {
1739
+ readonly entity: {
1740
+ readonly machine: "corporate-entity";
1741
+ readonly description: "Parent corporate entity";
1742
+ readonly foreignKey: "entityId";
1743
+ };
1744
+ readonly resolutions: {
1745
+ readonly machine: "corporate-resolution";
1746
+ readonly description: "Board resolutions";
1747
+ readonly foreignKey: "boardId";
1748
+ };
1749
+ readonly committees: {
1750
+ readonly machine: "corporate-committee";
1751
+ readonly description: "Board committees";
1752
+ readonly foreignKey: "boardId";
1753
+ };
1754
+ readonly officers: {
1755
+ readonly machine: "corporate-officers";
1756
+ readonly description: "Officers appointed by board";
1757
+ readonly foreignKey: "entityId";
1758
+ };
1759
+ };
1760
+ readonly metadata: {
1761
+ readonly author: "OttoChain";
1762
+ readonly license: "MIT";
1763
+ readonly tags: readonly ["corporate", "governance", "board", "directors", "meetings"];
1764
+ readonly documentation: "https://ottochain.dev/docs/corporate/board";
1765
+ };
1766
+ };
1767
+ readonly shareholders: {
1768
+ readonly $schema: "https://ottochain.dev/schemas/state-machine-v1.json";
1769
+ readonly name: "CorpShareholders";
1770
+ readonly version: "1.0.0";
1771
+ readonly category: "corporate-governance";
1772
+ readonly description: "Shareholder meeting state machine managing annual/special meetings, record dates, proxy periods, voting, and certification of results. Supports multiple share classes and cumulative voting.";
1773
+ readonly context: {
1774
+ readonly meetingId: {
1775
+ readonly type: "string";
1776
+ readonly description: "Unique identifier for this shareholder meeting";
1777
+ };
1778
+ readonly entityId: {
1779
+ readonly type: "string";
1780
+ readonly description: "Reference to parent corporate-entity";
1781
+ };
1782
+ readonly meetingType: {
1783
+ readonly type: "string";
1784
+ readonly enum: readonly ["ANNUAL", "SPECIAL"];
1785
+ readonly description: "Annual meetings are required; special meetings called for specific purposes";
1786
+ };
1787
+ readonly fiscalYear: {
1788
+ readonly type: "integer";
1789
+ readonly description: "Fiscal year for annual meetings";
1790
+ };
1791
+ readonly scheduledDate: {
1792
+ readonly type: "string";
1793
+ readonly format: "date-time";
1794
+ };
1795
+ readonly location: {
1796
+ readonly type: "object";
1797
+ readonly properties: {
1798
+ readonly physical: {
1799
+ readonly type: "string";
1800
+ readonly nullable: true;
1801
+ };
1802
+ readonly virtualUrl: {
1803
+ readonly type: "string";
1804
+ readonly nullable: true;
1805
+ };
1806
+ readonly isHybrid: {
1807
+ readonly type: "boolean";
1808
+ readonly default: false;
1809
+ };
1810
+ };
1811
+ };
1812
+ readonly calledBy: {
1813
+ readonly type: "object";
1814
+ readonly properties: {
1815
+ readonly type: {
1816
+ readonly type: "string";
1817
+ readonly enum: readonly ["BOARD", "SHAREHOLDERS", "COURT"];
1818
+ };
1819
+ readonly resolutionRef: {
1820
+ readonly type: "string";
1821
+ readonly nullable: true;
1822
+ };
1823
+ readonly shareholderPetitionRef: {
1824
+ readonly type: "string";
1825
+ readonly nullable: true;
1826
+ };
1827
+ readonly courtOrderRef: {
1828
+ readonly type: "string";
1829
+ readonly nullable: true;
1830
+ };
1831
+ };
1832
+ };
1833
+ readonly noticeInfo: {
1834
+ readonly type: "object";
1835
+ readonly properties: {
1836
+ readonly noticeSentDate: {
1837
+ readonly type: "string";
1838
+ readonly format: "date";
1839
+ };
1840
+ readonly noticeMethod: {
1841
+ readonly type: "string";
1842
+ readonly enum: readonly ["MAIL", "EMAIL", "ELECTRONIC_ACCESS"];
1843
+ };
1844
+ readonly minimumNoticeDays: {
1845
+ readonly type: "integer";
1846
+ readonly default: 10;
1847
+ };
1848
+ readonly maximumNoticeDays: {
1849
+ readonly type: "integer";
1850
+ readonly default: 60;
1851
+ };
1852
+ };
1853
+ };
1854
+ readonly recordDate: {
1855
+ readonly type: "object";
1856
+ readonly nullable: true;
1857
+ readonly properties: {
1858
+ readonly date: {
1859
+ readonly type: "string";
1860
+ readonly format: "date";
1861
+ };
1862
+ readonly setByBoardOn: {
1863
+ readonly type: "string";
1864
+ readonly format: "date";
1865
+ };
1866
+ readonly resolutionRef: {
1867
+ readonly type: "string";
1868
+ };
1869
+ };
1870
+ };
1871
+ readonly eligibleVoters: {
1872
+ readonly type: "array";
1873
+ readonly description: "Shareholders as of record date with their share counts";
1874
+ readonly items: {
1875
+ readonly type: "object";
1876
+ readonly properties: {
1877
+ readonly shareholderId: {
1878
+ readonly type: "string";
1879
+ };
1880
+ readonly name: {
1881
+ readonly type: "string";
1882
+ };
1883
+ readonly shareholdings: {
1884
+ readonly type: "array";
1885
+ readonly items: {
1886
+ readonly type: "object";
1887
+ readonly properties: {
1888
+ readonly shareClass: {
1889
+ readonly type: "string";
1890
+ };
1891
+ readonly shares: {
1892
+ readonly type: "integer";
1893
+ };
1894
+ readonly votes: {
1895
+ readonly type: "integer";
1896
+ readonly description: "Votes this holding represents";
1897
+ };
1898
+ };
1899
+ };
1900
+ };
1901
+ readonly totalVotes: {
1902
+ readonly type: "integer";
1903
+ };
1904
+ readonly proxyGrantedTo: {
1905
+ readonly type: "string";
1906
+ readonly nullable: true;
1907
+ readonly description: "Proxy holder ID if proxied";
1908
+ };
1909
+ readonly hasVoted: {
1910
+ readonly type: "boolean";
1911
+ readonly default: false;
1912
+ };
1913
+ };
1914
+ };
1915
+ };
1916
+ readonly quorumRequirements: {
1917
+ readonly type: "object";
1918
+ readonly properties: {
1919
+ readonly type: {
1920
+ readonly type: "string";
1921
+ readonly enum: readonly ["SHARES_REPRESENTED", "SHARES_OUTSTANDING"];
1922
+ };
1923
+ readonly threshold: {
1924
+ readonly type: "number";
1925
+ readonly default: 0.5;
1926
+ readonly description: "Fraction required for quorum";
1927
+ };
1928
+ readonly sharesRequired: {
1929
+ readonly type: "integer";
1930
+ };
1931
+ readonly sharesRepresented: {
1932
+ readonly type: "integer";
1933
+ readonly default: 0;
1934
+ };
1935
+ readonly quorumMet: {
1936
+ readonly type: "boolean";
1937
+ readonly default: false;
1938
+ };
1939
+ };
1940
+ };
1941
+ readonly agenda: {
1942
+ readonly type: "array";
1943
+ readonly items: {
1944
+ readonly type: "object";
1945
+ readonly properties: {
1946
+ readonly itemId: {
1947
+ readonly type: "string";
1948
+ };
1949
+ readonly itemNumber: {
1950
+ readonly type: "integer";
1951
+ };
1952
+ readonly title: {
1953
+ readonly type: "string";
1954
+ };
1955
+ readonly description: {
1956
+ readonly type: "string";
1957
+ };
1958
+ readonly type: {
1959
+ readonly type: "string";
1960
+ readonly enum: readonly ["DIRECTOR_ELECTION", "AUDITOR_RATIFICATION", "SAY_ON_PAY", "CHARTER_AMENDMENT", "MERGER", "STOCK_PLAN", "SHAREHOLDER_PROPOSAL", "OTHER"];
1961
+ };
1962
+ readonly voteRequired: {
1963
+ readonly type: "string";
1964
+ readonly enum: readonly ["PLURALITY", "MAJORITY_CAST", "MAJORITY_OUTSTANDING", "SUPERMAJORITY", "UNANIMOUS"];
1965
+ readonly description: "Vote threshold for approval";
1966
+ };
1967
+ readonly supermajorityThreshold: {
1968
+ readonly type: "number";
1969
+ readonly nullable: true;
1970
+ };
1971
+ readonly eligibleClasses: {
1972
+ readonly type: "array";
1973
+ readonly items: {
1974
+ readonly type: "string";
1975
+ };
1976
+ readonly description: "Share classes that can vote on this item";
1977
+ };
1978
+ readonly allowCumulativeVoting: {
1979
+ readonly type: "boolean";
1980
+ readonly default: false;
1981
+ readonly description: "For director elections";
1982
+ };
1983
+ readonly status: {
1984
+ readonly type: "string";
1985
+ readonly enum: readonly ["PENDING", "VOTING", "CLOSED", "APPROVED", "REJECTED"];
1986
+ };
1987
+ };
1988
+ };
1989
+ };
1990
+ readonly proxyPeriod: {
1991
+ readonly type: "object";
1992
+ readonly nullable: true;
1993
+ readonly properties: {
1994
+ readonly startDate: {
1995
+ readonly type: "string";
1996
+ readonly format: "date";
1997
+ };
1998
+ readonly endDate: {
1999
+ readonly type: "string";
2000
+ readonly format: "date-time";
2001
+ readonly description: "Usually meeting start time";
2002
+ };
2003
+ readonly proxyMaterials: {
2004
+ readonly type: "object";
2005
+ readonly properties: {
2006
+ readonly proxyStatementRef: {
2007
+ readonly type: "string";
2008
+ };
2009
+ readonly formOfProxyRef: {
2010
+ readonly type: "string";
2011
+ };
2012
+ readonly annualReportRef: {
2013
+ readonly type: "string";
2014
+ readonly nullable: true;
2015
+ };
2016
+ };
2017
+ };
2018
+ };
2019
+ };
2020
+ readonly votes: {
2021
+ readonly type: "array";
2022
+ readonly items: {
2023
+ readonly type: "object";
2024
+ readonly properties: {
2025
+ readonly voteId: {
2026
+ readonly type: "string";
2027
+ };
2028
+ readonly agendaItemId: {
2029
+ readonly type: "string";
2030
+ };
2031
+ readonly voterId: {
2032
+ readonly type: "string";
2033
+ readonly description: "Shareholder or proxy holder ID";
2034
+ };
2035
+ readonly shareholderId: {
2036
+ readonly type: "string";
2037
+ readonly description: "Beneficial owner";
2038
+ };
2039
+ readonly shareClass: {
2040
+ readonly type: "string";
2041
+ };
2042
+ readonly votesFor: {
2043
+ readonly type: "integer";
2044
+ readonly default: 0;
2045
+ };
2046
+ readonly votesAgainst: {
2047
+ readonly type: "integer";
2048
+ readonly default: 0;
2049
+ };
2050
+ readonly votesAbstain: {
2051
+ readonly type: "integer";
2052
+ readonly default: 0;
2053
+ };
2054
+ readonly votesWithhold: {
2055
+ readonly type: "integer";
2056
+ readonly default: 0;
2057
+ readonly description: "For director elections";
2058
+ };
2059
+ readonly cumulativeVoteAllocation: {
2060
+ readonly type: "object";
2061
+ readonly additionalProperties: {
2062
+ readonly type: "integer";
2063
+ };
2064
+ readonly nullable: true;
2065
+ readonly description: "For cumulative voting: candidate ID -> votes allocated";
2066
+ };
2067
+ readonly viaProxy: {
2068
+ readonly type: "boolean";
2069
+ readonly default: false;
2070
+ };
2071
+ readonly timestamp: {
2072
+ readonly type: "string";
2073
+ readonly format: "date-time";
2074
+ };
2075
+ };
2076
+ };
2077
+ };
2078
+ readonly voteTallies: {
2079
+ readonly type: "array";
2080
+ readonly items: {
2081
+ readonly type: "object";
2082
+ readonly properties: {
2083
+ readonly agendaItemId: {
2084
+ readonly type: "string";
2085
+ };
2086
+ readonly forVotes: {
2087
+ readonly type: "integer";
2088
+ readonly default: 0;
2089
+ };
2090
+ readonly againstVotes: {
2091
+ readonly type: "integer";
2092
+ readonly default: 0;
2093
+ };
2094
+ readonly abstainVotes: {
2095
+ readonly type: "integer";
2096
+ readonly default: 0;
2097
+ };
2098
+ readonly withholdVotes: {
2099
+ readonly type: "integer";
2100
+ readonly default: 0;
2101
+ };
2102
+ readonly brokerNonVotes: {
2103
+ readonly type: "integer";
2104
+ readonly default: 0;
2105
+ };
2106
+ readonly candidateVotes: {
2107
+ readonly type: "object";
2108
+ readonly additionalProperties: {
2109
+ readonly type: "integer";
2110
+ };
2111
+ readonly nullable: true;
2112
+ readonly description: "For director elections: candidate ID -> total votes";
2113
+ };
2114
+ readonly result: {
2115
+ readonly type: "string";
2116
+ readonly enum: readonly ["APPROVED", "REJECTED", "PENDING"];
2117
+ };
2118
+ readonly certified: {
2119
+ readonly type: "boolean";
2120
+ readonly default: false;
2121
+ };
2122
+ };
2123
+ };
2124
+ };
2125
+ readonly inspectorOfElections: {
2126
+ readonly type: "object";
2127
+ readonly nullable: true;
2128
+ readonly properties: {
2129
+ readonly name: {
2130
+ readonly type: "string";
2131
+ };
2132
+ readonly company: {
2133
+ readonly type: "string";
2134
+ readonly nullable: true;
2135
+ };
2136
+ readonly appointedBy: {
2137
+ readonly type: "string";
2138
+ };
2139
+ readonly appointmentDate: {
2140
+ readonly type: "string";
2141
+ readonly format: "date";
2142
+ };
2143
+ };
2144
+ };
2145
+ readonly sessionInfo: {
2146
+ readonly type: "object";
2147
+ readonly nullable: true;
2148
+ readonly properties: {
2149
+ readonly openedAt: {
2150
+ readonly type: "string";
2151
+ readonly format: "date-time";
2152
+ };
2153
+ readonly chairPerson: {
2154
+ readonly type: "string";
2155
+ };
2156
+ readonly secretaryPresent: {
2157
+ readonly type: "string";
2158
+ };
2159
+ readonly pollsOpenedAt: {
2160
+ readonly type: "string";
2161
+ readonly format: "date-time";
2162
+ readonly nullable: true;
2163
+ };
2164
+ readonly pollsClosedAt: {
2165
+ readonly type: "string";
2166
+ readonly format: "date-time";
2167
+ readonly nullable: true;
2168
+ };
2169
+ readonly adjournedAt: {
2170
+ readonly type: "string";
2171
+ readonly format: "date-time";
2172
+ readonly nullable: true;
2173
+ };
2174
+ readonly minutesRef: {
2175
+ readonly type: "string";
2176
+ readonly nullable: true;
2177
+ };
2178
+ };
2179
+ };
2180
+ readonly certification: {
2181
+ readonly type: "object";
2182
+ readonly nullable: true;
2183
+ readonly properties: {
2184
+ readonly certifiedAt: {
2185
+ readonly type: "string";
2186
+ readonly format: "date-time";
2187
+ };
2188
+ readonly certifiedBy: {
2189
+ readonly type: "string";
2190
+ };
2191
+ readonly certificateRef: {
2192
+ readonly type: "string";
2193
+ };
2194
+ };
2195
+ };
2196
+ readonly createdAt: {
2197
+ readonly type: "string";
2198
+ readonly format: "date-time";
2199
+ };
2200
+ readonly updatedAt: {
2201
+ readonly type: "string";
2202
+ readonly format: "date-time";
2203
+ };
2204
+ };
2205
+ readonly states: {
2206
+ readonly SCHEDULED: {
2207
+ readonly description: "Meeting has been scheduled but record date not yet set";
2208
+ readonly metadata: null;
2209
+ };
2210
+ readonly RECORD_DATE_SET: {
2211
+ readonly description: "Record date established; eligible shareholders determined";
2212
+ readonly metadata: null;
2213
+ };
2214
+ readonly PROXY_PERIOD: {
2215
+ readonly description: "Proxy materials distributed; shareholders may submit proxies";
2216
+ readonly metadata: null;
2217
+ };
2218
+ readonly IN_SESSION: {
2219
+ readonly description: "Meeting is convened and in progress";
2220
+ readonly metadata: null;
2221
+ };
2222
+ readonly VOTING: {
2223
+ readonly description: "Polls are open for voting on agenda items";
2224
+ readonly metadata: null;
2225
+ };
2226
+ readonly CLOSED: {
2227
+ readonly description: "Meeting concluded; results certified";
2228
+ readonly metadata: null;
2229
+ readonly terminal: true;
2230
+ };
2231
+ };
2232
+ readonly initialState: "SCHEDULED";
2233
+ readonly transitions: {
2234
+ readonly schedule_annual: {
2235
+ readonly from: null;
2236
+ readonly to: "SCHEDULED";
2237
+ readonly description: "Schedule an annual shareholder meeting";
2238
+ readonly event: {
2239
+ readonly name: "schedule_annual";
2240
+ readonly payload: {
2241
+ readonly meetingId: {
2242
+ readonly type: "string";
2243
+ readonly required: true;
2244
+ };
2245
+ readonly entityId: {
2246
+ readonly type: "string";
2247
+ readonly required: true;
2248
+ };
2249
+ readonly fiscalYear: {
2250
+ readonly type: "integer";
2251
+ readonly required: true;
2252
+ };
2253
+ readonly scheduledDate: {
2254
+ readonly type: "string";
2255
+ readonly format: "date-time";
2256
+ readonly required: true;
2257
+ };
2258
+ readonly location: {
2259
+ readonly type: "object";
2260
+ };
2261
+ readonly boardResolutionRef: {
2262
+ readonly type: "string";
2263
+ readonly required: true;
2264
+ };
2265
+ };
2266
+ };
2267
+ readonly guards: readonly [{
2268
+ readonly name: "boardApproved";
2269
+ readonly crossMachine: {
2270
+ readonly machine: "corporate-resolution";
2271
+ readonly instanceRef: "{{ event.boardResolutionRef }}";
2272
+ readonly requiredState: "EXECUTED";
2273
+ };
2274
+ }];
2275
+ readonly effects: readonly [{
2276
+ readonly type: "SET_CONTEXT";
2277
+ readonly path: "meetingId";
2278
+ readonly value: "{{ event.meetingId }}";
2279
+ }, {
2280
+ readonly type: "SET_CONTEXT";
2281
+ readonly path: "entityId";
2282
+ readonly value: "{{ event.entityId }}";
2283
+ }, {
2284
+ readonly type: "SET_CONTEXT";
2285
+ readonly path: "meetingType";
2286
+ readonly value: "ANNUAL";
2287
+ }, {
2288
+ readonly type: "SET_CONTEXT";
2289
+ readonly path: "fiscalYear";
2290
+ readonly value: "{{ event.fiscalYear }}";
2291
+ }, {
2292
+ readonly type: "SET_CONTEXT";
2293
+ readonly path: "scheduledDate";
2294
+ readonly value: "{{ event.scheduledDate }}";
2295
+ }, {
2296
+ readonly type: "SET_CONTEXT";
2297
+ readonly path: "location";
2298
+ readonly value: "{{ event.location }}";
2299
+ }, {
2300
+ readonly type: "SET_CONTEXT";
2301
+ readonly path: "calledBy";
2302
+ readonly value: {
2303
+ readonly type: "BOARD";
2304
+ readonly resolutionRef: "{{ event.boardResolutionRef }}";
2305
+ };
2306
+ }, {
2307
+ readonly type: "EMIT_EVENT";
2308
+ readonly eventType: "SHAREHOLDER_MEETING_SCHEDULED";
2309
+ readonly payload: {
2310
+ readonly meetingId: "{{ event.meetingId }}";
2311
+ readonly type: "ANNUAL";
2312
+ readonly scheduledDate: "{{ event.scheduledDate }}";
2313
+ };
2314
+ }];
2315
+ };
2316
+ readonly schedule_special: {
2317
+ readonly from: null;
2318
+ readonly to: "SCHEDULED";
2319
+ readonly description: "Schedule a special shareholder meeting";
2320
+ readonly event: {
2321
+ readonly name: "schedule_special";
2322
+ readonly payload: {
2323
+ readonly meetingId: {
2324
+ readonly type: "string";
2325
+ readonly required: true;
2326
+ };
2327
+ readonly entityId: {
2328
+ readonly type: "string";
2329
+ readonly required: true;
2330
+ };
2331
+ readonly scheduledDate: {
2332
+ readonly type: "string";
2333
+ readonly format: "date-time";
2334
+ readonly required: true;
2335
+ };
2336
+ readonly location: {
2337
+ readonly type: "object";
2338
+ };
2339
+ readonly purpose: {
2340
+ readonly type: "string";
2341
+ readonly required: true;
2342
+ readonly description: "Specific purpose for special meeting";
2343
+ };
2344
+ readonly calledByType: {
2345
+ readonly type: "string";
2346
+ readonly enum: readonly ["BOARD", "SHAREHOLDERS", "COURT"];
2347
+ readonly required: true;
2348
+ };
2349
+ readonly resolutionRef: {
2350
+ readonly type: "string";
2351
+ };
2352
+ readonly petitionRef: {
2353
+ readonly type: "string";
2354
+ };
2355
+ };
2356
+ };
2357
+ readonly effects: readonly [{
2358
+ readonly type: "SET_CONTEXT";
2359
+ readonly path: "meetingId";
2360
+ readonly value: "{{ event.meetingId }}";
2361
+ }, {
2362
+ readonly type: "SET_CONTEXT";
2363
+ readonly path: "entityId";
2364
+ readonly value: "{{ event.entityId }}";
2365
+ }, {
2366
+ readonly type: "SET_CONTEXT";
2367
+ readonly path: "meetingType";
2368
+ readonly value: "SPECIAL";
2369
+ }, {
2370
+ readonly type: "SET_CONTEXT";
2371
+ readonly path: "scheduledDate";
2372
+ readonly value: "{{ event.scheduledDate }}";
2373
+ }, {
2374
+ readonly type: "SET_CONTEXT";
2375
+ readonly path: "calledBy.type";
2376
+ readonly value: "{{ event.calledByType }}";
2377
+ }, {
2378
+ readonly type: "EMIT_EVENT";
2379
+ readonly eventType: "SPECIAL_MEETING_SCHEDULED";
2380
+ readonly payload: {
2381
+ readonly meetingId: "{{ event.meetingId }}";
2382
+ readonly purpose: "{{ event.purpose }}";
2383
+ };
2384
+ }];
2385
+ };
2386
+ readonly set_record_date: {
2387
+ readonly from: "SCHEDULED";
2388
+ readonly to: "RECORD_DATE_SET";
2389
+ readonly description: "Board sets the record date for determining eligible shareholders";
2390
+ readonly event: {
2391
+ readonly name: "set_record_date";
2392
+ readonly payload: {
2393
+ readonly recordDate: {
2394
+ readonly type: "string";
2395
+ readonly format: "date";
2396
+ readonly required: true;
2397
+ };
2398
+ readonly resolutionRef: {
2399
+ readonly type: "string";
2400
+ readonly required: true;
2401
+ };
2402
+ };
2403
+ };
2404
+ readonly guards: readonly [{
2405
+ readonly name: "validRecordDateTiming";
2406
+ readonly description: "Record date must be 10-60 days before meeting (per most state laws)";
2407
+ readonly expression: "true";
2408
+ }];
2409
+ readonly effects: readonly [{
2410
+ readonly type: "SET_CONTEXT";
2411
+ readonly path: "recordDate";
2412
+ readonly value: {
2413
+ readonly date: "{{ event.recordDate }}";
2414
+ readonly setByBoardOn: "{{ today() }}";
2415
+ readonly resolutionRef: "{{ event.resolutionRef }}";
2416
+ };
2417
+ }, {
2418
+ readonly type: "EMIT_EVENT";
2419
+ readonly eventType: "RECORD_DATE_SET";
2420
+ readonly payload: {
2421
+ readonly meetingId: "{{ context.meetingId }}";
2422
+ readonly recordDate: "{{ event.recordDate }}";
2423
+ };
2424
+ }];
2425
+ };
2426
+ readonly register_eligible_shareholders: {
2427
+ readonly from: "RECORD_DATE_SET";
2428
+ readonly to: "RECORD_DATE_SET";
2429
+ readonly description: "Register shareholders of record as of record date";
2430
+ readonly event: {
2431
+ readonly name: "register_eligible_shareholders";
2432
+ readonly payload: {
2433
+ readonly shareholders: {
2434
+ readonly type: "array";
2435
+ readonly required: true;
2436
+ readonly items: {
2437
+ readonly type: "object";
2438
+ readonly properties: {
2439
+ readonly shareholderId: {
2440
+ readonly type: "string";
2441
+ };
2442
+ readonly name: {
2443
+ readonly type: "string";
2444
+ };
2445
+ readonly shareholdings: {
2446
+ readonly type: "array";
2447
+ };
2448
+ };
2449
+ };
2450
+ };
2451
+ readonly totalSharesOutstanding: {
2452
+ readonly type: "integer";
2453
+ readonly required: true;
2454
+ };
2455
+ };
2456
+ };
2457
+ readonly effects: readonly [{
2458
+ readonly type: "SET_CONTEXT";
2459
+ readonly path: "eligibleVoters";
2460
+ readonly value: "{{ event.shareholders }}";
2461
+ }, {
2462
+ readonly type: "SET_CONTEXT";
2463
+ readonly path: "quorumRequirements.sharesRequired";
2464
+ readonly value: "{{ Math.ceil(event.totalSharesOutstanding * 0.5) }}";
2465
+ }];
2466
+ };
2467
+ readonly open_proxy_period: {
2468
+ readonly from: "RECORD_DATE_SET";
2469
+ readonly to: "PROXY_PERIOD";
2470
+ readonly description: "Distribute proxy materials and open proxy solicitation period";
2471
+ readonly event: {
2472
+ readonly name: "open_proxy_period";
2473
+ readonly payload: {
2474
+ readonly startDate: {
2475
+ readonly type: "string";
2476
+ readonly format: "date";
2477
+ readonly required: true;
2478
+ };
2479
+ readonly proxyStatementRef: {
2480
+ readonly type: "string";
2481
+ readonly required: true;
2482
+ };
2483
+ readonly formOfProxyRef: {
2484
+ readonly type: "string";
2485
+ readonly required: true;
2486
+ };
2487
+ readonly annualReportRef: {
2488
+ readonly type: "string";
2489
+ };
2490
+ readonly agenda: {
2491
+ readonly type: "array";
2492
+ readonly required: true;
2493
+ };
2494
+ };
2495
+ };
2496
+ readonly effects: readonly [{
2497
+ readonly type: "SET_CONTEXT";
2498
+ readonly path: "proxyPeriod";
2499
+ readonly value: {
2500
+ readonly startDate: "{{ event.startDate }}";
2501
+ readonly endDate: "{{ context.scheduledDate }}";
2502
+ readonly proxyMaterials: {
2503
+ readonly proxyStatementRef: "{{ event.proxyStatementRef }}";
2504
+ readonly formOfProxyRef: "{{ event.formOfProxyRef }}";
2505
+ readonly annualReportRef: "{{ event.annualReportRef }}";
2506
+ };
2507
+ };
2508
+ }, {
2509
+ readonly type: "SET_CONTEXT";
2510
+ readonly path: "agenda";
2511
+ readonly value: "{{ event.agenda }}";
2512
+ }, {
2513
+ readonly type: "SET_CONTEXT";
2514
+ readonly path: "noticeInfo.noticeSentDate";
2515
+ readonly value: "{{ event.startDate }}";
2516
+ }, {
2517
+ readonly type: "EMIT_EVENT";
2518
+ readonly eventType: "PROXY_PERIOD_OPENED";
2519
+ readonly payload: {
2520
+ readonly meetingId: "{{ context.meetingId }}";
2521
+ readonly proxyStatementRef: "{{ event.proxyStatementRef }}";
2522
+ };
2523
+ }];
2524
+ };
2525
+ readonly add_agenda_item: {
2526
+ readonly from: readonly ["SCHEDULED", "RECORD_DATE_SET", "PROXY_PERIOD"];
2527
+ readonly to: null;
2528
+ readonly description: "Add an item to the meeting agenda (e.g., shareholder proposal)";
2529
+ readonly event: {
2530
+ readonly name: "add_agenda_item";
2531
+ readonly payload: {
2532
+ readonly itemId: {
2533
+ readonly type: "string";
2534
+ readonly required: true;
2535
+ };
2536
+ readonly title: {
2537
+ readonly type: "string";
2538
+ readonly required: true;
2539
+ };
2540
+ readonly description: {
2541
+ readonly type: "string";
2542
+ };
2543
+ readonly type: {
2544
+ readonly type: "string";
2545
+ readonly required: true;
2546
+ };
2547
+ readonly voteRequired: {
2548
+ readonly type: "string";
2549
+ readonly required: true;
2550
+ };
2551
+ readonly eligibleClasses: {
2552
+ readonly type: "array";
2553
+ readonly items: {
2554
+ readonly type: "string";
2555
+ };
2556
+ };
2557
+ readonly allowCumulativeVoting: {
2558
+ readonly type: "boolean";
2559
+ readonly default: false;
2560
+ };
2561
+ };
2562
+ };
2563
+ readonly effects: readonly [{
2564
+ readonly type: "APPEND_ARRAY";
2565
+ readonly path: "agenda";
2566
+ readonly value: {
2567
+ readonly itemId: "{{ event.itemId }}";
2568
+ readonly itemNumber: "{{ context.agenda.length + 1 }}";
2569
+ readonly title: "{{ event.title }}";
2570
+ readonly description: "{{ event.description }}";
2571
+ readonly type: "{{ event.type }}";
2572
+ readonly voteRequired: "{{ event.voteRequired }}";
2573
+ readonly eligibleClasses: "{{ event.eligibleClasses }}";
2574
+ readonly allowCumulativeVoting: "{{ event.allowCumulativeVoting }}";
2575
+ readonly status: "PENDING";
2576
+ };
2577
+ }];
2578
+ };
2579
+ readonly open_meeting: {
2580
+ readonly from: "PROXY_PERIOD";
2581
+ readonly to: "IN_SESSION";
2582
+ readonly description: "Convene the shareholder meeting";
2583
+ readonly event: {
2584
+ readonly name: "open_meeting";
2585
+ readonly payload: {
2586
+ readonly openedAt: {
2587
+ readonly type: "string";
2588
+ readonly format: "date-time";
2589
+ readonly required: true;
2590
+ };
2591
+ readonly chairPerson: {
2592
+ readonly type: "string";
2593
+ readonly required: true;
2594
+ };
2595
+ readonly secretaryPresent: {
2596
+ readonly type: "string";
2597
+ readonly required: true;
2598
+ };
2599
+ readonly inspectorOfElections: {
2600
+ readonly type: "object";
2601
+ };
2602
+ readonly initialQuorumCount: {
2603
+ readonly type: "integer";
2604
+ readonly required: true;
2605
+ };
2606
+ };
2607
+ };
2608
+ readonly guards: readonly [{
2609
+ readonly name: "quorumPresentOrRepresented";
2610
+ readonly description: "Must have quorum to proceed";
2611
+ readonly expression: "event.initialQuorumCount >= context.quorumRequirements.sharesRequired";
2612
+ }];
2613
+ readonly effects: readonly [{
2614
+ readonly type: "SET_CONTEXT";
2615
+ readonly path: "sessionInfo";
2616
+ readonly value: {
2617
+ readonly openedAt: "{{ event.openedAt }}";
2618
+ readonly chairPerson: "{{ event.chairPerson }}";
2619
+ readonly secretaryPresent: "{{ event.secretaryPresent }}";
2620
+ };
2621
+ }, {
2622
+ readonly type: "SET_CONTEXT";
2623
+ readonly path: "inspectorOfElections";
2624
+ readonly value: "{{ event.inspectorOfElections }}";
2625
+ }, {
2626
+ readonly type: "SET_CONTEXT";
2627
+ readonly path: "quorumRequirements.sharesRepresented";
2628
+ readonly value: "{{ event.initialQuorumCount }}";
2629
+ }, {
2630
+ readonly type: "SET_CONTEXT";
2631
+ readonly path: "quorumRequirements.quorumMet";
2632
+ readonly value: true;
2633
+ }, {
2634
+ readonly type: "EMIT_EVENT";
2635
+ readonly eventType: "SHAREHOLDER_MEETING_OPENED";
2636
+ readonly payload: {
2637
+ readonly meetingId: "{{ context.meetingId }}";
2638
+ readonly sharesRepresented: "{{ event.initialQuorumCount }}";
2639
+ };
2640
+ }];
2641
+ };
2642
+ readonly open_polls: {
2643
+ readonly from: "IN_SESSION";
2644
+ readonly to: "VOTING";
2645
+ readonly description: "Open polls for voting on agenda items";
2646
+ readonly event: {
2647
+ readonly name: "open_polls";
2648
+ readonly payload: {
2649
+ readonly pollsOpenedAt: {
2650
+ readonly type: "string";
2651
+ readonly format: "date-time";
2652
+ readonly required: true;
2653
+ };
2654
+ };
2655
+ };
2656
+ readonly effects: readonly [{
2657
+ readonly type: "SET_CONTEXT";
2658
+ readonly path: "sessionInfo.pollsOpenedAt";
2659
+ readonly value: "{{ event.pollsOpenedAt }}";
2660
+ }, {
2661
+ readonly type: "UPDATE_ARRAY_ALL";
2662
+ readonly path: "agenda";
2663
+ readonly updates: {
2664
+ readonly status: "VOTING";
2665
+ };
2666
+ }];
2667
+ };
2668
+ readonly cast_vote: {
2669
+ readonly from: "VOTING";
2670
+ readonly to: "VOTING";
2671
+ readonly description: "Record a vote from a shareholder or proxy holder";
2672
+ readonly event: {
2673
+ readonly name: "cast_vote";
2674
+ readonly payload: {
2675
+ readonly voteId: {
2676
+ readonly type: "string";
2677
+ readonly required: true;
2678
+ };
2679
+ readonly agendaItemId: {
2680
+ readonly type: "string";
2681
+ readonly required: true;
2682
+ };
2683
+ readonly voterId: {
2684
+ readonly type: "string";
2685
+ readonly required: true;
2686
+ };
2687
+ readonly shareholderId: {
2688
+ readonly type: "string";
2689
+ readonly required: true;
2690
+ };
2691
+ readonly shareClass: {
2692
+ readonly type: "string";
2693
+ readonly required: true;
2694
+ };
2695
+ readonly votesFor: {
2696
+ readonly type: "integer";
2697
+ readonly default: 0;
2698
+ };
2699
+ readonly votesAgainst: {
2700
+ readonly type: "integer";
2701
+ readonly default: 0;
2702
+ };
2703
+ readonly votesAbstain: {
2704
+ readonly type: "integer";
2705
+ readonly default: 0;
2706
+ };
2707
+ readonly votesWithhold: {
2708
+ readonly type: "integer";
2709
+ readonly default: 0;
2710
+ };
2711
+ readonly cumulativeVoteAllocation: {
2712
+ readonly type: "object";
2713
+ readonly nullable: true;
2714
+ };
2715
+ readonly viaProxy: {
2716
+ readonly type: "boolean";
2717
+ readonly default: false;
2718
+ };
2719
+ };
2720
+ };
2721
+ readonly guards: readonly [{
2722
+ readonly name: "isEligibleVoter";
2723
+ readonly expression: "context.eligibleVoters.some(v => v.shareholderId === event.shareholderId)";
2724
+ }, {
2725
+ readonly name: "hasNotAlreadyVoted";
2726
+ readonly description: "Shareholder cannot vote twice on same item";
2727
+ readonly expression: "!context.votes.some(v => v.shareholderId === event.shareholderId && v.agendaItemId === event.agendaItemId)";
2728
+ }, {
2729
+ readonly name: "validProxyIfApplicable";
2730
+ readonly description: "If voting via proxy, proxy must be valid";
2731
+ readonly expression: "!event.viaProxy || true";
2732
+ readonly crossMachine: {
2733
+ readonly machine: "corporate-proxy";
2734
+ readonly condition: "event.viaProxy";
2735
+ readonly query: "findByGrantor(event.shareholderId)";
2736
+ readonly requiredState: "ACTIVE";
2737
+ };
2738
+ }];
2739
+ readonly effects: readonly [{
2740
+ readonly type: "APPEND_ARRAY";
2741
+ readonly path: "votes";
2742
+ readonly value: {
2743
+ readonly voteId: "{{ event.voteId }}";
2744
+ readonly agendaItemId: "{{ event.agendaItemId }}";
2745
+ readonly voterId: "{{ event.voterId }}";
2746
+ readonly shareholderId: "{{ event.shareholderId }}";
2747
+ readonly shareClass: "{{ event.shareClass }}";
2748
+ readonly votesFor: "{{ event.votesFor }}";
2749
+ readonly votesAgainst: "{{ event.votesAgainst }}";
2750
+ readonly votesAbstain: "{{ event.votesAbstain }}";
2751
+ readonly votesWithhold: "{{ event.votesWithhold }}";
2752
+ readonly cumulativeVoteAllocation: "{{ event.cumulativeVoteAllocation }}";
2753
+ readonly viaProxy: "{{ event.viaProxy }}";
2754
+ readonly timestamp: "{{ now() }}";
2755
+ };
2756
+ }, {
2757
+ readonly type: "UPDATE_ARRAY_ITEM";
2758
+ readonly path: "eligibleVoters";
2759
+ readonly matchKey: "shareholderId";
2760
+ readonly matchValue: "{{ event.shareholderId }}";
2761
+ readonly updates: {
2762
+ readonly hasVoted: true;
2763
+ };
2764
+ }];
2765
+ };
2766
+ readonly close_polls: {
2767
+ readonly from: "VOTING";
2768
+ readonly to: "IN_SESSION";
2769
+ readonly description: "Close polls and begin vote tabulation";
2770
+ readonly event: {
2771
+ readonly name: "close_polls";
2772
+ readonly payload: {
2773
+ readonly pollsClosedAt: {
2774
+ readonly type: "string";
2775
+ readonly format: "date-time";
2776
+ readonly required: true;
2777
+ };
2778
+ };
2779
+ };
2780
+ readonly effects: readonly [{
2781
+ readonly type: "SET_CONTEXT";
2782
+ readonly path: "sessionInfo.pollsClosedAt";
2783
+ readonly value: "{{ event.pollsClosedAt }}";
2784
+ }, {
2785
+ readonly type: "UPDATE_ARRAY_ALL";
2786
+ readonly path: "agenda";
2787
+ readonly updates: {
2788
+ readonly status: "CLOSED";
2789
+ };
2790
+ }, {
2791
+ readonly type: "COMPUTE_TALLIES";
2792
+ readonly description: "Aggregate votes by agenda item";
2793
+ readonly targetPath: "voteTallies";
2794
+ }];
2795
+ };
2796
+ readonly certify_results: {
2797
+ readonly from: "IN_SESSION";
2798
+ readonly to: "CLOSED";
2799
+ readonly description: "Inspector of elections certifies vote results";
2800
+ readonly event: {
2801
+ readonly name: "certify_results";
2802
+ readonly payload: {
2803
+ readonly certifiedAt: {
2804
+ readonly type: "string";
2805
+ readonly format: "date-time";
2806
+ readonly required: true;
2807
+ };
2808
+ readonly certifiedBy: {
2809
+ readonly type: "string";
2810
+ readonly required: true;
2811
+ };
2812
+ readonly certificateRef: {
2813
+ readonly type: "string";
2814
+ readonly required: true;
2815
+ };
2816
+ readonly results: {
2817
+ readonly type: "array";
2818
+ readonly items: {
2819
+ readonly type: "object";
2820
+ readonly properties: {
2821
+ readonly agendaItemId: {
2822
+ readonly type: "string";
2823
+ };
2824
+ readonly result: {
2825
+ readonly type: "string";
2826
+ readonly enum: readonly ["APPROVED", "REJECTED"];
2827
+ };
2828
+ };
2829
+ };
2830
+ };
2831
+ readonly minutesRef: {
2832
+ readonly type: "string";
2833
+ };
2834
+ };
2835
+ };
2836
+ readonly effects: readonly [{
2837
+ readonly type: "SET_CONTEXT";
2838
+ readonly path: "certification";
2839
+ readonly value: {
2840
+ readonly certifiedAt: "{{ event.certifiedAt }}";
2841
+ readonly certifiedBy: "{{ event.certifiedBy }}";
2842
+ readonly certificateRef: "{{ event.certificateRef }}";
2843
+ };
2844
+ }, {
2845
+ readonly type: "SET_CONTEXT";
2846
+ readonly path: "sessionInfo.adjournedAt";
2847
+ readonly value: "{{ event.certifiedAt }}";
2848
+ }, {
2849
+ readonly type: "SET_CONTEXT";
2850
+ readonly path: "sessionInfo.minutesRef";
2851
+ readonly value: "{{ event.minutesRef }}";
2852
+ }, {
2853
+ readonly type: "FOR_EACH";
2854
+ readonly array: "{{ event.results }}";
2855
+ readonly do: {
2856
+ readonly type: "UPDATE_ARRAY_ITEM";
2857
+ readonly path: "voteTallies";
2858
+ readonly matchKey: "agendaItemId";
2859
+ readonly matchValue: "{{ item.agendaItemId }}";
2860
+ readonly updates: {
2861
+ readonly result: "{{ item.result }}";
2862
+ readonly certified: true;
2863
+ };
2864
+ };
2865
+ }, {
2866
+ readonly type: "EMIT_EVENT";
2867
+ readonly eventType: "MEETING_RESULTS_CERTIFIED";
2868
+ readonly payload: {
2869
+ readonly meetingId: "{{ context.meetingId }}";
2870
+ readonly results: "{{ event.results }}";
2871
+ };
2872
+ }];
2873
+ };
2874
+ readonly adjourn_without_action: {
2875
+ readonly from: readonly ["IN_SESSION", "VOTING"];
2876
+ readonly to: "CLOSED";
2877
+ readonly description: "Adjourn meeting without completing agenda (e.g., quorum lost)";
2878
+ readonly event: {
2879
+ readonly name: "adjourn_without_action";
2880
+ readonly payload: {
2881
+ readonly adjournedAt: {
2882
+ readonly type: "string";
2883
+ readonly format: "date-time";
2884
+ readonly required: true;
2885
+ };
2886
+ readonly reason: {
2887
+ readonly type: "string";
2888
+ readonly required: true;
2889
+ };
2890
+ readonly adjournedTo: {
2891
+ readonly type: "string";
2892
+ readonly format: "date-time";
2893
+ readonly nullable: true;
2894
+ };
2895
+ };
2896
+ };
2897
+ readonly effects: readonly [{
2898
+ readonly type: "SET_CONTEXT";
2899
+ readonly path: "sessionInfo.adjournedAt";
2900
+ readonly value: "{{ event.adjournedAt }}";
2901
+ }, {
2902
+ readonly type: "EMIT_EVENT";
2903
+ readonly eventType: "MEETING_ADJOURNED";
2904
+ readonly payload: {
2905
+ readonly meetingId: "{{ context.meetingId }}";
2906
+ readonly reason: "{{ event.reason }}";
2907
+ readonly adjournedTo: "{{ event.adjournedTo }}";
2908
+ };
2909
+ }];
2910
+ };
2911
+ };
2912
+ readonly crossMachineRefs: {
2913
+ readonly entity: {
2914
+ readonly machine: "corporate-entity";
2915
+ readonly description: "Parent corporate entity";
2916
+ readonly foreignKey: "entityId";
2917
+ };
2918
+ readonly proxies: {
2919
+ readonly machine: "corporate-proxy";
2920
+ readonly description: "Proxy grants for this meeting";
2921
+ readonly foreignKey: "meetingId";
2922
+ };
2923
+ readonly resolutions: {
2924
+ readonly machine: "corporate-resolution";
2925
+ readonly description: "Resolutions resulting from meeting votes";
2926
+ readonly foreignKey: "meetingId";
2927
+ };
2928
+ readonly securities: {
2929
+ readonly machine: "corporate-securities";
2930
+ readonly description: "Share records for determining voting rights";
2931
+ readonly foreignKey: "entityId";
2932
+ };
2933
+ };
2934
+ readonly metadata: {
2935
+ readonly author: "OttoChain";
2936
+ readonly license: "MIT";
2937
+ readonly tags: readonly ["corporate", "governance", "shareholders", "voting", "meetings", "proxy"];
2938
+ readonly documentation: "https://ottochain.dev/docs/corporate/shareholders";
2939
+ };
2940
+ };
2941
+ readonly securities: {
2942
+ readonly $schema: "https://ottochain.dev/schemas/state-machine-v1.json";
2943
+ readonly name: "CorpSecurities";
2944
+ readonly version: "1.0.0";
2945
+ readonly category: "corporate-governance";
2946
+ readonly description: "Securities state machine tracking the lifecycle of equity from authorization through issuance, transfer, and retirement. Manages stock certificates, book entry positions, and restricted securities.";
2947
+ readonly context: {
2948
+ readonly securityId: {
2949
+ readonly type: "string";
2950
+ readonly description: "Unique identifier for this security lot/certificate";
2951
+ };
2952
+ readonly entityId: {
2953
+ readonly type: "string";
2954
+ readonly description: "Reference to parent corporate-entity";
2955
+ };
2956
+ readonly shareClass: {
2957
+ readonly type: "string";
2958
+ readonly description: "Share class ID from corporate-entity";
2959
+ };
2960
+ readonly shareClassName: {
2961
+ readonly type: "string";
2962
+ readonly description: "Human-readable class name";
2963
+ };
2964
+ readonly certificateNumber: {
2965
+ readonly type: "string";
2966
+ readonly nullable: true;
2967
+ readonly description: "For certificated shares";
2968
+ };
2969
+ readonly cusip: {
2970
+ readonly type: "string";
2971
+ readonly nullable: true;
2972
+ readonly description: "CUSIP number if assigned";
2973
+ };
2974
+ readonly shareCount: {
2975
+ readonly type: "integer";
2976
+ readonly description: "Number of shares in this lot";
2977
+ };
2978
+ readonly parValue: {
2979
+ readonly type: "number";
2980
+ readonly description: "Par value per share";
2981
+ };
2982
+ readonly issuancePrice: {
2983
+ readonly type: "number";
2984
+ readonly nullable: true;
2985
+ readonly description: "Price per share at issuance";
2986
+ };
2987
+ readonly issuanceDate: {
2988
+ readonly type: "string";
2989
+ readonly format: "date";
2990
+ readonly nullable: true;
2991
+ };
2992
+ readonly form: {
2993
+ readonly type: "string";
2994
+ readonly enum: readonly ["CERTIFICATED", "BOOK_ENTRY", "DRS"];
2995
+ readonly description: "Physical certificate, book entry, or Direct Registration System";
2996
+ };
2997
+ readonly holder: {
2998
+ readonly type: "object";
2999
+ readonly nullable: true;
3000
+ readonly properties: {
3001
+ readonly holderId: {
3002
+ readonly type: "string";
3003
+ };
3004
+ readonly holderType: {
3005
+ readonly type: "string";
3006
+ readonly enum: readonly ["INDIVIDUAL", "ENTITY", "TRUST", "TREASURY"];
3007
+ };
3008
+ readonly name: {
3009
+ readonly type: "string";
3010
+ };
3011
+ readonly taxId: {
3012
+ readonly type: "string";
3013
+ readonly nullable: true;
3014
+ };
3015
+ readonly address: {
3016
+ readonly type: "object";
3017
+ readonly nullable: true;
3018
+ };
3019
+ readonly acquisitionDate: {
3020
+ readonly type: "string";
3021
+ readonly format: "date";
3022
+ };
3023
+ readonly acquisitionMethod: {
3024
+ readonly type: "string";
3025
+ readonly enum: readonly ["ORIGINAL_ISSUANCE", "PURCHASE", "GIFT", "INHERITANCE", "STOCK_SPLIT", "CONVERSION", "EXERCISE"];
3026
+ };
3027
+ readonly costBasis: {
3028
+ readonly type: "number";
3029
+ readonly nullable: true;
3030
+ };
3031
+ };
3032
+ };
3033
+ readonly restrictions: {
3034
+ readonly type: "object";
3035
+ readonly properties: {
3036
+ readonly isRestricted: {
3037
+ readonly type: "boolean";
3038
+ readonly default: false;
3039
+ };
3040
+ readonly restrictionType: {
3041
+ readonly type: "array";
3042
+ readonly items: {
3043
+ readonly type: "string";
3044
+ readonly enum: readonly ["RULE_144", "SECTION_4(a)(2)", "REG_D", "REG_S", "LOCK_UP", "VESTING", "RIGHT_OF_FIRST_REFUSAL"];
3045
+ };
3046
+ };
3047
+ readonly restrictionEndDate: {
3048
+ readonly type: "string";
3049
+ readonly format: "date";
3050
+ readonly nullable: true;
3051
+ };
3052
+ readonly legends: {
3053
+ readonly type: "array";
3054
+ readonly items: {
3055
+ readonly type: "string";
3056
+ };
3057
+ readonly description: "Legend text on certificates";
3058
+ };
3059
+ readonly vestingSchedule: {
3060
+ readonly type: "object";
3061
+ readonly nullable: true;
3062
+ readonly properties: {
3063
+ readonly vestingStartDate: {
3064
+ readonly type: "string";
3065
+ readonly format: "date";
3066
+ };
3067
+ readonly totalShares: {
3068
+ readonly type: "integer";
3069
+ };
3070
+ readonly vestedShares: {
3071
+ readonly type: "integer";
3072
+ };
3073
+ readonly vestingScheduleRef: {
3074
+ readonly type: "string";
3075
+ };
3076
+ };
3077
+ };
3078
+ readonly lockUpExpiration: {
3079
+ readonly type: "string";
3080
+ readonly format: "date";
3081
+ readonly nullable: true;
3082
+ };
3083
+ readonly rofr: {
3084
+ readonly type: "object";
3085
+ readonly nullable: true;
3086
+ readonly description: "Right of First Refusal";
3087
+ readonly properties: {
3088
+ readonly holderIds: {
3089
+ readonly type: "array";
3090
+ readonly items: {
3091
+ readonly type: "string";
3092
+ };
3093
+ };
3094
+ readonly noticePeriodDays: {
3095
+ readonly type: "integer";
3096
+ };
3097
+ };
3098
+ };
3099
+ };
3100
+ };
3101
+ readonly authorization: {
3102
+ readonly type: "object";
3103
+ readonly nullable: true;
3104
+ readonly description: "For shares in AUTHORIZED state";
3105
+ readonly properties: {
3106
+ readonly authorizedDate: {
3107
+ readonly type: "string";
3108
+ readonly format: "date";
3109
+ };
3110
+ readonly charterProvision: {
3111
+ readonly type: "string";
3112
+ };
3113
+ readonly authorizedShares: {
3114
+ readonly type: "integer";
3115
+ };
3116
+ };
3117
+ };
3118
+ readonly issuanceDetails: {
3119
+ readonly type: "object";
3120
+ readonly nullable: true;
3121
+ readonly properties: {
3122
+ readonly boardResolutionRef: {
3123
+ readonly type: "string";
3124
+ };
3125
+ readonly issuanceAgreementRef: {
3126
+ readonly type: "string";
3127
+ };
3128
+ readonly consideration: {
3129
+ readonly type: "object";
3130
+ readonly properties: {
3131
+ readonly type: {
3132
+ readonly type: "string";
3133
+ readonly enum: readonly ["CASH", "PROPERTY", "SERVICES", "DEBT_CONVERSION", "STOCK_CONVERSION"];
3134
+ };
3135
+ readonly value: {
3136
+ readonly type: "number";
3137
+ };
3138
+ readonly description: {
3139
+ readonly type: "string";
3140
+ };
3141
+ };
3142
+ };
3143
+ readonly exemptionUsed: {
3144
+ readonly type: "string";
3145
+ readonly nullable: true;
3146
+ };
3147
+ readonly accreditedInvestor: {
3148
+ readonly type: "boolean";
3149
+ readonly nullable: true;
3150
+ };
3151
+ };
3152
+ };
3153
+ readonly transferHistory: {
3154
+ readonly type: "array";
3155
+ readonly items: {
3156
+ readonly type: "object";
3157
+ readonly properties: {
3158
+ readonly transferId: {
3159
+ readonly type: "string";
3160
+ };
3161
+ readonly transferDate: {
3162
+ readonly type: "string";
3163
+ readonly format: "date";
3164
+ };
3165
+ readonly fromHolderId: {
3166
+ readonly type: "string";
3167
+ };
3168
+ readonly toHolderId: {
3169
+ readonly type: "string";
3170
+ };
3171
+ readonly shares: {
3172
+ readonly type: "integer";
3173
+ };
3174
+ readonly transferType: {
3175
+ readonly type: "string";
3176
+ readonly enum: readonly ["SALE", "GIFT", "INHERITANCE", "INTERNAL"];
3177
+ };
3178
+ readonly pricePerShare: {
3179
+ readonly type: "number";
3180
+ readonly nullable: true;
3181
+ };
3182
+ readonly transferAgentConfirmation: {
3183
+ readonly type: "string";
3184
+ readonly nullable: true;
3185
+ };
3186
+ };
3187
+ };
3188
+ };
3189
+ readonly corporateActions: {
3190
+ readonly type: "array";
3191
+ readonly description: "Stock splits, dividends, etc. affecting this lot";
3192
+ readonly items: {
3193
+ readonly type: "object";
3194
+ readonly properties: {
3195
+ readonly actionId: {
3196
+ readonly type: "string";
3197
+ };
3198
+ readonly actionType: {
3199
+ readonly type: "string";
3200
+ readonly enum: readonly ["STOCK_SPLIT", "REVERSE_SPLIT", "STOCK_DIVIDEND", "CONVERSION", "RECLASSIFICATION"];
3201
+ };
3202
+ readonly actionDate: {
3203
+ readonly type: "string";
3204
+ readonly format: "date";
3205
+ };
3206
+ readonly ratio: {
3207
+ readonly type: "string";
3208
+ readonly nullable: true;
3209
+ readonly description: "e.g., 2:1 for split";
3210
+ };
3211
+ readonly sharesBeforeAction: {
3212
+ readonly type: "integer";
3213
+ };
3214
+ readonly sharesAfterAction: {
3215
+ readonly type: "integer";
3216
+ };
3217
+ readonly resolutionRef: {
3218
+ readonly type: "string";
3219
+ };
3220
+ };
3221
+ };
3222
+ };
3223
+ readonly retirementDetails: {
3224
+ readonly type: "object";
3225
+ readonly nullable: true;
3226
+ readonly properties: {
3227
+ readonly retiredDate: {
3228
+ readonly type: "string";
3229
+ readonly format: "date";
3230
+ };
3231
+ readonly retirementMethod: {
3232
+ readonly type: "string";
3233
+ readonly enum: readonly ["REPURCHASE", "REDEMPTION", "CANCELLATION", "CONVERSION"];
3234
+ };
3235
+ readonly repurchasePrice: {
3236
+ readonly type: "number";
3237
+ readonly nullable: true;
3238
+ };
3239
+ readonly boardResolutionRef: {
3240
+ readonly type: "string";
3241
+ };
3242
+ };
3243
+ };
3244
+ readonly createdAt: {
3245
+ readonly type: "string";
3246
+ readonly format: "date-time";
3247
+ };
3248
+ readonly updatedAt: {
3249
+ readonly type: "string";
3250
+ readonly format: "date-time";
3251
+ };
3252
+ };
3253
+ readonly states: {
3254
+ readonly AUTHORIZED: {
3255
+ readonly description: "Shares authorized by charter but not yet issued";
3256
+ readonly metadata: null;
3257
+ };
3258
+ readonly ISSUED: {
3259
+ readonly description: "Shares issued and held by a shareholder";
3260
+ readonly metadata: null;
3261
+ };
3262
+ readonly TREASURY: {
3263
+ readonly description: "Shares repurchased and held by the company";
3264
+ readonly metadata: null;
3265
+ };
3266
+ readonly TRANSFERRED: {
3267
+ readonly description: "Transitional state during transfer between holders";
3268
+ readonly metadata: null;
3269
+ };
3270
+ readonly RETIRED: {
3271
+ readonly description: "Shares cancelled and returned to authorized but unissued";
3272
+ readonly metadata: null;
3273
+ readonly terminal: true;
3274
+ };
3275
+ };
3276
+ readonly initialState: "AUTHORIZED";
3277
+ readonly transitions: {
3278
+ readonly authorize_shares: {
3279
+ readonly from: null;
3280
+ readonly to: "AUTHORIZED";
3281
+ readonly description: "Record shares as authorized per charter/amendment";
3282
+ readonly event: {
3283
+ readonly name: "authorize_shares";
3284
+ readonly payload: {
3285
+ readonly securityId: {
3286
+ readonly type: "string";
3287
+ readonly required: true;
3288
+ };
3289
+ readonly entityId: {
3290
+ readonly type: "string";
3291
+ readonly required: true;
3292
+ };
3293
+ readonly shareClass: {
3294
+ readonly type: "string";
3295
+ readonly required: true;
3296
+ };
3297
+ readonly shareClassName: {
3298
+ readonly type: "string";
3299
+ readonly required: true;
3300
+ };
3301
+ readonly shareCount: {
3302
+ readonly type: "integer";
3303
+ readonly required: true;
3304
+ };
3305
+ readonly parValue: {
3306
+ readonly type: "number";
3307
+ readonly required: true;
3308
+ };
3309
+ readonly authorizedDate: {
3310
+ readonly type: "string";
3311
+ readonly format: "date";
3312
+ readonly required: true;
3313
+ };
3314
+ readonly charterProvision: {
3315
+ readonly type: "string";
3316
+ };
3317
+ };
3318
+ };
3319
+ readonly effects: readonly [{
3320
+ readonly type: "SET_CONTEXT";
3321
+ readonly path: "securityId";
3322
+ readonly value: "{{ event.securityId }}";
3323
+ }, {
3324
+ readonly type: "SET_CONTEXT";
3325
+ readonly path: "entityId";
3326
+ readonly value: "{{ event.entityId }}";
3327
+ }, {
3328
+ readonly type: "SET_CONTEXT";
3329
+ readonly path: "shareClass";
3330
+ readonly value: "{{ event.shareClass }}";
3331
+ }, {
3332
+ readonly type: "SET_CONTEXT";
3333
+ readonly path: "shareClassName";
3334
+ readonly value: "{{ event.shareClassName }}";
3335
+ }, {
3336
+ readonly type: "SET_CONTEXT";
3337
+ readonly path: "shareCount";
3338
+ readonly value: "{{ event.shareCount }}";
3339
+ }, {
3340
+ readonly type: "SET_CONTEXT";
3341
+ readonly path: "parValue";
3342
+ readonly value: "{{ event.parValue }}";
3343
+ }, {
3344
+ readonly type: "SET_CONTEXT";
3345
+ readonly path: "authorization";
3346
+ readonly value: {
3347
+ readonly authorizedDate: "{{ event.authorizedDate }}";
3348
+ readonly charterProvision: "{{ event.charterProvision }}";
3349
+ readonly authorizedShares: "{{ event.shareCount }}";
3350
+ };
3351
+ }, {
3352
+ readonly type: "SET_CONTEXT";
3353
+ readonly path: "transferHistory";
3354
+ readonly value: readonly [];
3355
+ }, {
3356
+ readonly type: "SET_CONTEXT";
3357
+ readonly path: "corporateActions";
3358
+ readonly value: readonly [];
3359
+ }];
3360
+ };
3361
+ readonly issue_shares: {
3362
+ readonly from: "AUTHORIZED";
3363
+ readonly to: "ISSUED";
3364
+ readonly description: "Issue shares to a holder";
3365
+ readonly event: {
3366
+ readonly name: "issue_shares";
3367
+ readonly payload: {
3368
+ readonly holderId: {
3369
+ readonly type: "string";
3370
+ readonly required: true;
3371
+ };
3372
+ readonly holderType: {
3373
+ readonly type: "string";
3374
+ readonly required: true;
3375
+ };
3376
+ readonly holderName: {
3377
+ readonly type: "string";
3378
+ readonly required: true;
3379
+ };
3380
+ readonly address: {
3381
+ readonly type: "object";
3382
+ };
3383
+ readonly issuanceDate: {
3384
+ readonly type: "string";
3385
+ readonly format: "date";
3386
+ readonly required: true;
3387
+ };
3388
+ readonly issuancePrice: {
3389
+ readonly type: "number";
3390
+ };
3391
+ readonly form: {
3392
+ readonly type: "string";
3393
+ readonly enum: readonly ["CERTIFICATED", "BOOK_ENTRY", "DRS"];
3394
+ readonly required: true;
3395
+ };
3396
+ readonly certificateNumber: {
3397
+ readonly type: "string";
3398
+ };
3399
+ readonly boardResolutionRef: {
3400
+ readonly type: "string";
3401
+ readonly required: true;
3402
+ };
3403
+ readonly consideration: {
3404
+ readonly type: "object";
3405
+ readonly required: true;
3406
+ };
3407
+ readonly isRestricted: {
3408
+ readonly type: "boolean";
3409
+ readonly default: false;
3410
+ };
3411
+ readonly restrictionType: {
3412
+ readonly type: "array";
3413
+ };
3414
+ readonly legends: {
3415
+ readonly type: "array";
3416
+ };
3417
+ readonly exemptionUsed: {
3418
+ readonly type: "string";
3419
+ };
3420
+ readonly accreditedInvestor: {
3421
+ readonly type: "boolean";
3422
+ };
3423
+ };
3424
+ };
3425
+ readonly guards: readonly [{
3426
+ readonly name: "hasIssuanceResolution";
3427
+ readonly description: "Board must have approved stock issuance";
3428
+ readonly crossMachine: {
3429
+ readonly machine: "corporate-resolution";
3430
+ readonly instanceRef: "{{ event.boardResolutionRef }}";
3431
+ readonly requiredState: "EXECUTED";
3432
+ };
3433
+ }, {
3434
+ readonly name: "entityIsActive";
3435
+ readonly description: "Cannot issue stock if corporation is suspended or dissolved";
3436
+ readonly crossMachine: {
3437
+ readonly machine: "corporate-entity";
3438
+ readonly instanceRef: "{{ context.entityId }}";
3439
+ readonly requiredState: "ACTIVE";
3440
+ };
3441
+ }];
3442
+ readonly effects: readonly [{
3443
+ readonly type: "SET_CONTEXT";
3444
+ readonly path: "form";
3445
+ readonly value: "{{ event.form }}";
3446
+ }, {
3447
+ readonly type: "SET_CONTEXT";
3448
+ readonly path: "certificateNumber";
3449
+ readonly value: "{{ event.certificateNumber }}";
3450
+ }, {
3451
+ readonly type: "SET_CONTEXT";
3452
+ readonly path: "issuanceDate";
3453
+ readonly value: "{{ event.issuanceDate }}";
3454
+ }, {
3455
+ readonly type: "SET_CONTEXT";
3456
+ readonly path: "issuancePrice";
3457
+ readonly value: "{{ event.issuancePrice }}";
3458
+ }, {
3459
+ readonly type: "SET_CONTEXT";
3460
+ readonly path: "holder";
3461
+ readonly value: {
3462
+ readonly holderId: "{{ event.holderId }}";
3463
+ readonly holderType: "{{ event.holderType }}";
3464
+ readonly name: "{{ event.holderName }}";
3465
+ readonly address: "{{ event.address }}";
3466
+ readonly acquisitionDate: "{{ event.issuanceDate }}";
3467
+ readonly acquisitionMethod: "ORIGINAL_ISSUANCE";
3468
+ readonly costBasis: "{{ event.issuancePrice * context.shareCount }}";
3469
+ };
3470
+ }, {
3471
+ readonly type: "SET_CONTEXT";
3472
+ readonly path: "restrictions";
3473
+ readonly value: {
3474
+ readonly isRestricted: "{{ event.isRestricted }}";
3475
+ readonly restrictionType: "{{ event.restrictionType }}";
3476
+ readonly legends: "{{ event.legends }}";
3477
+ };
3478
+ }, {
3479
+ readonly type: "SET_CONTEXT";
3480
+ readonly path: "issuanceDetails";
3481
+ readonly value: {
3482
+ readonly boardResolutionRef: "{{ event.boardResolutionRef }}";
3483
+ readonly consideration: "{{ event.consideration }}";
3484
+ readonly exemptionUsed: "{{ event.exemptionUsed }}";
3485
+ readonly accreditedInvestor: "{{ event.accreditedInvestor }}";
3486
+ };
3487
+ }, {
3488
+ readonly type: "EMIT_EVENT";
3489
+ readonly eventType: "SHARES_ISSUED";
3490
+ readonly payload: {
3491
+ readonly securityId: "{{ context.securityId }}";
3492
+ readonly entityId: "{{ context.entityId }}";
3493
+ readonly shareClass: "{{ context.shareClassName }}";
3494
+ readonly shares: "{{ context.shareCount }}";
3495
+ readonly holderId: "{{ event.holderId }}";
3496
+ readonly holderName: "{{ event.holderName }}";
3497
+ };
3498
+ }];
3499
+ };
3500
+ readonly initiate_transfer: {
3501
+ readonly from: "ISSUED";
3502
+ readonly to: "TRANSFERRED";
3503
+ readonly description: "Begin transfer of shares to new holder";
3504
+ readonly event: {
3505
+ readonly name: "initiate_transfer";
3506
+ readonly payload: {
3507
+ readonly transferId: {
3508
+ readonly type: "string";
3509
+ readonly required: true;
3510
+ };
3511
+ readonly toHolderId: {
3512
+ readonly type: "string";
3513
+ readonly required: true;
3514
+ };
3515
+ readonly toHolderName: {
3516
+ readonly type: "string";
3517
+ readonly required: true;
3518
+ };
3519
+ readonly toHolderType: {
3520
+ readonly type: "string";
3521
+ readonly required: true;
3522
+ };
3523
+ readonly toAddress: {
3524
+ readonly type: "object";
3525
+ };
3526
+ readonly transferType: {
3527
+ readonly type: "string";
3528
+ readonly required: true;
3529
+ };
3530
+ readonly pricePerShare: {
3531
+ readonly type: "number";
3532
+ };
3533
+ readonly transferDate: {
3534
+ readonly type: "string";
3535
+ readonly format: "date";
3536
+ readonly required: true;
3537
+ };
3538
+ };
3539
+ };
3540
+ readonly guards: readonly [{
3541
+ readonly name: "restrictionsCleared";
3542
+ readonly description: "Must clear any transfer restrictions";
3543
+ readonly expression: "!context.restrictions.isRestricted || context.restrictions.restrictionEndDate == null || new Date() >= new Date(context.restrictions.restrictionEndDate)";
3544
+ }, {
3545
+ readonly name: "rofrSatisfied";
3546
+ readonly description: "Right of first refusal must be waived or expired";
3547
+ readonly expression: "context.restrictions.rofr == null";
3548
+ }];
3549
+ readonly effects: readonly [{
3550
+ readonly type: "APPEND_ARRAY";
3551
+ readonly path: "transferHistory";
3552
+ readonly value: {
3553
+ readonly transferId: "{{ event.transferId }}";
3554
+ readonly transferDate: "{{ event.transferDate }}";
3555
+ readonly fromHolderId: "{{ context.holder.holderId }}";
3556
+ readonly toHolderId: "{{ event.toHolderId }}";
3557
+ readonly shares: "{{ context.shareCount }}";
3558
+ readonly transferType: "{{ event.transferType }}";
3559
+ readonly pricePerShare: "{{ event.pricePerShare }}";
3560
+ };
3561
+ }, {
3562
+ readonly type: "EMIT_EVENT";
3563
+ readonly eventType: "TRANSFER_INITIATED";
3564
+ readonly payload: {
3565
+ readonly securityId: "{{ context.securityId }}";
3566
+ readonly transferId: "{{ event.transferId }}";
3567
+ readonly fromHolderId: "{{ context.holder.holderId }}";
3568
+ readonly toHolderId: "{{ event.toHolderId }}";
3569
+ };
3570
+ }];
3571
+ };
3572
+ readonly complete_transfer: {
3573
+ readonly from: "TRANSFERRED";
3574
+ readonly to: "ISSUED";
3575
+ readonly description: "Complete the transfer, update holder";
3576
+ readonly event: {
3577
+ readonly name: "complete_transfer";
3578
+ readonly payload: {
3579
+ readonly transferAgentConfirmation: {
3580
+ readonly type: "string";
3581
+ };
3582
+ readonly newCertificateNumber: {
3583
+ readonly type: "string";
3584
+ };
3585
+ readonly toHolderId: {
3586
+ readonly type: "string";
3587
+ readonly required: true;
3588
+ };
3589
+ readonly toHolderName: {
3590
+ readonly type: "string";
3591
+ readonly required: true;
3592
+ };
3593
+ readonly toHolderType: {
3594
+ readonly type: "string";
3595
+ readonly required: true;
3596
+ };
3597
+ readonly toAddress: {
3598
+ readonly type: "object";
3599
+ };
3600
+ readonly completedDate: {
3601
+ readonly type: "string";
3602
+ readonly format: "date";
3603
+ readonly required: true;
3604
+ };
3605
+ readonly costBasis: {
3606
+ readonly type: "number";
3607
+ };
3608
+ };
3609
+ };
3610
+ readonly effects: readonly [{
3611
+ readonly type: "SET_CONTEXT";
3612
+ readonly path: "holder";
3613
+ readonly value: {
3614
+ readonly holderId: "{{ event.toHolderId }}";
3615
+ readonly holderType: "{{ event.toHolderType }}";
3616
+ readonly name: "{{ event.toHolderName }}";
3617
+ readonly address: "{{ event.toAddress }}";
3618
+ readonly acquisitionDate: "{{ event.completedDate }}";
3619
+ readonly acquisitionMethod: "PURCHASE";
3620
+ readonly costBasis: "{{ event.costBasis }}";
3621
+ };
3622
+ }, {
3623
+ readonly type: "CONDITIONAL";
3624
+ readonly condition: "event.newCertificateNumber != null";
3625
+ readonly then: {
3626
+ readonly type: "SET_CONTEXT";
3627
+ readonly path: "certificateNumber";
3628
+ readonly value: "{{ event.newCertificateNumber }}";
3629
+ };
3630
+ }, {
3631
+ readonly type: "UPDATE_ARRAY_ITEM";
3632
+ readonly path: "transferHistory";
3633
+ readonly matchKey: "toHolderId";
3634
+ readonly matchValue: "{{ event.toHolderId }}";
3635
+ readonly updates: {
3636
+ readonly transferAgentConfirmation: "{{ event.transferAgentConfirmation }}";
3637
+ };
3638
+ }, {
3639
+ readonly type: "EMIT_EVENT";
3640
+ readonly eventType: "TRANSFER_COMPLETED";
3641
+ readonly payload: {
3642
+ readonly securityId: "{{ context.securityId }}";
3643
+ readonly newHolderId: "{{ event.toHolderId }}";
3644
+ };
3645
+ }];
3646
+ };
3647
+ readonly repurchase: {
3648
+ readonly from: "ISSUED";
3649
+ readonly to: "TREASURY";
3650
+ readonly description: "Company repurchases shares from holder";
3651
+ readonly event: {
3652
+ readonly name: "repurchase";
3653
+ readonly payload: {
3654
+ readonly repurchaseDate: {
3655
+ readonly type: "string";
3656
+ readonly format: "date";
3657
+ readonly required: true;
3658
+ };
3659
+ readonly pricePerShare: {
3660
+ readonly type: "number";
3661
+ readonly required: true;
3662
+ };
3663
+ readonly boardResolutionRef: {
3664
+ readonly type: "string";
3665
+ readonly required: true;
3666
+ };
3667
+ readonly repurchaseAgreementRef: {
3668
+ readonly type: "string";
3669
+ };
3670
+ };
3671
+ };
3672
+ readonly guards: readonly [{
3673
+ readonly name: "hasRepurchaseResolution";
3674
+ readonly crossMachine: {
3675
+ readonly machine: "corporate-resolution";
3676
+ readonly instanceRef: "{{ event.boardResolutionRef }}";
3677
+ readonly requiredState: "EXECUTED";
3678
+ };
3679
+ }];
3680
+ readonly effects: readonly [{
3681
+ readonly type: "APPEND_ARRAY";
3682
+ readonly path: "transferHistory";
3683
+ readonly value: {
3684
+ readonly transferId: "REPURCHASE-{{ event.repurchaseDate }}";
3685
+ readonly transferDate: "{{ event.repurchaseDate }}";
3686
+ readonly fromHolderId: "{{ context.holder.holderId }}";
3687
+ readonly toHolderId: "TREASURY";
3688
+ readonly shares: "{{ context.shareCount }}";
3689
+ readonly transferType: "INTERNAL";
3690
+ readonly pricePerShare: "{{ event.pricePerShare }}";
3691
+ };
3692
+ }, {
3693
+ readonly type: "SET_CONTEXT";
3694
+ readonly path: "holder";
3695
+ readonly value: {
3696
+ readonly holderId: "TREASURY";
3697
+ readonly holderType: "TREASURY";
3698
+ readonly name: "Treasury Stock";
3699
+ readonly acquisitionDate: "{{ event.repurchaseDate }}";
3700
+ readonly acquisitionMethod: "PURCHASE";
3701
+ readonly costBasis: "{{ event.pricePerShare * context.shareCount }}";
3702
+ };
3703
+ }, {
3704
+ readonly type: "EMIT_EVENT";
3705
+ readonly eventType: "SHARES_REPURCHASED";
3706
+ readonly payload: {
3707
+ readonly securityId: "{{ context.securityId }}";
3708
+ readonly shares: "{{ context.shareCount }}";
3709
+ readonly pricePerShare: "{{ event.pricePerShare }}";
3710
+ };
3711
+ }];
3712
+ };
3713
+ readonly reissue_from_treasury: {
3714
+ readonly from: "TREASURY";
3715
+ readonly to: "ISSUED";
3716
+ readonly description: "Reissue treasury shares to a new holder";
3717
+ readonly event: {
3718
+ readonly name: "reissue_from_treasury";
3719
+ readonly payload: {
3720
+ readonly holderId: {
3721
+ readonly type: "string";
3722
+ readonly required: true;
3723
+ };
3724
+ readonly holderName: {
3725
+ readonly type: "string";
3726
+ readonly required: true;
3727
+ };
3728
+ readonly holderType: {
3729
+ readonly type: "string";
3730
+ readonly required: true;
3731
+ };
3732
+ readonly address: {
3733
+ readonly type: "object";
3734
+ };
3735
+ readonly reissueDate: {
3736
+ readonly type: "string";
3737
+ readonly format: "date";
3738
+ readonly required: true;
3739
+ };
3740
+ readonly issuancePrice: {
3741
+ readonly type: "number";
3742
+ };
3743
+ readonly boardResolutionRef: {
3744
+ readonly type: "string";
3745
+ readonly required: true;
3746
+ };
3747
+ };
3748
+ };
3749
+ readonly guards: readonly [{
3750
+ readonly name: "hasReissueResolution";
3751
+ readonly crossMachine: {
3752
+ readonly machine: "corporate-resolution";
3753
+ readonly instanceRef: "{{ event.boardResolutionRef }}";
3754
+ readonly requiredState: "EXECUTED";
3755
+ };
3756
+ }];
3757
+ readonly effects: readonly [{
3758
+ readonly type: "SET_CONTEXT";
3759
+ readonly path: "holder";
3760
+ readonly value: {
3761
+ readonly holderId: "{{ event.holderId }}";
3762
+ readonly holderType: "{{ event.holderType }}";
3763
+ readonly name: "{{ event.holderName }}";
3764
+ readonly address: "{{ event.address }}";
3765
+ readonly acquisitionDate: "{{ event.reissueDate }}";
3766
+ readonly acquisitionMethod: "PURCHASE";
3767
+ readonly costBasis: "{{ event.issuancePrice * context.shareCount }}";
3768
+ };
3769
+ }, {
3770
+ readonly type: "EMIT_EVENT";
3771
+ readonly eventType: "TREASURY_SHARES_REISSUED";
3772
+ readonly payload: {
3773
+ readonly securityId: "{{ context.securityId }}";
3774
+ readonly holderId: "{{ event.holderId }}";
3775
+ };
3776
+ }];
3777
+ };
3778
+ readonly retire: {
3779
+ readonly from: readonly ["ISSUED", "TREASURY"];
3780
+ readonly to: "RETIRED";
3781
+ readonly description: "Retire shares (cancel them)";
3782
+ readonly event: {
3783
+ readonly name: "retire";
3784
+ readonly payload: {
3785
+ readonly retiredDate: {
3786
+ readonly type: "string";
3787
+ readonly format: "date";
3788
+ readonly required: true;
3789
+ };
3790
+ readonly retirementMethod: {
3791
+ readonly type: "string";
3792
+ readonly required: true;
3793
+ };
3794
+ readonly boardResolutionRef: {
3795
+ readonly type: "string";
3796
+ readonly required: true;
3797
+ };
3798
+ readonly repurchasePrice: {
3799
+ readonly type: "number";
3800
+ };
3801
+ };
3802
+ };
3803
+ readonly guards: readonly [{
3804
+ readonly name: "hasRetirementResolution";
3805
+ readonly crossMachine: {
3806
+ readonly machine: "corporate-resolution";
3807
+ readonly instanceRef: "{{ event.boardResolutionRef }}";
3808
+ readonly requiredState: "EXECUTED";
3809
+ };
3810
+ }];
3811
+ readonly effects: readonly [{
3812
+ readonly type: "SET_CONTEXT";
3813
+ readonly path: "retirementDetails";
3814
+ readonly value: {
3815
+ readonly retiredDate: "{{ event.retiredDate }}";
3816
+ readonly retirementMethod: "{{ event.retirementMethod }}";
3817
+ readonly repurchasePrice: "{{ event.repurchasePrice }}";
3818
+ readonly boardResolutionRef: "{{ event.boardResolutionRef }}";
3819
+ };
3820
+ }, {
3821
+ readonly type: "SET_CONTEXT";
3822
+ readonly path: "holder";
3823
+ readonly value: null;
3824
+ }, {
3825
+ readonly type: "EMIT_EVENT";
3826
+ readonly eventType: "SHARES_RETIRED";
3827
+ readonly payload: {
3828
+ readonly securityId: "{{ context.securityId }}";
3829
+ readonly shareClass: "{{ context.shareClassName }}";
3830
+ readonly shares: "{{ context.shareCount }}";
3831
+ };
3832
+ }];
3833
+ };
3834
+ readonly stock_split: {
3835
+ readonly from: "ISSUED";
3836
+ readonly to: "ISSUED";
3837
+ readonly description: "Apply stock split to this lot";
3838
+ readonly event: {
3839
+ readonly name: "stock_split";
3840
+ readonly payload: {
3841
+ readonly actionId: {
3842
+ readonly type: "string";
3843
+ readonly required: true;
3844
+ };
3845
+ readonly splitRatio: {
3846
+ readonly type: "string";
3847
+ readonly required: true;
3848
+ readonly description: "e.g., '2:1' for 2-for-1 split";
3849
+ };
3850
+ readonly effectiveDate: {
3851
+ readonly type: "string";
3852
+ readonly format: "date";
3853
+ readonly required: true;
3854
+ };
3855
+ readonly resolutionRef: {
3856
+ readonly type: "string";
3857
+ readonly required: true;
3858
+ };
3859
+ readonly newShareCount: {
3860
+ readonly type: "integer";
3861
+ readonly required: true;
3862
+ };
3863
+ };
3864
+ };
3865
+ readonly effects: readonly [{
3866
+ readonly type: "APPEND_ARRAY";
3867
+ readonly path: "corporateActions";
3868
+ readonly value: {
3869
+ readonly actionId: "{{ event.actionId }}";
3870
+ readonly actionType: "STOCK_SPLIT";
3871
+ readonly actionDate: "{{ event.effectiveDate }}";
3872
+ readonly ratio: "{{ event.splitRatio }}";
3873
+ readonly sharesBeforeAction: "{{ context.shareCount }}";
3874
+ readonly sharesAfterAction: "{{ event.newShareCount }}";
3875
+ readonly resolutionRef: "{{ event.resolutionRef }}";
3876
+ };
3877
+ }, {
3878
+ readonly type: "SET_CONTEXT";
3879
+ readonly path: "shareCount";
3880
+ readonly value: "{{ event.newShareCount }}";
3881
+ }, {
3882
+ readonly type: "EMIT_EVENT";
3883
+ readonly eventType: "STOCK_SPLIT_APPLIED";
3884
+ readonly payload: {
3885
+ readonly securityId: "{{ context.securityId }}";
3886
+ readonly ratio: "{{ event.splitRatio }}";
3887
+ readonly newShareCount: "{{ event.newShareCount }}";
3888
+ };
3889
+ }];
3890
+ };
3891
+ readonly declare_dividend: {
3892
+ readonly from: "ISSUED";
3893
+ readonly to: "ISSUED";
3894
+ readonly description: "Record dividend declaration affecting this lot (for stock dividends)";
3895
+ readonly event: {
3896
+ readonly name: "declare_dividend";
3897
+ readonly payload: {
3898
+ readonly actionId: {
3899
+ readonly type: "string";
3900
+ readonly required: true;
3901
+ };
3902
+ readonly dividendType: {
3903
+ readonly type: "string";
3904
+ readonly enum: readonly ["CASH", "STOCK"];
3905
+ readonly required: true;
3906
+ };
3907
+ readonly recordDate: {
3908
+ readonly type: "string";
3909
+ readonly format: "date";
3910
+ readonly required: true;
3911
+ };
3912
+ readonly paymentDate: {
3913
+ readonly type: "string";
3914
+ readonly format: "date";
3915
+ readonly required: true;
3916
+ };
3917
+ readonly cashAmount: {
3918
+ readonly type: "number";
3919
+ };
3920
+ readonly stockShares: {
3921
+ readonly type: "integer";
3922
+ };
3923
+ readonly resolutionRef: {
3924
+ readonly type: "string";
3925
+ readonly required: true;
3926
+ };
3927
+ };
3928
+ };
3929
+ readonly guards: readonly [{
3930
+ readonly name: "hasDividendResolution";
3931
+ readonly crossMachine: {
3932
+ readonly machine: "corporate-resolution";
3933
+ readonly instanceRef: "{{ event.resolutionRef }}";
3934
+ readonly requiredState: "EXECUTED";
3935
+ };
3936
+ }];
3937
+ readonly effects: readonly [{
3938
+ readonly type: "CONDITIONAL";
3939
+ readonly condition: "event.dividendType === 'STOCK'";
3940
+ readonly then: {
3941
+ readonly type: "APPEND_ARRAY";
3942
+ readonly path: "corporateActions";
3943
+ readonly value: {
3944
+ readonly actionId: "{{ event.actionId }}";
3945
+ readonly actionType: "STOCK_DIVIDEND";
3946
+ readonly actionDate: "{{ event.paymentDate }}";
3947
+ readonly sharesBeforeAction: "{{ context.shareCount }}";
3948
+ readonly sharesAfterAction: "{{ context.shareCount + event.stockShares }}";
3949
+ readonly resolutionRef: "{{ event.resolutionRef }}";
3950
+ };
3951
+ };
3952
+ }, {
3953
+ readonly type: "CONDITIONAL";
3954
+ readonly condition: "event.dividendType === 'STOCK'";
3955
+ readonly then: {
3956
+ readonly type: "INCREMENT";
3957
+ readonly path: "shareCount";
3958
+ readonly amount: "{{ event.stockShares }}";
3959
+ };
3960
+ }];
3961
+ };
3962
+ readonly remove_restriction: {
3963
+ readonly from: "ISSUED";
3964
+ readonly to: "ISSUED";
3965
+ readonly description: "Remove or update restrictions on the shares";
3966
+ readonly event: {
3967
+ readonly name: "remove_restriction";
3968
+ readonly payload: {
3969
+ readonly restrictionType: {
3970
+ readonly type: "string";
3971
+ readonly required: true;
3972
+ };
3973
+ readonly removedDate: {
3974
+ readonly type: "string";
3975
+ readonly format: "date";
3976
+ readonly required: true;
3977
+ };
3978
+ readonly reason: {
3979
+ readonly type: "string";
3980
+ };
3981
+ readonly legalOpinionRef: {
3982
+ readonly type: "string";
3983
+ };
3984
+ };
3985
+ };
3986
+ readonly effects: readonly [{
3987
+ readonly type: "UPDATE_ARRAY";
3988
+ readonly path: "restrictions.restrictionType";
3989
+ readonly operation: "REMOVE";
3990
+ readonly value: "{{ event.restrictionType }}";
3991
+ }, {
3992
+ readonly type: "COMPUTE";
3993
+ readonly path: "restrictions.isRestricted";
3994
+ readonly expression: "context.restrictions.restrictionType.length > 0";
3995
+ }, {
3996
+ readonly type: "EMIT_EVENT";
3997
+ readonly eventType: "RESTRICTION_REMOVED";
3998
+ readonly payload: {
3999
+ readonly securityId: "{{ context.securityId }}";
4000
+ readonly restrictionType: "{{ event.restrictionType }}";
4001
+ };
4002
+ }];
4003
+ };
4004
+ };
4005
+ readonly crossMachineRefs: {
4006
+ readonly entity: {
4007
+ readonly machine: "corporate-entity";
4008
+ readonly description: "Parent corporate entity with share class definitions";
4009
+ readonly foreignKey: "entityId";
4010
+ };
4011
+ readonly resolutions: {
4012
+ readonly machine: "corporate-resolution";
4013
+ readonly description: "Board resolutions authorizing securities actions";
4014
+ readonly foreignKey: "entityId";
4015
+ };
4016
+ readonly shareholders: {
4017
+ readonly machine: "corporate-shareholders";
4018
+ readonly description: "Shareholder meetings for determining voting rights";
4019
+ readonly foreignKey: "entityId";
4020
+ };
4021
+ };
4022
+ readonly metadata: {
4023
+ readonly author: "OttoChain";
4024
+ readonly license: "MIT";
4025
+ readonly tags: readonly ["corporate", "governance", "securities", "stock", "equity", "certificates"];
4026
+ readonly documentation: "https://ottochain.dev/docs/corporate/securities";
4027
+ };
4028
+ };
4029
+ };
4030
+ export type CorporateType = keyof typeof CORPORATE_DEFINITIONS;
24
4031
  /**
25
- * Get the state machine definition for a corporate type.
4032
+ * Get a corporate state machine definition by type.
4033
+ * @param type - 'entity' | 'board' | 'shareholders' | 'securities'
26
4034
  */
27
- export declare function getCorporateDefinition(type: CorporateDefinitionType): unknown;
4035
+ export declare function getCorporateDefinition(type: CorporateType): unknown;