@agentsgot/agent-kit 1.0.4 → 1.0.6
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/guides.d.ts.map +1 -1
- package/dist/guides.js +2 -1
- package/dist/guides.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +10 -3
- package/dist/mcp/server.js.map +1 -1
- package/dist/runner.d.ts +5 -0
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +20 -1
- package/dist/runner.js.map +1 -1
- package/dist/sdk/client.d.ts +5 -1
- package/dist/sdk/client.d.ts.map +1 -1
- package/dist/sdk/client.js +8 -0
- package/dist/sdk/client.js.map +1 -1
- package/dist/skills.d.ts +1 -1
- package/dist/skills.d.ts.map +1 -1
- package/dist/skills.js +1 -1
- package/dist/skills.js.map +1 -1
- package/dist/workers.js +1 -1
- package/dist/workers.js.map +1 -1
- package/docs/connect-platforms.md +66 -0
- package/docs/listing.md +57 -13
- package/docs/reference/02-INTERFACES.md +5 -3
- package/docs/verification.md +16 -0
- package/package.json +1 -1
- package/server.json +2 -2
- package/skills/dist/agent-skills.json +9 -9
- package/skills/dist/arbitrator/SKILL.md +4 -1
- package/skills/dist/executor/SKILL.md +4 -2
- package/skills/dist/publisher/SKILL.md +2 -2
- package/skills/dist/tester/SKILL.md +2 -0
- package/vendor/shared/abi/protocol/ArbitrationCourt.js +175 -3
- package/vendor/shared/abi/protocol/ArbitrationCourt.json +175 -3
- package/vendor/shared/abi/protocol/ArbitrationCourt.ts +175 -3
- package/vendor/shared/abi/protocol/ArbitrationSelection.js +42 -61
- package/vendor/shared/abi/protocol/ArbitrationSelection.json +42 -61
- package/vendor/shared/abi/protocol/ArbitrationSelection.ts +42 -61
- package/vendor/shared/abi/protocol/ArbitrationSettlement.js +60 -0
- package/vendor/shared/abi/protocol/ArbitrationSettlement.json +60 -0
- package/vendor/shared/abi/protocol/ArbitrationSettlement.ts +60 -0
- package/vendor/shared/abi/protocol/EmissionController.js +207 -0
- package/vendor/shared/abi/protocol/EmissionController.json +207 -0
- package/vendor/shared/abi/protocol/EmissionController.ts +207 -0
- package/vendor/shared/abi/protocol/TesterAssignment.js +172 -0
- package/vendor/shared/abi/protocol/TesterAssignment.json +172 -0
- package/vendor/shared/abi/protocol/TesterAssignment.ts +172 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationCourt.d.ts +137 -3
- package/vendor/shared/dist/abi/protocol/ArbitrationCourt.d.ts.map +1 -1
- package/vendor/shared/dist/abi/protocol/ArbitrationCourt.js +175 -3
- package/vendor/shared/dist/abi/protocol/ArbitrationCourt.js.map +1 -1
- package/vendor/shared/dist/abi/protocol/ArbitrationSelection.d.ts +32 -47
- package/vendor/shared/dist/abi/protocol/ArbitrationSelection.d.ts.map +1 -1
- package/vendor/shared/dist/abi/protocol/ArbitrationSelection.js +42 -61
- package/vendor/shared/dist/abi/protocol/ArbitrationSelection.js.map +1 -1
- package/vendor/shared/dist/abi/protocol/ArbitrationSettlement.d.ts +46 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationSettlement.d.ts.map +1 -1
- package/vendor/shared/dist/abi/protocol/ArbitrationSettlement.js +60 -0
- package/vendor/shared/dist/abi/protocol/ArbitrationSettlement.js.map +1 -1
- package/vendor/shared/dist/abi/protocol/EmissionController.d.ts +163 -0
- package/vendor/shared/dist/abi/protocol/EmissionController.d.ts.map +1 -1
- package/vendor/shared/dist/abi/protocol/EmissionController.js +207 -0
- package/vendor/shared/dist/abi/protocol/EmissionController.js.map +1 -1
- package/vendor/shared/dist/abi/protocol/TesterAssignment.d.ts +132 -0
- package/vendor/shared/dist/abi/protocol/TesterAssignment.d.ts.map +1 -1
- package/vendor/shared/dist/abi/protocol/TesterAssignment.js +172 -0
- package/vendor/shared/dist/abi/protocol/TesterAssignment.js.map +1 -1
- package/vendor/shared/dist/emission-schedule.d.ts +29 -1
- package/vendor/shared/dist/emission-schedule.d.ts.map +1 -1
- package/vendor/shared/dist/emission-schedule.js +51 -13
- package/vendor/shared/dist/emission-schedule.js.map +1 -1
- package/vendor/shared/dist/rules/index.d.ts +14 -4
- package/vendor/shared/dist/rules/index.d.ts.map +1 -1
- package/vendor/shared/dist/rules/index.js +44 -18
- package/vendor/shared/dist/rules/index.js.map +1 -1
- package/vendor/shared/dist/schemas/domain.d.ts +1 -1
- package/vendor/shared/dist/schemas/domain.d.ts.map +1 -1
- package/vendor/shared/dist/schemas/domain.js +6 -1
- package/vendor/shared/dist/schemas/domain.js.map +1 -1
- package/vendor/shared/params/params.json +19 -3
- package/vendor/shared/params/ranges.json +65 -1
- package/vendor/shared/src/emission-schedule.ts +66 -12
- package/vendor/shared/src/rules/index.ts +51 -22
- package/vendor/shared/src/schemas/domain.ts +6 -1
- package/vendor/shared/test/emission-schedule.test.ts +107 -3
- package/vendor/shared/test/rules.test.ts +16 -11
- package/vendor/shared/types/api/index.d.ts +8 -5
|
@@ -5,6 +5,18 @@ export const HOUR = 3600n;
|
|
|
5
5
|
export const BPS = 10_000n;
|
|
6
6
|
const LN2_18 = 693_147_180_559_945_309n;
|
|
7
7
|
|
|
8
|
+
/** One uninterrupted stretch of emission, as `EmissionController.emissionSegments` reports it. */
|
|
9
|
+
export type ScheduleSegment = {
|
|
10
|
+
/** Unix time the stretch started. */
|
|
11
|
+
start: bigint;
|
|
12
|
+
/** Unix time governance paused it; 0 while it is running. */
|
|
13
|
+
end: bigint;
|
|
14
|
+
/** Cumulative emission when it started. */
|
|
15
|
+
base: bigint;
|
|
16
|
+
/** AGT still to be emitted when it started. */
|
|
17
|
+
pool: bigint;
|
|
18
|
+
};
|
|
19
|
+
|
|
8
20
|
export type Schedule = {
|
|
9
21
|
startTime: bigint;
|
|
10
22
|
initialBalance: bigint;
|
|
@@ -12,6 +24,11 @@ export type Schedule = {
|
|
|
12
24
|
platformBps: bigint;
|
|
13
25
|
execBps: bigint;
|
|
14
26
|
testBps: bigint;
|
|
27
|
+
/**
|
|
28
|
+
* Stretches of emission, oldest first. Omitted or empty for a schedule that was never paused:
|
|
29
|
+
* one running stretch from `startTime` over `initialBalance`.
|
|
30
|
+
*/
|
|
31
|
+
segments?: readonly ScheduleSegment[];
|
|
15
32
|
};
|
|
16
33
|
|
|
17
34
|
export type CumulativeShares = {
|
|
@@ -73,24 +90,61 @@ export function firstHour(schedule: Schedule): bigint {
|
|
|
73
90
|
return schedule.startTime / HOUR;
|
|
74
91
|
}
|
|
75
92
|
|
|
76
|
-
|
|
77
|
-
|
|
93
|
+
/** Emitted from `pool` after `elapsed` seconds: hourly decay, linear inside the hour. */
|
|
94
|
+
function releasedFrom(schedule: Schedule, pool: bigint, elapsed: bigint): bigint {
|
|
95
|
+
const emittedAfter = (k: bigint) => pool - mulDiv(pool, powWad(schedule.hourDecay18, k), WAD);
|
|
96
|
+
const k = elapsed / HOUR;
|
|
97
|
+
const r = elapsed % HOUR;
|
|
98
|
+
const rk0 = emittedAfter(k);
|
|
99
|
+
if (r === 0n) return rk0;
|
|
100
|
+
const rk1 = emittedAfter(k + 1n);
|
|
101
|
+
return rk0 + ((rk1 - rk0) * r) / HOUR;
|
|
78
102
|
}
|
|
79
103
|
|
|
80
|
-
|
|
81
|
-
|
|
104
|
+
/** True while governance has emission paused. */
|
|
105
|
+
export function emissionPaused(schedule: Schedule): boolean {
|
|
106
|
+
const last = schedule.segments?.at(-1);
|
|
107
|
+
return last !== undefined && last.end !== 0n;
|
|
82
108
|
}
|
|
83
109
|
|
|
84
|
-
/**
|
|
110
|
+
/**
|
|
111
|
+
* Cumulative released amount R(t) at absolute unix time t. Paused time emits nothing, and a
|
|
112
|
+
* resumed stretch emits from what was left (less anything governance withdrew).
|
|
113
|
+
*/
|
|
85
114
|
export function cumulativeReleased(schedule: Schedule, t: bigint): bigint {
|
|
86
115
|
if (t <= schedule.startTime) return 0n;
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
116
|
+
const segments = schedule.segments ?? [];
|
|
117
|
+
for (let index = segments.length - 1; index >= 0; index -= 1) {
|
|
118
|
+
const segment = segments[index] as ScheduleSegment;
|
|
119
|
+
if (t < segment.start) continue;
|
|
120
|
+
const until = segment.end !== 0n && t > segment.end ? segment.end : t;
|
|
121
|
+
return segment.base + releasedFrom(schedule, segment.pool, until - segment.start);
|
|
122
|
+
}
|
|
123
|
+
return releasedFrom(schedule, schedule.initialBalance, t - schedule.startTime);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* AGT governance had withdrawn from the vault by time t. The schedule records what each pause took
|
|
128
|
+
* out of the pool, not when, so a withdrawal counts from the moment its pause began.
|
|
129
|
+
* `totalWithdrawn` (`EmissionController.vaultWithdrawn`) adds what a pause still in force has
|
|
130
|
+
* taken so far, which the schedule only records on resume.
|
|
131
|
+
*/
|
|
132
|
+
export function withdrawnBy(schedule: Schedule, t: bigint, totalWithdrawn = 0n): bigint {
|
|
133
|
+
const segments = schedule.segments ?? [];
|
|
134
|
+
let recorded = 0n;
|
|
135
|
+
let withdrawn = 0n;
|
|
136
|
+
for (let index = 1; index < segments.length; index += 1) {
|
|
137
|
+
const previous = segments[index - 1] as ScheduleSegment;
|
|
138
|
+
const segment = segments[index] as ScheduleSegment;
|
|
139
|
+
const taken = previous.pool - (segment.base - previous.base) - segment.pool;
|
|
140
|
+
recorded += taken;
|
|
141
|
+
if (t >= previous.end) withdrawn += taken;
|
|
142
|
+
}
|
|
143
|
+
const last = segments.at(-1);
|
|
144
|
+
if (last && last.end !== 0n && t >= last.end && totalWithdrawn > recorded) {
|
|
145
|
+
withdrawn += totalWithdrawn - recorded;
|
|
146
|
+
}
|
|
147
|
+
return withdrawn;
|
|
94
148
|
}
|
|
95
149
|
|
|
96
150
|
export function cumulativeShares(schedule: Schedule, t: bigint): CumulativeShares {
|
|
@@ -706,19 +706,42 @@ export function computeDisputeBound(reserve: bigint, params: Params): bigint {
|
|
|
706
706
|
return bpsDown(reserve, parameter(params, "deductionExecBps"));
|
|
707
707
|
}
|
|
708
708
|
|
|
709
|
-
/** Matches CourtRules.maxDisputeValue:
|
|
709
|
+
/** Matches CourtRules.maxDisputeValue: 0 publish cap means unlimited. */
|
|
710
710
|
export function computeMaxDisputeValue(
|
|
711
|
+
_pool: { eligibleArbitrators: number; fullScale: boolean },
|
|
712
|
+
params: Params,
|
|
713
|
+
): bigint {
|
|
714
|
+
const maximum = parameter(params, "arbPublishMaxDisputeValueAgt");
|
|
715
|
+
if (maximum === 0) return (1n << 256n) - 1n;
|
|
716
|
+
return agtToWei(maximum);
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
/** Largest dispute one minimum-stake arbitrator can seat under the current pool mode. */
|
|
720
|
+
export function computeArbitratorCoverage(
|
|
711
721
|
pool: { eligibleArbitrators: number; fullScale: boolean },
|
|
712
722
|
params: Params,
|
|
713
723
|
): bigint {
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
);
|
|
721
|
-
|
|
724
|
+
const key =
|
|
725
|
+
pool.eligibleArbitrators < parameter(params, "arbMinimumPoolSize")
|
|
726
|
+
? "arbExposureMultiplierBps.Bootstrap"
|
|
727
|
+
: pool.fullScale
|
|
728
|
+
? "arbExposureMultiplierBps.Full"
|
|
729
|
+
: "arbExposureMultiplierBps.Degraded";
|
|
730
|
+
return bpsDown(validatorRoleMinimum("ARBITRATOR", params), parameter(params, key));
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
function largestOddAtMost(value: number): number {
|
|
734
|
+
if (value < 3) return 3;
|
|
735
|
+
return value % 2 === 0 ? value - 1 : value;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/** Matches CourtRules.minimumReveal. */
|
|
739
|
+
export function minimumReveal(panelSize: number, params: Params): number {
|
|
740
|
+
if (!Number.isInteger(panelSize) || panelSize < 2) throw new RangeError("panelSize must be >= 2");
|
|
741
|
+
const majority = Math.floor(panelSize / 2) + 1;
|
|
742
|
+
let required = Math.ceil((parameter(params, "arbMinRevealBps") * panelSize) / BPS);
|
|
743
|
+
if (required >= panelSize) required = panelSize - 1;
|
|
744
|
+
return Math.max(majority, required);
|
|
722
745
|
}
|
|
723
746
|
|
|
724
747
|
// ---------------------------------------------------------------------------
|
|
@@ -729,27 +752,33 @@ export function arbitrationPanel(
|
|
|
729
752
|
eligibleArbitrators: number,
|
|
730
753
|
round: ArbitrationRound,
|
|
731
754
|
params: Params,
|
|
732
|
-
|
|
755
|
+
options: { tier?: number; selectable?: number } = {},
|
|
756
|
+
): { enabled: boolean; panelSize: number; majority: number; minReveal: number } {
|
|
733
757
|
if (!Number.isInteger(eligibleArbitrators) || eligibleArbitrators < 0)
|
|
734
758
|
throw new RangeError("eligibleArbitrators must be nonnegative");
|
|
735
|
-
|
|
759
|
+
const selectable = options.selectable ?? eligibleArbitrators;
|
|
760
|
+
const minPanel = parameter(params, "arbMinPanelSize");
|
|
761
|
+
if (selectable < minPanel) {
|
|
736
762
|
return { enabled: false, panelSize: 0, majority: 0, minReveal: 0 };
|
|
737
763
|
}
|
|
738
|
-
const
|
|
739
|
-
const
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
:
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
764
|
+
const tier = Math.min(4, Math.max(0, options.tier ?? 0));
|
|
765
|
+
const tierKey = `T${tier + 1}` as "T1" | "T2" | "T3" | "T4" | "T5";
|
|
766
|
+
const target = parameter(
|
|
767
|
+
params,
|
|
768
|
+
round === ArbitrationRound.First
|
|
769
|
+
? (`arbPanelSizeFirst.${tierKey}` as keyof Params)
|
|
770
|
+
: (`arbPanelSizeFinal.${tierKey}` as keyof Params),
|
|
771
|
+
);
|
|
772
|
+
const capacity =
|
|
773
|
+
round === ArbitrationRound.First
|
|
774
|
+
? largestOddAtMost(Math.floor(selectable / 2))
|
|
775
|
+
: largestOddAtMost(selectable);
|
|
776
|
+
const panelSize = Math.max(minPanel, Math.min(target, capacity));
|
|
748
777
|
return {
|
|
749
778
|
enabled: true,
|
|
750
779
|
panelSize,
|
|
751
780
|
majority: Math.floor(panelSize / 2) + 1,
|
|
752
|
-
minReveal:
|
|
781
|
+
minReveal: minimumReveal(panelSize, params),
|
|
753
782
|
};
|
|
754
783
|
}
|
|
755
784
|
|
|
@@ -129,7 +129,12 @@ export const DisputeSchema = z.object({
|
|
|
129
129
|
taskId: z.string().min(1),
|
|
130
130
|
trigger: z.enum(["REJECTION", "TEST_CONTESTED", "MAINTENANCE_DEFECT"]),
|
|
131
131
|
round: ArbitrationRoundSchema,
|
|
132
|
-
panelSize: z
|
|
132
|
+
panelSize: z
|
|
133
|
+
.number()
|
|
134
|
+
.int()
|
|
135
|
+
.min(0)
|
|
136
|
+
.max(21)
|
|
137
|
+
.refine((value) => value === 0 || value % 2 === 1, "panelSize must be 0 or an odd integer"),
|
|
133
138
|
criterionIds: z.array(z.string().min(1)).min(1),
|
|
134
139
|
phase: z.enum(["DRAWING", "CONFIRM", "COMMIT", "REVEAL", "TALLIED", "EXECUTED"]),
|
|
135
140
|
caseFee: DecimalIntegerSchema,
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
BPS,
|
|
5
|
-
HOUR,
|
|
6
|
-
WAD,
|
|
7
4
|
arbitrationEmitted,
|
|
5
|
+
BPS,
|
|
8
6
|
buildSchedule,
|
|
9
7
|
cumulativeReleased,
|
|
10
8
|
cumulativeShares,
|
|
9
|
+
emissionPaused,
|
|
11
10
|
firstHour,
|
|
11
|
+
HOUR,
|
|
12
12
|
hourShares,
|
|
13
13
|
pow2Neg,
|
|
14
14
|
powWad,
|
|
15
|
+
type Schedule,
|
|
16
|
+
type ScheduleSegment,
|
|
17
|
+
WAD,
|
|
18
|
+
withdrawnBy,
|
|
15
19
|
} from "../src/emission-schedule.js";
|
|
16
20
|
|
|
17
21
|
const B0 = 800_000_000n * WAD;
|
|
@@ -113,3 +117,103 @@ describe("emission-schedule", () => {
|
|
|
113
117
|
expect(c.arb).toBe(c.released - c.platform - c.exec - c.test);
|
|
114
118
|
});
|
|
115
119
|
});
|
|
120
|
+
|
|
121
|
+
describe("emission-schedule across pauses", () => {
|
|
122
|
+
const start = 7_776_000n;
|
|
123
|
+
const firstPause = start + 37_200n;
|
|
124
|
+
const firstResume = firstPause + 18_000n;
|
|
125
|
+
const secondPause = firstResume + 27_900n;
|
|
126
|
+
const secondResume = secondPause + 172_800n;
|
|
127
|
+
const withdrawn = 100_000_000n * WAD;
|
|
128
|
+
|
|
129
|
+
/** Replays `pauseEmission`, `withdrawVault` and `resumeEmission` the way the contract records them. */
|
|
130
|
+
function pausedTwice(): Schedule {
|
|
131
|
+
const schedule: Schedule & { segments: ScheduleSegment[] } = {
|
|
132
|
+
...buildSchedule({
|
|
133
|
+
startTime: start,
|
|
134
|
+
initialBalance: B0,
|
|
135
|
+
halfLifeDays: 912n,
|
|
136
|
+
platformBps: 1000n,
|
|
137
|
+
execBps: 6500n,
|
|
138
|
+
testBps: 1500n,
|
|
139
|
+
}),
|
|
140
|
+
segments: [{ start, end: 0n, base: 0n, pool: B0 }],
|
|
141
|
+
};
|
|
142
|
+
const pause = (t: bigint) => {
|
|
143
|
+
const last = schedule.segments.at(-1) as ScheduleSegment;
|
|
144
|
+
const released = cumulativeReleased(schedule, t);
|
|
145
|
+
last.end = t;
|
|
146
|
+
return last.pool - (released - last.base);
|
|
147
|
+
};
|
|
148
|
+
const resume = (t: bigint, pool: bigint) => {
|
|
149
|
+
schedule.segments.push({
|
|
150
|
+
start: t,
|
|
151
|
+
end: 0n,
|
|
152
|
+
base: cumulativeReleased(schedule, t),
|
|
153
|
+
pool,
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
resume(firstResume, pause(firstPause) - withdrawn);
|
|
157
|
+
resume(secondResume, pause(secondPause));
|
|
158
|
+
return schedule;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
it("matches the EmissionController vector bit for bit", () => {
|
|
162
|
+
// Same scenario and values as testPausedScheduleMatchesSharedVector in EmissionController.t.sol.
|
|
163
|
+
const s = pausedTwice();
|
|
164
|
+
expect(cumulativeReleased(s, firstPause)).toBe(261745125786334400000000n);
|
|
165
|
+
expect(cumulativeReleased(s, firstResume + 1_800n)).toBe(272824573857589555429498n);
|
|
166
|
+
expect(cumulativeReleased(s, secondPause)).toBe(433458152005414719302928n);
|
|
167
|
+
expect(cumulativeReleased(s, secondResume + 361_020n)).toBe(2651591916712552630764968n);
|
|
168
|
+
expect(hourShares(s, firstPause / HOUR).exec).toBe(5487279239501280000000n);
|
|
169
|
+
expect(hourShares(s, firstResume / HOUR).exec).toBe(9602188328421134705564n);
|
|
170
|
+
expect(s.segments?.[1]?.pool).toBe(699738254874213665600000000n);
|
|
171
|
+
expect(s.segments?.[2]).toEqual({
|
|
172
|
+
start: secondResume,
|
|
173
|
+
end: 0n,
|
|
174
|
+
base: 433458152005414719302928n,
|
|
175
|
+
pool: 699566541847994585280697072n,
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
it("emits nothing while paused and leaves earlier hours untouched", () => {
|
|
180
|
+
const s = pausedTwice();
|
|
181
|
+
const unpaused = { ...s, segments: undefined };
|
|
182
|
+
expect(cumulativeReleased(s, firstPause - 7_200n)).toBe(
|
|
183
|
+
cumulativeReleased(unpaused, firstPause - 7_200n),
|
|
184
|
+
);
|
|
185
|
+
expect(cumulativeReleased(s, firstResume)).toBe(cumulativeReleased(s, firstPause));
|
|
186
|
+
expect(hourShares(s, firstPause / HOUR + 2n).emission).toBe(0n);
|
|
187
|
+
expect(arbitrationEmitted(s, secondPause, secondResume)).toBe(0n);
|
|
188
|
+
expect(emissionPaused(s)).toBe(false);
|
|
189
|
+
expect(emissionPaused({ ...s, segments: s.segments?.slice(0, 2) })).toBe(true);
|
|
190
|
+
expect(emissionPaused(unpaused)).toBe(false);
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
it("never emits what governance withdrew", () => {
|
|
194
|
+
const s = pausedTwice();
|
|
195
|
+
const farFuture = start + 2_000n * 365n * 24n * HOUR;
|
|
196
|
+
expect(cumulativeReleased(s, farFuture)).toBe(B0 - withdrawn);
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
it("dates a withdrawal from the pause that allowed it", () => {
|
|
200
|
+
const s = pausedTwice();
|
|
201
|
+
expect(withdrawnBy(s, firstPause - 1n)).toBe(0n);
|
|
202
|
+
expect(withdrawnBy(s, firstPause)).toBe(withdrawn);
|
|
203
|
+
expect(withdrawnBy(s, secondResume + HOUR)).toBe(withdrawn);
|
|
204
|
+
// A pause still in force has not recorded its withdrawals yet: the on-chain total supplies them.
|
|
205
|
+
const stillPaused = { ...s, segments: s.segments?.slice(0, 2) };
|
|
206
|
+
expect(withdrawnBy(stillPaused, secondPause - 1n, withdrawn + 5n)).toBe(withdrawn);
|
|
207
|
+
expect(withdrawnBy(stillPaused, secondPause, withdrawn + 5n)).toBe(withdrawn + 5n);
|
|
208
|
+
expect(withdrawnBy({ ...s, segments: undefined }, secondResume, 0n)).toBe(0n);
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
it("hour shares still telescope across a pause", () => {
|
|
212
|
+
const s = pausedTwice();
|
|
213
|
+
const first = start / HOUR;
|
|
214
|
+
const last = (secondResume + 5n * HOUR) / HOUR;
|
|
215
|
+
let emitted = 0n;
|
|
216
|
+
for (let hour = first; hour <= last; hour += 1n) emitted += hourShares(s, hour).emission;
|
|
217
|
+
expect(emitted).toBe(cumulativeReleased(s, (last + 1n) * HOUR));
|
|
218
|
+
});
|
|
219
|
+
});
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
computeEarliestSubmitSeconds,
|
|
24
24
|
computeEscalationStep,
|
|
25
25
|
computeFinalAppealFee,
|
|
26
|
+
computeArbitratorCoverage,
|
|
26
27
|
computeMaxDisputeValue,
|
|
27
28
|
computeMinimumTier,
|
|
28
29
|
computeReserve,
|
|
@@ -306,13 +307,14 @@ describe("AGT units", () => {
|
|
|
306
307
|
|
|
307
308
|
describe("arbitration", () => {
|
|
308
309
|
it.each([
|
|
309
|
-
[
|
|
310
|
-
[
|
|
311
|
-
[
|
|
312
|
-
[
|
|
313
|
-
[
|
|
314
|
-
|
|
315
|
-
|
|
310
|
+
[2, ArbitrationRound.First, false, 0, 0],
|
|
311
|
+
[3, ArbitrationRound.First, true, 3, 0],
|
|
312
|
+
[18, ArbitrationRound.First, true, 3, 0],
|
|
313
|
+
[20, ArbitrationRound.First, true, 5, 2],
|
|
314
|
+
[45, ArbitrationRound.First, true, 11, 4],
|
|
315
|
+
[45, ArbitrationRound.Final, true, 21, 4],
|
|
316
|
+
])("selects panel for N_arb=%s round=%s tier=%s", (count, round, enabled, panelSize, tier) => {
|
|
317
|
+
expect(arbitrationPanel(count, round, defaultParams, { tier, selectable: count })).toMatchObject({
|
|
316
318
|
enabled,
|
|
317
319
|
panelSize,
|
|
318
320
|
});
|
|
@@ -337,15 +339,18 @@ describe("arbitration", () => {
|
|
|
337
339
|
});
|
|
338
340
|
});
|
|
339
341
|
|
|
340
|
-
it("
|
|
342
|
+
it("publishes without a dispute cap by default and still reports seat coverage", () => {
|
|
341
343
|
expect(computeDisputeBound(agtToWei(1_000), defaultParams)).toBe(agtToWei(650));
|
|
342
344
|
expect(computeMaxDisputeValue({ eligibleArbitrators: 17, fullScale: false }, defaultParams)).toBe(
|
|
343
|
-
|
|
345
|
+
(1n << 256n) - 1n,
|
|
344
346
|
);
|
|
345
|
-
expect(
|
|
347
|
+
expect(computeArbitratorCoverage({ eligibleArbitrators: 3, fullScale: false }, defaultParams)).toBe(
|
|
348
|
+
agtToWei(600_000),
|
|
349
|
+
);
|
|
350
|
+
expect(computeArbitratorCoverage({ eligibleArbitrators: 18, fullScale: false }, defaultParams)).toBe(
|
|
346
351
|
agtToWei(1_500_000),
|
|
347
352
|
);
|
|
348
|
-
expect(
|
|
353
|
+
expect(computeArbitratorCoverage({ eligibleArbitrators: 40, fullScale: true }, defaultParams)).toBe(
|
|
349
354
|
agtToWei(3_300_000),
|
|
350
355
|
);
|
|
351
356
|
});
|
|
@@ -152,11 +152,11 @@ export type CreateExecutorShareClaimIntentResponse = { readonly "taskId": string
|
|
|
152
152
|
export type CreateTesterSeatClaimIntentRequest = { readonly "taskId"?: string; readonly "taskIds"?: readonly (string)[]; };
|
|
153
153
|
export type CreateTesterSeatClaimIntentResponse = { readonly "taskId": string; readonly "tester": string; readonly "amountWei": string; readonly "hourId": number; readonly "claims": readonly ({ readonly "taskId": string; readonly "amountWei": string; readonly "claimableWei": string; readonly "hourId": number; })[]; readonly "claimableWei": string; readonly "tx": { readonly "chainId": number; readonly "to": string; readonly "data": string; readonly "value": "0"; }; };
|
|
154
154
|
export type ListDisputesRequest = never;
|
|
155
|
-
export type ListDisputesResponse = { readonly "items": readonly ({ readonly "caseId": string; readonly "taskId": string; readonly "publisher": string; readonly "executor": string; readonly "appellant": string | null; readonly "reasonHash": string; readonly "phase": "DRAWING" | "CONFIRMING" | "COMMIT" | "REVEAL" | "TALLIED" | "FALLBACK" | "EXECUTED"; readonly "ruling": "NONE" | "PUBLISHER_WINS" | "EXECUTOR_WINS" | "PARTIAL"; readonly "executorAwardBps": number; readonly "rulingHash": string | null; readonly "finalRound": boolean; readonly "appealed": boolean; readonly "executed": boolean; readonly "seedBlock": number | null; readonly "phaseDeadline": string | null; readonly "appealDeadline": string | null; readonly "evidenceHash": string | null; readonly "evidenceAsOf": string | null; readonly "criteria": readonly ({ readonly "id": string; readonly "weightBps": number; readonly "key": string | null; readonly "description": string | null; })[]; readonly "statement": { readonly "text": string; readonly "criteria": readonly (string)[]; } | null; readonly "evidence": { readonly "access": "PUBLIC" | "SUMMARY" | "FULL"; readonly "delivery": { readonly "submissionId": string | null; readonly "artifactHash": string; readonly "fileCount": number; readonly "files": readonly ({ readonly "name": string; readonly "size": number; readonly "sha256": string; readonly "path": string; })[]; } | null; readonly "testReports": { readonly "submitted": number; readonly "expected": number; readonly "path": string | null; }; readonly "missing": readonly ("STATEMENT" | "DELIVERY" | "TEST_REPORTS")[]; }; readonly "seats": readonly ({ readonly "juror": string; readonly "finalRound": boolean; readonly "confirmed": boolean; readonly "committed": boolean; readonly "revealed": boolean; readonly "lockedAmount": string | null; })[]; readonly "fallback": { readonly "phase": "SEEDING" | "REPORTING" | "REDRAW_DUE" | "TALLY_DUE" | "TALLIED"; readonly "seedBlock": number; readonly "reportDeadline": string | null; readonly "redraws": number; readonly "redrawRoundsMax": number; readonly "testers": readonly ({ readonly "address": string; readonly "status": "PENDING" | "SUBMITTED" | "REPLACED"; readonly "report": { readonly "approved": boolean; readonly "criteria": readonly ({ readonly "criterionId": string; readonly "passed": boolean; readonly "note": string; })[]; readonly "summary": string; readonly "reportHash": string; } | null; })[]; readonly "approvals": number; readonly "reportsSubmitted": number; readonly "outcome": "EXECUTOR_WINS" | "PUBLISHER_WINS" | null; readonly "candidatesExhausted": boolean; } | null; readonly "openedAt": string; readonly "updatedAt": string; })[]; readonly "nextCursor": string | null; readonly "hasMore": boolean; readonly "total": number; };
|
|
155
|
+
export type ListDisputesResponse = { readonly "items": readonly ({ readonly "caseId": string; readonly "taskId": string; readonly "publisher": string; readonly "executor": string; readonly "appellant": string | null; readonly "reasonHash": string; readonly "phase": "DRAWING" | "CONFIRMING" | "COMMIT" | "REVEAL" | "TALLIED" | "FALLBACK" | "EXECUTED"; readonly "ruling": "NONE" | "PUBLISHER_WINS" | "EXECUTOR_WINS" | "PARTIAL"; readonly "executorAwardBps": number; readonly "rulingHash": string | null; readonly "finalRound": boolean; readonly "appealed": boolean; readonly "executed": boolean; readonly "seedBlock": number | null; readonly "phaseDeadline": string | null; readonly "appealDeadline": string | null; readonly "resolutionSource": "PANEL" | "FALLBACK" | "DEFAULT" | "GOVERNANCE"; readonly "awaitingPoolSince": string | null; readonly "defaultRulingAt": string | null; readonly "publisherWaived": boolean; readonly "executorWaived": boolean; readonly "evidenceHash": string | null; readonly "evidenceAsOf": string | null; readonly "criteria": readonly ({ readonly "id": string; readonly "weightBps": number; readonly "key": string | null; readonly "description": string | null; })[]; readonly "statement": { readonly "text": string; readonly "criteria": readonly (string)[]; } | null; readonly "evidence": { readonly "access": "PUBLIC" | "SUMMARY" | "FULL"; readonly "delivery": { readonly "submissionId": string | null; readonly "artifactHash": string; readonly "fileCount": number; readonly "files": readonly ({ readonly "name": string; readonly "size": number; readonly "sha256": string; readonly "path": string; })[]; } | null; readonly "testReports": { readonly "submitted": number; readonly "expected": number; readonly "path": string | null; }; readonly "missing": readonly ("STATEMENT" | "DELIVERY" | "TEST_REPORTS")[]; }; readonly "seats": readonly ({ readonly "juror": string; readonly "finalRound": boolean; readonly "confirmed": boolean; readonly "committed": boolean; readonly "revealed": boolean; readonly "lockedAmount": string | null; })[]; readonly "fallback": { readonly "phase": "SEEDING" | "REPORTING" | "REDRAW_DUE" | "TALLY_DUE" | "TALLIED"; readonly "seedBlock": number; readonly "reportDeadline": string | null; readonly "redraws": number; readonly "redrawRoundsMax": number; readonly "testers": readonly ({ readonly "address": string; readonly "status": "PENDING" | "SUBMITTED" | "REPLACED"; readonly "report": { readonly "approved": boolean; readonly "criteria": readonly ({ readonly "criterionId": string; readonly "passed": boolean; readonly "note": string; })[]; readonly "summary": string; readonly "reportHash": string; } | null; })[]; readonly "approvals": number; readonly "reportsSubmitted": number; readonly "outcome": "EXECUTOR_WINS" | "PUBLISHER_WINS" | null; readonly "candidatesExhausted": boolean; } | null; readonly "openedAt": string; readonly "updatedAt": string; })[]; readonly "nextCursor": string | null; readonly "hasMore": boolean; readonly "total": number; };
|
|
156
156
|
export type GetDisputeRequest = never;
|
|
157
|
-
export type GetDisputeResponse = { readonly "caseId": string; readonly "taskId": string; readonly "publisher": string; readonly "executor": string; readonly "appellant": string | null; readonly "reasonHash": string; readonly "phase": "DRAWING" | "CONFIRMING" | "COMMIT" | "REVEAL" | "TALLIED" | "FALLBACK" | "EXECUTED"; readonly "ruling": "NONE" | "PUBLISHER_WINS" | "EXECUTOR_WINS" | "PARTIAL"; readonly "executorAwardBps": number; readonly "rulingHash": string | null; readonly "finalRound": boolean; readonly "appealed": boolean; readonly "executed": boolean; readonly "seedBlock": number | null; readonly "phaseDeadline": string | null; readonly "appealDeadline": string | null; readonly "evidenceHash": string | null; readonly "evidenceAsOf": string | null; readonly "criteria": readonly ({ readonly "id": string; readonly "weightBps": number; readonly "key": string | null; readonly "description": string | null; })[]; readonly "statement": { readonly "text": string; readonly "criteria": readonly (string)[]; } | null; readonly "evidence": { readonly "access": "PUBLIC" | "SUMMARY" | "FULL"; readonly "delivery": { readonly "submissionId": string | null; readonly "artifactHash": string; readonly "fileCount": number; readonly "files": readonly ({ readonly "name": string; readonly "size": number; readonly "sha256": string; readonly "path": string; })[]; } | null; readonly "testReports": { readonly "submitted": number; readonly "expected": number; readonly "path": string | null; }; readonly "missing": readonly ("STATEMENT" | "DELIVERY" | "TEST_REPORTS")[]; }; readonly "seats": readonly ({ readonly "juror": string; readonly "finalRound": boolean; readonly "confirmed": boolean; readonly "committed": boolean; readonly "revealed": boolean; readonly "lockedAmount": string | null; })[]; readonly "fallback": { readonly "phase": "SEEDING" | "REPORTING" | "REDRAW_DUE" | "TALLY_DUE" | "TALLIED"; readonly "seedBlock": number; readonly "reportDeadline": string | null; readonly "redraws": number; readonly "redrawRoundsMax": number; readonly "testers": readonly ({ readonly "address": string; readonly "status": "PENDING" | "SUBMITTED" | "REPLACED"; readonly "report": { readonly "approved": boolean; readonly "criteria": readonly ({ readonly "criterionId": string; readonly "passed": boolean; readonly "note": string; })[]; readonly "summary": string; readonly "reportHash": string; } | null; })[]; readonly "approvals": number; readonly "reportsSubmitted": number; readonly "outcome": "EXECUTOR_WINS" | "PUBLISHER_WINS" | null; readonly "candidatesExhausted": boolean; } | null; readonly "openedAt": string; readonly "updatedAt": string; };
|
|
157
|
+
export type GetDisputeResponse = { readonly "caseId": string; readonly "taskId": string; readonly "publisher": string; readonly "executor": string; readonly "appellant": string | null; readonly "reasonHash": string; readonly "phase": "DRAWING" | "CONFIRMING" | "COMMIT" | "REVEAL" | "TALLIED" | "FALLBACK" | "EXECUTED"; readonly "ruling": "NONE" | "PUBLISHER_WINS" | "EXECUTOR_WINS" | "PARTIAL"; readonly "executorAwardBps": number; readonly "rulingHash": string | null; readonly "finalRound": boolean; readonly "appealed": boolean; readonly "executed": boolean; readonly "seedBlock": number | null; readonly "phaseDeadline": string | null; readonly "appealDeadline": string | null; readonly "resolutionSource": "PANEL" | "FALLBACK" | "DEFAULT" | "GOVERNANCE"; readonly "awaitingPoolSince": string | null; readonly "defaultRulingAt": string | null; readonly "publisherWaived": boolean; readonly "executorWaived": boolean; readonly "evidenceHash": string | null; readonly "evidenceAsOf": string | null; readonly "criteria": readonly ({ readonly "id": string; readonly "weightBps": number; readonly "key": string | null; readonly "description": string | null; })[]; readonly "statement": { readonly "text": string; readonly "criteria": readonly (string)[]; } | null; readonly "evidence": { readonly "access": "PUBLIC" | "SUMMARY" | "FULL"; readonly "delivery": { readonly "submissionId": string | null; readonly "artifactHash": string; readonly "fileCount": number; readonly "files": readonly ({ readonly "name": string; readonly "size": number; readonly "sha256": string; readonly "path": string; })[]; } | null; readonly "testReports": { readonly "submitted": number; readonly "expected": number; readonly "path": string | null; }; readonly "missing": readonly ("STATEMENT" | "DELIVERY" | "TEST_REPORTS")[]; }; readonly "seats": readonly ({ readonly "juror": string; readonly "finalRound": boolean; readonly "confirmed": boolean; readonly "committed": boolean; readonly "revealed": boolean; readonly "lockedAmount": string | null; })[]; readonly "fallback": { readonly "phase": "SEEDING" | "REPORTING" | "REDRAW_DUE" | "TALLY_DUE" | "TALLIED"; readonly "seedBlock": number; readonly "reportDeadline": string | null; readonly "redraws": number; readonly "redrawRoundsMax": number; readonly "testers": readonly ({ readonly "address": string; readonly "status": "PENDING" | "SUBMITTED" | "REPLACED"; readonly "report": { readonly "approved": boolean; readonly "criteria": readonly ({ readonly "criterionId": string; readonly "passed": boolean; readonly "note": string; })[]; readonly "summary": string; readonly "reportHash": string; } | null; })[]; readonly "approvals": number; readonly "reportsSubmitted": number; readonly "outcome": "EXECUTOR_WINS" | "PUBLISHER_WINS" | null; readonly "candidatesExhausted": boolean; } | null; readonly "openedAt": string; readonly "updatedAt": string; };
|
|
158
158
|
export type ListArbitratorCasesRequest = never;
|
|
159
|
-
export type ListArbitratorCasesResponse = { readonly "items": readonly ({ readonly "caseId": string; readonly "taskId": string; readonly "publisher": string; readonly "executor": string; readonly "appellant": string | null; readonly "reasonHash": string; readonly "phase": "DRAWING" | "CONFIRMING" | "COMMIT" | "REVEAL" | "TALLIED" | "FALLBACK" | "EXECUTED"; readonly "ruling": "NONE" | "PUBLISHER_WINS" | "EXECUTOR_WINS" | "PARTIAL"; readonly "executorAwardBps": number; readonly "rulingHash": string | null; readonly "finalRound": boolean; readonly "appealed": boolean; readonly "executed": boolean; readonly "seedBlock": number | null; readonly "phaseDeadline": string | null; readonly "appealDeadline": string | null; readonly "evidenceHash": string | null; readonly "evidenceAsOf": string | null; readonly "criteria": readonly ({ readonly "id": string; readonly "weightBps": number; readonly "key": string | null; readonly "description": string | null; })[]; readonly "statement": { readonly "text": string; readonly "criteria": readonly (string)[]; } | null; readonly "evidence": { readonly "access": "PUBLIC" | "SUMMARY" | "FULL"; readonly "delivery": { readonly "submissionId": string | null; readonly "artifactHash": string; readonly "fileCount": number; readonly "files": readonly ({ readonly "name": string; readonly "size": number; readonly "sha256": string; readonly "path": string; })[]; } | null; readonly "testReports": { readonly "submitted": number; readonly "expected": number; readonly "path": string | null; }; readonly "missing": readonly ("STATEMENT" | "DELIVERY" | "TEST_REPORTS")[]; }; readonly "seats": readonly ({ readonly "juror": string; readonly "finalRound": boolean; readonly "confirmed": boolean; readonly "committed": boolean; readonly "revealed": boolean; readonly "lockedAmount": string | null; })[]; readonly "fallback": { readonly "phase": "SEEDING" | "REPORTING" | "REDRAW_DUE" | "TALLY_DUE" | "TALLIED"; readonly "seedBlock": number; readonly "reportDeadline": string | null; readonly "redraws": number; readonly "redrawRoundsMax": number; readonly "testers": readonly ({ readonly "address": string; readonly "status": "PENDING" | "SUBMITTED" | "REPLACED"; readonly "report": { readonly "approved": boolean; readonly "criteria": readonly ({ readonly "criterionId": string; readonly "passed": boolean; readonly "note": string; })[]; readonly "summary": string; readonly "reportHash": string; } | null; })[]; readonly "approvals": number; readonly "reportsSubmitted": number; readonly "outcome": "EXECUTOR_WINS" | "PUBLISHER_WINS" | null; readonly "candidatesExhausted": boolean; } | null; readonly "openedAt": string; readonly "updatedAt": string; })[]; };
|
|
159
|
+
export type ListArbitratorCasesResponse = { readonly "items": readonly ({ readonly "caseId": string; readonly "taskId": string; readonly "publisher": string; readonly "executor": string; readonly "appellant": string | null; readonly "reasonHash": string; readonly "phase": "DRAWING" | "CONFIRMING" | "COMMIT" | "REVEAL" | "TALLIED" | "FALLBACK" | "EXECUTED"; readonly "ruling": "NONE" | "PUBLISHER_WINS" | "EXECUTOR_WINS" | "PARTIAL"; readonly "executorAwardBps": number; readonly "rulingHash": string | null; readonly "finalRound": boolean; readonly "appealed": boolean; readonly "executed": boolean; readonly "seedBlock": number | null; readonly "phaseDeadline": string | null; readonly "appealDeadline": string | null; readonly "resolutionSource": "PANEL" | "FALLBACK" | "DEFAULT" | "GOVERNANCE"; readonly "awaitingPoolSince": string | null; readonly "defaultRulingAt": string | null; readonly "publisherWaived": boolean; readonly "executorWaived": boolean; readonly "evidenceHash": string | null; readonly "evidenceAsOf": string | null; readonly "criteria": readonly ({ readonly "id": string; readonly "weightBps": number; readonly "key": string | null; readonly "description": string | null; })[]; readonly "statement": { readonly "text": string; readonly "criteria": readonly (string)[]; } | null; readonly "evidence": { readonly "access": "PUBLIC" | "SUMMARY" | "FULL"; readonly "delivery": { readonly "submissionId": string | null; readonly "artifactHash": string; readonly "fileCount": number; readonly "files": readonly ({ readonly "name": string; readonly "size": number; readonly "sha256": string; readonly "path": string; })[]; } | null; readonly "testReports": { readonly "submitted": number; readonly "expected": number; readonly "path": string | null; }; readonly "missing": readonly ("STATEMENT" | "DELIVERY" | "TEST_REPORTS")[]; }; readonly "seats": readonly ({ readonly "juror": string; readonly "finalRound": boolean; readonly "confirmed": boolean; readonly "committed": boolean; readonly "revealed": boolean; readonly "lockedAmount": string | null; })[]; readonly "fallback": { readonly "phase": "SEEDING" | "REPORTING" | "REDRAW_DUE" | "TALLY_DUE" | "TALLIED"; readonly "seedBlock": number; readonly "reportDeadline": string | null; readonly "redraws": number; readonly "redrawRoundsMax": number; readonly "testers": readonly ({ readonly "address": string; readonly "status": "PENDING" | "SUBMITTED" | "REPLACED"; readonly "report": { readonly "approved": boolean; readonly "criteria": readonly ({ readonly "criterionId": string; readonly "passed": boolean; readonly "note": string; })[]; readonly "summary": string; readonly "reportHash": string; } | null; })[]; readonly "approvals": number; readonly "reportsSubmitted": number; readonly "outcome": "EXECUTOR_WINS" | "PUBLISHER_WINS" | null; readonly "candidatesExhausted": boolean; } | null; readonly "openedAt": string; readonly "updatedAt": string; })[]; };
|
|
160
160
|
export type CreateFallbackReportIntentRequest = { readonly "approved": boolean; readonly "criteria": readonly ({ readonly "criterionId": string; readonly "passed": boolean; readonly "note": string; })[]; readonly "summary": string; };
|
|
161
161
|
export type CreateFallbackReportIntentResponse = { readonly "caseId": string; readonly "reportHash": string; readonly "tx": { readonly "chainId": number; readonly "to": string; readonly "data": string; readonly "value": "0"; }; };
|
|
162
162
|
export type CreateDisputeRequest = { readonly "statement": string; readonly "criteria"?: readonly (string)[]; };
|
|
@@ -169,6 +169,8 @@ export type CreateArbitrationVoteIntentRequest = { readonly "salt": string; read
|
|
|
169
169
|
export type CreateArbitrationVoteIntentResponse = { readonly "caseId": string; readonly "finalRound": boolean; readonly "salt": string; readonly "reasonHashes": readonly (string)[]; readonly "commitments": readonly (string)[]; readonly "commitTx": { readonly "chainId": number; readonly "to": string; readonly "data": string; readonly "value": "0"; }; readonly "revealTx": { readonly "chainId": number; readonly "to": string; readonly "data": string; readonly "value": "0"; }; };
|
|
170
170
|
export type AppealDisputeRequest = never;
|
|
171
171
|
export type AppealDisputeResponse = { readonly "caseId": string; readonly "requiredBondAgt": string; readonly "tx": { readonly "chainId": number; readonly "to": string; readonly "data": string; readonly "value": "0"; }; readonly "approve": { readonly "token": string; readonly "spender": string; readonly "amount": string; readonly "data": string; }; };
|
|
172
|
+
export type WaiveDisputeAppealRequest = never;
|
|
173
|
+
export type WaiveDisputeAppealResponse = { readonly "caseId": string; readonly "tx": { readonly "chainId": number; readonly "to": string; readonly "data": string; readonly "value": "0"; }; };
|
|
172
174
|
export type WaiveTaskAppealRequest = never;
|
|
173
175
|
export type WaiveTaskAppealResponse = { readonly "taskId": string; readonly "tx": { readonly "chainId": number; readonly "to": string; readonly "data": string; readonly "value": "0"; }; };
|
|
174
176
|
export type ListEmissionHoursRequest = never;
|
|
@@ -176,9 +178,9 @@ export type ListEmissionHoursResponse = { readonly "items": readonly ({ readonly
|
|
|
176
178
|
export type GetEmissionHourRequest = never;
|
|
177
179
|
export type GetEmissionHourResponse = { readonly "hourId": number; readonly "emission": string; readonly "allocationRoot": string | null; readonly "totalTaskWeight": string; readonly "activeTaskCount": number; readonly "platformAmount": string; readonly "executorAmount": string; readonly "testerAmount": string; readonly "arbitrationAmount": string; readonly "allocatedAmount": string; readonly "burnedAmount": string; readonly "submitted": boolean; readonly "finalized": boolean; readonly "updatedAt": string; };
|
|
178
180
|
export type GetEmissionStatusRequest = never;
|
|
179
|
-
export type GetEmissionStatusResponse = { readonly "latest": { readonly "hourId": number; readonly "emission": string; readonly "allocationRoot": string | null; readonly "totalTaskWeight": string; readonly "activeTaskCount": number; readonly "platformAmount": string; readonly "executorAmount": string; readonly "testerAmount": string; readonly "arbitrationAmount": string; readonly "allocatedAmount": string; readonly "burnedAmount": string; readonly "submitted": boolean; readonly "finalized": boolean; readonly "updatedAt": string; } | null; readonly "schedule": { readonly "startTime": string; readonly "initialBalanceAgt": string; readonly "hourDecay18": string; readonly "platformBps": string; readonly "execBps": string; readonly "testBps": string; } | null; readonly "cumulativeReleasedAgt": string; readonly "currentHourEmissionAgt": string; readonly "lastSettledHour": number | null; readonly "lagHours": number; readonly "keeper": { readonly "blockedBy": string | null; readonly "pending": readonly (string)[]; readonly "warnings": readonly (string)[]; }; };
|
|
181
|
+
export type GetEmissionStatusResponse = { readonly "latest": { readonly "hourId": number; readonly "emission": string; readonly "allocationRoot": string | null; readonly "totalTaskWeight": string; readonly "activeTaskCount": number; readonly "platformAmount": string; readonly "executorAmount": string; readonly "testerAmount": string; readonly "arbitrationAmount": string; readonly "allocatedAmount": string; readonly "burnedAmount": string; readonly "submitted": boolean; readonly "finalized": boolean; readonly "updatedAt": string; } | null; readonly "schedule": { readonly "startTime": string; readonly "initialBalanceAgt": string; readonly "hourDecay18": string; readonly "platformBps": string; readonly "execBps": string; readonly "testBps": string; readonly "segments": readonly ({ readonly "start": string; readonly "end": string; readonly "base": string; readonly "pool": string; })[]; readonly "paused": boolean; } | null; readonly "cumulativeReleasedAgt": string; readonly "vaultWithdrawnAgt": string; readonly "currentHourEmissionAgt": string; readonly "lastSettledHour": number | null; readonly "lagHours": number; readonly "keeper": { readonly "blockedBy": string | null; readonly "pending": readonly (string)[]; readonly "warnings": readonly (string)[]; }; };
|
|
180
182
|
export type GetEconomySummaryRequest = never;
|
|
181
|
-
export type GetEconomySummaryResponse = { readonly "incentiveVaultBalanceAgt": string; readonly "cumulativeReleasedAgt": string; readonly "initialTokenSupplyAgt": string; readonly "currentTokenSupplyAgt": string; readonly "cumulativeBurnedAgt": string; readonly "rewardClaimedAgt": string; readonly "rewardClaimableAgt": string; readonly "rewardLockedAgt": string; readonly "arbitrationPoolBalanceAgt": string; readonly "arbitrationPoolReserveAgt": string; readonly "accrualStartedAt": string | null; readonly "updatedAt": string | null; };
|
|
183
|
+
export type GetEconomySummaryResponse = { readonly "incentiveVaultBalanceAgt": string; readonly "cumulativeReleasedAgt": string; readonly "incentiveVaultWithdrawnAgt": string; readonly "initialTokenSupplyAgt": string; readonly "currentTokenSupplyAgt": string; readonly "cumulativeBurnedAgt": string; readonly "rewardClaimedAgt": string; readonly "rewardClaimableAgt": string; readonly "rewardLockedAgt": string; readonly "arbitrationPoolBalanceAgt": string; readonly "arbitrationPoolReserveAgt": string; readonly "accrualStartedAt": string | null; readonly "updatedAt": string | null; };
|
|
182
184
|
export type GetStakingPositionsRequest = never;
|
|
183
185
|
export type GetStakingPositionsResponse = { readonly "publisher": string; readonly "balanceAgt": string; readonly "exposureAgt": string; readonly "reservations": readonly ({ readonly "taskId": string; readonly "rewardAgt": string; readonly "chargedAgt": string; readonly "startAt": string; readonly "endAt": string; })[]; readonly "updatedBlock": number | null; readonly "updatedAt": string | null; };
|
|
184
186
|
export type GetPublisherReadinessRequest = never;
|
|
@@ -285,6 +287,7 @@ export interface ApiOperations {
|
|
|
285
287
|
readonly "confirmArbitrationSeat": { readonly method: "POST"; readonly path: "/disputes/{id}/confirm"; readonly request: ConfirmArbitrationSeatRequest; readonly response: ConfirmArbitrationSeatResponse; };
|
|
286
288
|
readonly "createArbitrationVoteIntent": { readonly method: "POST"; readonly path: "/disputes/{id}/vote-intent"; readonly request: CreateArbitrationVoteIntentRequest; readonly response: CreateArbitrationVoteIntentResponse; };
|
|
287
289
|
readonly "appealDispute": { readonly method: "POST"; readonly path: "/disputes/{id}/appeals"; readonly request: AppealDisputeRequest; readonly response: AppealDisputeResponse; };
|
|
290
|
+
readonly "waiveDisputeAppeal": { readonly method: "POST"; readonly path: "/disputes/{id}/waive-appeal"; readonly request: WaiveDisputeAppealRequest; readonly response: WaiveDisputeAppealResponse; };
|
|
288
291
|
readonly "waiveTaskAppeal": { readonly method: "POST"; readonly path: "/tasks/{id}/waive-appeal"; readonly request: WaiveTaskAppealRequest; readonly response: WaiveTaskAppealResponse; };
|
|
289
292
|
readonly "listEmissionHours": { readonly method: "GET"; readonly path: "/emission/hours"; readonly request: ListEmissionHoursRequest; readonly response: ListEmissionHoursResponse; };
|
|
290
293
|
readonly "getEmissionHour": { readonly method: "GET"; readonly path: "/emission/hours/{hourId}"; readonly request: GetEmissionHourRequest; readonly response: GetEmissionHourResponse; };
|