@ottochain/sdk 1.6.0 → 2.0.0

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 (40) 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/index.js +15 -7
  8. package/dist/cjs/apps/identity/state-machines/index.js +516 -4
  9. package/dist/cjs/apps/index.js +15 -13
  10. package/dist/cjs/apps/markets/index.js +23 -10
  11. package/dist/cjs/apps/markets/state-machines/index.js +1904 -230
  12. package/dist/esm/apps/contracts/index.js +16 -13
  13. package/dist/esm/apps/contracts/state-machines/index.js +138 -6
  14. package/dist/esm/apps/corporate/index.js +14 -20
  15. package/dist/esm/apps/corporate/state-machines/index.js +534 -6335
  16. package/dist/esm/apps/governance/index.js +26 -30
  17. package/dist/esm/apps/governance/state-machines/index.js +497 -2314
  18. package/dist/esm/apps/identity/index.js +13 -7
  19. package/dist/esm/apps/identity/state-machines/index.js +515 -3
  20. package/dist/esm/apps/index.js +14 -12
  21. package/dist/esm/apps/markets/index.js +19 -10
  22. package/dist/esm/apps/markets/state-machines/index.js +1903 -229
  23. package/dist/types/apps/contracts/index.d.ts +661 -9
  24. package/dist/types/apps/contracts/state-machines/index.d.ts +109 -6
  25. package/dist/types/apps/corporate/index.d.ts +4015 -7
  26. package/dist/types/apps/corporate/state-machines/index.d.ts +472 -5587
  27. package/dist/types/apps/governance/index.d.ts +2151 -12
  28. package/dist/types/apps/governance/state-machines/index.d.ts +462 -1875
  29. package/dist/types/apps/identity/index.d.ts +601 -4
  30. package/dist/types/apps/identity/state-machines/index.d.ts +393 -3
  31. package/dist/types/apps/index.d.ts +14 -12
  32. package/dist/types/apps/markets/index.d.ts +1690 -7
  33. package/dist/types/apps/markets/state-machines/index.d.ts +1416 -184
  34. package/package.json +1 -1
  35. package/dist/cjs/apps/oracles/index.js +0 -59
  36. package/dist/cjs/apps/oracles/state-machines/index.js +0 -415
  37. package/dist/esm/apps/oracles/index.js +0 -42
  38. package/dist/esm/apps/oracles/state-machines/index.js +0 -412
  39. package/dist/types/apps/oracles/index.d.ts +0 -34
  40. package/dist/types/apps/oracles/state-machines/index.d.ts +0 -312
@@ -485,190 +485,10 @@ export declare const daoMultisigDef: {
485
485
  readonly Escrow: "controlled release";
486
486
  };
487
487
  };
