@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.
- package/dist/cjs/apps/contracts/index.js +18 -13
- package/dist/cjs/apps/contracts/state-machines/index.js +139 -7
- package/dist/cjs/apps/corporate/index.js +18 -20
- package/dist/cjs/apps/corporate/state-machines/index.js +535 -6336
- package/dist/cjs/apps/governance/index.js +32 -31
- package/dist/cjs/apps/governance/state-machines/index.js +498 -2315
- package/dist/cjs/apps/identity/index.js +15 -7
- package/dist/cjs/apps/identity/state-machines/index.js +516 -4
- package/dist/cjs/apps/index.js +15 -13
- package/dist/cjs/apps/markets/index.js +23 -10
- package/dist/cjs/apps/markets/state-machines/index.js +1904 -230
- package/dist/esm/apps/contracts/index.js +16 -13
- package/dist/esm/apps/contracts/state-machines/index.js +138 -6
- package/dist/esm/apps/corporate/index.js +14 -20
- package/dist/esm/apps/corporate/state-machines/index.js +534 -6335
- package/dist/esm/apps/governance/index.js +26 -30
- package/dist/esm/apps/governance/state-machines/index.js +497 -2314
- package/dist/esm/apps/identity/index.js +13 -7
- package/dist/esm/apps/identity/state-machines/index.js +515 -3
- package/dist/esm/apps/index.js +14 -12
- package/dist/esm/apps/markets/index.js +19 -10
- package/dist/esm/apps/markets/state-machines/index.js +1903 -229
- package/dist/types/apps/contracts/index.d.ts +661 -9
- package/dist/types/apps/contracts/state-machines/index.d.ts +109 -6
- package/dist/types/apps/corporate/index.d.ts +4015 -7
- package/dist/types/apps/corporate/state-machines/index.d.ts +472 -5587
- package/dist/types/apps/governance/index.d.ts +2151 -12
- package/dist/types/apps/governance/state-machines/index.d.ts +462 -1875
- package/dist/types/apps/identity/index.d.ts +601 -4
- package/dist/types/apps/identity/state-machines/index.d.ts +393 -3
- package/dist/types/apps/index.d.ts +14 -12
- package/dist/types/apps/markets/index.d.ts +1690 -7
- package/dist/types/apps/markets/state-machines/index.d.ts +1416 -184
- package/package.json +1 -1
- package/dist/cjs/apps/oracles/index.js +0 -59
- package/dist/cjs/apps/oracles/state-machines/index.js +0 -415
- package/dist/esm/apps/oracles/index.js +0 -42
- package/dist/esm/apps/oracles/state-machines/index.js +0 -412
- package/dist/types/apps/oracles/index.d.ts +0 -34
- package/dist/types/apps/oracles/state-machines/index.d.ts +0 -312
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Auto-generated from JSON state machine definitions.
|
|
3
|
-
* DO NOT EDIT - regenerate with: npm run prebuild
|
|
4
|
-
*/
|
|
5
|
-
export declare const oracleDef: {
|
|
6
|
-
readonly metadata: {
|
|
7
|
-
readonly name: "Oracle";
|
|
8
|
-
readonly description: "Oracle registration, reputation, and slashing state machine";
|
|
9
|
-
readonly version: "1.0.0";
|
|
10
|
-
};
|
|
11
|
-
readonly states: {
|
|
12
|
-
readonly UNREGISTERED: {
|
|
13
|
-
readonly id: "UNREGISTERED";
|
|
14
|
-
readonly isFinal: false;
|
|
15
|
-
readonly metadata: null;
|
|
16
|
-
};
|
|
17
|
-
readonly REGISTERED: {
|
|
18
|
-
readonly id: "REGISTERED";
|
|
19
|
-
readonly isFinal: false;
|
|
20
|
-
readonly metadata: null;
|
|
21
|
-
};
|
|
22
|
-
readonly ACTIVE: {
|
|
23
|
-
readonly id: "ACTIVE";
|
|
24
|
-
readonly isFinal: false;
|
|
25
|
-
readonly metadata: null;
|
|
26
|
-
};
|
|
27
|
-
readonly SLASHED: {
|
|
28
|
-
readonly id: "SLASHED";
|
|
29
|
-
readonly isFinal: false;
|
|
30
|
-
readonly metadata: null;
|
|
31
|
-
};
|
|
32
|
-
readonly WITHDRAWN: {
|
|
33
|
-
readonly id: "WITHDRAWN";
|
|
34
|
-
readonly isFinal: true;
|
|
35
|
-
readonly metadata: null;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
readonly initialState: "UNREGISTERED";
|
|
39
|
-
readonly transitions: readonly [{
|
|
40
|
-
readonly from: "UNREGISTERED";
|
|
41
|
-
readonly to: "REGISTERED";
|
|
42
|
-
readonly eventName: "register";
|
|
43
|
-
readonly guard: {
|
|
44
|
-
readonly ">=": readonly [{
|
|
45
|
-
readonly var: "event.stake";
|
|
46
|
-
}, {
|
|
47
|
-
readonly var: "state.minStake";
|
|
48
|
-
}];
|
|
49
|
-
};
|
|
50
|
-
readonly effect: {
|
|
51
|
-
readonly merge: readonly [{
|
|
52
|
-
readonly var: "state";
|
|
53
|
-
}, {
|
|
54
|
-
readonly status: "REGISTERED";
|
|
55
|
-
readonly address: {
|
|
56
|
-
readonly var: "event.agent";
|
|
57
|
-
};
|
|
58
|
-
readonly stake: {
|
|
59
|
-
readonly var: "event.stake";
|
|
60
|
-
};
|
|
61
|
-
readonly registeredAt: {
|
|
62
|
-
readonly var: "$timestamp";
|
|
63
|
-
};
|
|
64
|
-
readonly reputation: {
|
|
65
|
-
readonly accuracy: 100;
|
|
66
|
-
readonly totalResolutions: 0;
|
|
67
|
-
readonly disputesWon: 0;
|
|
68
|
-
readonly disputesLost: 0;
|
|
69
|
-
};
|
|
70
|
-
readonly domains: {
|
|
71
|
-
readonly var: "event.domains";
|
|
72
|
-
};
|
|
73
|
-
readonly slashingHistory: readonly [];
|
|
74
|
-
}];
|
|
75
|
-
};
|
|
76
|
-
readonly dependencies: readonly [];
|
|
77
|
-
}, {
|
|
78
|
-
readonly from: "REGISTERED";
|
|
79
|
-
readonly to: "ACTIVE";
|
|
80
|
-
readonly eventName: "activate";
|
|
81
|
-
readonly guard: {
|
|
82
|
-
readonly or: readonly [{
|
|
83
|
-
readonly "===": readonly [{
|
|
84
|
-
readonly var: "event.agent";
|
|
85
|
-
}, {
|
|
86
|
-
readonly var: "state.address";
|
|
87
|
-
}];
|
|
88
|
-
}, {
|
|
89
|
-
readonly var: "event.adminOverride";
|
|
90
|
-
}];
|
|
91
|
-
};
|
|
92
|
-
readonly effect: {
|
|
93
|
-
readonly merge: readonly [{
|
|
94
|
-
readonly var: "state";
|
|
95
|
-
}, {
|
|
96
|
-
readonly status: "ACTIVE";
|
|
97
|
-
readonly activatedAt: {
|
|
98
|
-
readonly var: "$timestamp";
|
|
99
|
-
};
|
|
100
|
-
}];
|
|
101
|
-
};
|
|
102
|
-
readonly dependencies: readonly [];
|
|
103
|
-
}, {
|
|
104
|
-
readonly from: "ACTIVE";
|
|
105
|
-
readonly to: "ACTIVE";
|
|
106
|
-
readonly eventName: "add_stake";
|
|
107
|
-
readonly guard: {
|
|
108
|
-
readonly and: readonly [{
|
|
109
|
-
readonly "===": readonly [{
|
|
110
|
-
readonly var: "event.agent";
|
|
111
|
-
}, {
|
|
112
|
-
readonly var: "state.address";
|
|
113
|
-
}];
|
|
114
|
-
}, {
|
|
115
|
-
readonly ">": readonly [{
|
|
116
|
-
readonly var: "event.amount";
|
|
117
|
-
}, 0];
|
|
118
|
-
}];
|
|
119
|
-
};
|
|
120
|
-
readonly effect: {
|
|
121
|
-
readonly merge: readonly [{
|
|
122
|
-
readonly var: "state";
|
|
123
|
-
}, {
|
|
124
|
-
readonly stake: {
|
|
125
|
-
readonly "+": readonly [{
|
|
126
|
-
readonly var: "state.stake";
|
|
127
|
-
}, {
|
|
128
|
-
readonly var: "event.amount";
|
|
129
|
-
}];
|
|
130
|
-
};
|
|
131
|
-
readonly lastStakeAt: {
|
|
132
|
-
readonly var: "$timestamp";
|
|
133
|
-
};
|
|
134
|
-
}];
|
|
135
|
-
};
|
|
136
|
-
readonly dependencies: readonly [];
|
|
137
|
-
}, {
|
|
138
|
-
readonly from: "ACTIVE";
|
|
139
|
-
readonly to: "ACTIVE";
|
|
140
|
-
readonly eventName: "record_resolution";
|
|
141
|
-
readonly guard: {
|
|
142
|
-
readonly var: "event.marketId";
|
|
143
|
-
};
|
|
144
|
-
readonly effect: {
|
|
145
|
-
readonly merge: readonly [{
|
|
146
|
-
readonly var: "state";
|
|
147
|
-
}, {
|
|
148
|
-
readonly reputation: {
|
|
149
|
-
readonly merge: readonly [{
|
|
150
|
-
readonly var: "state.reputation";
|
|
151
|
-
}, {
|
|
152
|
-
readonly totalResolutions: {
|
|
153
|
-
readonly "+": readonly [{
|
|
154
|
-
readonly var: "state.reputation.totalResolutions";
|
|
155
|
-
}, 1];
|
|
156
|
-
};
|
|
157
|
-
readonly accuracy: {
|
|
158
|
-
readonly if: readonly [{
|
|
159
|
-
readonly var: "event.correct";
|
|
160
|
-
}, {
|
|
161
|
-
readonly var: "state.reputation.accuracy";
|
|
162
|
-
}, {
|
|
163
|
-
readonly "-": readonly [{
|
|
164
|
-
readonly var: "state.reputation.accuracy";
|
|
165
|
-
}, 5];
|
|
166
|
-
}];
|
|
167
|
-
};
|
|
168
|
-
}];
|
|
169
|
-
};
|
|
170
|
-
readonly lastResolutionAt: {
|
|
171
|
-
readonly var: "$timestamp";
|
|
172
|
-
};
|
|
173
|
-
}];
|
|
174
|
-
};
|
|
175
|
-
readonly dependencies: readonly [];
|
|
176
|
-
}, {
|
|
177
|
-
readonly from: "ACTIVE";
|
|
178
|
-
readonly to: "SLASHED";
|
|
179
|
-
readonly eventName: "slash";
|
|
180
|
-
readonly guard: {
|
|
181
|
-
readonly and: readonly [{
|
|
182
|
-
readonly var: "event.reason";
|
|
183
|
-
}, {
|
|
184
|
-
readonly ">": readonly [{
|
|
185
|
-
readonly var: "event.amount";
|
|
186
|
-
}, 0];
|
|
187
|
-
}, {
|
|
188
|
-
readonly "<=": readonly [{
|
|
189
|
-
readonly var: "event.amount";
|
|
190
|
-
}, {
|
|
191
|
-
readonly var: "state.stake";
|
|
192
|
-
}];
|
|
193
|
-
}];
|
|
194
|
-
};
|
|
195
|
-
readonly effect: {
|
|
196
|
-
readonly merge: readonly [{
|
|
197
|
-
readonly var: "state";
|
|
198
|
-
}, {
|
|
199
|
-
readonly status: "SLASHED";
|
|
200
|
-
readonly stake: {
|
|
201
|
-
readonly "-": readonly [{
|
|
202
|
-
readonly var: "state.stake";
|
|
203
|
-
}, {
|
|
204
|
-
readonly var: "event.amount";
|
|
205
|
-
}];
|
|
206
|
-
};
|
|
207
|
-
readonly slashingHistory: {
|
|
208
|
-
readonly cat: readonly [{
|
|
209
|
-
readonly var: "state.slashingHistory";
|
|
210
|
-
}, readonly [{
|
|
211
|
-
readonly reason: {
|
|
212
|
-
readonly var: "event.reason";
|
|
213
|
-
};
|
|
214
|
-
readonly amount: {
|
|
215
|
-
readonly var: "event.amount";
|
|
216
|
-
};
|
|
217
|
-
readonly marketId: {
|
|
218
|
-
readonly var: "event.marketId";
|
|
219
|
-
};
|
|
220
|
-
readonly slashedAt: {
|
|
221
|
-
readonly var: "$timestamp";
|
|
222
|
-
};
|
|
223
|
-
}]];
|
|
224
|
-
};
|
|
225
|
-
readonly slashedAt: {
|
|
226
|
-
readonly var: "$timestamp";
|
|
227
|
-
};
|
|
228
|
-
}];
|
|
229
|
-
};
|
|
230
|
-
readonly dependencies: readonly [];
|
|
231
|
-
}, {
|
|
232
|
-
readonly from: "SLASHED";
|
|
233
|
-
readonly to: "ACTIVE";
|
|
234
|
-
readonly eventName: "reactivate";
|
|
235
|
-
readonly guard: {
|
|
236
|
-
readonly and: readonly [{
|
|
237
|
-
readonly "===": readonly [{
|
|
238
|
-
readonly var: "event.agent";
|
|
239
|
-
}, {
|
|
240
|
-
readonly var: "state.address";
|
|
241
|
-
}];
|
|
242
|
-
}, {
|
|
243
|
-
readonly ">=": readonly [{
|
|
244
|
-
readonly var: "state.stake";
|
|
245
|
-
}, {
|
|
246
|
-
readonly var: "state.minStake";
|
|
247
|
-
}];
|
|
248
|
-
}];
|
|
249
|
-
};
|
|
250
|
-
readonly effect: {
|
|
251
|
-
readonly merge: readonly [{
|
|
252
|
-
readonly var: "state";
|
|
253
|
-
}, {
|
|
254
|
-
readonly status: "ACTIVE";
|
|
255
|
-
readonly reactivatedAt: {
|
|
256
|
-
readonly var: "$timestamp";
|
|
257
|
-
};
|
|
258
|
-
}];
|
|
259
|
-
};
|
|
260
|
-
readonly dependencies: readonly [];
|
|
261
|
-
}, {
|
|
262
|
-
readonly from: "ACTIVE";
|
|
263
|
-
readonly to: "WITHDRAWN";
|
|
264
|
-
readonly eventName: "withdraw";
|
|
265
|
-
readonly guard: {
|
|
266
|
-
readonly "===": readonly [{
|
|
267
|
-
readonly var: "event.agent";
|
|
268
|
-
}, {
|
|
269
|
-
readonly var: "state.address";
|
|
270
|
-
}];
|
|
271
|
-
};
|
|
272
|
-
readonly effect: {
|
|
273
|
-
readonly merge: readonly [{
|
|
274
|
-
readonly var: "state";
|
|
275
|
-
}, {
|
|
276
|
-
readonly status: "WITHDRAWN";
|
|
277
|
-
readonly withdrawnAt: {
|
|
278
|
-
readonly var: "$timestamp";
|
|
279
|
-
};
|
|
280
|
-
readonly finalStake: {
|
|
281
|
-
readonly var: "state.stake";
|
|
282
|
-
};
|
|
283
|
-
}];
|
|
284
|
-
};
|
|
285
|
-
readonly dependencies: readonly [];
|
|
286
|
-
}, {
|
|
287
|
-
readonly from: "SLASHED";
|
|
288
|
-
readonly to: "WITHDRAWN";
|
|
289
|
-
readonly eventName: "withdraw";
|
|
290
|
-
readonly guard: {
|
|
291
|
-
readonly "===": readonly [{
|
|
292
|
-
readonly var: "event.agent";
|
|
293
|
-
}, {
|
|
294
|
-
readonly var: "state.address";
|
|
295
|
-
}];
|
|
296
|
-
};
|
|
297
|
-
readonly effect: {
|
|
298
|
-
readonly merge: readonly [{
|
|
299
|
-
readonly var: "state";
|
|
300
|
-
}, {
|
|
301
|
-
readonly status: "WITHDRAWN";
|
|
302
|
-
readonly withdrawnAt: {
|
|
303
|
-
readonly var: "$timestamp";
|
|
304
|
-
};
|
|
305
|
-
readonly finalStake: {
|
|
306
|
-
readonly var: "state.stake";
|
|
307
|
-
};
|
|
308
|
-
}];
|
|
309
|
-
};
|
|
310
|
-
readonly dependencies: readonly [];
|
|
311
|
-
}];
|
|
312
|
-
};
|