@ottochain/sdk 1.7.0-beta.2 → 2.1.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 (113) hide show
  1. package/dist/cjs/apps/contracts/index.js +1 -1
  2. package/dist/cjs/apps/contracts/state-machines/contract-agreement.js +272 -0
  3. package/dist/cjs/apps/contracts/state-machines/contract-escrow.js +284 -0
  4. package/dist/cjs/apps/contracts/state-machines/contract-universal.js +93 -0
  5. package/dist/cjs/apps/contracts/state-machines/index.js +177 -1
  6. package/dist/cjs/apps/corporate/state-machines/corp-board.js +1022 -0
  7. package/dist/cjs/apps/corporate/state-machines/corp-entity.js +671 -0
  8. package/dist/cjs/apps/corporate/state-machines/corp-securities.js +998 -0
  9. package/dist/cjs/apps/corporate/state-machines/corp-shareholders.js +1102 -0
  10. package/dist/cjs/apps/corporate/state-machines/index.js +20 -4440
  11. package/dist/cjs/apps/governance/index.js +7 -7
  12. package/dist/cjs/apps/governance/state-machines/dao-multisig.js +467 -0
  13. package/dist/cjs/apps/governance/state-machines/dao-reputation.js +458 -0
  14. package/dist/cjs/apps/governance/state-machines/dao-single.js +199 -0
  15. package/dist/cjs/apps/governance/state-machines/dao-token.js +503 -0
  16. package/dist/cjs/apps/governance/state-machines/governance-simple.js +482 -0
  17. package/dist/cjs/apps/governance/state-machines/governance-universal.js +138 -0
  18. package/dist/cjs/apps/governance/state-machines/index.js +16 -2934
  19. package/dist/cjs/apps/identity/constants.js +20 -20
  20. package/dist/cjs/apps/identity/index.js +13 -21
  21. package/dist/cjs/apps/identity/state-machines/identity-agent.js +256 -0
  22. package/dist/cjs/apps/identity/state-machines/identity-oracle.js +321 -0
  23. package/dist/cjs/apps/identity/state-machines/identity-universal.js +106 -0
  24. package/dist/cjs/apps/identity/state-machines/index.js +15 -784
  25. package/dist/cjs/apps/markets/index.js +1 -1
  26. package/dist/cjs/apps/markets/state-machines/index.js +14 -2298
  27. package/dist/cjs/apps/markets/state-machines/market-auction.js +283 -0
  28. package/dist/cjs/apps/markets/state-machines/market-crowdfund.js +312 -0
  29. package/dist/cjs/apps/markets/state-machines/market-group-buy.js +407 -0
  30. package/dist/cjs/apps/markets/state-machines/market-prediction.js +485 -0
  31. package/dist/cjs/apps/markets/state-machines/market-universal.js +129 -0
  32. package/dist/cjs/apps/oracles/index.js +36 -0
  33. package/dist/cjs/generated/index.js +14 -7
  34. package/dist/cjs/generated/ottochain/apps/identity/v1/identity.js +197 -198
  35. package/dist/cjs/schema/fiber-app.js +55 -0
  36. package/dist/cjs/schema/index.js +20 -0
  37. package/dist/esm/apps/contracts/index.js +3 -3
  38. package/dist/esm/apps/contracts/state-machines/contract-agreement.js +269 -0
  39. package/dist/esm/apps/contracts/state-machines/contract-escrow.js +281 -0
  40. package/dist/esm/apps/contracts/state-machines/contract-universal.js +90 -0
  41. package/dist/esm/apps/contracts/state-machines/index.js +177 -1
  42. package/dist/esm/apps/corporate/index.js +3 -3
  43. package/dist/esm/apps/corporate/state-machines/corp-board.js +1019 -0
  44. package/dist/esm/apps/corporate/state-machines/corp-entity.js +668 -0
  45. package/dist/esm/apps/corporate/state-machines/corp-securities.js +995 -0
  46. package/dist/esm/apps/corporate/state-machines/corp-shareholders.js +1099 -0
  47. package/dist/esm/apps/corporate/state-machines/index.js +15 -4439
  48. package/dist/esm/apps/governance/index.js +9 -9
  49. package/dist/esm/apps/governance/state-machines/dao-multisig.js +464 -0
  50. package/dist/esm/apps/governance/state-machines/dao-reputation.js +455 -0
  51. package/dist/esm/apps/governance/state-machines/dao-single.js +196 -0
  52. package/dist/esm/apps/governance/state-machines/dao-token.js +500 -0
  53. package/dist/esm/apps/governance/state-machines/governance-simple.js +479 -0
  54. package/dist/esm/apps/governance/state-machines/governance-universal.js +135 -0
  55. package/dist/esm/apps/governance/state-machines/index.js +9 -2933
  56. package/dist/esm/apps/identity/constants.js +21 -21
  57. package/dist/esm/apps/identity/index.js +13 -22
  58. package/dist/esm/apps/identity/state-machines/identity-agent.js +253 -0
  59. package/dist/esm/apps/identity/state-machines/identity-oracle.js +318 -0
  60. package/dist/esm/apps/identity/state-machines/identity-universal.js +103 -0
  61. package/dist/esm/apps/identity/state-machines/index.js +11 -783
  62. package/dist/esm/apps/index.js +5 -5
  63. package/dist/esm/apps/markets/index.js +3 -3
  64. package/dist/esm/apps/markets/state-machines/index.js +8 -2297
  65. package/dist/esm/apps/markets/state-machines/market-auction.js +280 -0
  66. package/dist/esm/apps/markets/state-machines/market-crowdfund.js +309 -0
  67. package/dist/esm/apps/markets/state-machines/market-group-buy.js +404 -0
  68. package/dist/esm/apps/markets/state-machines/market-prediction.js +482 -0
  69. package/dist/esm/apps/markets/state-machines/market-universal.js +126 -0
  70. package/dist/esm/apps/oracles/index.js +21 -0
  71. package/dist/esm/generated/index.js +8 -3
  72. package/dist/esm/generated/ottochain/apps/identity/v1/identity.js +196 -197
  73. package/dist/esm/schema/fiber-app.js +47 -0
  74. package/dist/esm/schema/index.js +4 -0
  75. package/dist/types/apps/contracts/index.d.ts +151 -2
  76. package/dist/types/apps/contracts/state-machines/contract-agreement.d.ts +462 -0
  77. package/dist/types/apps/contracts/state-machines/contract-escrow.d.ts +511 -0
  78. package/dist/types/apps/contracts/state-machines/contract-universal.d.ts +147 -0
  79. package/dist/types/apps/contracts/state-machines/index.d.ts +149 -0
  80. package/dist/types/apps/corporate/index.d.ts +5263 -3825
  81. package/dist/types/apps/corporate/state-machines/corp-board.d.ts +1479 -0
  82. package/dist/types/apps/corporate/state-machines/corp-entity.d.ts +970 -0
  83. package/dist/types/apps/corporate/state-machines/corp-securities.d.ts +1381 -0
  84. package/dist/types/apps/corporate/state-machines/corp-shareholders.d.ts +1631 -0
  85. package/dist/types/apps/corporate/state-machines/index.d.ts +5245 -3802
  86. package/dist/types/apps/governance/index.d.ts +875 -37
  87. package/dist/types/apps/governance/state-machines/dao-multisig.d.ts +644 -0
  88. package/dist/types/apps/governance/state-machines/dao-reputation.d.ts +610 -0
  89. package/dist/types/apps/governance/state-machines/dao-single.d.ts +276 -0
  90. package/dist/types/apps/governance/state-machines/dao-token.d.ts +601 -0
  91. package/dist/types/apps/governance/state-machines/governance-simple.d.ts +652 -0
  92. package/dist/types/apps/governance/state-machines/governance-universal.d.ts +181 -0
  93. package/dist/types/apps/governance/state-machines/index.d.ts +9 -2136
  94. package/dist/types/apps/identity/constants.d.ts +4 -7
  95. package/dist/types/apps/identity/index.d.ts +1082 -592
  96. package/dist/types/apps/identity/state-machines/identity-agent.d.ts +401 -0
  97. package/dist/types/apps/identity/state-machines/identity-oracle.d.ts +550 -0
  98. package/dist/types/apps/identity/state-machines/identity-universal.d.ts +151 -0
  99. package/dist/types/apps/identity/state-machines/index.d.ts +1069 -567
  100. package/dist/types/apps/index.d.ts +5 -5
  101. package/dist/types/apps/markets/index.d.ts +535 -7
  102. package/dist/types/apps/markets/state-machines/index.d.ts +8 -1678
  103. package/dist/types/apps/markets/state-machines/market-auction.d.ts +392 -0
  104. package/dist/types/apps/markets/state-machines/market-crowdfund.d.ts +443 -0
  105. package/dist/types/apps/markets/state-machines/market-group-buy.d.ts +539 -0
  106. package/dist/types/apps/markets/state-machines/market-prediction.d.ts +651 -0
  107. package/dist/types/apps/markets/state-machines/market-universal.d.ts +191 -0
  108. package/dist/types/apps/oracles/index.d.ts +18 -0
  109. package/dist/types/generated/index.d.ts +3 -1
  110. package/dist/types/generated/ottochain/apps/identity/v1/identity.d.ts +43 -64
  111. package/dist/types/schema/fiber-app.d.ts +139 -0
  112. package/dist/types/schema/index.d.ts +4 -0
  113. package/package.json +1 -1
