@ottochain/sdk 1.5.0 → 1.7.0-beta.1

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 (92) hide show
  1. package/dist/cjs/apps/contracts/index.js +20 -19
  2. package/dist/cjs/apps/contracts/state-machines/index.js +845 -0
  3. package/dist/cjs/apps/corporate/index.js +20 -34
  4. package/dist/cjs/apps/corporate/state-machines/index.js +4445 -0
  5. package/dist/cjs/apps/governance/index.js +34 -44
  6. package/dist/cjs/apps/governance/state-machines/index.js +2938 -0
  7. package/dist/cjs/apps/identity/index.js +16 -11
  8. package/dist/{esm/apps/oracles/state-machines/oracle.json → cjs/apps/identity/state-machines/index.js} +385 -4
  9. package/dist/cjs/apps/index.js +15 -13
  10. package/dist/cjs/apps/markets/index.js +24 -14
  11. package/dist/cjs/apps/markets/state-machines/index.js +2302 -0
  12. package/dist/cjs/ottochain/index.js +4 -1
  13. package/dist/cjs/ottochain/normalize.js +17 -3
  14. package/dist/cjs/ottochain/types.js +12 -0
  15. package/dist/esm/apps/contracts/index.js +17 -15
  16. package/dist/esm/apps/contracts/state-machines/index.js +842 -0
  17. package/dist/esm/apps/corporate/index.js +15 -30
  18. package/dist/esm/apps/corporate/state-machines/index.js +4442 -0
  19. package/dist/esm/apps/governance/index.js +27 -39
  20. package/dist/esm/apps/governance/state-machines/index.js +2935 -0
  21. package/dist/esm/apps/identity/index.js +13 -7
  22. package/dist/{cjs/apps/oracles/state-machines/oracle.json → esm/apps/identity/state-machines/index.js} +382 -4
  23. package/dist/esm/apps/index.js +14 -12
  24. package/dist/esm/apps/markets/index.js +19 -10
  25. package/dist/esm/apps/markets/state-machines/index.js +2299 -0
  26. package/dist/esm/ottochain/index.js +2 -0
  27. package/dist/esm/ottochain/normalize.js +17 -3
  28. package/dist/esm/ottochain/types.js +11 -1
  29. package/dist/types/apps/contracts/index.d.ts +661 -9
  30. package/dist/types/apps/contracts/state-machines/index.d.ts +652 -0
  31. package/dist/types/apps/corporate/index.d.ts +4015 -7
  32. package/dist/types/apps/corporate/state-machines/index.d.ts +4006 -0
  33. package/dist/types/apps/governance/index.d.ts +2151 -12
  34. package/dist/types/apps/governance/state-machines/index.d.ts +2138 -0
  35. package/dist/types/apps/identity/index.d.ts +601 -4
  36. package/dist/types/apps/identity/state-machines/index.d.ts +596 -0
  37. package/dist/types/apps/index.d.ts +14 -12
  38. package/dist/types/apps/markets/index.d.ts +1690 -7
  39. package/dist/types/apps/markets/state-machines/index.d.ts +1680 -0
  40. package/dist/types/ottochain/index.d.ts +2 -1
  41. package/dist/types/ottochain/normalize.d.ts +14 -0
  42. package/dist/types/ottochain/types.d.ts +9 -0
  43. package/package.json +4 -3
  44. package/dist/cjs/apps/contracts/state-machines/contract.json +0 -352
  45. package/dist/cjs/apps/contracts/state-machines/escrow.json +0 -354
  46. package/dist/cjs/apps/corporate/state-machines/corporate-board.json +0 -1064
  47. package/dist/cjs/apps/corporate/state-machines/corporate-bylaws.json +0 -751
  48. package/dist/cjs/apps/corporate/state-machines/corporate-committee.json +0 -957
  49. package/dist/cjs/apps/corporate/state-machines/corporate-compliance.json +0 -1293
  50. package/dist/cjs/apps/corporate/state-machines/corporate-entity.json +0 -861
  51. package/dist/cjs/apps/corporate/state-machines/corporate-officers.json +0 -843
  52. package/dist/cjs/apps/corporate/state-machines/corporate-proxy.json +0 -783
  53. package/dist/cjs/apps/corporate/state-machines/corporate-resolution.json +0 -1174
  54. package/dist/cjs/apps/corporate/state-machines/corporate-securities.json +0 -1215
  55. package/dist/cjs/apps/corporate/state-machines/corporate-shareholders.json +0 -1298
  56. package/dist/cjs/apps/governance/state-machines/dao-multisig.json +0 -667
  57. package/dist/cjs/apps/governance/state-machines/dao-single.json +0 -230
  58. package/dist/cjs/apps/governance/state-machines/dao-threshold.json +0 -624
  59. package/dist/cjs/apps/governance/state-machines/dao-token.json +0 -638
  60. package/dist/cjs/apps/governance/state-machines/governance-constitution.json +0 -357
  61. package/dist/cjs/apps/governance/state-machines/governance-executive.json +0 -387
  62. package/dist/cjs/apps/governance/state-machines/governance-judiciary.json +0 -558
  63. package/dist/cjs/apps/governance/state-machines/governance-legislature.json +0 -662
  64. package/dist/cjs/apps/governance/state-machines/governance-simple.json +0 -625
  65. package/dist/cjs/apps/identity/state-machines/agent-identity.json +0 -270
  66. package/dist/cjs/apps/markets/state-machines/market-universal.json +0 -621
  67. package/dist/cjs/apps/oracles/index.js +0 -62
  68. package/dist/esm/apps/contracts/state-machines/contract.json +0 -352
  69. package/dist/esm/apps/contracts/state-machines/escrow.json +0 -354
  70. package/dist/esm/apps/corporate/state-machines/corporate-board.json +0 -1064
  71. package/dist/esm/apps/corporate/state-machines/corporate-bylaws.json +0 -751
  72. package/dist/esm/apps/corporate/state-machines/corporate-committee.json +0 -957
  73. package/dist/esm/apps/corporate/state-machines/corporate-compliance.json +0 -1293
  74. package/dist/esm/apps/corporate/state-machines/corporate-entity.json +0 -861
  75. package/dist/esm/apps/corporate/state-machines/corporate-officers.json +0 -843
  76. package/dist/esm/apps/corporate/state-machines/corporate-proxy.json +0 -783
  77. package/dist/esm/apps/corporate/state-machines/corporate-resolution.json +0 -1174
  78. package/dist/esm/apps/corporate/state-machines/corporate-securities.json +0 -1215
  79. package/dist/esm/apps/corporate/state-machines/corporate-shareholders.json +0 -1298
  80. package/dist/esm/apps/governance/state-machines/dao-multisig.json +0 -667
  81. package/dist/esm/apps/governance/state-machines/dao-single.json +0 -230
  82. package/dist/esm/apps/governance/state-machines/dao-threshold.json +0 -624
  83. package/dist/esm/apps/governance/state-machines/dao-token.json +0 -638
  84. package/dist/esm/apps/governance/state-machines/governance-constitution.json +0 -357
  85. package/dist/esm/apps/governance/state-machines/governance-executive.json +0 -387
  86. package/dist/esm/apps/governance/state-machines/governance-judiciary.json +0 -558
  87. package/dist/esm/apps/governance/state-machines/governance-legislature.json +0 -662
  88. package/dist/esm/apps/governance/state-machines/governance-simple.json +0 -625
  89. package/dist/esm/apps/identity/state-machines/agent-identity.json +0 -270
  90. package/dist/esm/apps/markets/state-machines/market-universal.json +0 -621
  91. package/dist/esm/apps/oracles/index.js +0 -42
  92. package/dist/types/apps/oracles/index.d.ts +0 -34