488
- export declare const daoSingleDef: {
489
- readonly metadata: {
490
- readonly name: "SingleOwnerDAO";
491
- readonly description: "Single owner controls all actions. Simplest governance model.";
492
- readonly version: "1.0.0";
493
- readonly category: "governance/dao";
494
- };
495
- readonly states: {
496
- readonly ACTIVE: {
497
- readonly id: "ACTIVE";
498
- readonly isFinal: false;
499
- readonly metadata: null;
500
- };
501
- readonly TRANSFERRING: {
502
- readonly id: "TRANSFERRING";
503
- readonly isFinal: false;
504
- readonly metadata: null;
505
- };
506
- readonly DISSOLVED: {
507
- readonly id: "DISSOLVED";
508
- readonly isFinal: true;
509
- readonly metadata: null;
510
- };
511
- };
512
- readonly initialState: "ACTIVE";
513
- readonly transitions: readonly [{
514
- readonly from: "ACTIVE";
515
- readonly to: "ACTIVE";
516
- readonly eventName: "execute";
517
- readonly guard: {
518
- readonly "===": readonly [{
519
- readonly var: "event.agent";
520
- }, {
521
- readonly var: "state.owner";
522
- }];
523
- };
524
- readonly effect: {
525
- readonly merge: readonly [{
526
- readonly var: "state";
527
- }, {
528
- readonly actions: {
529
- readonly cat: readonly [{
530
- readonly var: "state.actions";
531
- }, readonly [{
532
- readonly id: {
533
- readonly var: "event.actionId";
534
- };
535
- readonly type: {
536
- readonly var: "event.actionType";
537
- };
538
- readonly payload: {
539
- readonly var: "event.payload";
540
- };
541
- readonly executedAt: {
542
- readonly var: "$timestamp";
543
- };
544
- }]];
545
- };
546
- }];
547
- };
548
- readonly emits: readonly [{
549
- readonly event: "action_executed";
550
- readonly to: "external";
551
- }];
552
- readonly dependencies: readonly [];
553
- }, {
554
- readonly from: "ACTIVE";
555
- readonly to: "TRANSFERRING";
556
- readonly eventName: "transfer_ownership";
557
- readonly guard: {
558
- readonly "===": readonly [{
559
- readonly var: "event.agent";
560
- }, {
561
- readonly var: "state.owner";
562
- }];
563
- };
564
- readonly effect: {
565
- readonly merge: readonly [{
566
- readonly var: "state";
567
- }, {
568
- readonly pendingOwner: {
569
- readonly var: "event.newOwner";
570
- };
571
- readonly transferInitiatedAt: {
572
- readonly var: "$timestamp";
573
- };
574
- }];
575
- };
576
- readonly dependencies: readonly [];
577
- }, {
578
- readonly from: "TRANSFERRING";
579
- readonly to: "ACTIVE";
580
- readonly eventName: "accept_ownership";
581
- readonly guard: {
582
- readonly "===": readonly [{
583
- readonly var: "event.agent";
584
- }, {
585
- readonly var: "state.pendingOwner";
586
- }];
587
- };
588
- readonly effect: {
589
- readonly merge: readonly [{
590
- readonly var: "state";
591
- }, {
592
- readonly owner: {
593
- readonly var: "state.pendingOwner";
594
- };
595
- readonly pendingOwner: null;
596
- readonly transferInitiatedAt: null;
597
- readonly ownershipHistory: {
598
- readonly cat: readonly [{
599
- readonly var: "state.ownershipHistory";
600
- }, readonly [{
601
- readonly from: {
602
- readonly var: "state.owner";
603
- };
604
- readonly to: {
605
- readonly var: "state.pendingOwner";
606
- };
607
- readonly at: {
608
- readonly var: "$timestamp";
609
- };
610
- }]];
611
- };
612
- }];
613
- };
614
- readonly emits: readonly [{
615
- readonly event: "ownership_transferred";
616
- readonly to: "Identity";
617
- }];
618
- readonly dependencies: readonly [];
619
- }, {
620
- readonly from: "TRANSFERRING";
621
- readonly to: "ACTIVE";
622
- readonly eventName: "cancel_transfer";
623
- readonly guard: {
624
- readonly "===": readonly [{
625
- readonly var: "event.agent";
626
- }, {
627
- readonly var: "state.owner";
628
- }];
629
- };
630
- readonly effect: {
631
- readonly merge: readonly [{
632
- readonly var: "state";
633
- }, {
634
- readonly pendingOwner: null;
635
- readonly transferInitiatedAt: null;
636
- }];
637
- };
638
- readonly dependencies: readonly [];
639
- }, {
640
- readonly from: "ACTIVE";
641
- readonly to: "DISSOLVED";
642
- readonly eventName: "dissolve";
643
- readonly guard: {
644
- readonly "===": readonly [{
645
- readonly var: "event.agent";
646
- }, {
647
- readonly var: "state.owner";
648
- }];
649
- };
650
- readonly effect: {
651
- readonly merge: readonly [{
652
- readonly var: "state";
653
- }, {
654
- readonly dissolvedAt: {
655
- readonly var: "$timestamp";
656
- };
657
- readonly status: "DISSOLVED";
658
- }];
659
- };
660
- readonly dependencies: readonly [];
661
- }];
662
- readonly crossReferences: {
663
- readonly Identity: "owner registration";
664
- readonly Contract: "action execution targets";
665
- readonly Treasury: "fund management";
666
- };
667
- };
668
- export declare const daoThresholdDef: {
488
+ export declare const daoReputationDef: {
669
489
  readonly metadata: {
670
- readonly name: "ThresholdDAO";
671
- readonly description: "Reputation-threshold governance. Minimum reputation required for participation.";
490
+ readonly name: "DAOReputation";
491
+ readonly description: "Reputation-based governance. Minimum reputation required for participation.";
672
492
  readonly version: "1.0.0";
673
493
  readonly category: "governance/dao";
674
494
  };
@@ -1110,10 +930,10 @@ export declare const daoThresholdDef: {
1110
930
  readonly Contract: "action execution";
1111
931
  };
1112
932
  };
1113
- export declare const daoTokenDef: {
933
+ export declare const daoSingleDef: {
1114
934
  readonly metadata: {
1115
- readonly name: "TokenDAO";
1116
- readonly description: "Token-weighted voting. Voting power proportional to token holdings.";
935
+ readonly name: "SingleOwnerDAO";
936
+ readonly description: "Single owner controls all actions. Simplest governance model.";
1117
937
  readonly version: "1.0.0";
1118
938
  readonly category: "governance/dao";
1119
939
  };
@@ -1123,13 +943,8 @@ export declare const daoTokenDef: {
1123
943
  readonly isFinal: false;
1124
944
  readonly metadata: null;
1125
945
  };
1126
- readonly VOTING: {
1127
- readonly id: "VOTING";
1128
- readonly isFinal: false;
1129
- readonly metadata: null;
1130
- };
1131
- readonly QUEUED: {
1132
- readonly id: "QUEUED";
946
+ readonly TRANSFERRING: {
947
+ readonly id: "TRANSFERRING";
1133
948
  readonly isFinal: false;
1134
949
  readonly metadata: null;
1135
950
  };
@@ -1142,55 +957,240 @@ export declare const daoTokenDef: {
1142
957
  readonly initialState: "ACTIVE";
1143
958
  readonly transitions: readonly [{
1144
959
  readonly from: "ACTIVE";
1145
- readonly to: "VOTING";
1146
- readonly eventName: "propose";
960
+ readonly to: "ACTIVE";
961
+ readonly eventName: "execute";
1147
962
  readonly guard: {
1148
- readonly ">=": readonly [{
1149
- readonly getKey: readonly [{
1150
- readonly var: "state.balances";
1151
- }, {
1152
- readonly var: "event.agent";
1153
- }];
963
+ readonly "===": readonly [{
964
+ readonly var: "event.agent";
1154
965
  }, {
1155
- readonly var: "state.proposalThreshold";
966
+ readonly var: "state.owner";
1156
967
  }];
1157
968
  };
1158
969
  readonly effect: {
1159
970
  readonly merge: readonly [{
1160
971
  readonly var: "state";
1161
972
  }, {
1162
- readonly proposal: {
1163
- readonly id: {
1164
- readonly var: "event.proposalId";
1165
- };
1166
- readonly title: {
1167
- readonly var: "event.title";
1168
- };
1169
- readonly description: {
1170
- readonly var: "event.description";
1171
- };
1172
- readonly actionType: {
1173
- readonly var: "event.actionType";
1174
- };
1175
- readonly payload: {
1176
- readonly var: "event.payload";
1177
- };
1178
- readonly proposer: {
1179
- readonly var: "event.agent";
1180
- };
1181
- readonly proposedAt: {
1182
- readonly var: "$timestamp";
1183
- };
1184
- readonly votingEndsAt: {
1185
- readonly "+": readonly [{
973
+ readonly actions: {
974
+ readonly cat: readonly [{
975
+ readonly var: "state.actions";
976
+ }, readonly [{
977
+ readonly id: {
978
+ readonly var: "event.actionId";
979
+ };
980
+ readonly type: {
981
+ readonly var: "event.actionType";
982
+ };
983
+ readonly payload: {
984
+ readonly var: "event.payload";
985
+ };
986
+ readonly executedAt: {
1186
987
  readonly var: "$timestamp";
1187
- }, {
1188
- readonly var: "state.votingPeriodMs";
1189
- }];
1190
- };
1191
- readonly snapshotBlock: {
1192
- readonly var: "event.snapshotBlock";
1193
- };
988
+ };
989
+ }]];
990
+ };
991
+ }];
992
+ };
993
+ readonly emits: readonly [{
994
+ readonly event: "action_executed";
995
+ readonly to: "external";
996
+ }];
997
+ readonly dependencies: readonly [];
998
+ }, {
999
+ readonly from: "ACTIVE";
1000
+ readonly to: "TRANSFERRING";
1001
+ readonly eventName: "transfer_ownership";
1002
+ readonly guard: {
1003
+ readonly "===": readonly [{
1004
+ readonly var: "event.agent";
1005
+ }, {
1006
+ readonly var: "state.owner";
1007
+ }];
1008
+ };
1009
+ readonly effect: {
1010
+ readonly merge: readonly [{
1011
+ readonly var: "state";
1012
+ }, {
1013
+ readonly pendingOwner: {
1014
+ readonly var: "event.newOwner";
1015
+ };
1016
+ readonly transferInitiatedAt: {
1017
+ readonly var: "$timestamp";
1018
+ };
1019
+ }];
1020
+ };
1021
+ readonly dependencies: readonly [];
1022
+ }, {
1023
+ readonly from: "TRANSFERRING";
1024
+ readonly to: "ACTIVE";
1025
+ readonly eventName: "accept_ownership";
1026
+ readonly guard: {
1027
+ readonly "===": readonly [{
1028
+ readonly var: "event.agent";
1029
+ }, {
1030
+ readonly var: "state.pendingOwner";
1031
+ }];
1032
+ };
1033
+ readonly effect: {
1034
+ readonly merge: readonly [{
1035
+ readonly var: "state";
1036
+ }, {
1037
+ readonly owner: {
1038
+ readonly var: "state.pendingOwner";
1039
+ };
1040
+ readonly pendingOwner: null;
1041
+ readonly transferInitiatedAt: null;
1042
+ readonly ownershipHistory: {
1043
+ readonly cat: readonly [{
1044
+ readonly var: "state.ownershipHistory";
1045
+ }, readonly [{
1046
+ readonly from: {
1047
+ readonly var: "state.owner";
1048
+ };
1049
+ readonly to: {
1050
+ readonly var: "state.pendingOwner";
1051
+ };
1052
+ readonly at: {
1053
+ readonly var: "$timestamp";
1054
+ };
1055
+ }]];
1056
+ };
1057
+ }];
1058
+ };
1059
+ readonly emits: readonly [{
1060
+ readonly event: "ownership_transferred";
1061
+ readonly to: "Identity";
1062
+ }];
1063
+ readonly dependencies: readonly [];
1064
+ }, {
1065
+ readonly from: "TRANSFERRING";
1066
+ readonly to: "ACTIVE";
1067
+ readonly eventName: "cancel_transfer";
1068
+ readonly guard: {
1069
+ readonly "===": readonly [{
1070
+ readonly var: "event.agent";
1071
+ }, {
1072
+ readonly var: "state.owner";
1073
+ }];
1074
+ };
1075
+ readonly effect: {
1076
+ readonly merge: readonly [{
1077
+ readonly var: "state";
1078
+ }, {
1079
+ readonly pendingOwner: null;
1080
+ readonly transferInitiatedAt: null;
1081
+ }];
1082
+ };
1083
+ readonly dependencies: readonly [];
1084
+ }, {
1085
+ readonly from: "ACTIVE";
1086
+ readonly to: "DISSOLVED";
1087
+ readonly eventName: "dissolve";
1088
+ readonly guard: {
1089
+ readonly "===": readonly [{
1090
+ readonly var: "event.agent";
1091
+ }, {
1092
+ readonly var: "state.owner";
1093
+ }];
1094
+ };
1095
+ readonly effect: {
1096
+ readonly merge: readonly [{
1097
+ readonly var: "state";
1098
+ }, {
1099
+ readonly dissolvedAt: {
1100
+ readonly var: "$timestamp";
1101
+ };
1102
+ readonly status: "DISSOLVED";
1103
+ }];
1104
+ };
1105
+ readonly dependencies: readonly [];
1106
+ }];
1107
+ readonly crossReferences: {
1108
+ readonly Identity: "owner registration";
1109
+ readonly Contract: "action execution targets";
1110
+ readonly Treasury: "fund management";
1111
+ };
1112
+ };
1113
+ export declare const daoTokenDef: {
1114
+ readonly metadata: {
1115
+ readonly name: "TokenDAO";
1116
+ readonly description: "Token-weighted voting. Voting power proportional to token holdings.";
1117
+ readonly version: "1.0.0";
1118
+ readonly category: "governance/dao";
1119
+ };
1120
+ readonly states: {
1121
+ readonly ACTIVE: {
1122
+ readonly id: "ACTIVE";
1123
+ readonly isFinal: false;
1124
+ readonly metadata: null;
1125
+ };
1126
+ readonly VOTING: {
1127
+ readonly id: "VOTING";
1128
+ readonly isFinal: false;
1129
+ readonly metadata: null;
1130
+ };
1131
+ readonly QUEUED: {
1132
+ readonly id: "QUEUED";
1133
+ readonly isFinal: false;
1134
+ readonly metadata: null;
1135
+ };
1136
+ readonly DISSOLVED: {
1137
+ readonly id: "DISSOLVED";
1138
+ readonly isFinal: true;
1139
+ readonly metadata: null;
1140
+ };
1141
+ };
1142
+ readonly initialState: "ACTIVE";
1143
+ readonly transitions: readonly [{
1144
+ readonly from: "ACTIVE";
1145
+ readonly to: "VOTING";
1146
+ readonly eventName: "propose";
1147
+ readonly guard: {
1148
+ readonly ">=": readonly [{
1149
+ readonly getKey: readonly [{
1150
+ readonly var: "state.balances";
1151
+ }, {
1152
+ readonly var: "event.agent";
1153
+ }];
1154
+ }, {
1155
+ readonly var: "state.proposalThreshold";
1156
+ }];
1157
+ };
1158
+ readonly effect: {
1159
+ readonly merge: readonly [{
1160
+ readonly var: "state";
1161
+ }, {
1162
+ readonly proposal: {
1163
+ readonly id: {
1164
+ readonly var: "event.proposalId";
1165
+ };
1166
+ readonly title: {
1167
+ readonly var: "event.title";
1168
+ };
1169
+ readonly description: {
1170
+ readonly var: "event.description";
1171
+ };
1172
+ readonly actionType: {
1173
+ readonly var: "event.actionType";
1174
+ };
1175
+ readonly payload: {
1176
+ readonly var: "event.payload";
1177
+ };
1178
+ readonly proposer: {
1179
+ readonly var: "event.agent";
1180
+ };
1181
+ readonly proposedAt: {
1182
+ readonly var: "$timestamp";
1183
+ };
1184
+ readonly votingEndsAt: {
1185
+ readonly "+": readonly [{
1186
+ readonly var: "$timestamp";
1187
+ }, {
1188
+ readonly var: "state.votingPeriodMs";
1189
+ }];
1190
+ };
1191
+ readonly snapshotBlock: {
1192
+ readonly var: "event.snapshotBlock";
1193
+ };
1194
1194
  };
1195
1195
  readonly votes: {
1196
1196
  readonly for: 0;
@@ -1372,1717 +1372,189 @@ export declare const daoTokenDef: {
1372
1372
  readonly ">=": readonly [{
1373
1373
  readonly var: "$timestamp";
1374
1374
  }, {
1375
- readonly var: "state.proposal.executableAt";
1376
- }];
1377
- };
1378
- readonly effect: {
1379
- readonly merge: readonly [{
1380
- readonly var: "state";
1381
- }, {
1382
- readonly executedProposals: {
1383
- readonly cat: readonly [{
1384
- readonly var: "state.executedProposals";
1385
- }, readonly [{
1386
- readonly merge: readonly [{
1387
- readonly var: "state.proposal";
1388
- }, {
1389
- readonly votes: {
1390
- readonly var: "state.votes";
1391
- };
1392
- readonly executedAt: {
1393
- readonly var: "$timestamp";
1394
- };
1395
- }];
1396
- }]];
1397
- };
1398
- readonly proposal: null;
1399
- readonly votes: null;
1400
- }];
1401
- };
1402
- readonly emits: readonly [{
1403
- readonly event: "proposal_executed";
1404
- readonly to: "external";
1405
- }];
1406
- readonly dependencies: readonly [];
1407
- }, {
1408
- readonly from: "VOTING";
1409
- readonly to: "ACTIVE";
1410
- readonly eventName: "reject";
1411
- readonly guard: {
1412
- readonly and: readonly [{
1413
- readonly ">": readonly [{
1414
- readonly var: "$timestamp";
1415
- }, {
1416
- readonly var: "state.proposal.votingEndsAt";
1417
- }];
1418
- }, {
1419
- readonly or: readonly [{
1420
- readonly "<=": readonly [{
1421
- readonly var: "state.votes.for";
1422
- }, {
1423
- readonly var: "state.votes.against";
1424
- }];
1425
- }, {
1426
- readonly "<": readonly [{
1427
- readonly "+": readonly [{
1428
- readonly var: "state.votes.for";
1429
- }, {
1430
- readonly var: "state.votes.against";
1431
- }, {
1432
- readonly var: "state.votes.abstain";
1433
- }];
1434
- }, {
1435
- readonly var: "state.quorum";
1436
- }];
1437
- }];
1438
- }];
1439
- };
1440
- readonly effect: {
1441
- readonly merge: readonly [{
1442
- readonly var: "state";
1443
- }, {
1444
- readonly rejectedProposals: {
1445
- readonly cat: readonly [{
1446
- readonly var: "state.rejectedProposals";
1447
- }, readonly [{
1448
- readonly merge: readonly [{
1449
- readonly var: "state.proposal";
1450
- }, {
1451
- readonly votes: {
1452
- readonly var: "state.votes";
1453
- };
1454
- readonly rejectedAt: {
1455
- readonly var: "$timestamp";
1456
- };
1457
- }];
1458
- }]];
1459
- };
1460
- readonly proposal: null;
1461
- readonly votes: null;
1462
- }];
1463
- };
1464
- readonly dependencies: readonly [];
1465
- }, {
1466
- readonly from: "QUEUED";
1467
- readonly to: "ACTIVE";
1468
- readonly eventName: "cancel";
1469
- readonly guard: {
1470
- readonly "===": readonly [{
1471
- readonly var: "event.agent";
1472
- }, {
1473
- readonly var: "state.proposal.proposer";
1474
- }];
1475
- };
1476
- readonly effect: {
1477
- readonly merge: readonly [{
1478
- readonly var: "state";
1479
- }, {
1480
- readonly cancelledProposals: {
1481
- readonly cat: readonly [{
1482
- readonly var: "state.cancelledProposals";
1483
- }, readonly [{
1484
- readonly merge: readonly [{
1485
- readonly var: "state.proposal";
1486
- }, {
1487
- readonly cancelledAt: {
1488
- readonly var: "$timestamp";
1489
- };
1490
- }];
1491
- }]];
1492
- };
1493
- readonly proposal: null;
1494
- readonly votes: null;
1495
- }];
1496
- };
1497
- readonly dependencies: readonly [];
1498
- }, {
1499
- readonly from: "ACTIVE";
1500
- readonly to: "ACTIVE";
1501
- readonly eventName: "delegate";
1502
- readonly guard: {
1503
- readonly ">": readonly [{
1504
- readonly getKey: readonly [{
1505
- readonly var: "state.balances";
1506
- }, {
1507
- readonly var: "event.agent";
1508
- }];
1509
- }, 0];
1510
- };
1511
- readonly effect: {
1512
- readonly merge: readonly [{
1513
- readonly var: "state";
1514
- }, {
1515
- readonly delegations: {
1516
- readonly setKey: readonly [{
1517
- readonly var: "state.delegations";
1518
- }, {
1519
- readonly var: "event.agent";
1520
- }, {
1521
- readonly var: "event.delegateTo";
1522
- }];
1523
- };
1524
- }];
1525
- };
1526
- readonly dependencies: readonly [];
1527
- }, {
1528
- readonly from: "ACTIVE";
1529
- readonly to: "ACTIVE";
1530
- readonly eventName: "undelegate";
1531
- readonly guard: {
1532
- readonly getKey: readonly [{
1533
- readonly var: "state.delegations";
1534
- }, {
1535
- readonly var: "event.agent";
1536
- }];
1537
- };
1538
- readonly effect: {
1539
- readonly merge: readonly [{
1540
- readonly var: "state";
1541
- }, {
1542
- readonly delegations: {
1543
- readonly deleteKey: readonly [{
1544
- readonly var: "state.delegations";
1545
- }, {
1546
- readonly var: "event.agent";
1547
- }];
1548
- };
1549
- }];
1550
- };
1551
- readonly dependencies: readonly [];
1552
- }];
1553
- readonly crossReferences: {
1554
- readonly Identity: "voter verification";
1555
- readonly Token: "balance snapshots";
1556
- readonly Contract: "action execution";
1557
- readonly Treasury: "fund management";
1558
- };
1559
- };
1560
- export declare const govConstitutionDef: {
1561
- readonly metadata: {
1562
- readonly name: "Constitution";
1563
- readonly description: "Foundational charter that defines governance structure, branch powers, and amendment rules";
1564
- readonly version: "1.0.0";
1565
- };
1566
- readonly states: {
1567
- readonly DRAFT: {
1568
- readonly id: "DRAFT";
1569
- readonly isFinal: false;
1570
- readonly metadata: null;
1571
- };
1572
- readonly RATIFIED: {
1573
- readonly id: "RATIFIED";
1574
- readonly isFinal: false;
1575
- readonly metadata: null;
1576
- };
1577
- readonly AMENDING: {
1578
- readonly id: "AMENDING";
1579
- readonly isFinal: false;
1580
- readonly metadata: null;
1581
- };
1582
- readonly SUSPENDED: {
1583
- readonly id: "SUSPENDED";
1584
- readonly isFinal: false;
1585
- readonly metadata: null;
1586
- };
1587
- readonly DISSOLVED: {
1588
- readonly id: "DISSOLVED";
1589
- readonly isFinal: true;
1590
- readonly metadata: null;
1591
- };
1592
- };
1593
- readonly initialState: "DRAFT";
1594
- readonly transitions: readonly [{
1595
- readonly from: "DRAFT";
1596
- readonly to: "RATIFIED";
1597
- readonly eventName: "ratify";
1598
- readonly guard: {
1599
- readonly ">=": readonly [{
1600
- readonly size: {
1601
- readonly var: "state.ratifications";
1602
- };
1603
- }, {
1604
- readonly var: "state.ratificationThreshold";
1605
- }];
1606
- };
1607
- readonly effect: {
1608
- readonly merge: readonly [{
1609
- readonly var: "state";
1610
- }, {
1611
- readonly status: "RATIFIED";
1612
- readonly ratifiedAt: {
1613
- readonly var: "$timestamp";
1614
- };
1615
- }];
1616
- };
1617
- readonly dependencies: readonly [];
1618
- }, {
1619
- readonly from: "DRAFT";
1620
- readonly to: "DRAFT";
1621
- readonly eventName: "sign";
1622
- readonly guard: {
1623
- readonly and: readonly [{
1624
- readonly in: readonly [{
1625
- readonly var: "event.agent";
1626
- }, {
1627
- readonly var: "state.founders";
1628
- }];
1629
- }, {
1630
- readonly "!": readonly [{
1631
- readonly in: readonly [{
1632
- readonly var: "event.agent";
1633
- }, {
1634
- readonly var: "state.ratifications";
1635
- }];
1636
- }];
1637
- }];
1638
- };
1639
- readonly effect: {
1640
- readonly merge: readonly [{
1641
- readonly var: "state";
1642
- }, {
1643
- readonly ratifications: {
1644
- readonly cat: readonly [{
1645
- readonly var: "state.ratifications";
1646
- }, readonly [{
1647
- readonly var: "event.agent";
1648
- }]];
1649
- };
1650
- }];
1651
- };
1652
- readonly dependencies: readonly [];
1653
- }, {
1654
- readonly from: "RATIFIED";
1655
- readonly to: "AMENDING";
1656
- readonly eventName: "propose_amendment";
1657
- readonly guard: {
1658
- readonly or: readonly [{
1659
- readonly in: readonly [{
1660
- readonly var: "event.agent";
1661
- }, {
1662
- readonly var: "state.branches.legislature.members";
1663
- }];
1664
- }, {
1665
- readonly ">=": readonly [{
1666
- readonly var: "event.petitionSignatures";
1667
- }, {
1668
- readonly var: "state.amendmentPetitionThreshold";
1669
- }];
1670
- }];
1671
- };
1672
- readonly effect: {
1673
- readonly merge: readonly [{
1674
- readonly var: "state";
1675
- }, {
1676
- readonly status: "AMENDING";
1677
- readonly pendingAmendment: {
1678
- readonly id: {
1679
- readonly var: "event.amendmentId";
1680
- };
1681
- readonly proposer: {
1682
- readonly var: "event.agent";
1683
- };
1684
- readonly changes: {
1685
- readonly var: "event.changes";
1686
- };
1687
- readonly proposedAt: {
1688
- readonly var: "$timestamp";
1689
- };
1690
- readonly votes: {};
1691
- };
1692
- }];
1693
- };
1694
- readonly dependencies: readonly [];
1695
- }, {
1696
- readonly from: "AMENDING";
1697
- readonly to: "RATIFIED";
1698
- readonly eventName: "ratify_amendment";
1699
- readonly guard: {
1700
- readonly ">=": readonly [{
1701
- readonly var: "state.pendingAmendment.approvalCount";
1702
- }, {
1703
- readonly var: "state.amendmentThreshold";
1704
- }];
1705
- };
1706
- readonly effect: {
1707
- readonly merge: readonly [{
1708
- readonly var: "state";
1709
- }, {
1710
- readonly status: "RATIFIED";
1711
- readonly amendments: {
1712
- readonly cat: readonly [{
1713
- readonly var: "state.amendments";
1714
- }, readonly [{
1715
- readonly id: {
1716
- readonly var: "state.pendingAmendment.id";
1717
- };
1718
- readonly changes: {
1719
- readonly var: "state.pendingAmendment.changes";
1720
- };
1721
- readonly ratifiedAt: {
1722
- readonly var: "$timestamp";
1723
- };
1724
- }]];
1725
- };
1726
- readonly pendingAmendment: null;
1727
- }];
1728
- };
1729
- readonly dependencies: readonly [];
1730
- }, {
1731
- readonly from: "AMENDING";
1732
- readonly to: "RATIFIED";
1733
- readonly eventName: "reject_amendment";
1734
- readonly guard: {
1735
- readonly var: "state.pendingAmendment.rejected";
1736
- };
1737
- readonly effect: {
1738
- readonly merge: readonly [{
1739
- readonly var: "state";
1740
- }, {
1741
- readonly status: "RATIFIED";
1742
- readonly failedAmendments: {
1743
- readonly cat: readonly [{
1744
- readonly var: "state.failedAmendments";
1745
- }, readonly [{
1746
- readonly var: "state.pendingAmendment";
1747
- }]];
1748
- };
1749
- readonly pendingAmendment: null;
1750
- }];
1751
- };
1752
- readonly dependencies: readonly [];
1753
- }, {
1754
- readonly from: "RATIFIED";
1755
- readonly to: "SUSPENDED";
1756
- readonly eventName: "suspend";
1757
- readonly guard: {
1758
- readonly and: readonly [{
1759
- readonly in: readonly [{
1760
- readonly var: "event.agent";
1761
- }, {
1762
- readonly var: "state.emergencyCouncil";
1763
- }];
1764
- }, {
1765
- readonly var: "event.reason";
1766
- }];
1767
- };
1768
- readonly effect: {
1769
- readonly merge: readonly [{
1770
- readonly var: "state";
1771
- }, {
1772
- readonly status: "SUSPENDED";
1773
- readonly suspendedBy: {
1774
- readonly var: "event.agent";
1775
- };
1776
- readonly suspensionReason: {
1777
- readonly var: "event.reason";
1778
- };
1779
- readonly suspendedAt: {
1780
- readonly var: "$timestamp";
1781
- };
1782
- }];
1783
- };
1784
- readonly dependencies: readonly [];
1785
- }, {
1786
- readonly from: "SUSPENDED";
1787
- readonly to: "RATIFIED";
1788
- readonly eventName: "restore";
1789
- readonly guard: {
1790
- readonly ">=": readonly [{
1791
- readonly var: "event.restorationVotes";
1792
- }, {
1793
- readonly var: "state.restorationThreshold";
1794
- }];
1795
- };
1796
- readonly effect: {
1797
- readonly merge: readonly [{
1798
- readonly var: "state";
1799
- }, {
1800
- readonly status: "RATIFIED";
1801
- readonly restoredAt: {
1802
- readonly var: "$timestamp";
1803
- };
1804
- }];
1805
- };
1806
- readonly dependencies: readonly [];
1807
- }, {
1808
- readonly from: "RATIFIED";
1809
- readonly to: "DISSOLVED";
1810
- readonly eventName: "dissolve";
1811
- readonly guard: {
1812
- readonly ">=": readonly [{
1813
- readonly var: "event.dissolutionVotes";
1814
- }, {
1815
- readonly var: "state.dissolutionThreshold";
1816
- }];
1817
- };
1818
- readonly effect: {
1819
- readonly merge: readonly [{
1820
- readonly var: "state";
1821
- }, {
1822
- readonly status: "DISSOLVED";
1823
- readonly dissolvedAt: {
1824
- readonly var: "$timestamp";
1825
- };
1826
- }];
1827
- };
1828
- readonly dependencies: readonly [];
1829
- }];
1830
- };
1831
- export declare const govExecutiveDef: {
1832
- readonly metadata: {
1833
- readonly name: "Executive";
1834
- readonly description: "Execution branch - implements mandates, manages operations, reports outcomes";
1835
- readonly version: "1.0.0";
1836
- };
1837
- readonly states: {
1838
- readonly RECEIVED: {
1839
- readonly id: "RECEIVED";
1840
- readonly isFinal: false;
1841
- readonly metadata: null;
1842
- };
1843
- readonly PLANNING: {
1844
- readonly id: "PLANNING";
1845
- readonly isFinal: false;
1846
- readonly metadata: null;
1847
- };
1848
- readonly EXECUTING: {
1849
- readonly id: "EXECUTING";
1850
- readonly isFinal: false;
1851
- readonly metadata: null;
1852
- };
1853
- readonly PAUSED: {
1854
- readonly id: "PAUSED";
1855
- readonly isFinal: false;
1856
- readonly metadata: null;
1857
- };
1858
- readonly COMPLETED: {
1859
- readonly id: "COMPLETED";
1860
- readonly isFinal: true;
1861
- readonly metadata: null;
1862
- };
1863
- readonly FAILED: {
1864
- readonly id: "FAILED";
1865
- readonly isFinal: true;
1866
- readonly metadata: null;
1867
- };
1868
- readonly BLOCKED: {
1869
- readonly id: "BLOCKED";
1870
- readonly isFinal: true;
1871
- readonly metadata: null;
1872
- };
1873
- readonly VETOED: {
1874
- readonly id: "VETOED";
1875
- readonly isFinal: true;
1876
- readonly metadata: null;
1877
- };
1878
- };
1879
- readonly initialState: "RECEIVED";
1880
- readonly transitions: readonly [{
1881
- readonly from: "RECEIVED";
1882
- readonly to: "PLANNING";
1883
- readonly eventName: "accept";
1884
- readonly guard: {
1885
- readonly in: readonly [{
1886
- readonly var: "event.agent";
1887
- }, {
1888
- readonly var: "state.executors";
1889
- }];
1890
- };
1891
- readonly effect: {
1892
- readonly merge: readonly [{
1893
- readonly var: "state";
1894
- }, {
1895
- readonly status: "PLANNING";
1896
- readonly acceptedBy: {
1897
- readonly var: "event.agent";
1898
- };
1899
- readonly acceptedAt: {
1900
- readonly var: "$timestamp";
1901
- };
1902
- readonly plan: {
1903
- readonly var: "event.plan";
1904
- };
1905
- }];
1906
- };
1907
- readonly dependencies: readonly [];
1908
- }, {
1909
- readonly from: "RECEIVED";
1910
- readonly to: "VETOED";
1911
- readonly eventName: "veto";
1912
- readonly guard: {
1913
- readonly and: readonly [{
1914
- readonly var: "state.config.executiveVeto";
1915
- }, {
1916
- readonly "===": readonly [{
1917
- readonly var: "event.agent";
1918
- }, {
1919
- readonly var: "state.executiveHead";
1920
- }];
1921
- }];
1922
- };
1923
- readonly effect: {
1924
- readonly merge: readonly [{
1925
- readonly var: "state";
1926
- }, {
1927
- readonly status: "VETOED";
1928
- readonly vetoedBy: {
1929
- readonly var: "event.agent";
1930
- };
1931
- readonly vetoReason: {
1932
- readonly var: "event.reason";
1933
- };
1934
- readonly vetoedAt: {
1935
- readonly var: "$timestamp";
1936
- };
1937
- }];
1938
- };
1939
- readonly dependencies: readonly [];
1940
- }, {
1941
- readonly from: "PLANNING";
1942
- readonly to: "EXECUTING";
1943
- readonly eventName: "begin";
1944
- readonly guard: {
1945
- readonly in: readonly [{
1946
- readonly var: "event.agent";
1947
- }, {
1948
- readonly var: "state.executors";
1949
- }];
1950
- };
1951
- readonly effect: {
1952
- readonly merge: readonly [{
1953
- readonly var: "state";
1954
- }, {
1955
- readonly status: "EXECUTING";
1956
- readonly executionStartedAt: {
1957
- readonly var: "$timestamp";
1958
- };
1959
- readonly milestones: readonly [];
1960
- }];
1961
- };
1962
- readonly dependencies: readonly [];
1963
- }, {
1964
- readonly from: "EXECUTING";
1965
- readonly to: "EXECUTING";
1966
- readonly eventName: "report_progress";
1967
- readonly guard: {
1968
- readonly in: readonly [{
1969
- readonly var: "event.agent";
1970
- }, {
1971
- readonly var: "state.executors";
1972
- }];
1973
- };
1974
- readonly effect: {
1975
- readonly merge: readonly [{
1976
- readonly var: "state";
1977
- }, {
1978
- readonly milestones: {
1979
- readonly cat: readonly [{
1980
- readonly var: "state.milestones";
1981
- }, readonly [{
1982
- readonly description: {
1983
- readonly var: "event.description";
1984
- };
1985
- readonly completedAt: {
1986
- readonly var: "$timestamp";
1987
- };
1988
- readonly evidence: {
1989
- readonly var: "event.evidence";
1990
- };
1991
- }]];
1992
- };
1993
- readonly lastProgressAt: {
1994
- readonly var: "$timestamp";
1995
- };
1996
- }];
1997
- };
1998
- readonly dependencies: readonly [];
1999
- }, {
2000
- readonly from: "EXECUTING";
2001
- readonly to: "PAUSED";
2002
- readonly eventName: "pause";
2003
- readonly guard: {
2004
- readonly or: readonly [{
2005
- readonly in: readonly [{
2006
- readonly var: "event.agent";
2007
- }, {
2008
- readonly var: "state.executors";
2009
- }];
2010
- }, {
2011
- readonly var: "event.judicialOrder";
2012
- }];
2013
- };
2014
- readonly effect: {
2015
- readonly merge: readonly [{
2016
- readonly var: "state";
2017
- }, {
2018
- readonly status: "PAUSED";
2019
- readonly pausedBy: {
2020
- readonly var: "event.agent";
2021
- };
2022
- readonly pauseReason: {
2023
- readonly var: "event.reason";
2024
- };
2025
- readonly pausedAt: {
2026
- readonly var: "$timestamp";
2027
- };
2028
- readonly judicialHold: {
2029
- readonly var: "event.judicialOrder";
2030
- };
2031
- }];
2032
- };
2033
- readonly dependencies: readonly [];
2034
- }, {
2035
- readonly from: "PAUSED";
2036
- readonly to: "EXECUTING";
2037
- readonly eventName: "resume";
2038
- readonly guard: {
2039
- readonly and: readonly [{
2040
- readonly in: readonly [{
2041
- readonly var: "event.agent";
2042
- }, {
2043
- readonly var: "state.executors";
2044
- }];
2045
- }, {
2046
- readonly "!": readonly [{
2047
- readonly var: "state.judicialHold";
2048
- }];
2049
- }];
2050
- };
2051
- readonly effect: {
2052
- readonly merge: readonly [{
2053
- readonly var: "state";
2054
- }, {
2055
- readonly status: "EXECUTING";
2056
- readonly resumedAt: {
2057
- readonly var: "$timestamp";
2058
- };
2059
- }];
2060
- };
2061
- readonly dependencies: readonly [];
2062
- }, {
2063
- readonly from: "PAUSED";
2064
- readonly to: "BLOCKED";
2065
- readonly eventName: "block";
2066
- readonly guard: {
2067
- readonly var: "event.judicialRuling";
2068
- };
2069
- readonly effect: {
2070
- readonly merge: readonly [{
2071
- readonly var: "state";
2072
- }, {
2073
- readonly status: "BLOCKED";
2074
- readonly blockedBy: {
2075
- readonly var: "event.agent";
2076
- };
2077
- readonly rulingId: {
2078
- readonly var: "event.rulingId";
2079
- };
2080
- readonly blockedAt: {
2081
- readonly var: "$timestamp";
2082
- };
2083
- }];
2084
- };
2085
- readonly dependencies: readonly [];
2086
- }, {
2087
- readonly from: "EXECUTING";
2088
- readonly to: "COMPLETED";
2089
- readonly eventName: "complete";
2090
- readonly guard: {
2091
- readonly in: readonly [{
2092
- readonly var: "event.agent";
2093
- }, {
2094
- readonly var: "state.executors";
2095
- }];
2096
- };
2097
- readonly effect: {
2098
- readonly merge: readonly [{
2099
- readonly var: "state";
2100
- }, {
2101
- readonly status: "COMPLETED";
2102
- readonly completedAt: {
2103
- readonly var: "$timestamp";
2104
- };
2105
- readonly outcome: {
2106
- readonly var: "event.outcome";
2107
- };
2108
- readonly finalReport: {
2109
- readonly var: "event.report";
2110
- };
2111
- }];
2112
- };
2113
- readonly dependencies: readonly [];
2114
- }, {
2115
- readonly from: "EXECUTING";
2116
- readonly to: "FAILED";
2117
- readonly eventName: "fail";
2118
- readonly guard: {
2119
- readonly in: readonly [{
2120
- readonly var: "event.agent";
2121
- }, {
2122
- readonly var: "state.executors";
2123
- }];
2124
- };
2125
- readonly effect: {
2126
- readonly merge: readonly [{
2127
- readonly var: "state";
2128
- }, {
2129
- readonly status: "FAILED";
2130
- readonly failedAt: {
2131
- readonly var: "$timestamp";
2132
- };
2133
- readonly failureReason: {
2134
- readonly var: "event.reason";
2135
- };
2136
- }];
2137
- };
2138
- readonly dependencies: readonly [];
2139
- }];
2140
- };
2141
- export declare const govJudiciaryDef: {
2142
- readonly metadata: {
2143
- readonly name: "Judiciary";
2144
- readonly description: "Judicial branch - interprets rules, reviews actions, resolves disputes, issues rulings";
2145
- readonly version: "1.0.0";
2146
- };
2147
- readonly states: {
2148
- readonly FILED: {
2149
- readonly id: "FILED";
2150
- readonly isFinal: false;
2151
- readonly metadata: null;
2152
- };
2153
- readonly REVIEW: {
2154
- readonly id: "REVIEW";
2155
- readonly isFinal: false;
2156
- readonly metadata: null;
2157
- };
2158
- readonly HEARING: {
2159
- readonly id: "HEARING";
2160
- readonly isFinal: false;
2161
- readonly metadata: null;
2162
- };
2163
- readonly DELIBERATION: {
2164
- readonly id: "DELIBERATION";
2165
- readonly isFinal: false;
2166
- readonly metadata: null;
2167
- };
2168
- readonly RULING: {
2169
- readonly id: "RULING";
2170
- readonly isFinal: false;
2171
- readonly metadata: null;
2172
- };
2173
- readonly ENFORCING: {
2174
- readonly id: "ENFORCING";
2175
- readonly isFinal: false;
2176
- readonly metadata: null;
2177
- };
2178
- readonly CLOSED: {
2179
- readonly id: "CLOSED";
2180
- readonly isFinal: true;
2181
- readonly metadata: null;
2182
- };
2183
- readonly DISMISSED: {
2184
- readonly id: "DISMISSED";
2185
- readonly isFinal: true;
2186
- readonly metadata: null;
2187
- };
2188
- readonly APPEALED: {
2189
- readonly id: "APPEALED";
2190
- readonly isFinal: false;
2191
- readonly metadata: null;
2192
- };
2193
- };
2194
- readonly initialState: "FILED";
2195
- readonly transitions: readonly [{
2196
- readonly from: "FILED";
2197
- readonly to: "REVIEW";
2198
- readonly eventName: "accept";
2199
- readonly guard: {
2200
- readonly in: readonly [{
2201
- readonly var: "event.agent";
2202
- }, {
2203
- readonly var: "state.judges";
2204
- }];
2205
- };
2206
- readonly effect: {
2207
- readonly merge: readonly [{
2208
- readonly var: "state";
2209
- }, {
2210
- readonly status: "REVIEW";
2211
- readonly acceptedBy: {
2212
- readonly var: "event.agent";
2213
- };
2214
- readonly acceptedAt: {
2215
- readonly var: "$timestamp";
2216
- };
2217
- readonly assignedJudges: {
2218
- readonly var: "event.panel";
2219
- };
2220
- }];
2221
- };
2222
- readonly dependencies: readonly [];
2223
- }, {
2224
- readonly from: "FILED";
2225
- readonly to: "DISMISSED";
2226
- readonly eventName: "dismiss";
2227
- readonly guard: {
2228
- readonly in: readonly [{
2229
- readonly var: "event.agent";
2230
- }, {
2231
- readonly var: "state.judges";
2232
- }];
2233
- };
2234
- readonly effect: {
2235
- readonly merge: readonly [{
2236
- readonly var: "state";
2237
- }, {
2238
- readonly status: "DISMISSED";
2239
- readonly dismissedBy: {
2240
- readonly var: "event.agent";
2241
- };
2242
- readonly dismissReason: {
2243
- readonly var: "event.reason";
2244
- };
2245
- readonly dismissedAt: {
2246
- readonly var: "$timestamp";
2247
- };
2248
- }];
2249
- };
2250
- readonly dependencies: readonly [];
2251
- }, {
2252
- readonly from: "REVIEW";
2253
- readonly to: "REVIEW";
2254
- readonly eventName: "issue_stay";
2255
- readonly guard: {
2256
- readonly in: readonly [{
2257
- readonly var: "event.agent";
2258
- }, {
2259
- readonly var: "state.assignedJudges";
2260
- }];
2261
- };
2262
- readonly effect: {
2263
- readonly merge: readonly [{
2264
- readonly var: "state";
2265
- }, {
2266
- readonly emergencyStay: {
2267
- readonly issuedBy: {
2268
- readonly var: "event.agent";
2269
- };
2270
- readonly issuedAt: {
2271
- readonly var: "$timestamp";
2272
- };
2273
- readonly targetFiberId: {
2274
- readonly var: "event.targetFiberId";
2275
- };
2276
- readonly reason: {
2277
- readonly var: "event.reason";
2278
- };
2279
- readonly expiresAt: {
2280
- readonly var: "event.expiresAt";
2281
- };
2282
- };
2283
- }];
2284
- };
2285
- readonly dependencies: readonly [];
2286
- }, {
2287
- readonly from: "REVIEW";
2288
- readonly to: "HEARING";
2289
- readonly eventName: "schedule_hearing";
2290
- readonly guard: {
2291
- readonly in: readonly [{
2292
- readonly var: "event.agent";
2293
- }, {
2294
- readonly var: "state.assignedJudges";
2295
- }];
2296
- };
2297
- readonly effect: {
2298
- readonly merge: readonly [{
2299
- readonly var: "state";
2300
- }, {
2301
- readonly status: "HEARING";
2302
- readonly hearingScheduledAt: {
2303
- readonly var: "event.hearingDate";
2304
- };
2305
- readonly submissions: readonly [];
2306
- }];
2307
- };
2308
- readonly dependencies: readonly [];
2309
- }, {
2310
- readonly from: "HEARING";
2311
- readonly to: "HEARING";
2312
- readonly eventName: "submit_evidence";
2313
- readonly guard: {
2314
- readonly or: readonly [{
2315
- readonly "===": readonly [{
2316
- readonly var: "event.agent";
2317
- }, {
2318
- readonly var: "state.plaintiff";
2319
- }];
2320
- }, {
2321
- readonly "===": readonly [{
2322
- readonly var: "event.agent";
2323
- }, {
2324
- readonly var: "state.defendant";
2325
- }];
2326
- }, {
2327
- readonly in: readonly [{
2328
- readonly var: "event.agent";
2329
- }, {
2330
- readonly var: "state.interestedParties";
2331
- }];
2332
- }];
2333
- };
2334
- readonly effect: {
2335
- readonly merge: readonly [{
2336
- readonly var: "state";
2337
- }, {
2338
- readonly submissions: {
2339
- readonly cat: readonly [{
2340
- readonly var: "state.submissions";
2341
- }, readonly [{
2342
- readonly party: {
2343
- readonly var: "event.agent";
2344
- };
2345
- readonly type: {
2346
- readonly var: "event.type";
2347
- };
2348
- readonly content: {
2349
- readonly var: "event.content";
2350
- };
2351
- readonly submittedAt: {
2352
- readonly var: "$timestamp";
2353
- };
2354
- }]];
2355
- };
2356
- }];
2357
- };
2358
- readonly dependencies: readonly [];
2359
- }, {
2360
- readonly from: "HEARING";
2361
- readonly to: "DELIBERATION";
2362
- readonly eventName: "close_hearing";
2363
- readonly guard: {
2364
- readonly in: readonly [{
2365
- readonly var: "event.agent";
2366
- }, {
2367
- readonly var: "state.assignedJudges";
2368
- }];
2369
- };
2370
- readonly effect: {
2371
- readonly merge: readonly [{
2372
- readonly var: "state";
2373
- }, {
2374
- readonly status: "DELIBERATION";
2375
- readonly hearingClosedAt: {
2376
- readonly var: "$timestamp";
2377
- };
2378
- readonly votes: {};
2379
- }];
2380
- };
2381
- readonly dependencies: readonly [];
2382
- }, {
2383
- readonly from: "DELIBERATION";
2384
- readonly to: "DELIBERATION";
2385
- readonly eventName: "vote";
2386
- readonly guard: {
2387
- readonly and: readonly [{
2388
- readonly in: readonly [{
2389
- readonly var: "event.agent";
2390
- }, {
2391
- readonly var: "state.assignedJudges";
2392
- }];
2393
- }, {
2394
- readonly "!": readonly [{
2395
- readonly getKey: readonly [{
2396
- readonly var: "state.votes";
2397
- }, {
2398
- readonly var: "event.agent";
2399
- }];
2400
- }];
2401
- }];
2402
- };
2403
- readonly effect: {
2404
- readonly merge: readonly [{
2405
- readonly var: "state";
2406
- }, {
2407
- readonly votes: {
2408
- readonly setKey: readonly [{
2409
- readonly var: "state.votes";
2410
- }, {
2411
- readonly var: "event.agent";
2412
- }, {
2413
- readonly position: {
2414
- readonly var: "event.position";
2415
- };
2416
- readonly opinion: {
2417
- readonly var: "event.opinion";
2418
- };
2419
- readonly votedAt: {
2420
- readonly var: "$timestamp";
2421
- };
2422
- }];
2423
- };
2424
- }];
2425
- };
2426
- readonly dependencies: readonly [];
2427
- }, {
2428
- readonly from: "DELIBERATION";
2429
- readonly to: "RULING";
2430
- readonly eventName: "issue_ruling";
2431
- readonly guard: {
2432
- readonly ">=": readonly [{
2433
- readonly size: {
2434
- readonly var: "state.votes";
2435
- };
2436
- }, {
2437
- readonly var: "state.quorum";
2438
- }];
2439
- };
2440
- readonly effect: {
2441
- readonly merge: readonly [{
2442
- readonly var: "state";
2443
- }, {
2444
- readonly status: "RULING";
2445
- readonly ruling: {
2446
- readonly decision: {
2447
- readonly var: "event.decision";
2448
- };
2449
- readonly majority: {
2450
- readonly var: "event.majority";
2451
- };
2452
- readonly dissent: {
2453
- readonly var: "event.dissent";
2454
- };
2455
- readonly remedy: {
2456
- readonly var: "event.remedy";
2457
- };
2458
- readonly issuedAt: {
2459
- readonly var: "$timestamp";
2460
- };
2461
- };
2462
- }];
2463
- };
2464
- readonly dependencies: readonly [];
2465
- }, {
2466
- readonly from: "RULING";
2467
- readonly to: "ENFORCING";
2468
- readonly eventName: "begin_enforcement";
2469
- readonly guard: {
2470
- readonly var: "state.ruling.remedy";
2471
- };
2472
- readonly effect: {
2473
- readonly merge: readonly [{
2474
- readonly var: "state";
2475
- }, {
2476
- readonly status: "ENFORCING";
2477
- readonly enforcementStartedAt: {
2478
- readonly var: "$timestamp";
2479
- };
2480
- }];
2481
- };
2482
- readonly dependencies: readonly [];
2483
- }, {
2484
- readonly from: "RULING";
2485
- readonly to: "CLOSED";
2486
- readonly eventName: "close";
2487
- readonly guard: {
2488
- readonly "!": readonly [{
2489
- readonly var: "state.ruling.remedy";
2490
- }];
2491
- };
2492
- readonly effect: {
2493
- readonly merge: readonly [{
2494
- readonly var: "state";
2495
- }, {
2496
- readonly status: "CLOSED";
2497
- readonly closedAt: {
2498
- readonly var: "$timestamp";
2499
- };
2500
- }];
2501
- };
2502
- readonly dependencies: readonly [];
2503
- }, {
2504
- readonly from: "ENFORCING";
2505
- readonly to: "CLOSED";
2506
- readonly eventName: "enforcement_complete";
2507
- readonly guard: {
2508
- readonly var: "event.evidence";
2509
- };
2510
- readonly effect: {
2511
- readonly merge: readonly [{
2512
- readonly var: "state";
2513
- }, {
2514
- readonly status: "CLOSED";
2515
- readonly enforcementCompletedAt: {
2516
- readonly var: "$timestamp";
2517
- };
2518
- readonly enforcementEvidence: {
2519
- readonly var: "event.evidence";
2520
- };
2521
- }];
2522
- };
2523
- readonly dependencies: readonly [];
2524
- }, {
2525
- readonly from: "RULING";
2526
- readonly to: "APPEALED";
2527
- readonly eventName: "appeal";
2528
- readonly guard: {
2529
- readonly and: readonly [{
2530
- readonly var: "state.config.allowAppeals";
2531
- }, {
2532
- readonly or: readonly [{
2533
- readonly "===": readonly [{
2534
- readonly var: "event.agent";
2535
- }, {
2536
- readonly var: "state.plaintiff";
2537
- }];
2538
- }, {
2539
- readonly "===": readonly [{
2540
- readonly var: "event.agent";
2541
- }, {
2542
- readonly var: "state.defendant";
2543
- }];
2544
- }];
2545
- }, {
2546
- readonly "<=": readonly [{
2547
- readonly "-": readonly [{
2548
- readonly var: "$timestamp";
2549
- }, {
2550
- readonly var: "state.ruling.issuedAt";
2551
- }];
2552
- }, {
2553
- readonly var: "state.config.appealWindowMs";
2554
- }];
2555
- }];
2556
- };
2557
- readonly effect: {
2558
- readonly merge: readonly [{
2559
- readonly var: "state";
2560
- }, {
2561
- readonly status: "APPEALED";
2562
- readonly appeal: {
2563
- readonly filedBy: {
2564
- readonly var: "event.agent";
2565
- };
2566
- readonly grounds: {
2567
- readonly var: "event.grounds";
2568
- };
2569
- readonly filedAt: {
2570
- readonly var: "$timestamp";
2571
- };
2572
- };
2573
- }];
2574
- };
2575
- readonly dependencies: readonly [];
2576
- }];
2577
- };
2578
- export declare const govLegislatureDef: {
2579
- readonly metadata: {
2580
- readonly name: "Governance";
2581
- readonly description: "Flexible governance for proposals, voting, delegation, and execution across relationship types";
2582
- readonly version: "1.0.0";
2583
- };
2584
- readonly states: {
2585
- readonly DRAFT: {
2586
- readonly id: "DRAFT";
2587
- readonly isFinal: false;
2588
- readonly metadata: null;
2589
- };
2590
- readonly ACTIVE: {
2591
- readonly id: "ACTIVE";
2592
- readonly isFinal: false;
2593
- readonly metadata: null;
2594
- };
2595
- readonly PENDING: {
2596
- readonly id: "PENDING";
2597
- readonly isFinal: false;
2598
- readonly metadata: null;
2599
- };
2600
- readonly EXECUTING: {
2601
- readonly id: "EXECUTING";
2602
- readonly isFinal: false;
2603
- readonly metadata: null;
2604
- };
2605
- readonly EXECUTED: {
2606
- readonly id: "EXECUTED";
2607
- readonly isFinal: true;
2608
- readonly metadata: null;
2609
- };
2610
- readonly VETOED: {
2611
- readonly id: "VETOED";
2612
- readonly isFinal: true;
2613
- readonly metadata: null;
2614
- };
2615
- readonly DEFEATED: {
2616
- readonly id: "DEFEATED";
2617
- readonly isFinal: true;
2618
- readonly metadata: null;
2619
- };
2620
- readonly EXPIRED: {
2621
- readonly id: "EXPIRED";
2622
- readonly isFinal: true;
2623
- readonly metadata: null;
2624
- };
2625
- readonly CANCELLED: {
2626
- readonly id: "CANCELLED";
2627
- readonly isFinal: true;
2628
- readonly metadata: null;
2629
- };
2630
- };
2631
- readonly initialState: "DRAFT";
2632
- readonly transitions: readonly [{
2633
- readonly from: "DRAFT";
2634
- readonly to: "ACTIVE";
2635
- readonly eventName: "submit";
2636
- readonly guard: {
2637
- readonly and: readonly [{
2638
- readonly in: readonly [{
2639
- readonly var: "event.agent";
2640
- }, {
2641
- readonly var: "state.proposers";
2642
- }];
2643
- }, {
2644
- readonly var: "state.proposal.title";
2645
- }, {
2646
- readonly var: "state.proposal.actions";
2647
- }];
2648
- };
2649
- readonly effect: {
2650
- readonly merge: readonly [{
2651
- readonly var: "state";
2652
- }, {
2653
- readonly status: "ACTIVE";
2654
- readonly submittedAt: {
2655
- readonly var: "$timestamp";
2656
- };
2657
- readonly votingEndsAt: {
2658
- readonly "+": readonly [{
2659
- readonly var: "$timestamp";
2660
- }, {
2661
- readonly var: "state.config.votingPeriodMs";
2662
- }];
2663
- };
2664
- }];
2665
- };
2666
- readonly dependencies: readonly [];
2667
- }, {
2668
- readonly from: "ACTIVE";
2669
- readonly to: "ACTIVE";
2670
- readonly eventName: "vote";
2671
- readonly guard: {
2672
- readonly and: readonly [{
2673
- readonly "<=": readonly [{
2674
- readonly var: "$timestamp";
2675
- }, {
2676
- readonly var: "state.votingEndsAt";
2677
- }];
2678
- }, {
2679
- readonly "!": readonly [{
2680
- readonly getKey: readonly [{
2681
- readonly var: "state.votes";
2682
- }, {
2683
- readonly var: "event.agent";
2684
- }];
2685
- }];
2686
- }, {
2687
- readonly or: readonly [{
2688
- readonly in: readonly [{
2689
- readonly var: "event.agent";
2690
- }, {
2691
- readonly var: "state.voters";
2692
- }];
2693
- }, {
2694
- readonly "===": readonly [{
2695
- readonly var: "state.config.openVoting";
2696
- }, true];
2697
- }];
2698
- }];
2699
- };
2700
- readonly effect: {
2701
- readonly merge: readonly [{
2702
- readonly var: "state";
2703
- }, {
2704
- readonly votes: {
2705
- readonly setKey: readonly [{
2706
- readonly var: "state.votes";
2707
- }, {
2708
- readonly var: "event.agent";
2709
- }, {
2710
- readonly choice: {
2711
- readonly var: "event.choice";
2712
- };
2713
- readonly weight: {
2714
- readonly var: "event.weight";
2715
- };
2716
- readonly conviction: {
2717
- readonly var: "event.conviction";
2718
- };
2719
- readonly delegatedFrom: {
2720
- readonly var: "event.delegatedFrom";
2721
- };
2722
- readonly votedAt: {
2723
- readonly var: "$timestamp";
2724
- };
2725
- }];
2726
- };
2727
- }];
2728
- };
2729
- readonly dependencies: readonly [];
2730
- }, {
2731
- readonly from: "ACTIVE";
2732
- readonly to: "ACTIVE";
2733
- readonly eventName: "delegate";
2734
- readonly guard: {
2735
- readonly and: readonly [{
2736
- readonly var: "state.config.allowDelegation";
2737
- }, {
2738
- readonly "!==": readonly [{
2739
- readonly var: "event.agent";
2740
- }, {
2741
- readonly var: "event.delegateTo";
2742
- }];
2743
- }, {
2744
- readonly "!": readonly [{
2745
- readonly getKey: readonly [{
2746
- readonly var: "state.votes";
2747
- }, {
2748
- readonly var: "event.agent";
2749
- }];
2750
- }];
2751
- }];
2752
- };
2753
- readonly effect: {
2754
- readonly merge: readonly [{
2755
- readonly var: "state";
2756
- }, {
2757
- readonly delegations: {
2758
- readonly setKey: readonly [{
2759
- readonly var: "state.delegations";
2760
- }, {
2761
- readonly var: "event.agent";
2762
- }, {
2763
- readonly delegateTo: {
2764
- readonly var: "event.delegateTo";
2765
- };
2766
- readonly weight: {
2767
- readonly var: "event.weight";
2768
- };
2769
- readonly delegatedAt: {
2770
- readonly var: "$timestamp";
2771
- };
2772
- }];
2773
- };
2774
- }];
2775
- };
2776
- readonly dependencies: readonly [];
2777
- }, {
2778
- readonly from: "ACTIVE";
2779
- readonly to: "PENDING";
2780
- readonly eventName: "finalize_voting";
2781
- readonly guard: {
2782
- readonly and: readonly [{
2783
- readonly ">=": readonly [{
2784
- readonly var: "$timestamp";
2785
- }, {
2786
- readonly var: "state.votingEndsAt";
2787
- }];
2788
- }, {
2789
- readonly var: "state.tally.passed";
2790
- }];
2791
- };
2792
- readonly effect: {
2793
- readonly merge: readonly [{
2794
- readonly var: "state";
2795
- }, {
2796
- readonly status: "PENDING";
2797
- readonly finalizedAt: {
2798
- readonly var: "$timestamp";
2799
- };
2800
- readonly vetoEndsAt: {
2801
- readonly "+": readonly [{
2802
- readonly var: "$timestamp";
2803
- }, {
2804
- readonly var: "state.config.vetoPeriodMs";
2805
- }];
2806
- };
2807
- }];
2808
- };
2809
- readonly dependencies: readonly [];
2810
- }, {
2811
- readonly from: "ACTIVE";
2812
- readonly to: "DEFEATED";
2813
- readonly eventName: "finalize_voting";
2814
- readonly guard: {
2815
- readonly and: readonly [{
2816
- readonly ">=": readonly [{
2817
- readonly var: "$timestamp";
2818
- }, {
2819
- readonly var: "state.votingEndsAt";
2820
- }];
2821
- }, {
2822
- readonly "!": readonly [{
2823
- readonly var: "state.tally.passed";
2824
- }];
2825
- }];
2826
- };
2827
- readonly effect: {
2828
- readonly merge: readonly [{
2829
- readonly var: "state";
2830
- }, {
2831
- readonly status: "DEFEATED";
2832
- readonly finalizedAt: {
2833
- readonly var: "$timestamp";
2834
- };
2835
- readonly defeatReason: {
2836
- readonly var: "state.tally.reason";
2837
- };
2838
- }];
2839
- };
2840
- readonly dependencies: readonly [];
2841
- }, {
2842
- readonly from: "PENDING";
2843
- readonly to: "VETOED";
2844
- readonly eventName: "veto";
2845
- readonly guard: {
2846
- readonly and: readonly [{
2847
- readonly "<=": readonly [{
2848
- readonly var: "$timestamp";
2849
- }, {
2850
- readonly var: "state.vetoEndsAt";
2851
- }];
2852
- }, {
2853
- readonly in: readonly [{
2854
- readonly var: "event.agent";
2855
- }, {
2856
- readonly var: "state.vetoers";
2857
- }];
2858
- }];
2859
- };
2860
- readonly effect: {
2861
- readonly merge: readonly [{
2862
- readonly var: "state";
2863
- }, {
2864
- readonly status: "VETOED";
2865
- readonly vetoedBy: {
2866
- readonly var: "event.agent";
2867
- };
2868
- readonly vetoReason: {
2869
- readonly var: "event.reason";
2870
- };
2871
- readonly vetoedAt: {
2872
- readonly var: "$timestamp";
2873
- };
2874
- }];
2875
- };
2876
- readonly dependencies: readonly [];
2877
- }, {
2878
- readonly from: "PENDING";
2879
- readonly to: "EXECUTING";
2880
- readonly eventName: "execute";
2881
- readonly guard: {
2882
- readonly and: readonly [{
2883
- readonly ">=": readonly [{
2884
- readonly var: "$timestamp";
2885
- }, {
2886
- readonly var: "state.vetoEndsAt";
2887
- }];
2888
- }, {
2889
- readonly in: readonly [{
2890
- readonly var: "event.agent";
2891
- }, {
2892
- readonly var: "state.executors";
2893
- }];
1375
+ readonly var: "state.proposal.executableAt";
2894
1376
  }];
2895
1377
  };
2896
1378
  readonly effect: {
2897
1379
  readonly merge: readonly [{
2898
1380
  readonly var: "state";
2899
1381
  }, {
2900
- readonly status: "EXECUTING";
2901
- readonly executedBy: {
2902
- readonly var: "event.agent";
2903
- };
2904
- readonly executionStartedAt: {
2905
- readonly var: "$timestamp";
1382
+ readonly executedProposals: {
1383
+ readonly cat: readonly [{
1384
+ readonly var: "state.executedProposals";
1385
+ }, readonly [{
1386
+ readonly merge: readonly [{
1387
+ readonly var: "state.proposal";
1388
+ }, {
1389
+ readonly votes: {
1390
+ readonly var: "state.votes";
1391
+ };
1392
+ readonly executedAt: {
1393
+ readonly var: "$timestamp";
1394
+ };
1395
+ }];
1396
+ }]];
2906
1397
  };
1398
+ readonly proposal: null;
1399
+ readonly votes: null;
2907
1400
  }];
2908
1401
  };
1402
+ readonly emits: readonly [{
1403
+ readonly event: "proposal_executed";
1404
+ readonly to: "external";
1405
+ }];
2909
1406
  readonly dependencies: readonly [];
2910
1407
  }, {
2911
- readonly from: "EXECUTING";
2912
- readonly to: "EXECUTED";
2913
- readonly eventName: "complete";
1408
+ readonly from: "VOTING";
1409
+ readonly to: "ACTIVE";
1410
+ readonly eventName: "reject";
2914
1411
  readonly guard: {
2915
- readonly in: readonly [{
2916
- readonly var: "event.agent";
1412
+ readonly and: readonly [{
1413
+ readonly ">": readonly [{
1414
+ readonly var: "$timestamp";
1415
+ }, {
1416
+ readonly var: "state.proposal.votingEndsAt";
1417
+ }];
2917
1418
  }, {
2918
- readonly var: "state.executors";
1419
+ readonly or: readonly [{
1420
+ readonly "<=": readonly [{
1421
+ readonly var: "state.votes.for";
1422
+ }, {
1423
+ readonly var: "state.votes.against";
1424
+ }];
1425
+ }, {
1426
+ readonly "<": readonly [{
1427
+ readonly "+": readonly [{
1428
+ readonly var: "state.votes.for";
1429
+ }, {
1430
+ readonly var: "state.votes.against";
1431
+ }, {
1432
+ readonly var: "state.votes.abstain";
1433
+ }];
1434
+ }, {
1435
+ readonly var: "state.quorum";
1436
+ }];
1437
+ }];
2919
1438
  }];
2920
1439
  };
2921
1440
  readonly effect: {
2922
1441
  readonly merge: readonly [{
2923
1442
  readonly var: "state";
2924
1443
  }, {
2925
- readonly status: "EXECUTED";
2926
- readonly completedAt: {
2927
- readonly var: "$timestamp";
2928
- };
2929
- readonly executionProof: {
2930
- readonly var: "event.proof";
1444
+ readonly rejectedProposals: {
1445
+ readonly cat: readonly [{
1446
+ readonly var: "state.rejectedProposals";
1447
+ }, readonly [{
1448
+ readonly merge: readonly [{
1449
+ readonly var: "state.proposal";
1450
+ }, {
1451
+ readonly votes: {
1452
+ readonly var: "state.votes";
1453
+ };
1454
+ readonly rejectedAt: {
1455
+ readonly var: "$timestamp";
1456
+ };
1457
+ }];
1458
+ }]];
2931
1459
  };
1460
+ readonly proposal: null;
1461
+ readonly votes: null;
2932
1462
  }];
2933
1463
  };
2934
1464
  readonly dependencies: readonly [];
2935
1465
  }, {
2936
- readonly from: "DRAFT";
2937
- readonly to: "CANCELLED";
1466
+ readonly from: "QUEUED";
1467
+ readonly to: "ACTIVE";
2938
1468
  readonly eventName: "cancel";
2939
1469
  readonly guard: {
2940
1470
  readonly "===": readonly [{
2941
1471
  readonly var: "event.agent";
2942
1472
  }, {
2943
- readonly var: "state.proposer";
1473
+ readonly var: "state.proposal.proposer";
2944
1474
  }];
2945
1475
  };
2946
1476
  readonly effect: {
2947
1477
  readonly merge: readonly [{
2948
1478
  readonly var: "state";
2949
1479
  }, {
2950
- readonly status: "CANCELLED";
2951
- readonly cancelledAt: {
2952
- readonly var: "$timestamp";
1480
+ readonly cancelledProposals: {
1481
+ readonly cat: readonly [{
1482
+ readonly var: "state.cancelledProposals";
1483
+ }, readonly [{
1484
+ readonly merge: readonly [{
1485
+ readonly var: "state.proposal";
1486
+ }, {
1487
+ readonly cancelledAt: {
1488
+ readonly var: "$timestamp";
1489
+ };
1490
+ }];
1491
+ }]];
2953
1492
  };
1493
+ readonly proposal: null;
1494
+ readonly votes: null;
2954
1495
  }];
2955
1496
  };
2956
1497
  readonly dependencies: readonly [];
2957
1498
  }, {
2958
1499
  readonly from: "ACTIVE";
2959
- readonly to: "CANCELLED";
2960
- readonly eventName: "cancel";
1500
+ readonly to: "ACTIVE";
1501
+ readonly eventName: "delegate";
2961
1502
  readonly guard: {
2962
- readonly or: readonly [{
2963
- readonly "===": readonly [{
2964
- readonly var: "event.agent";
1503
+ readonly ">": readonly [{
1504
+ readonly getKey: readonly [{
1505
+ readonly var: "state.balances";
2965
1506
  }, {
2966
- readonly var: "state.proposer";
2967
- }];
2968
- }, {
2969
- readonly in: readonly [{
2970
1507
  readonly var: "event.agent";
2971
- }, {
2972
- readonly var: "state.admins";
2973
1508
  }];
2974
- }];
1509
+ }, 0];
2975
1510
  };
2976
1511
  readonly effect: {
2977
1512
  readonly merge: readonly [{
2978
1513
  readonly var: "state";
2979
1514
  }, {
2980
- readonly status: "CANCELLED";
2981
- readonly cancelledBy: {
2982
- readonly var: "event.agent";
2983
- };
2984
- readonly cancelledAt: {
2985
- readonly var: "$timestamp";
1515
+ readonly delegations: {
1516
+ readonly setKey: readonly [{
1517
+ readonly var: "state.delegations";
1518
+ }, {
1519
+ readonly var: "event.agent";
1520
+ }, {
1521
+ readonly var: "event.delegateTo";
1522
+ }];
2986
1523
  };
2987
1524
  }];
2988
1525
  };
2989
1526
  readonly dependencies: readonly [];
2990
1527
  }, {
2991
1528
  readonly from: "ACTIVE";
2992
- readonly to: "EXPIRED";
2993
- readonly eventName: "expire";
1529
+ readonly to: "ACTIVE";
1530
+ readonly eventName: "undelegate";
2994
1531
  readonly guard: {
2995
- readonly ">": readonly [{
2996
- readonly var: "$timestamp";
1532
+ readonly getKey: readonly [{
1533
+ readonly var: "state.delegations";
2997
1534
  }, {
2998
- readonly "+": readonly [{
2999
- readonly var: "state.votingEndsAt";
3000
- }, {
3001
- readonly var: "state.config.gracePeriodMs";
3002
- }];
1535
+ readonly var: "event.agent";
3003
1536
  }];
3004
1537
  };
3005
1538
  readonly effect: {
3006
1539
  readonly merge: readonly [{
3007
1540
  readonly var: "state";
3008
1541
  }, {
3009
- readonly status: "EXPIRED";
3010
- readonly expiredAt: {
3011
- readonly var: "$timestamp";
1542
+ readonly delegations: {
1543
+ readonly deleteKey: readonly [{
1544
+ readonly var: "state.delegations";
1545
+ }, {
1546
+ readonly var: "event.agent";
1547
+ }];
3012
1548
  };
3013
1549
  }];
3014
1550
  };
3015
1551
  readonly dependencies: readonly [];
3016
1552
  }];
3017
- readonly presets: {
3018
- readonly _comment: "Common governance configurations";
3019
- readonly bilateral: {
3020
- readonly description: "Two-party mutual consent (like a contract)";
3021
- readonly config: {
3022
- readonly votingMechanism: "simple";
3023
- readonly quorumType: "absolute";
3024
- readonly quorumValue: 2;
3025
- readonly passingThreshold: 1;
3026
- readonly allowDelegation: false;
3027
- readonly openVoting: false;
3028
- };
3029
- };
3030
- readonly multisig: {
3031
- readonly description: "N-of-M threshold signing";
3032
- readonly config: {
3033
- readonly votingMechanism: "simple";
3034
- readonly quorumType: "absolute";
3035
- readonly passingThreshold: 0.6;
3036
- readonly vetoPeriodMs: 0;
3037
- readonly allowDelegation: false;
3038
- };
3039
- };
3040
- readonly council: {
3041
- readonly description: "Small elected/appointed body";
3042
- readonly config: {
3043
- readonly votingMechanism: "simple";
3044
- readonly quorumType: "percentage";
3045
- readonly quorumValue: 0.5;
3046
- readonly passingThreshold: 0.5;
3047
- readonly openVoting: false;
3048
- readonly allowDelegation: true;
3049
- };
3050
- };
3051
- readonly liquid_democracy: {
3052
- readonly description: "Delegatable voting power";
3053
- readonly config: {
3054
- readonly votingMechanism: "simple";
3055
- readonly allowDelegation: true;
3056
- readonly openVoting: true;
3057
- readonly onePersonOneVote: true;
3058
- };
3059
- };
3060
- readonly conviction: {
3061
- readonly description: "Time-weighted conviction voting";
3062
- readonly config: {
3063
- readonly votingMechanism: "conviction";
3064
- readonly allowDelegation: true;
3065
- readonly convictionHalfLifeMs: 604800000;
3066
- };
3067
- };
3068
- readonly quadratic: {
3069
- readonly description: "Quadratic voting to reduce whale power";
3070
- readonly config: {
3071
- readonly votingMechanism: "quadratic";
3072
- readonly onePersonOneVote: false;
3073
- };
3074
- };
3075
- readonly dictator: {
3076
- readonly description: "Single admin with full control";
3077
- readonly config: {
3078
- readonly votingMechanism: "simple";
3079
- readonly quorumType: "absolute";
3080
- readonly quorumValue: 1;
3081
- readonly passingThreshold: 1;
3082
- readonly vetoPeriodMs: 0;
3083
- readonly allowDelegation: false;
3084
- };
3085
- };
1553
+ readonly crossReferences: {
1554
+ readonly Identity: "voter verification";
1555
+ readonly Token: "balance snapshots";
1556
+ readonly Contract: "action execution";
1557
+ readonly Treasury: "fund management";
3086
1558
  };
3087
1559
  };
3088
1560
  export declare const govSimpleDef: {
@@ -3549,3 +2021,118 @@ export declare const govSimpleDef: {
3549
2021
  readonly dependencies: readonly [];
3550
2022
  }];
3551
2023
  };
2024
+ export declare const govUniversalDef: {
2025
+ readonly metadata: {
2026
+ readonly name: "GovernanceUniversal";
2027
+ readonly description: "Minimal governance state machine - extend for custom use cases";
2028
+ readonly version: "1.0.0";
2029
+ };
2030
+ readonly states: {
2031
+ readonly ACTIVE: {
2032
+ readonly id: "ACTIVE";
2033
+ readonly isFinal: false;
2034
+ readonly metadata: null;
2035
+ };
2036
+ readonly VOTING: {
2037
+ readonly id: "VOTING";
2038
+ readonly isFinal: false;
2039
+ readonly metadata: null;
2040
+ };
2041
+ readonly DISSOLVED: {
2042
+ readonly id: "DISSOLVED";
2043
+ readonly isFinal: true;
2044
+ readonly metadata: null;
2045
+ };
2046
+ };
2047
+ readonly initialState: "ACTIVE";
2048
+ readonly transitions: readonly [{
2049
+ readonly from: "ACTIVE";
2050
+ readonly to: "VOTING";
2051
+ readonly eventName: "propose";
2052
+ readonly guard: {
2053
+ readonly "==": readonly [1, 1];
2054
+ };
2055
+ readonly effect: {
2056
+ readonly merge: readonly [{
2057
+ readonly var: "state";
2058
+ }, {
2059
+ readonly status: "VOTING";
2060
+ readonly proposal: {
2061
+ readonly var: "event.proposal";
2062
+ };
2063
+ readonly proposedAt: {
2064
+ readonly var: "$timestamp";
2065
+ };
2066
+ readonly votes: {};
2067
+ }];
2068
+ };
2069
+ readonly dependencies: readonly [];
2070
+ }, {
2071
+ readonly from: "VOTING";
2072
+ readonly to: "VOTING";
2073
+ readonly eventName: "vote";
2074
+ readonly guard: {
2075
+ readonly "==": readonly [1, 1];
2076
+ };
2077
+ readonly effect: {
2078
+ readonly merge: readonly [{
2079
+ readonly var: "state";
2080
+ }, {
2081
+ readonly votes: {
2082
+ readonly merge: readonly [{
2083
+ readonly var: "state.votes";
2084
+ }, {
2085
+ readonly __key: {
2086
+ readonly var: "event.agent";
2087
+ };
2088
+ readonly __value: {
2089
+ readonly var: "event.vote";
2090
+ };
2091
+ }];
2092
+ };
2093
+ }];
2094
+ };
2095
+ readonly dependencies: readonly [];
2096
+ }, {
2097
+ readonly from: "VOTING";
2098
+ readonly to: "ACTIVE";
2099
+ readonly eventName: "finalize";
2100
+ readonly guard: {
2101
+ readonly "==": readonly [1, 1];
2102
+ };
2103
+ readonly effect: {
2104
+ readonly merge: readonly [{
2105
+ readonly var: "state";
2106
+ }, {
2107
+ readonly status: "ACTIVE";
2108
+ readonly lastProposal: {
2109
+ readonly var: "state.proposal";
2110
+ };
2111
+ readonly lastResult: {
2112
+ readonly var: "event.result";
2113
+ };
2114
+ readonly proposal: null;
2115
+ readonly votes: null;
2116
+ }];
2117
+ };
2118
+ readonly dependencies: readonly [];
2119
+ }, {
2120
+ readonly from: "ACTIVE";
2121
+ readonly to: "DISSOLVED";
2122
+ readonly eventName: "dissolve";
2123
+ readonly guard: {
2124
+ readonly "==": readonly [1, 1];
2125
+ };
2126
+ readonly effect: {
2127
+ readonly merge: readonly [{
2128
+ readonly var: "state";
2129
+ }, {
2130
+ readonly status: "DISSOLVED";
2131
+ readonly dissolvedAt: {
2132
+ readonly var: "$timestamp";
2133
+ };
2134
+ }];
2135
+ };
2136
+ readonly dependencies: readonly [];
2137
+ }];
2138
+ };