@ottochain/sdk 1.5.0 → 1.6.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 +6 -10
- package/dist/cjs/apps/{governance/state-machines/governance-legislature.json → contracts/state-machines/index.js} +381 -330
- package/dist/cjs/apps/corporate/index.js +12 -24
- package/dist/cjs/apps/corporate/state-machines/index.js +10246 -0
- package/dist/cjs/apps/governance/index.js +11 -22
- package/dist/cjs/apps/governance/state-machines/index.js +4755 -0
- package/dist/cjs/apps/identity/index.js +3 -6
- package/dist/{esm/apps/identity/state-machines/agent-identity.json → cjs/apps/identity/state-machines/index.js} +9 -2
- package/dist/cjs/apps/markets/index.js +2 -5
- package/dist/{esm/apps/markets/state-machines/market-universal.json → cjs/apps/markets/state-machines/index.js} +9 -2
- package/dist/cjs/apps/oracles/index.js +2 -5
- package/dist/{esm/apps/oracles/state-machines/oracle.json → cjs/apps/oracles/state-machines/index.js} +9 -2
- package/dist/cjs/ottochain/index.js +4 -1
- package/dist/cjs/ottochain/normalize.js +17 -3
- package/dist/cjs/ottochain/types.js +12 -0
- package/dist/esm/apps/contracts/index.js +2 -3
- package/dist/esm/apps/{governance/state-machines/governance-legislature.json → contracts/state-machines/index.js} +378 -330
- package/dist/esm/apps/corporate/index.js +2 -11
- package/dist/esm/apps/corporate/state-machines/index.js +10243 -0
- package/dist/esm/apps/governance/index.js +2 -10
- package/dist/esm/apps/governance/state-machines/index.js +4752 -0
- package/dist/esm/apps/identity/index.js +2 -2
- package/dist/{cjs/apps/identity/state-machines/agent-identity.json → esm/apps/identity/state-machines/index.js} +6 -2
- package/dist/esm/apps/markets/index.js +1 -1
- package/dist/{cjs/apps/markets/state-machines/market-universal.json → esm/apps/markets/state-machines/index.js} +6 -2
- package/dist/esm/apps/oracles/index.js +1 -1
- package/dist/{cjs/apps/oracles/state-machines/oracle.json → esm/apps/oracles/state-machines/index.js} +6 -2
- package/dist/esm/ottochain/index.js +2 -0
- package/dist/esm/ottochain/normalize.js +17 -3
- package/dist/esm/ottochain/types.js +11 -1
- package/dist/types/apps/contracts/state-machines/index.d.ts +549 -0
- package/dist/types/apps/corporate/state-machines/index.d.ts +9121 -0
- package/dist/types/apps/governance/state-machines/index.d.ts +3551 -0
- package/dist/types/apps/identity/state-machines/index.d.ts +206 -0
- package/dist/types/apps/markets/state-machines/index.d.ts +448 -0
- package/dist/types/apps/oracles/state-machines/index.d.ts +312 -0
- package/dist/types/ottochain/index.d.ts +2 -1
- package/dist/types/ottochain/normalize.d.ts +14 -0
- package/dist/types/ottochain/types.d.ts +9 -0
- package/package.json +4 -3
- package/dist/cjs/apps/contracts/state-machines/contract.json +0 -352
- package/dist/cjs/apps/contracts/state-machines/escrow.json +0 -354
- package/dist/cjs/apps/corporate/state-machines/corporate-board.json +0 -1064
- package/dist/cjs/apps/corporate/state-machines/corporate-bylaws.json +0 -751
- package/dist/cjs/apps/corporate/state-machines/corporate-committee.json +0 -957
- package/dist/cjs/apps/corporate/state-machines/corporate-compliance.json +0 -1293
- package/dist/cjs/apps/corporate/state-machines/corporate-entity.json +0 -861
- package/dist/cjs/apps/corporate/state-machines/corporate-officers.json +0 -843
- package/dist/cjs/apps/corporate/state-machines/corporate-proxy.json +0 -783
- package/dist/cjs/apps/corporate/state-machines/corporate-resolution.json +0 -1174
- package/dist/cjs/apps/corporate/state-machines/corporate-securities.json +0 -1215
- package/dist/cjs/apps/corporate/state-machines/corporate-shareholders.json +0 -1298
- package/dist/cjs/apps/governance/state-machines/dao-multisig.json +0 -667
- package/dist/cjs/apps/governance/state-machines/dao-single.json +0 -230
- package/dist/cjs/apps/governance/state-machines/dao-threshold.json +0 -624
- package/dist/cjs/apps/governance/state-machines/dao-token.json +0 -638
- package/dist/cjs/apps/governance/state-machines/governance-constitution.json +0 -357
- package/dist/cjs/apps/governance/state-machines/governance-executive.json +0 -387
- package/dist/cjs/apps/governance/state-machines/governance-judiciary.json +0 -558
- package/dist/cjs/apps/governance/state-machines/governance-simple.json +0 -625
- package/dist/esm/apps/contracts/state-machines/contract.json +0 -352
- package/dist/esm/apps/contracts/state-machines/escrow.json +0 -354
- package/dist/esm/apps/corporate/state-machines/corporate-board.json +0 -1064
- package/dist/esm/apps/corporate/state-machines/corporate-bylaws.json +0 -751
- package/dist/esm/apps/corporate/state-machines/corporate-committee.json +0 -957
- package/dist/esm/apps/corporate/state-machines/corporate-compliance.json +0 -1293
- package/dist/esm/apps/corporate/state-machines/corporate-entity.json +0 -861
- package/dist/esm/apps/corporate/state-machines/corporate-officers.json +0 -843
- package/dist/esm/apps/corporate/state-machines/corporate-proxy.json +0 -783
- package/dist/esm/apps/corporate/state-machines/corporate-resolution.json +0 -1174
- package/dist/esm/apps/corporate/state-machines/corporate-securities.json +0 -1215
- package/dist/esm/apps/corporate/state-machines/corporate-shareholders.json +0 -1298
- package/dist/esm/apps/governance/state-machines/dao-multisig.json +0 -667
- package/dist/esm/apps/governance/state-machines/dao-single.json +0 -230
- package/dist/esm/apps/governance/state-machines/dao-threshold.json +0 -624
- package/dist/esm/apps/governance/state-machines/dao-token.json +0 -638
- package/dist/esm/apps/governance/state-machines/governance-constitution.json +0 -357
- package/dist/esm/apps/governance/state-machines/governance-executive.json +0 -387
- package/dist/esm/apps/governance/state-machines/governance-judiciary.json +0 -558
- package/dist/esm/apps/governance/state-machines/governance-simple.json +0 -625
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-generated from JSON state machine definitions.
|
|
3
|
+
* DO NOT EDIT - regenerate with: npm run prebuild
|
|
4
|
+
*/
|
|
5
|
+
export declare const agentIdentityDef: {
|
|
6
|
+
readonly metadata: {
|
|
7
|
+
readonly name: "AgentIdentity";
|
|
8
|
+
readonly description: "Decentralized agent identity with reputation tracking and lifecycle management";
|
|
9
|
+
readonly version: "1.0.0";
|
|
10
|
+
};
|
|
11
|
+
readonly states: {
|
|
12
|
+
readonly REGISTERED: {
|
|
13
|
+
readonly id: "REGISTERED";
|
|
14
|
+
readonly isFinal: false;
|
|
15
|
+
readonly metadata: null;
|
|
16
|
+
};
|
|
17
|
+
readonly ACTIVE: {
|
|
18
|
+
readonly id: "ACTIVE";
|
|
19
|
+
readonly isFinal: false;
|
|
20
|
+
readonly metadata: null;
|
|
21
|
+
};
|
|
22
|
+
readonly CHALLENGED: {
|
|
23
|
+
readonly id: "CHALLENGED";
|
|
24
|
+
readonly isFinal: false;
|
|
25
|
+
readonly metadata: null;
|
|
26
|
+
};
|
|
27
|
+
readonly SUSPENDED: {
|
|
28
|
+
readonly id: "SUSPENDED";
|
|
29
|
+
readonly isFinal: false;
|
|
30
|
+
readonly metadata: null;
|
|
31
|
+
};
|
|
32
|
+
readonly PROBATION: {
|
|
33
|
+
readonly id: "PROBATION";
|
|
34
|
+
readonly isFinal: false;
|
|
35
|
+
readonly metadata: null;
|
|
36
|
+
};
|
|
37
|
+
readonly WITHDRAWN: {
|
|
38
|
+
readonly id: "WITHDRAWN";
|
|
39
|
+
readonly isFinal: true;
|
|
40
|
+
readonly metadata: null;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
readonly initialState: "REGISTERED";
|
|
44
|
+
readonly transitions: readonly [{
|
|
45
|
+
readonly from: "REGISTERED";
|
|
46
|
+
readonly to: "ACTIVE";
|
|
47
|
+
readonly eventName: "activate";
|
|
48
|
+
readonly guard: {
|
|
49
|
+
readonly "==": readonly [1, 1];
|
|
50
|
+
};
|
|
51
|
+
readonly effect: {
|
|
52
|
+
readonly merge: readonly [{
|
|
53
|
+
readonly var: "state";
|
|
54
|
+
}, {
|
|
55
|
+
readonly status: "ACTIVE";
|
|
56
|
+
readonly activatedAt: {
|
|
57
|
+
readonly var: "$timestamp";
|
|
58
|
+
};
|
|
59
|
+
}];
|
|
60
|
+
};
|
|
61
|
+
readonly dependencies: readonly [];
|
|
62
|
+
}, {
|
|
63
|
+
readonly from: "ACTIVE";
|
|
64
|
+
readonly to: "ACTIVE";
|
|
65
|
+
readonly eventName: "receive_vouch";
|
|
66
|
+
readonly guard: {
|
|
67
|
+
readonly "!!": readonly [{
|
|
68
|
+
readonly var: "event.from";
|
|
69
|
+
}];
|
|
70
|
+
};
|
|
71
|
+
readonly effect: {
|
|
72
|
+
readonly merge: readonly [{
|
|
73
|
+
readonly var: "state";
|
|
74
|
+
}, {
|
|
75
|
+
readonly reputation: {
|
|
76
|
+
readonly "+": readonly [{
|
|
77
|
+
readonly var: "state.reputation";
|
|
78
|
+
}, 2];
|
|
79
|
+
};
|
|
80
|
+
}];
|
|
81
|
+
};
|
|
82
|
+
readonly dependencies: readonly [];
|
|
83
|
+
}, {
|
|
84
|
+
readonly from: "ACTIVE";
|
|
85
|
+
readonly to: "ACTIVE";
|
|
86
|
+
readonly eventName: "receive_completion";
|
|
87
|
+
readonly guard: {
|
|
88
|
+
readonly "==": readonly [1, 1];
|
|
89
|
+
};
|
|
90
|
+
readonly effect: {
|
|
91
|
+
readonly merge: readonly [{
|
|
92
|
+
readonly var: "state";
|
|
93
|
+
}, {
|
|
94
|
+
readonly reputation: {
|
|
95
|
+
readonly "+": readonly [{
|
|
96
|
+
readonly var: "state.reputation";
|
|
97
|
+
}, 5];
|
|
98
|
+
};
|
|
99
|
+
}];
|
|
100
|
+
};
|
|
101
|
+
readonly dependencies: readonly [];
|
|
102
|
+
}, {
|
|
103
|
+
readonly from: "ACTIVE";
|
|
104
|
+
readonly to: "CHALLENGED";
|
|
105
|
+
readonly eventName: "challenge";
|
|
106
|
+
readonly guard: {
|
|
107
|
+
readonly "!!": readonly [{
|
|
108
|
+
readonly var: "event.challenger";
|
|
109
|
+
}];
|
|
110
|
+
};
|
|
111
|
+
readonly effect: {
|
|
112
|
+
readonly merge: readonly [{
|
|
113
|
+
readonly var: "state";
|
|
114
|
+
}, {
|
|
115
|
+
readonly status: "CHALLENGED";
|
|
116
|
+
readonly challengedBy: {
|
|
117
|
+
readonly var: "event.challenger";
|
|
118
|
+
};
|
|
119
|
+
}];
|
|
120
|
+
};
|
|
121
|
+
readonly dependencies: readonly [];
|
|
122
|
+
}, {
|
|
123
|
+
readonly from: "CHALLENGED";
|
|
124
|
+
readonly to: "ACTIVE";
|
|
125
|
+
readonly eventName: "dismiss_challenge";
|
|
126
|
+
readonly guard: {
|
|
127
|
+
readonly "==": readonly [1, 1];
|
|
128
|
+
};
|
|
129
|
+
readonly effect: {
|
|
130
|
+
readonly merge: readonly [{
|
|
131
|
+
readonly var: "state";
|
|
132
|
+
}, {
|
|
133
|
+
readonly status: "ACTIVE";
|
|
134
|
+
readonly challengedBy: null;
|
|
135
|
+
}];
|
|
136
|
+
};
|
|
137
|
+
readonly dependencies: readonly [];
|
|
138
|
+
}, {
|
|
139
|
+
readonly from: "CHALLENGED";
|
|
140
|
+
readonly to: "SUSPENDED";
|
|
141
|
+
readonly eventName: "uphold_challenge";
|
|
142
|
+
readonly guard: {
|
|
143
|
+
readonly "==": readonly [1, 1];
|
|
144
|
+
};
|
|
145
|
+
readonly effect: {
|
|
146
|
+
readonly merge: readonly [{
|
|
147
|
+
readonly var: "state";
|
|
148
|
+
}, {
|
|
149
|
+
readonly status: "SUSPENDED";
|
|
150
|
+
readonly suspendedAt: {
|
|
151
|
+
readonly var: "$timestamp";
|
|
152
|
+
};
|
|
153
|
+
}];
|
|
154
|
+
};
|
|
155
|
+
readonly dependencies: readonly [];
|
|
156
|
+
}, {
|
|
157
|
+
readonly from: "SUSPENDED";
|
|
158
|
+
readonly to: "PROBATION";
|
|
159
|
+
readonly eventName: "begin_probation";
|
|
160
|
+
readonly guard: {
|
|
161
|
+
readonly "==": readonly [1, 1];
|
|
162
|
+
};
|
|
163
|
+
readonly effect: {
|
|
164
|
+
readonly merge: readonly [{
|
|
165
|
+
readonly var: "state";
|
|
166
|
+
}, {
|
|
167
|
+
readonly status: "PROBATION";
|
|
168
|
+
readonly probationStartedAt: {
|
|
169
|
+
readonly var: "$timestamp";
|
|
170
|
+
};
|
|
171
|
+
}];
|
|
172
|
+
};
|
|
173
|
+
readonly dependencies: readonly [];
|
|
174
|
+
}, {
|
|
175
|
+
readonly from: "PROBATION";
|
|
176
|
+
readonly to: "ACTIVE";
|
|
177
|
+
readonly eventName: "complete_probation";
|
|
178
|
+
readonly guard: {
|
|
179
|
+
readonly "==": readonly [1, 1];
|
|
180
|
+
};
|
|
181
|
+
readonly effect: {
|
|
182
|
+
readonly merge: readonly [{
|
|
183
|
+
readonly var: "state";
|
|
184
|
+
}, {
|
|
185
|
+
readonly status: "ACTIVE";
|
|
186
|
+
readonly probationStartedAt: null;
|
|
187
|
+
}];
|
|
188
|
+
};
|
|
189
|
+
readonly dependencies: readonly [];
|
|
190
|
+
}, {
|
|
191
|
+
readonly from: "ACTIVE";
|
|
192
|
+
readonly to: "WITHDRAWN";
|
|
193
|
+
readonly eventName: "withdraw";
|
|
194
|
+
readonly guard: {
|
|
195
|
+
readonly "==": readonly [1, 1];
|
|
196
|
+
};
|
|
197
|
+
readonly effect: {
|
|
198
|
+
readonly merge: readonly [{
|
|
199
|
+
readonly var: "state";
|
|
200
|
+
}, {
|
|
201
|
+
readonly status: "WITHDRAWN";
|
|
202
|
+
}];
|
|
203
|
+
};
|
|
204
|
+
readonly dependencies: readonly [];
|
|
205
|
+
}];
|
|
206
|
+
};
|
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-generated from JSON state machine definitions.
|
|
3
|
+
* DO NOT EDIT - regenerate with: npm run prebuild
|
|
4
|
+
*/
|
|
5
|
+
export declare const marketUniversalDef: {
|
|
6
|
+
readonly metadata: {
|
|
7
|
+
readonly name: "Market";
|
|
8
|
+
readonly description: "Universal market state machine: predictions, auctions, crowdfunding, group buys";
|
|
9
|
+
readonly version: "1.1.0";
|
|
10
|
+
};
|
|
11
|
+
readonly states: {
|
|
12
|
+
readonly PROPOSED: {
|
|
13
|
+
readonly id: "PROPOSED";
|
|
14
|
+
readonly isFinal: false;
|
|
15
|
+
readonly metadata: null;
|
|
16
|
+
};
|
|
17
|
+
readonly OPEN: {
|
|
18
|
+
readonly id: "OPEN";
|
|
19
|
+
readonly isFinal: false;
|
|
20
|
+
readonly metadata: null;
|
|
21
|
+
};
|
|
22
|
+
readonly CLOSED: {
|
|
23
|
+
readonly id: "CLOSED";
|
|
24
|
+
readonly isFinal: false;
|
|
25
|
+
readonly metadata: null;
|
|
26
|
+
};
|
|
27
|
+
readonly RESOLVING: {
|
|
28
|
+
readonly id: "RESOLVING";
|
|
29
|
+
readonly isFinal: false;
|
|
30
|
+
readonly metadata: null;
|
|
31
|
+
};
|
|
32
|
+
readonly SETTLED: {
|
|
33
|
+
readonly id: "SETTLED";
|
|
34
|
+
readonly isFinal: true;
|
|
35
|
+
readonly metadata: null;
|
|
36
|
+
};
|
|
37
|
+
readonly REFUNDED: {
|
|
38
|
+
readonly id: "REFUNDED";
|
|
39
|
+
readonly isFinal: true;
|
|
40
|
+
readonly metadata: null;
|
|
41
|
+
};
|
|
42
|
+
readonly CANCELLED: {
|
|
43
|
+
readonly id: "CANCELLED";
|
|
44
|
+
readonly isFinal: true;
|
|
45
|
+
readonly metadata: null;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
readonly initialState: "PROPOSED";
|
|
49
|
+
readonly transitions: readonly [{
|
|
50
|
+
readonly from: "PROPOSED";
|
|
51
|
+
readonly to: "OPEN";
|
|
52
|
+
readonly eventName: "open";
|
|
53
|
+
readonly guard: {
|
|
54
|
+
readonly "===": readonly [{
|
|
55
|
+
readonly var: "event.agent";
|
|
56
|
+
}, {
|
|
57
|
+
readonly var: "state.creator";
|
|
58
|
+
}];
|
|
59
|
+
};
|
|
60
|
+
readonly effect: {
|
|
61
|
+
readonly merge: readonly [{
|
|
62
|
+
readonly var: "state";
|
|
63
|
+
}, {
|
|
64
|
+
readonly status: "OPEN";
|
|
65
|
+
readonly openedAt: {
|
|
66
|
+
readonly var: "$epochProgress";
|
|
67
|
+
};
|
|
68
|
+
}];
|
|
69
|
+
};
|
|
70
|
+
readonly dependencies: readonly [];
|
|
71
|
+
}, {
|
|
72
|
+
readonly from: "PROPOSED";
|
|
73
|
+
readonly to: "CANCELLED";
|
|
74
|
+
readonly eventName: "cancel";
|
|
75
|
+
readonly guard: {
|
|
76
|
+
readonly "===": readonly [{
|
|
77
|
+
readonly var: "event.agent";
|
|
78
|
+
}, {
|
|
79
|
+
readonly var: "state.creator";
|
|
80
|
+
}];
|
|
81
|
+
};
|
|
82
|
+
readonly effect: {
|
|
83
|
+
readonly merge: readonly [{
|
|
84
|
+
readonly var: "state";
|
|
85
|
+
}, {
|
|
86
|
+
readonly status: "CANCELLED";
|
|
87
|
+
readonly cancelledAt: {
|
|
88
|
+
readonly var: "$epochProgress";
|
|
89
|
+
};
|
|
90
|
+
readonly reason: {
|
|
91
|
+
readonly var: "event.reason";
|
|
92
|
+
};
|
|
93
|
+
}];
|
|
94
|
+
};
|
|
95
|
+
readonly dependencies: readonly [];
|
|
96
|
+
}, {
|
|
97
|
+
readonly from: "OPEN";
|
|
98
|
+
readonly to: "OPEN";
|
|
99
|
+
readonly eventName: "commit";
|
|
100
|
+
readonly guard: {
|
|
101
|
+
readonly and: readonly [{
|
|
102
|
+
readonly ">": readonly [{
|
|
103
|
+
readonly var: "event.amount";
|
|
104
|
+
}, 0];
|
|
105
|
+
}, {
|
|
106
|
+
readonly or: readonly [{
|
|
107
|
+
readonly "!": readonly [{
|
|
108
|
+
readonly var: "state.deadline";
|
|
109
|
+
}];
|
|
110
|
+
}, {
|
|
111
|
+
readonly "<=": readonly [{
|
|
112
|
+
readonly var: "$epochProgress";
|
|
113
|
+
}, {
|
|
114
|
+
readonly var: "state.deadline";
|
|
115
|
+
}];
|
|
116
|
+
}];
|
|
117
|
+
}];
|
|
118
|
+
};
|
|
119
|
+
readonly effect: {
|
|
120
|
+
readonly merge: readonly [{
|
|
121
|
+
readonly var: "state";
|
|
122
|
+
}, {
|
|
123
|
+
readonly commitments: {
|
|
124
|
+
readonly merge: readonly [{
|
|
125
|
+
readonly var: "state.commitments";
|
|
126
|
+
}, readonly [{
|
|
127
|
+
readonly agent: {
|
|
128
|
+
readonly var: "event.agent";
|
|
129
|
+
};
|
|
130
|
+
readonly amount: {
|
|
131
|
+
readonly var: "event.amount";
|
|
132
|
+
};
|
|
133
|
+
readonly data: {
|
|
134
|
+
readonly var: "event.data";
|
|
135
|
+
};
|
|
136
|
+
readonly committedAt: {
|
|
137
|
+
readonly var: "$epochProgress";
|
|
138
|
+
};
|
|
139
|
+
}]];
|
|
140
|
+
};
|
|
141
|
+
readonly totalCommitted: {
|
|
142
|
+
readonly "+": readonly [{
|
|
143
|
+
readonly var: "state.totalCommitted";
|
|
144
|
+
}, {
|
|
145
|
+
readonly var: "event.amount";
|
|
146
|
+
}];
|
|
147
|
+
};
|
|
148
|
+
}];
|
|
149
|
+
};
|
|
150
|
+
readonly dependencies: readonly [];
|
|
151
|
+
}, {
|
|
152
|
+
readonly from: "OPEN";
|
|
153
|
+
readonly to: "CLOSED";
|
|
154
|
+
readonly eventName: "close";
|
|
155
|
+
readonly guard: {
|
|
156
|
+
readonly or: readonly [{
|
|
157
|
+
readonly "===": readonly [{
|
|
158
|
+
readonly var: "event.agent";
|
|
159
|
+
}, {
|
|
160
|
+
readonly var: "state.creator";
|
|
161
|
+
}];
|
|
162
|
+
}, {
|
|
163
|
+
readonly and: readonly [{
|
|
164
|
+
readonly var: "state.deadline";
|
|
165
|
+
}, {
|
|
166
|
+
readonly ">=": readonly [{
|
|
167
|
+
readonly var: "$epochProgress";
|
|
168
|
+
}, {
|
|
169
|
+
readonly var: "state.deadline";
|
|
170
|
+
}];
|
|
171
|
+
}];
|
|
172
|
+
}];
|
|
173
|
+
};
|
|
174
|
+
readonly effect: {
|
|
175
|
+
readonly merge: readonly [{
|
|
176
|
+
readonly var: "state";
|
|
177
|
+
}, {
|
|
178
|
+
readonly status: "CLOSED";
|
|
179
|
+
readonly closedAt: {
|
|
180
|
+
readonly var: "$epochProgress";
|
|
181
|
+
};
|
|
182
|
+
}];
|
|
183
|
+
};
|
|
184
|
+
readonly dependencies: readonly [];
|
|
185
|
+
}, {
|
|
186
|
+
readonly from: "CLOSED";
|
|
187
|
+
readonly to: "RESOLVING";
|
|
188
|
+
readonly eventName: "submit_resolution";
|
|
189
|
+
readonly guard: {
|
|
190
|
+
readonly or: readonly [{
|
|
191
|
+
readonly in: readonly [{
|
|
192
|
+
readonly var: "event.agent";
|
|
193
|
+
}, {
|
|
194
|
+
readonly var: "state.oracles";
|
|
195
|
+
}];
|
|
196
|
+
}, {
|
|
197
|
+
readonly "===": readonly [{
|
|
198
|
+
readonly var: "event.agent";
|
|
199
|
+
}, {
|
|
200
|
+
readonly var: "state.creator";
|
|
201
|
+
}];
|
|
202
|
+
}];
|
|
203
|
+
};
|
|
204
|
+
readonly effect: {
|
|
205
|
+
readonly merge: readonly [{
|
|
206
|
+
readonly var: "state";
|
|
207
|
+
}, {
|
|
208
|
+
readonly status: "RESOLVING";
|
|
209
|
+
readonly resolutions: {
|
|
210
|
+
readonly merge: readonly [{
|
|
211
|
+
readonly var: "state.resolutions";
|
|
212
|
+
}, readonly [{
|
|
213
|
+
readonly oracle: {
|
|
214
|
+
readonly var: "event.agent";
|
|
215
|
+
};
|
|
216
|
+
readonly outcome: {
|
|
217
|
+
readonly var: "event.outcome";
|
|
218
|
+
};
|
|
219
|
+
readonly proof: {
|
|
220
|
+
readonly var: "event.proof";
|
|
221
|
+
};
|
|
222
|
+
readonly submittedAt: {
|
|
223
|
+
readonly var: "$epochProgress";
|
|
224
|
+
};
|
|
225
|
+
}]];
|
|
226
|
+
};
|
|
227
|
+
}];
|
|
228
|
+
};
|
|
229
|
+
readonly dependencies: readonly [];
|
|
230
|
+
}, {
|
|
231
|
+
readonly from: "RESOLVING";
|
|
232
|
+
readonly to: "RESOLVING";
|
|
233
|
+
readonly eventName: "submit_resolution";
|
|
234
|
+
readonly guard: {
|
|
235
|
+
readonly and: readonly [{
|
|
236
|
+
readonly in: readonly [{
|
|
237
|
+
readonly var: "event.agent";
|
|
238
|
+
}, {
|
|
239
|
+
readonly var: "state.oracles";
|
|
240
|
+
}];
|
|
241
|
+
}, {
|
|
242
|
+
readonly "!": readonly [{
|
|
243
|
+
readonly in: readonly [{
|
|
244
|
+
readonly var: "event.agent";
|
|
245
|
+
}, {
|
|
246
|
+
readonly map: readonly [{
|
|
247
|
+
readonly var: "state.resolutions";
|
|
248
|
+
}, {
|
|
249
|
+
readonly var: "oracle";
|
|
250
|
+
}];
|
|
251
|
+
}];
|
|
252
|
+
}];
|
|
253
|
+
}];
|
|
254
|
+
};
|
|
255
|
+
readonly effect: {
|
|
256
|
+
readonly merge: readonly [{
|
|
257
|
+
readonly var: "state";
|
|
258
|
+
}, {
|
|
259
|
+
readonly resolutions: {
|
|
260
|
+
readonly merge: readonly [{
|
|
261
|
+
readonly var: "state.resolutions";
|
|
262
|
+
}, readonly [{
|
|
263
|
+
readonly oracle: {
|
|
264
|
+
readonly var: "event.agent";
|
|
265
|
+
};
|
|
266
|
+
readonly outcome: {
|
|
267
|
+
readonly var: "event.outcome";
|
|
268
|
+
};
|
|
269
|
+
readonly proof: {
|
|
270
|
+
readonly var: "event.proof";
|
|
271
|
+
};
|
|
272
|
+
readonly submittedAt: {
|
|
273
|
+
readonly var: "$epochProgress";
|
|
274
|
+
};
|
|
275
|
+
}]];
|
|
276
|
+
};
|
|
277
|
+
}];
|
|
278
|
+
};
|
|
279
|
+
readonly dependencies: readonly [];
|
|
280
|
+
}, {
|
|
281
|
+
readonly from: "RESOLVING";
|
|
282
|
+
readonly to: "SETTLED";
|
|
283
|
+
readonly eventName: "finalize";
|
|
284
|
+
readonly guard: {
|
|
285
|
+
readonly or: readonly [{
|
|
286
|
+
readonly ">=": readonly [{
|
|
287
|
+
readonly size: {
|
|
288
|
+
readonly var: "state.resolutions";
|
|
289
|
+
};
|
|
290
|
+
}, {
|
|
291
|
+
readonly var: "state.quorum";
|
|
292
|
+
}];
|
|
293
|
+
}, {
|
|
294
|
+
readonly "===": readonly [{
|
|
295
|
+
readonly var: "state.marketType";
|
|
296
|
+
}, "crowdfund"];
|
|
297
|
+
}, {
|
|
298
|
+
readonly "===": readonly [{
|
|
299
|
+
readonly var: "state.marketType";
|
|
300
|
+
}, "group_buy"];
|
|
301
|
+
}, {
|
|
302
|
+
readonly "===": readonly [{
|
|
303
|
+
readonly var: "state.marketType";
|
|
304
|
+
}, "auction"];
|
|
305
|
+
}];
|
|
306
|
+
};
|
|
307
|
+
readonly effect: {
|
|
308
|
+
readonly merge: readonly [{
|
|
309
|
+
readonly var: "state";
|
|
310
|
+
}, {
|
|
311
|
+
readonly status: "SETTLED";
|
|
312
|
+
readonly settledAt: {
|
|
313
|
+
readonly var: "$epochProgress";
|
|
314
|
+
};
|
|
315
|
+
readonly finalOutcome: {
|
|
316
|
+
readonly var: "event.outcome";
|
|
317
|
+
};
|
|
318
|
+
readonly settlement: {
|
|
319
|
+
readonly var: "event.settlement";
|
|
320
|
+
};
|
|
321
|
+
}];
|
|
322
|
+
};
|
|
323
|
+
readonly dependencies: readonly [];
|
|
324
|
+
}, {
|
|
325
|
+
readonly from: "CLOSED";
|
|
326
|
+
readonly to: "REFUNDED";
|
|
327
|
+
readonly eventName: "refund";
|
|
328
|
+
readonly guard: {
|
|
329
|
+
readonly and: readonly [{
|
|
330
|
+
readonly var: "state.threshold";
|
|
331
|
+
}, {
|
|
332
|
+
readonly "<": readonly [{
|
|
333
|
+
readonly var: "state.totalCommitted";
|
|
334
|
+
}, {
|
|
335
|
+
readonly var: "state.threshold";
|
|
336
|
+
}];
|
|
337
|
+
}];
|
|
338
|
+
};
|
|
339
|
+
readonly effect: {
|
|
340
|
+
readonly merge: readonly [{
|
|
341
|
+
readonly var: "state";
|
|
342
|
+
}, {
|
|
343
|
+
readonly status: "REFUNDED";
|
|
344
|
+
readonly refundedAt: {
|
|
345
|
+
readonly var: "$epochProgress";
|
|
346
|
+
};
|
|
347
|
+
readonly reason: "threshold_not_met";
|
|
348
|
+
}];
|
|
349
|
+
};
|
|
350
|
+
readonly dependencies: readonly [];
|
|
351
|
+
}, {
|
|
352
|
+
readonly from: "RESOLVING";
|
|
353
|
+
readonly to: "REFUNDED";
|
|
354
|
+
readonly eventName: "refund";
|
|
355
|
+
readonly guard: {
|
|
356
|
+
readonly or: readonly [{
|
|
357
|
+
readonly "===": readonly [{
|
|
358
|
+
readonly var: "event.agent";
|
|
359
|
+
}, {
|
|
360
|
+
readonly var: "state.creator";
|
|
361
|
+
}];
|
|
362
|
+
}, {
|
|
363
|
+
readonly ">=": readonly [{
|
|
364
|
+
readonly size: {
|
|
365
|
+
readonly filter: readonly [{
|
|
366
|
+
readonly var: "state.resolutions";
|
|
367
|
+
}, {
|
|
368
|
+
readonly "===": readonly [{
|
|
369
|
+
readonly var: "outcome";
|
|
370
|
+
}, "INVALID"];
|
|
371
|
+
}];
|
|
372
|
+
};
|
|
373
|
+
}, {
|
|
374
|
+
readonly var: "state.quorum";
|
|
375
|
+
}];
|
|
376
|
+
}];
|
|
377
|
+
};
|
|
378
|
+
readonly effect: {
|
|
379
|
+
readonly merge: readonly [{
|
|
380
|
+
readonly var: "state";
|
|
381
|
+
}, {
|
|
382
|
+
readonly status: "REFUNDED";
|
|
383
|
+
readonly refundedAt: {
|
|
384
|
+
readonly var: "$epochProgress";
|
|
385
|
+
};
|
|
386
|
+
readonly reason: {
|
|
387
|
+
readonly var: "event.reason";
|
|
388
|
+
};
|
|
389
|
+
}];
|
|
390
|
+
};
|
|
391
|
+
readonly dependencies: readonly [];
|
|
392
|
+
}, {
|
|
393
|
+
readonly from: "SETTLED";
|
|
394
|
+
readonly to: "SETTLED";
|
|
395
|
+
readonly eventName: "claim";
|
|
396
|
+
readonly guard: {
|
|
397
|
+
readonly and: readonly [{
|
|
398
|
+
readonly ">": readonly [{
|
|
399
|
+
readonly size: {
|
|
400
|
+
readonly filter: readonly [{
|
|
401
|
+
readonly var: "state.commitments";
|
|
402
|
+
}, {
|
|
403
|
+
readonly "===": readonly [{
|
|
404
|
+
readonly var: "agent";
|
|
405
|
+
}, {
|
|
406
|
+
readonly var: "event.agent";
|
|
407
|
+
}];
|
|
408
|
+
}];
|
|
409
|
+
};
|
|
410
|
+
}, 0];
|
|
411
|
+
}, {
|
|
412
|
+
readonly "!": readonly [{
|
|
413
|
+
readonly in: readonly [{
|
|
414
|
+
readonly var: "event.agent";
|
|
415
|
+
}, {
|
|
416
|
+
readonly map: readonly [{
|
|
417
|
+
readonly var: "state.claims";
|
|
418
|
+
}, {
|
|
419
|
+
readonly var: "agent";
|
|
420
|
+
}];
|
|
421
|
+
}];
|
|
422
|
+
}];
|
|
423
|
+
}];
|
|
424
|
+
};
|
|
425
|
+
readonly effect: {
|
|
426
|
+
readonly merge: readonly [{
|
|
427
|
+
readonly var: "state";
|
|
428
|
+
}, {
|
|
429
|
+
readonly claims: {
|
|
430
|
+
readonly merge: readonly [{
|
|
431
|
+
readonly var: "state.claims";
|
|
432
|
+
}, readonly [{
|
|
433
|
+
readonly agent: {
|
|
434
|
+
readonly var: "event.agent";
|
|
435
|
+
};
|
|
436
|
+
readonly amount: {
|
|
437
|
+
readonly var: "event.amount";
|
|
438
|
+
};
|
|
439
|
+
readonly claimedAt: {
|
|
440
|
+
readonly var: "$epochProgress";
|
|
441
|
+
};
|
|
442
|
+
}]];
|
|
443
|
+
};
|
|
444
|
+
}];
|
|
445
|
+
};
|
|
446
|
+
readonly dependencies: readonly [];
|
|
447
|
+
}];
|
|
448
|
+
};
|