@@ -1,861 +0,0 @@
1
- {
2
- "$schema": "https://ottochain.dev/schemas/state-machine-v1.json",
3
- "name": "corporate-entity",
4
- "version": "1.0.0",
5
- "category": "corporate-governance",
6
- "description": "Master corporate record tracking the lifecycle of a business entity from incorporation through dissolution. Manages legal identity, share structure, and corporate status.",
7
- "context": {
8
- "entityId": {
9
- "type": "string",
10
- "description": "Unique identifier for this corporate entity"
11
- },
12
- "legalName": {
13
- "type": "string",
14
- "description": "Full legal name of the corporation"
15
- },
16
- "tradeName": {
17
- "type": "string",
18
- "nullable": true,
19
- "description": "DBA or trade name if different"
20
- },
21
- "entityType": {
22
- "type": "string",
23
- "enum": [
24
- "C_CORP",
25
- "S_CORP",
26
- "B_CORP",
27
- "LLC",
28
- "LP",
29
- "LLP"
30
- ],
31
- "description": "Legal entity type"
32
- },
33
- "jurisdiction": {
34
- "type": "object",
35
- "properties": {
36
- "state": {
37
- "type": "string",
38
- "description": "State of incorporation (e.g., DE, NV, WY)"
39
- },
40
- "country": {
41
- "type": "string",
42
- "default": "USA"
43
- },
44
- "foreignQualifications": {
45
- "type": "array",
46
- "items": {
47
- "type": "string"
48
- },
49
- "description": "States where foreign qualified to do business"
50
- }
51
- }
52
- },
53
- "formationDate": {
54
- "type": "string",
55
- "format": "date",
56
- "description": "Date of incorporation"
57
- },
58
- "fiscalYearEnd": {
59
- "type": "string",
60
- "description": "Fiscal year end (MM-DD format)"
61
- },
62
- "registeredAgent": {
63
- "type": "object",
64
- "properties": {
65
- "name": {
66
- "type": "string"
67
- },
68
- "address": {
69
- "type": "object"
70
- },
71
- "phone": {
72
- "type": "string"
73
- },
74
- "email": {
75
- "type": "string"
76
- },
77
- "effectiveDate": {
78
- "type": "string",
79
- "format": "date"
80
- }
81
- }
82
- },
83
- "principalOffice": {
84
- "type": "object",
85
- "properties": {
86
- "street": {
87
- "type": "string"
88
- },
89
- "city": {
90
- "type": "string"
91
- },
92
- "state": {
93
- "type": "string"
94
- },
95
- "zip": {
96
- "type": "string"
97
- },
98
- "country": {
99
- "type": "string",
100
- "default": "USA"
101
- }
102
- }
103
- },
104
- "shareStructure": {
105
- "type": "object",
106
- "properties": {
107
- "classes": {
108
- "type": "array",
109
- "items": {
110
- "type": "object",
111
- "properties": {
112
- "className": {
113
- "type": "string",
114
- "description": "e.g., Common, Series A Preferred"
115
- },
116
- "classId": {
117
- "type": "string"
118
- },
119
- "authorized": {
120
- "type": "integer",
121
- "description": "Total shares authorized"
122
- },
123
- "issued": {
124
- "type": "integer",
125
- "description": "Shares currently issued"
126
- },
127
- "outstanding": {
128
- "type": "integer",
129
- "description": "Issued minus treasury"
130
- },
131
- "treasury": {
132
- "type": "integer",
133
- "description": "Shares held by company"
134
- },
135
- "parValue": {
136
- "type": "number",
137
- "description": "Par value per share"
138
- },
139
- "votingRights": {
140
- "type": "boolean",
141
- "description": "Whether class has voting rights"
142
- },
143
- "votesPerShare": {
144
- "type": "number",
145
- "default": 1
146
- },
147
- "liquidationPreference": {
148
- "type": "number",
149
- "nullable": true,
150
- "description": "Liquidation preference multiple"
151
- },
152
- "dividendRate": {
153
- "type": "number",
154
- "nullable": true,
155
- "description": "Annual dividend rate %"
156
- },
157
- "convertible": {
158
- "type": "boolean",
159
- "default": false
160
- },
161
- "conversionRatio": {
162
- "type": "number",
163
- "nullable": true
164
- },
165
- "antidilution": {
166
- "type": "string",
167
- "enum": [
168
- "NONE",
169
- "BROAD_BASED",
170
- "NARROW_BASED",
171
- "FULL_RATCHET"
172
- ],
173
- "nullable": true
174
- }
175
- }
176
- }
177
- },
178
- "totalAuthorized": {
179
- "type": "integer",
180
- "description": "Sum of all authorized shares"
181
- },
182
- "totalIssued": {
183
- "type": "integer"
184
- },
185
- "totalOutstanding": {
186
- "type": "integer"
187
- }
188
- }
189
- },
190
- "incorporators": {
191
- "type": "array",
192
- "items": {
193
- "type": "object",
194
- "properties": {
195
- "name": {
196
- "type": "string"
197
- },
198
- "address": {
199
- "type": "object"
200
- },
201
- "signatureDate": {
202
- "type": "string",
203
- "format": "date"
204
- }
205
- }
206
- }
207
- },
208
- "ein": {
209
- "type": "string",
210
- "nullable": true,
211
- "description": "Federal EIN"
212
- },
213
- "stateIds": {
214
- "type": "object",
215
- "additionalProperties": {
216
- "type": "string"
217
- },
218
- "description": "State-specific entity IDs keyed by state code"
219
- },
220
- "suspensionReason": {
221
- "type": "string",
222
- "nullable": true
223
- },
224
- "suspensionDate": {
225
- "type": "string",
226
- "format": "date",
227
- "nullable": true
228
- },
229
- "dissolutionDate": {
230
- "type": "string",
231
- "format": "date",
232
- "nullable": true
233
- },
234
- "dissolutionReason": {
235
- "type": "string",
236
- "nullable": true
237
- },
238
- "charterAmendments": {
239
- "type": "array",
240
- "items": {
241
- "type": "object",
242
- "properties": {
243
- "amendmentId": {
244
- "type": "string"
245
- },
246
- "description": {
247
- "type": "string"
248
- },
249
- "effectiveDate": {
250
- "type": "string",
251
- "format": "date"
252
- },
253
- "resolutionRef": {
254
- "type": "string",
255
- "description": "Reference to approving resolution"
256
- },
257
- "filedDate": {
258
- "type": "string",
259
- "format": "date"
260
- }
261
- }
262
- }
263
- },
264
- "createdAt": {
265
- "type": "string",
266
- "format": "date-time"
267
- },
268
- "updatedAt": {
269
- "type": "string",
270
- "format": "date-time"
271
- }
272
- },
273
- "states": {
274
- "INCORPORATING": {
275
- "description": "Initial state during formation process. Articles filed but not yet approved by state.",
276
- "metadata": null
277
- },
278
- "ACTIVE": {
279
- "description": "Corporation is in good standing and authorized to conduct business.",
280
- "metadata": null
281
- },
282
- "SUSPENDED": {
283
- "description": "Corporate powers suspended due to compliance failure (tax, filings, etc). Can be reinstated.",
284
- "metadata": null
285
- },
286
- "DISSOLVED": {
287
- "description": "Corporation has been legally dissolved. Terminal state.",
288
- "metadata": null,
289
- "terminal": true
290
- }
291
- },
292
- "initialState": "INCORPORATING",
293
- "transitions": {
294
- "incorporate": {
295
- "from": "INCORPORATING",
296
- "to": "ACTIVE",
297
- "description": "State approves articles of incorporation, corporation comes into existence",
298
- "event": {
299
- "name": "incorporate",
300
- "payload": {
301
- "approvalDate": {
302
- "type": "string",
303
- "format": "date",
304
- "required": true
305
- },
306
- "stateFileNumber": {
307
- "type": "string",
308
- "required": true
309
- },
310
- "certificateOfIncorporation": {
311
- "type": "string",
312
- "description": "Document reference"
313
- }
314
- }
315
- },
316
- "guards": [
317
- {
318
- "name": "hasRequiredFormationDocs",
319
- "description": "Articles of incorporation filed, incorporators signed, registered agent designated",
320
- "expression": "context.legalName != null && context.jurisdiction.state != null && context.registeredAgent != null && context.incorporators.length > 0"
321
- },
322
- {
323
- "name": "hasAuthorizedShares",
324
- "description": "At least one share class authorized",
325
- "expression": "context.shareStructure.classes.length > 0 && context.shareStructure.totalAuthorized > 0"
326
- }
327
- ],
328
- "effects": [
329
- {
330
- "type": "SET_CONTEXT",
331
- "path": "formationDate",
332
- "value": "{{ event.approvalDate }}"
333
- },
334
- {
335
- "type": "SET_CONTEXT",
336
- "path": "stateIds.{{ context.jurisdiction.state }}",
337
- "value": "{{ event.stateFileNumber }}"
338
- },
339
- {
340
- "type": "SET_CONTEXT",
341
- "path": "updatedAt",
342
- "value": "{{ now() }}"
343
- },
344
- {
345
- "type": "EMIT_EVENT",
346
- "eventType": "CORPORATION_FORMED",
347
- "payload": {
348
- "entityId": "{{ context.entityId }}",
349
- "legalName": "{{ context.legalName }}",
350
- "jurisdiction": "{{ context.jurisdiction.state }}",
351
- "formationDate": "{{ event.approvalDate }}"
352
- }
353
- }
354
- ]
355
- },
356
- "amend_charter": {
357
- "from": "ACTIVE",
358
- "to": "ACTIVE",
359
- "description": "Amend the certificate/articles of incorporation (requires shareholder approval for most amendments)",
360
- "event": {
361
- "name": "amend_charter",
362
- "payload": {
363
- "amendmentId": {
364
- "type": "string",
365
- "required": true
366
- },
367
- "description": {
368
- "type": "string",
369
- "required": true
370
- },
371
- "amendmentType": {
372
- "type": "string",
373
- "enum": [
374
- "NAME_CHANGE",
375
- "SHARE_AUTHORIZATION",
376
- "PURPOSE_CHANGE",
377
- "OTHER"
378
- ],
379
- "required": true
380
- },
381
- "resolutionRef": {
382
- "type": "string",
383
- "required": true,
384
- "description": "Reference to board/shareholder resolution"
385
- },
386
- "effectiveDate": {
387
- "type": "string",
388
- "format": "date",
389
- "required": true
390
- },
391
- "filedDate": {
392
- "type": "string",
393
- "format": "date",
394
- "required": true
395
- },
396
- "newShareAuthorization": {
397
- "type": "object",
398
- "nullable": true,
399
- "description": "If increasing/changing authorized shares"
400
- },
401
- "newLegalName": {
402
- "type": "string",
403
- "nullable": true
404
- }
405
- }
406
- },
407
- "guards": [
408
- {
409
- "name": "hasApprovedResolution",
410
- "description": "Charter amendment must be backed by an executed resolution",
411
- "expression": "event.resolutionRef != null",
412
- "crossMachine": {
413
- "machine": "corporate-resolution",
414
- "instanceRef": "{{ event.resolutionRef }}",
415
- "requiredState": "EXECUTED"
416
- }
417
- }
418
- ],
419
- "effects": [
420
- {
421
- "type": "APPEND_ARRAY",
422
- "path": "charterAmendments",
423
- "value": {
424
- "amendmentId": "{{ event.amendmentId }}",
425
- "description": "{{ event.description }}",
426
- "effectiveDate": "{{ event.effectiveDate }}",
427
- "resolutionRef": "{{ event.resolutionRef }}",
428
- "filedDate": "{{ event.filedDate }}"
429
- }
430
- },
431
- {
432
- "type": "CONDITIONAL",
433
- "condition": "event.newLegalName != null",
434
- "then": {
435
- "type": "SET_CONTEXT",
436
- "path": "legalName",
437
- "value": "{{ event.newLegalName }}"
438
- }
439
- },
440
- {
441
- "type": "SET_CONTEXT",
442
- "path": "updatedAt",
443
- "value": "{{ now() }}"
444
- },
445
- {
446
- "type": "EMIT_EVENT",
447
- "eventType": "CHARTER_AMENDED",
448
- "payload": {
449
- "entityId": "{{ context.entityId }}",
450
- "amendmentId": "{{ event.amendmentId }}",
451
- "amendmentType": "{{ event.amendmentType }}"
452
- }
453
- }
454
- ]
455
- },
456
- "update_share_class": {
457
- "from": "ACTIVE",
458
- "to": "ACTIVE",
459
- "description": "Update authorized shares for an existing class or add new class (requires charter amendment)",
460
- "event": {
461
- "name": "update_share_class",
462
- "payload": {
463
- "classId": {
464
- "type": "string",
465
- "required": true
466
- },
467
- "className": {
468
- "type": "string",
469
- "required": true
470
- },
471
- "authorized": {
472
- "type": "integer",
473
- "required": true
474
- },
475
- "parValue": {
476
- "type": "number",
477
- "required": true
478
- },
479
- "votingRights": {
480
- "type": "boolean",
481
- "required": true
482
- },
483
- "votesPerShare": {
484
- "type": "number",
485
- "default": 1
486
- },
487
- "liquidationPreference": {
488
- "type": "number",
489
- "nullable": true
490
- },
491
- "dividendRate": {
492
- "type": "number",
493
- "nullable": true
494
- },
495
- "convertible": {
496
- "type": "boolean",
497
- "default": false
498
- },
499
- "charterAmendmentRef": {
500
- "type": "string",
501
- "required": true
502
- }
503
- }
504
- },
505
- "guards": [
506
- {
507
- "name": "charterAmended",
508
- "description": "Share class changes require charter amendment to be filed",
509
- "expression": "context.charterAmendments.some(a => a.amendmentId === event.charterAmendmentRef)"
510
- }
511
- ],
512
- "effects": [
513
- {
514
- "type": "UPSERT_ARRAY",
515
- "path": "shareStructure.classes",
516
- "matchKey": "classId",
517
- "matchValue": "{{ event.classId }}",
518
- "value": {
519
- "classId": "{{ event.classId }}",
520
- "className": "{{ event.className }}",
521
- "authorized": "{{ event.authorized }}",
522
- "issued": 0,
523
- "outstanding": 0,
524
- "treasury": 0,
525
- "parValue": "{{ event.parValue }}",
526
- "votingRights": "{{ event.votingRights }}",
527
- "votesPerShare": "{{ event.votesPerShare }}",
528
- "liquidationPreference": "{{ event.liquidationPreference }}",
529
- "dividendRate": "{{ event.dividendRate }}",
530
- "convertible": "{{ event.convertible }}"
531
- }
532
- },
533
- {
534
- "type": "COMPUTE",
535
- "path": "shareStructure.totalAuthorized",
536
- "expression": "context.shareStructure.classes.reduce((sum, c) => sum + c.authorized, 0)"
537
- }
538
- ]
539
- },
540
- "update_registered_agent": {
541
- "from": "ACTIVE",
542
- "to": "ACTIVE",
543
- "description": "Change the registered agent on file with the state",
544
- "event": {
545
- "name": "update_registered_agent",
546
- "payload": {
547
- "name": {
548
- "type": "string",
549
- "required": true
550
- },
551
- "address": {
552
- "type": "object",
553
- "required": true
554
- },
555
- "phone": {
556
- "type": "string"
557
- },
558
- "email": {
559
- "type": "string"
560
- },
561
- "effectiveDate": {
562
- "type": "string",
563
- "format": "date",
564
- "required": true
565
- },
566
- "filingConfirmation": {
567
- "type": "string",
568
- "description": "State filing confirmation number"
569
- }
570
- }
571
- },
572
- "effects": [
573
- {
574
- "type": "SET_CONTEXT",
575
- "path": "registeredAgent",
576
- "value": {
577
- "name": "{{ event.name }}",
578
- "address": "{{ event.address }}",
579
- "phone": "{{ event.phone }}",
580
- "email": "{{ event.email }}",
581
- "effectiveDate": "{{ event.effectiveDate }}"
582
- }
583
- },
584
- {
585
- "type": "EMIT_EVENT",
586
- "eventType": "REGISTERED_AGENT_CHANGED",
587
- "payload": {
588
- "entityId": "{{ context.entityId }}",
589
- "newAgent": "{{ event.name }}",
590
- "effectiveDate": "{{ event.effectiveDate }}"
591
- }
592
- }
593
- ]
594
- },
595
- "suspend": {
596
- "from": "ACTIVE",
597
- "to": "SUSPENDED",
598
- "description": "State suspends corporate powers (typically for tax/filing noncompliance)",
599
- "event": {
600
- "name": "suspend",
601
- "payload": {
602
- "reason": {
603
- "type": "string",
604
- "enum": [
605
- "FRANCHISE_TAX_DELINQUENT",
606
- "ANNUAL_REPORT_MISSING",
607
- "REGISTERED_AGENT_LAPSE",
608
- "ADMINISTRATIVE",
609
- "OTHER"
610
- ],
611
- "required": true
612
- },
613
- "suspensionDate": {
614
- "type": "string",
615
- "format": "date",
616
- "required": true
617
- },
618
- "stateNotice": {
619
- "type": "string",
620
- "description": "Reference to state notice"
621
- },
622
- "cureDeadline": {
623
- "type": "string",
624
- "format": "date",
625
- "nullable": true
626
- }
627
- }
628
- },
629
- "effects": [
630
- {
631
- "type": "SET_CONTEXT",
632
- "path": "suspensionReason",
633
- "value": "{{ event.reason }}"
634
- },
635
- {
636
- "type": "SET_CONTEXT",
637
- "path": "suspensionDate",
638
- "value": "{{ event.suspensionDate }}"
639
- },
640
- {
641
- "type": "EMIT_EVENT",
642
- "eventType": "CORPORATION_SUSPENDED",
643
- "payload": {
644
- "entityId": "{{ context.entityId }}",
645
- "reason": "{{ event.reason }}",
646
- "cureDeadline": "{{ event.cureDeadline }}"
647
- }
648
- }
649
- ]
650
- },
651
- "reinstate": {
652
- "from": "SUSPENDED",
653
- "to": "ACTIVE",
654
- "description": "Cure deficiencies and reinstate corporate powers",
655
- "event": {
656
- "name": "reinstate",
657
- "payload": {
658
- "reinstatementDate": {
659
- "type": "string",
660
- "format": "date",
661
- "required": true
662
- },
663
- "curativeActions": {
664
- "type": "array",
665
- "items": {
666
- "type": "string"
667
- },
668
- "description": "List of actions taken to cure",
669
- "required": true
670
- },
671
- "stateConfirmation": {
672
- "type": "string",
673
- "required": true
674
- },
675
- "penaltiesPaid": {
676
- "type": "number",
677
- "nullable": true
678
- }
679
- }
680
- },
681
- "effects": [
682
- {
683
- "type": "SET_CONTEXT",
684
- "path": "suspensionReason",
685
- "value": null
686
- },
687
- {
688
- "type": "SET_CONTEXT",
689
- "path": "suspensionDate",
690
- "value": null
691
- },
692
- {
693
- "type": "EMIT_EVENT",
694
- "eventType": "CORPORATION_REINSTATED",
695
- "payload": {
696
- "entityId": "{{ context.entityId }}",
697
- "reinstatementDate": "{{ event.reinstatementDate }}"
698
- }
699
- }
700
- ]
701
- },
702
- "dissolve_voluntary": {
703
- "from": "ACTIVE",
704
- "to": "DISSOLVED",
705
- "description": "Voluntary dissolution approved by board and shareholders",
706
- "event": {
707
- "name": "dissolve_voluntary",
708
- "payload": {
709
- "dissolutionDate": {
710
- "type": "string",
711
- "format": "date",
712
- "required": true
713
- },
714
- "boardResolutionRef": {
715
- "type": "string",
716
- "required": true
717
- },
718
- "shareholderResolutionRef": {
719
- "type": "string",
720
- "required": true
721
- },
722
- "windingUpPlan": {
723
- "type": "string",
724
- "description": "Reference to winding up plan"
725
- },
726
- "certificateOfDissolution": {
727
- "type": "string"
728
- }
729
- }
730
- },
731
- "guards": [
732
- {
733
- "name": "boardApproved",
734
- "description": "Board must approve dissolution",
735
- "crossMachine": {
736
- "machine": "corporate-resolution",
737
- "instanceRef": "{{ event.boardResolutionRef }}",
738
- "requiredState": "EXECUTED"
739
- }
740
- },
741
- {
742
- "name": "shareholdersApproved",
743
- "description": "Shareholders must approve dissolution (typically majority or supermajority)",
744
- "crossMachine": {
745
- "machine": "corporate-resolution",
746
- "instanceRef": "{{ event.shareholderResolutionRef }}",
747
- "requiredState": "EXECUTED"
748
- }
749
- }
750
- ],
751
- "effects": [
752
- {
753
- "type": "SET_CONTEXT",
754
- "path": "dissolutionDate",
755
- "value": "{{ event.dissolutionDate }}"
756
- },
757
- {
758
- "type": "SET_CONTEXT",
759
- "path": "dissolutionReason",
760
- "value": "VOLUNTARY"
761
- },
762
- {
763
- "type": "EMIT_EVENT",
764
- "eventType": "CORPORATION_DISSOLVED",
765
- "payload": {
766
- "entityId": "{{ context.entityId }}",
767
- "dissolutionType": "VOLUNTARY",
768
- "dissolutionDate": "{{ event.dissolutionDate }}"
769
- }
770
- }
771
- ]
772
- },
773
- "dissolve_administrative": {
774
- "from": "SUSPENDED",
775
- "to": "DISSOLVED",
776
- "description": "Administrative dissolution by state after prolonged suspension",
777
- "event": {
778
- "name": "dissolve_administrative",
779
- "payload": {
780
- "dissolutionDate": {
781
- "type": "string",
782
- "format": "date",
783
- "required": true
784
- },
785
- "stateOrder": {
786
- "type": "string",
787
- "required": true
788
- },
789
- "reason": {
790
- "type": "string",
791
- "required": true
792
- }
793
- }
794
- },
795
- "effects": [
796
- {
797
- "type": "SET_CONTEXT",
798
- "path": "dissolutionDate",
799
- "value": "{{ event.dissolutionDate }}"
800
- },
801
- {
802
- "type": "SET_CONTEXT",
803
- "path": "dissolutionReason",
804
- "value": "ADMINISTRATIVE: {{ event.reason }}"
805
- },
806
- {
807
- "type": "EMIT_EVENT",
808
- "eventType": "CORPORATION_DISSOLVED",
809
- "payload": {
810
- "entityId": "{{ context.entityId }}",
811
- "dissolutionType": "ADMINISTRATIVE",
812
- "dissolutionDate": "{{ event.dissolutionDate }}"
813
- }
814
- }
815
- ]
816
- }
817
- },
818
- "crossMachineRefs": {
819
- "board": {
820
- "machine": "corporate-board",
821
- "description": "Board of directors for this entity",
822
- "foreignKey": "entityId"
823
- },
824
- "officers": {
825
- "machine": "corporate-officers",
826
- "description": "Executive officers for this entity",
827
- "foreignKey": "entityId"
828
- },
829
- "bylaws": {
830
- "machine": "corporate-bylaws",
831
- "description": "Governing bylaws for this entity",
832
- "foreignKey": "entityId"
833
- },
834
- "shareholders": {
835
- "machine": "corporate-shareholders",
836
- "description": "Shareholder meeting instances",
837
- "foreignKey": "entityId"
838
- },
839
- "securities": {
840
- "machine": "corporate-securities",
841
- "description": "Stock issuance records",
842
- "foreignKey": "entityId"
843
- },
844
- "compliance": {
845
- "machine": "corporate-compliance",
846
- "description": "Regulatory compliance tracking",
847
- "foreignKey": "entityId"
848
- }
849
- },
850
- "metadata": {
851
- "author": "OttoChain",
852
- "license": "MIT",
853
- "tags": [
854
- "corporate",
855
- "governance",
856
- "entity",
857
- "formation"
858
- ],
859
- "documentation": "https://ottochain.dev/docs/corporate/entity"
860
- }
861
- }