@ottochain/sdk 2.0.0 → 2.2.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.
- package/dist/cjs/apps/contracts/index.js +1 -1
- package/dist/cjs/apps/contracts/state-machines/contract-agreement.js +272 -0
- package/dist/cjs/apps/contracts/state-machines/contract-escrow.js +284 -0
- package/dist/cjs/apps/contracts/state-machines/contract-universal.js +93 -0
- package/dist/cjs/apps/contracts/state-machines/index.js +177 -1
- package/dist/cjs/apps/corporate/state-machines/corp-board.js +1022 -0
- package/dist/cjs/apps/corporate/state-machines/corp-entity.js +671 -0
- package/dist/cjs/apps/corporate/state-machines/corp-securities.js +998 -0
- package/dist/cjs/apps/corporate/state-machines/corp-shareholders.js +1102 -0
- package/dist/cjs/apps/corporate/state-machines/index.js +20 -4440
- package/dist/cjs/apps/governance/index.js +7 -7
- package/dist/cjs/apps/governance/state-machines/dao-multisig.js +467 -0
- package/dist/cjs/apps/governance/state-machines/dao-reputation.js +458 -0
- package/dist/cjs/apps/governance/state-machines/dao-single.js +199 -0
- package/dist/cjs/apps/governance/state-machines/dao-token.js +503 -0
- package/dist/cjs/apps/governance/state-machines/governance-simple.js +482 -0
- package/dist/cjs/apps/governance/state-machines/governance-universal.js +138 -0
- package/dist/cjs/apps/governance/state-machines/index.js +16 -2934
- package/dist/cjs/apps/identity/constants.js +28 -14
- package/dist/cjs/apps/identity/index.js +27 -12
- package/dist/cjs/apps/identity/state-machines/identity-agent.js +256 -0
- package/dist/cjs/apps/identity/state-machines/identity-oracle.js +321 -0
- package/dist/cjs/apps/identity/state-machines/identity-universal.js +106 -0
- package/dist/cjs/apps/identity/state-machines/index.js +15 -784
- package/dist/cjs/apps/markets/index.js +1 -1
- package/dist/cjs/apps/markets/state-machines/index.js +14 -2298
- package/dist/cjs/apps/markets/state-machines/market-auction.js +283 -0
- package/dist/cjs/apps/markets/state-machines/market-crowdfund.js +312 -0
- package/dist/cjs/apps/markets/state-machines/market-group-buy.js +407 -0
- package/dist/cjs/apps/markets/state-machines/market-prediction.js +485 -0
- package/dist/cjs/apps/markets/state-machines/market-universal.js +129 -0
- package/dist/cjs/apps/oracles/index.js +36 -0
- package/dist/cjs/generated/google/protobuf/struct.js +1 -1
- package/dist/cjs/generated/google/protobuf/timestamp.js +1 -1
- package/dist/cjs/generated/index.js +26 -22
- package/dist/cjs/generated/ottochain/apps/contracts/v1/contract.js +1 -1
- package/dist/cjs/generated/ottochain/apps/corporate/v1/corporate.js +1 -1
- package/dist/cjs/generated/ottochain/apps/governance/v1/governance.js +1 -1
- package/dist/cjs/generated/ottochain/apps/identity/v1/attestation.js +12 -12
- package/dist/cjs/generated/ottochain/apps/identity/v1/identity.js +1688 -0
- package/dist/cjs/generated/ottochain/apps/markets/v1/market.js +1 -1
- package/dist/cjs/generated/ottochain/v1/common.js +1 -1
- package/dist/cjs/generated/ottochain/v1/fiber.js +1 -1
- package/dist/cjs/generated/ottochain/v1/messages.js +1 -1
- package/dist/cjs/generated/ottochain/v1/records.js +1 -1
- package/dist/cjs/schema/fiber-app.js +95 -0
- package/dist/cjs/schema/index.js +20 -0
- package/dist/esm/apps/contracts/index.js +3 -3
- package/dist/esm/apps/contracts/state-machines/contract-agreement.js +269 -0
- package/dist/esm/apps/contracts/state-machines/contract-escrow.js +281 -0
- package/dist/esm/apps/contracts/state-machines/contract-universal.js +90 -0
- package/dist/esm/apps/contracts/state-machines/index.js +177 -1
- package/dist/esm/apps/corporate/index.js +3 -3
- package/dist/esm/apps/corporate/state-machines/corp-board.js +1019 -0
- package/dist/esm/apps/corporate/state-machines/corp-entity.js +668 -0
- package/dist/esm/apps/corporate/state-machines/corp-securities.js +995 -0
- package/dist/esm/apps/corporate/state-machines/corp-shareholders.js +1099 -0
- package/dist/esm/apps/corporate/state-machines/index.js +15 -4439
- package/dist/esm/apps/governance/index.js +9 -9
- package/dist/esm/apps/governance/state-machines/dao-multisig.js +464 -0
- package/dist/esm/apps/governance/state-machines/dao-reputation.js +455 -0
- package/dist/esm/apps/governance/state-machines/dao-single.js +196 -0
- package/dist/esm/apps/governance/state-machines/dao-token.js +500 -0
- package/dist/esm/apps/governance/state-machines/governance-simple.js +479 -0
- package/dist/esm/apps/governance/state-machines/governance-universal.js +135 -0
- package/dist/esm/apps/governance/state-machines/index.js +9 -2933
- package/dist/esm/apps/identity/constants.js +28 -14
- package/dist/esm/apps/identity/index.js +7 -5
- package/dist/esm/apps/identity/state-machines/identity-agent.js +253 -0
- package/dist/esm/apps/identity/state-machines/identity-oracle.js +318 -0
- package/dist/esm/apps/identity/state-machines/identity-universal.js +103 -0
- package/dist/esm/apps/identity/state-machines/index.js +11 -783
- package/dist/esm/apps/index.js +5 -5
- package/dist/esm/apps/markets/index.js +3 -3
- package/dist/esm/apps/markets/state-machines/index.js +8 -2297
- package/dist/esm/apps/markets/state-machines/market-auction.js +280 -0
- package/dist/esm/apps/markets/state-machines/market-crowdfund.js +309 -0
- package/dist/esm/apps/markets/state-machines/market-group-buy.js +404 -0
- package/dist/esm/apps/markets/state-machines/market-prediction.js +482 -0
- package/dist/esm/apps/markets/state-machines/market-universal.js +126 -0
- package/dist/esm/apps/oracles/index.js +21 -0
- package/dist/esm/generated/google/protobuf/struct.js +1 -1
- package/dist/esm/generated/google/protobuf/timestamp.js +1 -1
- package/dist/esm/generated/index.js +8 -4
- package/dist/esm/generated/ottochain/apps/contracts/v1/contract.js +1 -1
- package/dist/esm/generated/ottochain/apps/corporate/v1/corporate.js +1 -1
- package/dist/esm/generated/ottochain/apps/governance/v1/governance.js +1 -1
- package/dist/esm/generated/ottochain/apps/identity/v1/attestation.js +2 -2
- package/dist/esm/generated/ottochain/apps/identity/v1/identity.js +1676 -0
- package/dist/esm/generated/ottochain/apps/markets/v1/market.js +1 -1
- package/dist/esm/generated/ottochain/v1/common.js +1 -1
- package/dist/esm/generated/ottochain/v1/fiber.js +1 -1
- package/dist/esm/generated/ottochain/v1/messages.js +1 -1
- package/dist/esm/generated/ottochain/v1/records.js +1 -1
- package/dist/esm/schema/fiber-app.js +86 -0
- package/dist/esm/schema/index.js +4 -0
- package/dist/types/apps/contracts/index.d.ts +151 -2
- package/dist/types/apps/contracts/state-machines/contract-agreement.d.ts +462 -0
- package/dist/types/apps/contracts/state-machines/contract-escrow.d.ts +511 -0
- package/dist/types/apps/contracts/state-machines/contract-universal.d.ts +147 -0
- package/dist/types/apps/contracts/state-machines/index.d.ts +149 -0
- package/dist/types/apps/corporate/index.d.ts +5263 -3825
- package/dist/types/apps/corporate/state-machines/corp-board.d.ts +1479 -0
- package/dist/types/apps/corporate/state-machines/corp-entity.d.ts +970 -0
- package/dist/types/apps/corporate/state-machines/corp-securities.d.ts +1381 -0
- package/dist/types/apps/corporate/state-machines/corp-shareholders.d.ts +1631 -0
- package/dist/types/apps/corporate/state-machines/index.d.ts +5245 -3802
- package/dist/types/apps/governance/index.d.ts +875 -37
- package/dist/types/apps/governance/state-machines/dao-multisig.d.ts +644 -0
- package/dist/types/apps/governance/state-machines/dao-reputation.d.ts +610 -0
- package/dist/types/apps/governance/state-machines/dao-single.d.ts +276 -0
- package/dist/types/apps/governance/state-machines/dao-token.d.ts +601 -0
- package/dist/types/apps/governance/state-machines/governance-simple.d.ts +652 -0
- package/dist/types/apps/governance/state-machines/governance-universal.d.ts +181 -0
- package/dist/types/apps/governance/state-machines/index.d.ts +9 -2136
- package/dist/types/apps/identity/constants.d.ts +8 -6
- package/dist/types/apps/identity/index.d.ts +1078 -577
- package/dist/types/apps/identity/state-machines/identity-agent.d.ts +401 -0
- package/dist/types/apps/identity/state-machines/identity-oracle.d.ts +550 -0
- package/dist/types/apps/identity/state-machines/identity-universal.d.ts +151 -0
- package/dist/types/apps/identity/state-machines/index.d.ts +1069 -567
- package/dist/types/apps/index.d.ts +5 -5
- package/dist/types/apps/markets/index.d.ts +535 -7
- package/dist/types/apps/markets/state-machines/index.d.ts +8 -1678
- package/dist/types/apps/markets/state-machines/market-auction.d.ts +392 -0
- package/dist/types/apps/markets/state-machines/market-crowdfund.d.ts +443 -0
- package/dist/types/apps/markets/state-machines/market-group-buy.d.ts +539 -0
- package/dist/types/apps/markets/state-machines/market-prediction.d.ts +651 -0
- package/dist/types/apps/markets/state-machines/market-universal.d.ts +191 -0
- package/dist/types/apps/oracles/index.d.ts +18 -0
- package/dist/types/generated/index.d.ts +3 -2
- package/dist/types/generated/ottochain/apps/identity/v1/attestation.d.ts +1 -1
- package/dist/types/generated/ottochain/apps/identity/v1/identity.d.ts +187 -0
- package/dist/types/schema/fiber-app.d.ts +172 -0
- package/dist/types/schema/index.d.ts +4 -0
- package/package.json +1 -1
- package/dist/cjs/generated/ottochain/apps/identity/v1/agent.js +0 -619
- package/dist/cjs/generated/ottochain/apps/oracles/v1/oracle.js +0 -1223
- package/dist/esm/generated/ottochain/apps/identity/v1/agent.js +0 -610
- package/dist/esm/generated/ottochain/apps/oracles/v1/oracle.js +0 -1217
- package/dist/types/generated/ottochain/apps/identity/v1/agent.d.ts +0 -94
- package/dist/types/generated/ottochain/apps/oracles/v1/oracle.d.ts +0 -150
|
@@ -0,0 +1,652 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simple org governance: manage members, update rules, resolve disputes.
|
|
3
|
+
*/
|
|
4
|
+
export declare const govSimpleDef: {
|
|
5
|
+
readonly metadata: {
|
|
6
|
+
readonly name: "Governance";
|
|
7
|
+
readonly app: "governance";
|
|
8
|
+
readonly type: "simple";
|
|
9
|
+
readonly version: "1.0.0";
|
|
10
|
+
readonly description: "Simple org governance: manage members, update rules, resolve disputes";
|
|
11
|
+
};
|
|
12
|
+
readonly createSchema: {
|
|
13
|
+
readonly required: readonly ["admins", "passingThreshold", "disputeQuorum", "votingPeriodMs"];
|
|
14
|
+
readonly properties: {
|
|
15
|
+
readonly admins: {
|
|
16
|
+
readonly type: "array";
|
|
17
|
+
readonly description: "Initial admin addresses";
|
|
18
|
+
readonly immutable: false;
|
|
19
|
+
};
|
|
20
|
+
readonly passingThreshold: {
|
|
21
|
+
readonly type: "number";
|
|
22
|
+
readonly description: "Fraction of members required to pass (0-1)";
|
|
23
|
+
};
|
|
24
|
+
readonly disputeQuorum: {
|
|
25
|
+
readonly type: "number";
|
|
26
|
+
readonly description: "Min votes to resolve a dispute";
|
|
27
|
+
};
|
|
28
|
+
readonly votingPeriodMs: {
|
|
29
|
+
readonly type: "number";
|
|
30
|
+
readonly description: "Voting window in milliseconds";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
readonly stateSchema: {
|
|
35
|
+
readonly properties: {
|
|
36
|
+
readonly admins: {
|
|
37
|
+
readonly type: "array";
|
|
38
|
+
readonly immutable: false;
|
|
39
|
+
};
|
|
40
|
+
readonly members: {
|
|
41
|
+
readonly type: "object";
|
|
42
|
+
readonly computed: true;
|
|
43
|
+
};
|
|
44
|
+
readonly rules: {
|
|
45
|
+
readonly type: "object";
|
|
46
|
+
readonly computed: true;
|
|
47
|
+
};
|
|
48
|
+
readonly history: {
|
|
49
|
+
readonly type: "array";
|
|
50
|
+
readonly computed: true;
|
|
51
|
+
};
|
|
52
|
+
readonly proposal: {
|
|
53
|
+
readonly type: "object";
|
|
54
|
+
};
|
|
55
|
+
readonly votes: {
|
|
56
|
+
readonly type: "object";
|
|
57
|
+
readonly computed: true;
|
|
58
|
+
};
|
|
59
|
+
readonly dispute: {
|
|
60
|
+
readonly type: "object";
|
|
61
|
+
};
|
|
62
|
+
readonly passingThreshold: {
|
|
63
|
+
readonly type: "number";
|
|
64
|
+
};
|
|
65
|
+
readonly disputeQuorum: {
|
|
66
|
+
readonly type: "number";
|
|
67
|
+
};
|
|
68
|
+
readonly votingPeriodMs: {
|
|
69
|
+
readonly type: "number";
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
readonly eventSchemas: {
|
|
74
|
+
readonly add_member: {
|
|
75
|
+
readonly description: "Add a member (admin only)";
|
|
76
|
+
readonly required: readonly ["member", "role"];
|
|
77
|
+
readonly properties: {
|
|
78
|
+
readonly agent: {
|
|
79
|
+
readonly type: "address";
|
|
80
|
+
};
|
|
81
|
+
readonly member: {
|
|
82
|
+
readonly type: "address";
|
|
83
|
+
};
|
|
84
|
+
readonly role: {
|
|
85
|
+
readonly type: "string";
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
readonly remove_member: {
|
|
90
|
+
readonly description: "Remove a member (admin only)";
|
|
91
|
+
readonly required: readonly ["member"];
|
|
92
|
+
readonly properties: {
|
|
93
|
+
readonly agent: {
|
|
94
|
+
readonly type: "address";
|
|
95
|
+
};
|
|
96
|
+
readonly member: {
|
|
97
|
+
readonly type: "address";
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
readonly propose: {
|
|
102
|
+
readonly description: "Submit a rule change proposal";
|
|
103
|
+
readonly required: readonly ["proposalId", "type", "changes"];
|
|
104
|
+
readonly properties: {
|
|
105
|
+
readonly agent: {
|
|
106
|
+
readonly type: "address";
|
|
107
|
+
};
|
|
108
|
+
readonly proposalId: {
|
|
109
|
+
readonly type: "string";
|
|
110
|
+
};
|
|
111
|
+
readonly type: {
|
|
112
|
+
readonly type: "string";
|
|
113
|
+
};
|
|
114
|
+
readonly changes: {
|
|
115
|
+
readonly type: "object";
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
readonly vote: {
|
|
120
|
+
readonly description: "Cast a vote on the active proposal or dispute";
|
|
121
|
+
readonly required: readonly ["vote"];
|
|
122
|
+
readonly properties: {
|
|
123
|
+
readonly agent: {
|
|
124
|
+
readonly type: "address";
|
|
125
|
+
};
|
|
126
|
+
readonly vote: {
|
|
127
|
+
readonly type: "string";
|
|
128
|
+
};
|
|
129
|
+
readonly ruling: {
|
|
130
|
+
readonly type: "string";
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
readonly finalize: {
|
|
135
|
+
readonly description: "Finalize the voting period";
|
|
136
|
+
readonly required: readonly ["forCount"];
|
|
137
|
+
readonly properties: {
|
|
138
|
+
readonly forCount: {
|
|
139
|
+
readonly type: "number";
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
readonly file_dispute: {
|
|
144
|
+
readonly description: "File a dispute against a member";
|
|
145
|
+
readonly required: readonly ["disputeId", "defendant", "claim"];
|
|
146
|
+
readonly properties: {
|
|
147
|
+
readonly agent: {
|
|
148
|
+
readonly type: "address";
|
|
149
|
+
};
|
|
150
|
+
readonly disputeId: {
|
|
151
|
+
readonly type: "string";
|
|
152
|
+
};
|
|
153
|
+
readonly defendant: {
|
|
154
|
+
readonly type: "address";
|
|
155
|
+
};
|
|
156
|
+
readonly claim: {
|
|
157
|
+
readonly type: "string";
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
readonly submit_evidence: {
|
|
162
|
+
readonly description: "Submit evidence in a dispute";
|
|
163
|
+
readonly required: readonly ["content"];
|
|
164
|
+
readonly properties: {
|
|
165
|
+
readonly agent: {
|
|
166
|
+
readonly type: "address";
|
|
167
|
+
};
|
|
168
|
+
readonly content: {
|
|
169
|
+
readonly type: "string";
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
readonly resolve: {
|
|
174
|
+
readonly description: "Resolve the active dispute";
|
|
175
|
+
readonly required: readonly ["ruling", "remedy"];
|
|
176
|
+
readonly properties: {
|
|
177
|
+
readonly ruling: {
|
|
178
|
+
readonly type: "string";
|
|
179
|
+
};
|
|
180
|
+
readonly remedy: {
|
|
181
|
+
readonly type: "string";
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
readonly dissolve: {
|
|
186
|
+
readonly description: "Dissolve the organization (requires 90% approval)";
|
|
187
|
+
readonly required: readonly ["approvalCount"];
|
|
188
|
+
readonly properties: {
|
|
189
|
+
readonly approvalCount: {
|
|
190
|
+
readonly type: "number";
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
readonly states: {
|
|
196
|
+
readonly ACTIVE: {
|
|
197
|
+
readonly id: "ACTIVE";
|
|
198
|
+
readonly isFinal: false;
|
|
199
|
+
readonly metadata: null;
|
|
200
|
+
};
|
|
201
|
+
readonly VOTING: {
|
|
202
|
+
readonly id: "VOTING";
|
|
203
|
+
readonly isFinal: false;
|
|
204
|
+
readonly metadata: null;
|
|
205
|
+
};
|
|
206
|
+
readonly DISPUTE: {
|
|
207
|
+
readonly id: "DISPUTE";
|
|
208
|
+
readonly isFinal: false;
|
|
209
|
+
readonly metadata: null;
|
|
210
|
+
};
|
|
211
|
+
readonly DISSOLVED: {
|
|
212
|
+
readonly id: "DISSOLVED";
|
|
213
|
+
readonly isFinal: true;
|
|
214
|
+
readonly metadata: null;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
readonly initialState: "ACTIVE";
|
|
218
|
+
readonly transitions: readonly [{
|
|
219
|
+
readonly from: "ACTIVE";
|
|
220
|
+
readonly to: "ACTIVE";
|
|
221
|
+
readonly eventName: "add_member";
|
|
222
|
+
readonly guard: {
|
|
223
|
+
readonly in: readonly [{
|
|
224
|
+
readonly var: "event.agent";
|
|
225
|
+
}, {
|
|
226
|
+
readonly var: "state.admins";
|
|
227
|
+
}];
|
|
228
|
+
};
|
|
229
|
+
readonly effect: {
|
|
230
|
+
readonly merge: readonly [{
|
|
231
|
+
readonly var: "state";
|
|
232
|
+
}, {
|
|
233
|
+
readonly members: {
|
|
234
|
+
readonly setKey: readonly [{
|
|
235
|
+
readonly var: "state.members";
|
|
236
|
+
}, {
|
|
237
|
+
readonly var: "event.member";
|
|
238
|
+
}, {
|
|
239
|
+
readonly role: {
|
|
240
|
+
readonly var: "event.role";
|
|
241
|
+
};
|
|
242
|
+
readonly addedAt: {
|
|
243
|
+
readonly var: "$timestamp";
|
|
244
|
+
};
|
|
245
|
+
}];
|
|
246
|
+
};
|
|
247
|
+
}];
|
|
248
|
+
};
|
|
249
|
+
readonly dependencies: readonly [];
|
|
250
|
+
}, {
|
|
251
|
+
readonly from: "ACTIVE";
|
|
252
|
+
readonly to: "ACTIVE";
|
|
253
|
+
readonly eventName: "remove_member";
|
|
254
|
+
readonly guard: {
|
|
255
|
+
readonly in: readonly [{
|
|
256
|
+
readonly var: "event.agent";
|
|
257
|
+
}, {
|
|
258
|
+
readonly var: "state.admins";
|
|
259
|
+
}];
|
|
260
|
+
};
|
|
261
|
+
readonly effect: {
|
|
262
|
+
readonly merge: readonly [{
|
|
263
|
+
readonly var: "state";
|
|
264
|
+
}, {
|
|
265
|
+
readonly members: {
|
|
266
|
+
readonly deleteKey: readonly [{
|
|
267
|
+
readonly var: "state.members";
|
|
268
|
+
}, {
|
|
269
|
+
readonly var: "event.member";
|
|
270
|
+
}];
|
|
271
|
+
};
|
|
272
|
+
}];
|
|
273
|
+
};
|
|
274
|
+
readonly dependencies: readonly [];
|
|
275
|
+
}, {
|
|
276
|
+
readonly from: "ACTIVE";
|
|
277
|
+
readonly to: "VOTING";
|
|
278
|
+
readonly eventName: "propose";
|
|
279
|
+
readonly guard: {
|
|
280
|
+
readonly getKey: readonly [{
|
|
281
|
+
readonly var: "state.members";
|
|
282
|
+
}, {
|
|
283
|
+
readonly var: "event.agent";
|
|
284
|
+
}];
|
|
285
|
+
};
|
|
286
|
+
readonly effect: {
|
|
287
|
+
readonly merge: readonly [{
|
|
288
|
+
readonly var: "state";
|
|
289
|
+
}, {
|
|
290
|
+
readonly proposal: {
|
|
291
|
+
readonly id: {
|
|
292
|
+
readonly var: "event.proposalId";
|
|
293
|
+
};
|
|
294
|
+
readonly type: {
|
|
295
|
+
readonly var: "event.type";
|
|
296
|
+
};
|
|
297
|
+
readonly changes: {
|
|
298
|
+
readonly var: "event.changes";
|
|
299
|
+
};
|
|
300
|
+
readonly proposer: {
|
|
301
|
+
readonly var: "event.agent";
|
|
302
|
+
};
|
|
303
|
+
readonly proposedAt: {
|
|
304
|
+
readonly var: "$timestamp";
|
|
305
|
+
};
|
|
306
|
+
readonly deadline: {
|
|
307
|
+
readonly "+": readonly [{
|
|
308
|
+
readonly var: "$timestamp";
|
|
309
|
+
}, {
|
|
310
|
+
readonly var: "state.votingPeriodMs";
|
|
311
|
+
}];
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
readonly votes: {};
|
|
315
|
+
}];
|
|
316
|
+
};
|
|
317
|
+
readonly dependencies: readonly [];
|
|
318
|
+
}, {
|
|
319
|
+
readonly from: "VOTING";
|
|
320
|
+
readonly to: "VOTING";
|
|
321
|
+
readonly eventName: "vote";
|
|
322
|
+
readonly guard: {
|
|
323
|
+
readonly and: readonly [{
|
|
324
|
+
readonly getKey: readonly [{
|
|
325
|
+
readonly var: "state.members";
|
|
326
|
+
}, {
|
|
327
|
+
readonly var: "event.agent";
|
|
328
|
+
}];
|
|
329
|
+
}, {
|
|
330
|
+
readonly "!": readonly [{
|
|
331
|
+
readonly getKey: readonly [{
|
|
332
|
+
readonly var: "state.votes";
|
|
333
|
+
}, {
|
|
334
|
+
readonly var: "event.agent";
|
|
335
|
+
}];
|
|
336
|
+
}];
|
|
337
|
+
}];
|
|
338
|
+
};
|
|
339
|
+
readonly effect: {
|
|
340
|
+
readonly merge: readonly [{
|
|
341
|
+
readonly var: "state";
|
|
342
|
+
}, {
|
|
343
|
+
readonly votes: {
|
|
344
|
+
readonly setKey: readonly [{
|
|
345
|
+
readonly var: "state.votes";
|
|
346
|
+
}, {
|
|
347
|
+
readonly var: "event.agent";
|
|
348
|
+
}, {
|
|
349
|
+
readonly vote: {
|
|
350
|
+
readonly var: "event.vote";
|
|
351
|
+
};
|
|
352
|
+
readonly votedAt: {
|
|
353
|
+
readonly var: "$timestamp";
|
|
354
|
+
};
|
|
355
|
+
}];
|
|
356
|
+
};
|
|
357
|
+
}];
|
|
358
|
+
};
|
|
359
|
+
readonly dependencies: readonly [];
|
|
360
|
+
}, {
|
|
361
|
+
readonly from: "VOTING";
|
|
362
|
+
readonly to: "ACTIVE";
|
|
363
|
+
readonly eventName: "finalize";
|
|
364
|
+
readonly guard: {
|
|
365
|
+
readonly ">=": readonly [{
|
|
366
|
+
readonly var: "event.forCount";
|
|
367
|
+
}, {
|
|
368
|
+
readonly "*": readonly [{
|
|
369
|
+
readonly size: {
|
|
370
|
+
readonly var: "state.members";
|
|
371
|
+
};
|
|
372
|
+
}, {
|
|
373
|
+
readonly var: "state.passingThreshold";
|
|
374
|
+
}];
|
|
375
|
+
}];
|
|
376
|
+
};
|
|
377
|
+
readonly effect: {
|
|
378
|
+
readonly merge: readonly [{
|
|
379
|
+
readonly var: "state";
|
|
380
|
+
}, {
|
|
381
|
+
readonly rules: {
|
|
382
|
+
readonly merge: readonly [{
|
|
383
|
+
readonly var: "state.rules";
|
|
384
|
+
}, {
|
|
385
|
+
readonly var: "state.proposal.changes";
|
|
386
|
+
}];
|
|
387
|
+
};
|
|
388
|
+
readonly history: {
|
|
389
|
+
readonly cat: readonly [{
|
|
390
|
+
readonly var: "state.history";
|
|
391
|
+
}, readonly [{
|
|
392
|
+
readonly type: "rule_change";
|
|
393
|
+
readonly proposal: {
|
|
394
|
+
readonly var: "state.proposal";
|
|
395
|
+
};
|
|
396
|
+
readonly outcome: "passed";
|
|
397
|
+
readonly finalizedAt: {
|
|
398
|
+
readonly var: "$timestamp";
|
|
399
|
+
};
|
|
400
|
+
}]];
|
|
401
|
+
};
|
|
402
|
+
readonly proposal: null;
|
|
403
|
+
readonly votes: {};
|
|
404
|
+
}];
|
|
405
|
+
};
|
|
406
|
+
readonly dependencies: readonly [];
|
|
407
|
+
}, {
|
|
408
|
+
readonly from: "VOTING";
|
|
409
|
+
readonly to: "ACTIVE";
|
|
410
|
+
readonly eventName: "finalize";
|
|
411
|
+
readonly guard: {
|
|
412
|
+
readonly "<": readonly [{
|
|
413
|
+
readonly var: "event.forCount";
|
|
414
|
+
}, {
|
|
415
|
+
readonly "*": readonly [{
|
|
416
|
+
readonly size: {
|
|
417
|
+
readonly var: "state.members";
|
|
418
|
+
};
|
|
419
|
+
}, {
|
|
420
|
+
readonly var: "state.passingThreshold";
|
|
421
|
+
}];
|
|
422
|
+
}];
|
|
423
|
+
};
|
|
424
|
+
readonly effect: {
|
|
425
|
+
readonly merge: readonly [{
|
|
426
|
+
readonly var: "state";
|
|
427
|
+
}, {
|
|
428
|
+
readonly history: {
|
|
429
|
+
readonly cat: readonly [{
|
|
430
|
+
readonly var: "state.history";
|
|
431
|
+
}, readonly [{
|
|
432
|
+
readonly type: "rule_change";
|
|
433
|
+
readonly proposal: {
|
|
434
|
+
readonly var: "state.proposal";
|
|
435
|
+
};
|
|
436
|
+
readonly outcome: "failed";
|
|
437
|
+
readonly finalizedAt: {
|
|
438
|
+
readonly var: "$timestamp";
|
|
439
|
+
};
|
|
440
|
+
}]];
|
|
441
|
+
};
|
|
442
|
+
readonly proposal: null;
|
|
443
|
+
readonly votes: {};
|
|
444
|
+
}];
|
|
445
|
+
};
|
|
446
|
+
readonly dependencies: readonly [];
|
|
447
|
+
}, {
|
|
448
|
+
readonly from: "ACTIVE";
|
|
449
|
+
readonly to: "DISPUTE";
|
|
450
|
+
readonly eventName: "file_dispute";
|
|
451
|
+
readonly guard: {
|
|
452
|
+
readonly getKey: readonly [{
|
|
453
|
+
readonly var: "state.members";
|
|
454
|
+
}, {
|
|
455
|
+
readonly var: "event.agent";
|
|
456
|
+
}];
|
|
457
|
+
};
|
|
458
|
+
readonly effect: {
|
|
459
|
+
readonly merge: readonly [{
|
|
460
|
+
readonly var: "state";
|
|
461
|
+
}, {
|
|
462
|
+
readonly dispute: {
|
|
463
|
+
readonly id: {
|
|
464
|
+
readonly var: "event.disputeId";
|
|
465
|
+
};
|
|
466
|
+
readonly plaintiff: {
|
|
467
|
+
readonly var: "event.agent";
|
|
468
|
+
};
|
|
469
|
+
readonly defendant: {
|
|
470
|
+
readonly var: "event.defendant";
|
|
471
|
+
};
|
|
472
|
+
readonly claim: {
|
|
473
|
+
readonly var: "event.claim";
|
|
474
|
+
};
|
|
475
|
+
readonly filedAt: {
|
|
476
|
+
readonly var: "$timestamp";
|
|
477
|
+
};
|
|
478
|
+
readonly evidence: readonly [];
|
|
479
|
+
};
|
|
480
|
+
readonly votes: {};
|
|
481
|
+
}];
|
|
482
|
+
};
|
|
483
|
+
readonly dependencies: readonly [];
|
|
484
|
+
}, {
|
|
485
|
+
readonly from: "DISPUTE";
|
|
486
|
+
readonly to: "DISPUTE";
|
|
487
|
+
readonly eventName: "submit_evidence";
|
|
488
|
+
readonly guard: {
|
|
489
|
+
readonly or: readonly [{
|
|
490
|
+
readonly "===": readonly [{
|
|
491
|
+
readonly var: "event.agent";
|
|
492
|
+
}, {
|
|
493
|
+
readonly var: "state.dispute.plaintiff";
|
|
494
|
+
}];
|
|
495
|
+
}, {
|
|
496
|
+
readonly "===": readonly [{
|
|
497
|
+
readonly var: "event.agent";
|
|
498
|
+
}, {
|
|
499
|
+
readonly var: "state.dispute.defendant";
|
|
500
|
+
}];
|
|
501
|
+
}];
|
|
502
|
+
};
|
|
503
|
+
readonly effect: {
|
|
504
|
+
readonly merge: readonly [{
|
|
505
|
+
readonly var: "state";
|
|
506
|
+
}, {
|
|
507
|
+
readonly dispute: {
|
|
508
|
+
readonly merge: readonly [{
|
|
509
|
+
readonly var: "state.dispute";
|
|
510
|
+
}, {
|
|
511
|
+
readonly evidence: {
|
|
512
|
+
readonly cat: readonly [{
|
|
513
|
+
readonly var: "state.dispute.evidence";
|
|
514
|
+
}, readonly [{
|
|
515
|
+
readonly from: {
|
|
516
|
+
readonly var: "event.agent";
|
|
517
|
+
};
|
|
518
|
+
readonly content: {
|
|
519
|
+
readonly var: "event.content";
|
|
520
|
+
};
|
|
521
|
+
readonly at: {
|
|
522
|
+
readonly var: "$timestamp";
|
|
523
|
+
};
|
|
524
|
+
}]];
|
|
525
|
+
};
|
|
526
|
+
}];
|
|
527
|
+
};
|
|
528
|
+
}];
|
|
529
|
+
};
|
|
530
|
+
readonly dependencies: readonly [];
|
|
531
|
+
}, {
|
|
532
|
+
readonly from: "DISPUTE";
|
|
533
|
+
readonly to: "DISPUTE";
|
|
534
|
+
readonly eventName: "vote";
|
|
535
|
+
readonly guard: {
|
|
536
|
+
readonly and: readonly [{
|
|
537
|
+
readonly getKey: readonly [{
|
|
538
|
+
readonly var: "state.members";
|
|
539
|
+
}, {
|
|
540
|
+
readonly var: "event.agent";
|
|
541
|
+
}];
|
|
542
|
+
}, {
|
|
543
|
+
readonly "!==": readonly [{
|
|
544
|
+
readonly var: "event.agent";
|
|
545
|
+
}, {
|
|
546
|
+
readonly var: "state.dispute.plaintiff";
|
|
547
|
+
}];
|
|
548
|
+
}, {
|
|
549
|
+
readonly "!==": readonly [{
|
|
550
|
+
readonly var: "event.agent";
|
|
551
|
+
}, {
|
|
552
|
+
readonly var: "state.dispute.defendant";
|
|
553
|
+
}];
|
|
554
|
+
}, {
|
|
555
|
+
readonly "!": readonly [{
|
|
556
|
+
readonly getKey: readonly [{
|
|
557
|
+
readonly var: "state.votes";
|
|
558
|
+
}, {
|
|
559
|
+
readonly var: "event.agent";
|
|
560
|
+
}];
|
|
561
|
+
}];
|
|
562
|
+
}];
|
|
563
|
+
};
|
|
564
|
+
readonly effect: {
|
|
565
|
+
readonly merge: readonly [{
|
|
566
|
+
readonly var: "state";
|
|
567
|
+
}, {
|
|
568
|
+
readonly votes: {
|
|
569
|
+
readonly setKey: readonly [{
|
|
570
|
+
readonly var: "state.votes";
|
|
571
|
+
}, {
|
|
572
|
+
readonly var: "event.agent";
|
|
573
|
+
}, {
|
|
574
|
+
readonly ruling: {
|
|
575
|
+
readonly var: "event.ruling";
|
|
576
|
+
};
|
|
577
|
+
readonly votedAt: {
|
|
578
|
+
readonly var: "$timestamp";
|
|
579
|
+
};
|
|
580
|
+
}];
|
|
581
|
+
};
|
|
582
|
+
}];
|
|
583
|
+
};
|
|
584
|
+
readonly dependencies: readonly [];
|
|
585
|
+
}, {
|
|
586
|
+
readonly from: "DISPUTE";
|
|
587
|
+
readonly to: "ACTIVE";
|
|
588
|
+
readonly eventName: "resolve";
|
|
589
|
+
readonly guard: {
|
|
590
|
+
readonly ">=": readonly [{
|
|
591
|
+
readonly size: {
|
|
592
|
+
readonly var: "state.votes";
|
|
593
|
+
};
|
|
594
|
+
}, {
|
|
595
|
+
readonly var: "state.disputeQuorum";
|
|
596
|
+
}];
|
|
597
|
+
};
|
|
598
|
+
readonly effect: {
|
|
599
|
+
readonly merge: readonly [{
|
|
600
|
+
readonly var: "state";
|
|
601
|
+
}, {
|
|
602
|
+
readonly history: {
|
|
603
|
+
readonly cat: readonly [{
|
|
604
|
+
readonly var: "state.history";
|
|
605
|
+
}, readonly [{
|
|
606
|
+
readonly type: "dispute";
|
|
607
|
+
readonly dispute: {
|
|
608
|
+
readonly var: "state.dispute";
|
|
609
|
+
};
|
|
610
|
+
readonly ruling: {
|
|
611
|
+
readonly var: "event.ruling";
|
|
612
|
+
};
|
|
613
|
+
readonly remedy: {
|
|
614
|
+
readonly var: "event.remedy";
|
|
615
|
+
};
|
|
616
|
+
readonly resolvedAt: {
|
|
617
|
+
readonly var: "$timestamp";
|
|
618
|
+
};
|
|
619
|
+
}]];
|
|
620
|
+
};
|
|
621
|
+
readonly dispute: null;
|
|
622
|
+
readonly votes: {};
|
|
623
|
+
}];
|
|
624
|
+
};
|
|
625
|
+
readonly dependencies: readonly [];
|
|
626
|
+
}, {
|
|
627
|
+
readonly from: "ACTIVE";
|
|
628
|
+
readonly to: "DISSOLVED";
|
|
629
|
+
readonly eventName: "dissolve";
|
|
630
|
+
readonly guard: {
|
|
631
|
+
readonly ">=": readonly [{
|
|
632
|
+
readonly var: "event.approvalCount";
|
|
633
|
+
}, {
|
|
634
|
+
readonly "*": readonly [{
|
|
635
|
+
readonly size: {
|
|
636
|
+
readonly var: "state.members";
|
|
637
|
+
};
|
|
638
|
+
}, 0.9];
|
|
639
|
+
}];
|
|
640
|
+
};
|
|
641
|
+
readonly effect: {
|
|
642
|
+
readonly merge: readonly [{
|
|
643
|
+
readonly var: "state";
|
|
644
|
+
}, {
|
|
645
|
+
readonly dissolvedAt: {
|
|
646
|
+
readonly var: "$timestamp";
|
|
647
|
+
};
|
|
648
|
+
}];
|
|
649
|
+
};
|
|
650
|
+
readonly dependencies: readonly [];
|
|
651
|
+
}];
|
|
652
|
+
};
|