@@ -0,0 +1,601 @@
1
+ /**
2
+ * Token-weighted voting. Voting power proportional to token holdings.
3
+ */
4
+ export declare const daoTokenDef: {
5
+ readonly metadata: {
6
+ readonly name: "TokenDAO";
7
+ readonly app: "governance";
8
+ readonly type: "daoToken";
9
+ readonly version: "1.0.0";
10
+ readonly description: "Token-weighted voting. Voting power proportional to token holdings.";
11
+ readonly category: "governance/dao";
12
+ readonly crossReferences: {
13
+ readonly Identity: "voter verification";
14
+ readonly Token: "balance snapshots";
15
+ readonly Contract: "action execution";
16
+ readonly Treasury: "fund management";
17
+ };
18
+ };
19
+ readonly createSchema: {
20
+ readonly required: readonly ["balances", "proposalThreshold", "quorum", "votingPeriodMs", "timelockMs"];
21
+ readonly properties: {
22
+ readonly balances: {
23
+ readonly type: "object";
24
+ readonly description: "Initial token balances by address";
25
+ };
26
+ readonly proposalThreshold: {
27
+ readonly type: "number";
28
+ readonly description: "Min token balance to submit a proposal";
29
+ };
30
+ readonly quorum: {
31
+ readonly type: "number";
32
+ readonly description: "Min total votes (weighted) to pass";
33
+ };
34
+ readonly votingPeriodMs: {
35
+ readonly type: "number";
36
+ readonly description: "Voting window in milliseconds";
37
+ };
38
+ readonly timelockMs: {
39
+ readonly type: "number";
40
+ readonly description: "Time-lock delay before execution";
41
+ };
42
+ };
43
+ };
44
+ readonly stateSchema: {
45
+ readonly properties: {
46
+ readonly balances: {
47
+ readonly type: "object";
48
+ };
49
+ readonly delegations: {
50
+ readonly type: "object";
51
+ readonly computed: true;
52
+ };
53
+ readonly proposalThreshold: {
54
+ readonly type: "number";
55
+ };
56
+ readonly quorum: {
57
+ readonly type: "number";
58
+ };
59
+ readonly votingPeriodMs: {
60
+ readonly type: "number";
61
+ };
62
+ readonly timelockMs: {
63
+ readonly type: "number";
64
+ };
65
+ readonly proposal: {
66
+ readonly type: "object";
67
+ };
68
+ readonly votes: {
69
+ readonly type: "object";
70
+ readonly computed: true;
71
+ };
72
+ readonly executedProposals: {
73
+ readonly type: "array";
74
+ readonly computed: true;
75
+ };
76
+ readonly rejectedProposals: {
77
+ readonly type: "array";
78
+ readonly computed: true;
79
+ };
80
+ readonly cancelledProposals: {
81
+ readonly type: "array";
82
+ readonly computed: true;
83
+ };
84
+ };
85
+ };
86
+ readonly eventSchemas: {
87
+ readonly propose: {
88
+ readonly description: "Submit a proposal (requires >= proposalThreshold tokens)";
89
+ readonly required: readonly ["proposalId", "title", "description", "actionType", "payload"];
90
+ readonly properties: {
91
+ readonly agent: {
92
+ readonly type: "address";
93
+ };
94
+ readonly proposalId: {
95
+ readonly type: "string";
96
+ };
97
+ readonly title: {
98
+ readonly type: "string";
99
+ };
100
+ readonly description: {
101
+ readonly type: "string";
102
+ };
103
+ readonly actionType: {
104
+ readonly type: "string";
105
+ };
106
+ readonly payload: {
107
+ readonly type: "object";
108
+ };
109
+ readonly snapshotBlock: {
110
+ readonly type: "string";
111
+ };
112
+ };
113
+ };
114
+ readonly vote: {
115
+ readonly description: "Cast a token-weighted vote (must hold tokens, no double-vote, within window)";
116
+ readonly required: readonly ["vote"];
117
+ readonly properties: {
118
+ readonly agent: {
119
+ readonly type: "address";
120
+ };
121
+ readonly vote: {
122
+ readonly type: "string";
123
+ readonly description: "\"for\" | \"against\" | \"abstain\"";
124
+ };
125
+ };
126
+ };
127
+ readonly queue: {
128
+ readonly description: "Queue passing proposal into timelock (voting ended, for > against, quorum met)";
129
+ readonly properties: {};
130
+ };
131
+ readonly execute: {
132
+ readonly description: "Execute queued proposal after timelock expires";
133
+ readonly properties: {};
134
+ };
135
+ readonly reject: {
136
+ readonly description: "Formally reject a failed proposal (voting ended, failed conditions)";
137
+ readonly properties: {};
138
+ };
139
+ readonly cancel: {
140
+ readonly description: "Cancel a queued proposal (proposer only)";
141
+ readonly properties: {
142
+ readonly agent: {
143
+ readonly type: "address";
144
+ };
145
+ };
146
+ };
147
+ readonly delegate: {
148
+ readonly description: "Delegate voting power to another address";
149
+ readonly required: readonly ["delegateTo"];
150
+ readonly properties: {
151
+ readonly agent: {
152
+ readonly type: "address";
153
+ };
154
+ readonly delegateTo: {
155
+ readonly type: "address";
156
+ };
157
+ };
158
+ };
159
+ readonly undelegate: {
160
+ readonly description: "Revoke delegation";
161
+ readonly properties: {
162
+ readonly agent: {
163
+ readonly type: "address";
164
+ };
165
+ };
166
+ };
167
+ };
168
+ readonly states: {
169
+ readonly ACTIVE: {
170
+ readonly id: "ACTIVE";
171
+ readonly isFinal: false;
172
+ readonly metadata: null;
173
+ };
174
+ readonly VOTING: {
175
+ readonly id: "VOTING";
176
+ readonly isFinal: false;
177
+ readonly metadata: null;
178
+ };
179
+ readonly QUEUED: {
180
+ readonly id: "QUEUED";
181
+ readonly isFinal: false;
182
+ readonly metadata: null;
183
+ };
184
+ readonly DISSOLVED: {
185
+ readonly id: "DISSOLVED";
186
+ readonly isFinal: true;
187
+ readonly metadata: null;
188
+ };
189
+ };
190
+ readonly initialState: "ACTIVE";
191
+ readonly transitions: readonly [{
192
+ readonly from: "ACTIVE";
193
+ readonly to: "VOTING";
194
+ readonly eventName: "propose";
195
+ readonly guard: {
196
+ readonly ">=": readonly [{
197
+ readonly getKey: readonly [{
198
+ readonly var: "state.balances";
199
+ }, {
200
+ readonly var: "event.agent";
201
+ }];
202
+ }, {
203
+ readonly var: "state.proposalThreshold";
204
+ }];
205
+ };
206
+ readonly effect: {
207
+ readonly merge: readonly [{
208
+ readonly var: "state";
209
+ }, {
210
+ readonly proposal: {
211
+ readonly id: {
212
+ readonly var: "event.proposalId";
213
+ };
214
+ readonly title: {
215
+ readonly var: "event.title";
216
+ };
217
+ readonly description: {
218
+ readonly var: "event.description";
219
+ };
220
+ readonly actionType: {
221
+ readonly var: "event.actionType";
222
+ };
223
+ readonly payload: {
224
+ readonly var: "event.payload";
225
+ };
226
+ readonly proposer: {
227
+ readonly var: "event.agent";
228
+ };
229
+ readonly proposedAt: {
230
+ readonly var: "$timestamp";
231
+ };
232
+ readonly votingEndsAt: {
233
+ readonly "+": readonly [{
234
+ readonly var: "$timestamp";
235
+ }, {
236
+ readonly var: "state.votingPeriodMs";
237
+ }];
238
+ };
239
+ readonly snapshotBlock: {
240
+ readonly var: "event.snapshotBlock";
241
+ };
242
+ };
243
+ readonly votes: {
244
+ readonly for: 0;
245
+ readonly against: 0;
246
+ readonly abstain: 0;
247
+ readonly voters: {};
248
+ };
249
+ }];
250
+ };
251
+ readonly dependencies: readonly [];
252
+ }, {
253
+ readonly from: "VOTING";
254
+ readonly to: "VOTING";
255
+ readonly eventName: "vote";
256
+ readonly guard: {
257
+ readonly and: readonly [{
258
+ readonly ">": readonly [{
259
+ readonly getKey: readonly [{
260
+ readonly var: "state.balances";
261
+ }, {
262
+ readonly var: "event.agent";
263
+ }];
264
+ }, 0];
265
+ }, {
266
+ readonly "!": readonly [{
267
+ readonly getKey: readonly [{
268
+ readonly var: "state.votes.voters";
269
+ }, {
270
+ readonly var: "event.agent";
271
+ }];
272
+ }];
273
+ }, {
274
+ readonly "<=": readonly [{
275
+ readonly var: "$timestamp";
276
+ }, {
277
+ readonly var: "state.proposal.votingEndsAt";
278
+ }];
279
+ }];
280
+ };
281
+ readonly effect: {
282
+ readonly merge: readonly [{
283
+ readonly var: "state";
284
+ }, {
285
+ readonly votes: {
286
+ readonly merge: readonly [{
287
+ readonly var: "state.votes";
288
+ }, {
289
+ readonly if: readonly [{
290
+ readonly "===": readonly [{
291
+ readonly var: "event.vote";
292
+ }, "for"];
293
+ }, {
294
+ readonly for: {
295
+ readonly "+": readonly [{
296
+ readonly var: "state.votes.for";
297
+ }, {
298
+ readonly getKey: readonly [{
299
+ readonly var: "state.balances";
300
+ }, {
301
+ readonly var: "event.agent";
302
+ }];
303
+ }];
304
+ };
305
+ }, {
306
+ readonly "===": readonly [{
307
+ readonly var: "event.vote";
308
+ }, "against"];
309
+ }, {
310
+ readonly against: {
311
+ readonly "+": readonly [{
312
+ readonly var: "state.votes.against";
313
+ }, {
314
+ readonly getKey: readonly [{
315
+ readonly var: "state.balances";
316
+ }, {
317
+ readonly var: "event.agent";
318
+ }];
319
+ }];
320
+ };
321
+ }, {
322
+ readonly abstain: {
323
+ readonly "+": readonly [{
324
+ readonly var: "state.votes.abstain";
325
+ }, {
326
+ readonly getKey: readonly [{
327
+ readonly var: "state.balances";
328
+ }, {
329
+ readonly var: "event.agent";
330
+ }];
331
+ }];
332
+ };
333
+ }];
334
+ }, {
335
+ readonly voters: {
336
+ readonly setKey: readonly [{
337
+ readonly var: "state.votes.voters";
338
+ }, {
339
+ readonly var: "event.agent";
340
+ }, {
341
+ readonly vote: {
342
+ readonly var: "event.vote";
343
+ };
344
+ readonly weight: {
345
+ readonly getKey: readonly [{
346
+ readonly var: "state.balances";
347
+ }, {
348
+ readonly var: "event.agent";
349
+ }];
350
+ };
351
+ readonly votedAt: {
352
+ readonly var: "$timestamp";
353
+ };
354
+ }];
355
+ };
356
+ }];
357
+ };
358
+ }];
359
+ };
360
+ readonly dependencies: readonly [];
361
+ }, {
362
+ readonly from: "VOTING";
363
+ readonly to: "QUEUED";
364
+ readonly eventName: "queue";
365
+ readonly guard: {
366
+ readonly and: readonly [{
367
+ readonly ">": readonly [{
368
+ readonly var: "$timestamp";
369
+ }, {
370
+ readonly var: "state.proposal.votingEndsAt";
371
+ }];
372
+ }, {
373
+ readonly ">": readonly [{
374
+ readonly var: "state.votes.for";
375
+ }, {
376
+ readonly var: "state.votes.against";
377
+ }];
378
+ }, {
379
+ readonly ">=": readonly [{
380
+ readonly "+": readonly [{
381
+ readonly var: "state.votes.for";
382
+ }, {
383
+ readonly var: "state.votes.against";
384
+ }, {
385
+ readonly var: "state.votes.abstain";
386
+ }];
387
+ }, {
388
+ readonly var: "state.quorum";
389
+ }];
390
+ }];
391
+ };
392
+ readonly effect: {
393
+ readonly merge: readonly [{
394
+ readonly var: "state";
395
+ }, {
396
+ readonly proposal: {
397
+ readonly merge: readonly [{
398
+ readonly var: "state.proposal";
399
+ }, {
400
+ readonly queuedAt: {
401
+ readonly var: "$timestamp";
402
+ };
403
+ readonly executableAt: {
404
+ readonly "+": readonly [{
405
+ readonly var: "$timestamp";
406
+ }, {
407
+ readonly var: "state.timelockMs";
408
+ }];
409
+ };
410
+ }];
411
+ };
412
+ }];
413
+ };
414
+ readonly dependencies: readonly [];
415
+ }, {
416
+ readonly from: "QUEUED";
417
+ readonly to: "ACTIVE";
418
+ readonly eventName: "execute";
419
+ readonly guard: {
420
+ readonly ">=": readonly [{
421
+ readonly var: "$timestamp";
422
+ }, {
423
+ readonly var: "state.proposal.executableAt";
424
+ }];
425
+ };
426
+ readonly effect: {
427
+ readonly merge: readonly [{
428
+ readonly var: "state";
429
+ }, {
430
+ readonly executedProposals: {
431
+ readonly cat: readonly [{
432
+ readonly var: "state.executedProposals";
433
+ }, readonly [{
434
+ readonly merge: readonly [{
435
+ readonly var: "state.proposal";
436
+ }, {
437
+ readonly votes: {
438
+ readonly var: "state.votes";
439
+ };
440
+ readonly executedAt: {
441
+ readonly var: "$timestamp";
442
+ };
443
+ }];
444
+ }]];
445
+ };
446
+ readonly proposal: null;
447
+ readonly votes: null;
448
+ }];
449
+ };
450
+ readonly emits: readonly [{
451
+ readonly event: "proposal_executed";
452
+ readonly to: "external";
453
+ }];
454
+ readonly dependencies: readonly [];
455
+ }, {
456
+ readonly from: "VOTING";
457
+ readonly to: "ACTIVE";
458
+ readonly eventName: "reject";
459
+ readonly guard: {
460
+ readonly and: readonly [{
461
+ readonly ">": readonly [{
462
+ readonly var: "$timestamp";
463
+ }, {
464
+ readonly var: "state.proposal.votingEndsAt";
465
+ }];
466
+ }, {
467
+ readonly or: readonly [{
468
+ readonly "<=": readonly [{
469
+ readonly var: "state.votes.for";
470
+ }, {
471
+ readonly var: "state.votes.against";
472
+ }];
473
+ }, {
474
+ readonly "<": readonly [{
475
+ readonly "+": readonly [{
476
+ readonly var: "state.votes.for";
477
+ }, {
478
+ readonly var: "state.votes.against";
479
+ }, {
480
+ readonly var: "state.votes.abstain";
481
+ }];
482
+ }, {
483
+ readonly var: "state.quorum";
484
+ }];
485
+ }];
486
+ }];
487
+ };
488
+ readonly effect: {
489
+ readonly merge: readonly [{
490
+ readonly var: "state";
491
+ }, {
492
+ readonly rejectedProposals: {
493
+ readonly cat: readonly [{
494
+ readonly var: "state.rejectedProposals";
495
+ }, readonly [{
496
+ readonly merge: readonly [{
497
+ readonly var: "state.proposal";
498
+ }, {
499
+ readonly votes: {
500
+ readonly var: "state.votes";
501
+ };
502
+ readonly rejectedAt: {
503
+ readonly var: "$timestamp";
504
+ };
505
+ }];
506
+ }]];
507
+ };
508
+ readonly proposal: null;
509
+ readonly votes: null;
510
+ }];
511
+ };
512
+ readonly dependencies: readonly [];
513
+ }, {
514
+ readonly from: "QUEUED";
515
+ readonly to: "ACTIVE";
516
+ readonly eventName: "cancel";
517
+ readonly guard: {
518
+ readonly "===": readonly [{
519
+ readonly var: "event.agent";
520
+ }, {
521
+ readonly var: "state.proposal.proposer";
522
+ }];
523
+ };
524
+ readonly effect: {
525
+ readonly merge: readonly [{
526
+ readonly var: "state";
527
+ }, {
528
+ readonly cancelledProposals: {
529
+ readonly cat: readonly [{
530
+ readonly var: "state.cancelledProposals";
531
+ }, readonly [{
532
+ readonly merge: readonly [{
533
+ readonly var: "state.proposal";
534
+ }, {
535
+ readonly cancelledAt: {
536
+ readonly var: "$timestamp";
537
+ };
538
+ }];
539
+ }]];
540
+ };
541
+ readonly proposal: null;
542
+ readonly votes: null;
543
+ }];
544
+ };
545
+ readonly dependencies: readonly [];
546
+ }, {
547
+ readonly from: "ACTIVE";
548
+ readonly to: "ACTIVE";
549
+ readonly eventName: "delegate";
550
+ readonly guard: {
551
+ readonly ">": readonly [{
552
+ readonly getKey: readonly [{
553
+ readonly var: "state.balances";
554
+ }, {
555
+ readonly var: "event.agent";
556
+ }];
557
+ }, 0];
558
+ };
559
+ readonly effect: {
560
+ readonly merge: readonly [{
561
+ readonly var: "state";
562
+ }, {
563
+ readonly delegations: {
564
+ readonly setKey: readonly [{
565
+ readonly var: "state.delegations";
566
+ }, {
567
+ readonly var: "event.agent";
568
+ }, {
569
+ readonly var: "event.delegateTo";
570
+ }];
571
+ };
572
+ }];
573
+ };
574
+ readonly dependencies: readonly [];
575
+ }, {
576
+ readonly from: "ACTIVE";
577
+ readonly to: "ACTIVE";
578
+ readonly eventName: "undelegate";
579
+ readonly guard: {
580
+ readonly getKey: readonly [{
581
+ readonly var: "state.delegations";
582
+ }, {
583
+ readonly var: "event.agent";
584
+ }];
585
+ };
586
+ readonly effect: {
587
+ readonly merge: readonly [{
588
+ readonly var: "state";
589
+ }, {
590
+ readonly delegations: {
591
+ readonly deleteKey: readonly [{
592
+ readonly var: "state.delegations";
593
+ }, {
594
+ readonly var: "event.agent";
595
+ }];
596
+ };
597
+ }];
598
+ };
599
+ readonly dependencies: readonly [];
600
+ }];
601
+ };