@sparkdreamnft/sparkdreamjs 0.0.35 → 0.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/akash/bundle.d.ts +134 -134
  2. package/akash/bundle.js +150 -150
  3. package/cosmos/bundle.d.ts +160 -160
  4. package/cosmos/bundle.js +182 -182
  5. package/esm/akash/bundle.js +150 -150
  6. package/esm/cosmos/bundle.js +182 -182
  7. package/esm/ibc/bundle.js +116 -116
  8. package/esm/sparkdream/bundle.js +305 -301
  9. package/esm/sparkdream/federation/v1/genesis.js +101 -3
  10. package/esm/sparkdream/federation/v1/params.js +129 -117
  11. package/esm/sparkdream/federation/v1/query.js +204 -7
  12. package/esm/sparkdream/federation/v1/query.lcd.js +11 -2
  13. package/esm/sparkdream/federation/v1/query.rpc.Query.js +16 -3
  14. package/esm/sparkdream/federation/v1/types.js +73 -1
  15. package/esm/sparkdream/federation/v1/verifier_activity.js +143 -45
  16. package/esm/sparkdream/rep/v1/{interim_template.js → acceptance_criteria.js} +13 -123
  17. package/esm/sparkdream/rep/v1/accountability.js +11 -0
  18. package/esm/sparkdream/rep/v1/bonded_role.js +50 -1
  19. package/esm/sparkdream/rep/v1/challenge.js +21 -9
  20. package/esm/sparkdream/rep/v1/genesis.js +198 -59
  21. package/esm/sparkdream/rep/v1/initiative.js +160 -49
  22. package/esm/sparkdream/rep/v1/initiative_review.js +179 -0
  23. package/esm/sparkdream/rep/v1/jury_participation.js +39 -9
  24. package/esm/sparkdream/rep/v1/jury_review.js +40 -1
  25. package/esm/sparkdream/rep/v1/member_report.js +8 -8
  26. package/esm/sparkdream/rep/v1/member_warning.js +2 -2
  27. package/esm/sparkdream/rep/v1/params.js +806 -2
  28. package/esm/sparkdream/rep/v1/query.js +1446 -325
  29. package/esm/sparkdream/rep/v1/query.lcd.js +49 -16
  30. package/esm/sparkdream/rep/v1/query.rpc.Query.js +67 -21
  31. package/esm/sparkdream/rep/v1/review_bounty.js +215 -0
  32. package/esm/sparkdream/rep/v1/role_activity.js +13 -1
  33. package/esm/sparkdream/rep/v1/tag_report.js +2 -2
  34. package/esm/sparkdream/rep/v1/tx.js +2610 -1442
  35. package/esm/sparkdream/rep/v1/tx.registry.js +128 -2
  36. package/esm/sparkdream/rep/v1/tx.rpc.msg.js +43 -1
  37. package/esm/tendermint/bundle.js +18 -18
  38. package/ibc/bundle.d.ts +99 -99
  39. package/ibc/bundle.js +116 -116
  40. package/package.json +1 -1
  41. package/sparkdream/bundle.d.ts +9709 -9199
  42. package/sparkdream/bundle.js +305 -301
  43. package/sparkdream/federation/v1/genesis.d.ts +66 -0
  44. package/sparkdream/federation/v1/genesis.js +102 -4
  45. package/sparkdream/federation/v1/params.d.ts +72 -10
  46. package/sparkdream/federation/v1/params.js +129 -117
  47. package/sparkdream/federation/v1/query.d.ts +120 -3
  48. package/sparkdream/federation/v1/query.js +204 -7
  49. package/sparkdream/federation/v1/query.lcd.d.ts +2 -1
  50. package/sparkdream/federation/v1/query.lcd.js +11 -2
  51. package/sparkdream/federation/v1/query.rpc.Query.d.ts +13 -3
  52. package/sparkdream/federation/v1/query.rpc.Query.js +15 -2
  53. package/sparkdream/federation/v1/types.d.ts +44 -0
  54. package/sparkdream/federation/v1/types.js +73 -1
  55. package/sparkdream/federation/v1/verifier_activity.d.ts +151 -68
  56. package/sparkdream/federation/v1/verifier_activity.js +144 -46
  57. package/sparkdream/rep/v1/{interim_template.d.ts → acceptance_criteria.d.ts} +39 -52
  58. package/sparkdream/rep/v1/{interim_template.js → acceptance_criteria.js} +14 -124
  59. package/sparkdream/rep/v1/accountability.d.ts +6 -0
  60. package/sparkdream/rep/v1/accountability.js +11 -0
  61. package/sparkdream/rep/v1/bonded_role.d.ts +50 -0
  62. package/sparkdream/rep/v1/bonded_role.js +50 -1
  63. package/sparkdream/rep/v1/challenge.d.ts +14 -0
  64. package/sparkdream/rep/v1/challenge.js +21 -9
  65. package/sparkdream/rep/v1/genesis.d.ts +100 -3
  66. package/sparkdream/rep/v1/genesis.js +199 -60
  67. package/sparkdream/rep/v1/initiative.d.ts +106 -2
  68. package/sparkdream/rep/v1/initiative.js +163 -50
  69. package/sparkdream/rep/v1/initiative_review.d.ts +121 -0
  70. package/sparkdream/rep/v1/initiative_review.js +182 -0
  71. package/sparkdream/rep/v1/jury_participation.d.ts +89 -5
  72. package/sparkdream/rep/v1/jury_participation.js +39 -9
  73. package/sparkdream/rep/v1/jury_review.d.ts +38 -0
  74. package/sparkdream/rep/v1/jury_review.js +40 -1
  75. package/sparkdream/rep/v1/member_report.js +8 -8
  76. package/sparkdream/rep/v1/member_warning.js +2 -2
  77. package/sparkdream/rep/v1/params.d.ts +764 -16
  78. package/sparkdream/rep/v1/params.js +806 -2
  79. package/sparkdream/rep/v1/query.d.ts +929 -179
  80. package/sparkdream/rep/v1/query.js +1450 -329
  81. package/sparkdream/rep/v1/query.lcd.d.ts +7 -3
  82. package/sparkdream/rep/v1/query.lcd.js +49 -16
  83. package/sparkdream/rep/v1/query.rpc.Query.d.ts +47 -9
  84. package/sparkdream/rep/v1/query.rpc.Query.js +66 -20
  85. package/sparkdream/rep/v1/review_bounty.d.ts +168 -0
  86. package/sparkdream/rep/v1/review_bounty.js +218 -0
  87. package/sparkdream/rep/v1/role_activity.d.ts +26 -0
  88. package/sparkdream/rep/v1/role_activity.js +13 -1
  89. package/sparkdream/rep/v1/tag_report.js +2 -2
  90. package/sparkdream/rep/v1/tx.d.ts +816 -9
  91. package/sparkdream/rep/v1/tx.js +2612 -1443
  92. package/sparkdream/rep/v1/tx.registry.d.ts +85 -1
  93. package/sparkdream/rep/v1/tx.registry.js +127 -1
  94. package/sparkdream/rep/v1/tx.rpc.msg.d.ts +20 -1
  95. package/sparkdream/rep/v1/tx.rpc.msg.js +42 -0
  96. package/sparkdream/rpc.query.d.ts +7 -2
  97. package/tendermint/bundle.d.ts +844 -844
  98. package/tendermint/bundle.js +18 -18
@@ -1,3 +1,4 @@
1
+ import { VerificationCriteria, VerificationCriteriaAmino } from "./acceptance_criteria";
1
2
  import { BinaryReader, BinaryWriter } from "../../../binary";
2
3
  import { DeepPartial } from "../../../helpers";
3
4
  export declare enum InitiativeTier {
@@ -46,6 +47,31 @@ export declare enum InitiativeStatus {
46
47
  export declare const InitiativeStatusAmino: typeof InitiativeStatus;
47
48
  export declare function initiativeStatusFromJSON(object: any): InitiativeStatus;
48
49
  export declare function initiativeStatusToJSON(object: InitiativeStatus): string;
50
+ /**
51
+ * How an escalated review round was resolved by the Operations Committee.
52
+ *
53
+ * PASSED is also what committee *inaction* resolves to: silence must never wedge
54
+ * an initiative, and silence must never mint.
55
+ */
56
+ export declare enum ReviewEscalation {
57
+ REVIEW_ESCALATION_NONE = 0,
58
+ /**
59
+ * REVIEW_ESCALATION_APPROVED - Committee satisfied the reviewer gate itself. Writes no RoleActivity — the
60
+ * committee holds no bond and carries no accuracy record.
61
+ */
62
+ REVIEW_ESCALATION_APPROVED = 1,
63
+ /** REVIEW_ESCALATION_REJECTED - Committee rejected; same effect as a reviewer rejection. */
64
+ REVIEW_ESCALATION_REJECTED = 2,
65
+ /**
66
+ * REVIEW_ESCALATION_PASSED - Committee declined to substitute its judgement. The initiative proceeds on
67
+ * conviction alone; the challenge window still runs.
68
+ */
69
+ REVIEW_ESCALATION_PASSED = 3,
70
+ UNRECOGNIZED = -1
71
+ }
72
+ export declare const ReviewEscalationAmino: typeof ReviewEscalation;
73
+ export declare function reviewEscalationFromJSON(object: any): ReviewEscalation;
74
+ export declare function reviewEscalationToJSON(object: ReviewEscalation): string;
49
75
  /**
50
76
  * Initiative defines the Initiative message.
51
77
  * @name Initiative
@@ -60,7 +86,6 @@ export interface Initiative {
60
86
  tags: string[];
61
87
  tier: InitiativeTier;
62
88
  category: InitiativeCategory;
63
- templateId: string;
64
89
  budget: string;
65
90
  assignee: string;
66
91
  apprentice: string;
@@ -86,6 +111,36 @@ export interface Initiative {
86
111
  * only). Returned on completion/abandonment, burned on upheld challenge.
87
112
  */
88
113
  selfAssignBond: string;
114
+ /**
115
+ * The definition of done, pre-committed by the initiative's author before
116
+ * any work starts and immutable thereafter. Optional; when present it gives
117
+ * a challenger something concrete and objective to point at
118
+ * (Challenge.criteria_id) and gives a juror's CriteriaVote a real referent
119
+ * instead of an unvalidated free-form id.
120
+ *
121
+ * Deliberately declared per-initiative rather than resolved from a registry:
122
+ * templates have no authoring message and all three networks ship zero of
123
+ * them, so a template reference would be a pointer into an empty registry.
124
+ */
125
+ acceptanceCriteria: VerificationCriteria[];
126
+ /**
127
+ * Review-round bookkeeping for the bonded reviewer gate. A rejection returns
128
+ * the initiative to ASSIGNED and increments the round, so the assignee can
129
+ * fix the work and resubmit; each round collects its own verdicts. Bounded by
130
+ * max_review_rounds so a bad-faith assignee cannot burn reviewer effort
131
+ * indefinitely.
132
+ */
133
+ reviewRound: number;
134
+ /**
135
+ * Height at which the current round's review window closes. Past this with
136
+ * the gate unmet, the initiative escalates to the Operations Committee.
137
+ */
138
+ reviewDeadline: bigint;
139
+ /**
140
+ * Set when the committee has resolved an escalation for the current round, so
141
+ * the sweep does not escalate the same round twice.
142
+ */
143
+ reviewEscalation: ReviewEscalation;
89
144
  /**
90
145
  * Address that submitted MsgCreateInitiative. Recorded on state so
91
146
  * authorship is answerable from a node query instead of only from the
@@ -93,6 +148,16 @@ export interface Initiative {
93
148
  * Immutable once set.
94
149
  */
95
150
  creator: string;
151
+ /**
152
+ * Reviewer approvals this round needs, snapshotted from the project's policy
153
+ * when the review window opened.
154
+ *
155
+ * Read instead of the live policy so a project cannot relax its own standard
156
+ * out from under work already under review — the creator owns the policy and,
157
+ * for self-assigned work, is also the party the gate exists to constrain.
158
+ * Zero means no reviewer gate for this round, which is the genesis default.
159
+ */
160
+ requiredVerifiers: number;
96
161
  }
97
162
  export interface InitiativeProtoMsg {
98
163
  typeUrl: "/sparkdream.rep.v1.Initiative";
@@ -112,7 +177,6 @@ export interface InitiativeAmino {
112
177
  tags?: string[];
113
178
  tier?: InitiativeTier;
114
179
  category?: InitiativeCategory;
115
- template_id?: string;
116
180
  budget?: string;
117
181
  assignee?: string;
118
182
  apprentice?: string;
@@ -138,6 +202,36 @@ export interface InitiativeAmino {
138
202
  * only). Returned on completion/abandonment, burned on upheld challenge.
139
203
  */
140
204
  self_assign_bond?: string;
205
+ /**
206
+ * The definition of done, pre-committed by the initiative's author before
207
+ * any work starts and immutable thereafter. Optional; when present it gives
208
+ * a challenger something concrete and objective to point at
209
+ * (Challenge.criteria_id) and gives a juror's CriteriaVote a real referent
210
+ * instead of an unvalidated free-form id.
211
+ *
212
+ * Deliberately declared per-initiative rather than resolved from a registry:
213
+ * templates have no authoring message and all three networks ship zero of
214
+ * them, so a template reference would be a pointer into an empty registry.
215
+ */
216
+ acceptance_criteria?: VerificationCriteriaAmino[];
217
+ /**
218
+ * Review-round bookkeeping for the bonded reviewer gate. A rejection returns
219
+ * the initiative to ASSIGNED and increments the round, so the assignee can
220
+ * fix the work and resubmit; each round collects its own verdicts. Bounded by
221
+ * max_review_rounds so a bad-faith assignee cannot burn reviewer effort
222
+ * indefinitely.
223
+ */
224
+ review_round?: number;
225
+ /**
226
+ * Height at which the current round's review window closes. Past this with
227
+ * the gate unmet, the initiative escalates to the Operations Committee.
228
+ */
229
+ review_deadline?: string;
230
+ /**
231
+ * Set when the committee has resolved an escalation for the current round, so
232
+ * the sweep does not escalate the same round twice.
233
+ */
234
+ review_escalation?: ReviewEscalation;
141
235
  /**
142
236
  * Address that submitted MsgCreateInitiative. Recorded on state so
143
237
  * authorship is answerable from a node query instead of only from the
@@ -145,6 +239,16 @@ export interface InitiativeAmino {
145
239
  * Immutable once set.
146
240
  */
147
241
  creator?: string;
242
+ /**
243
+ * Reviewer approvals this round needs, snapshotted from the project's policy
244
+ * when the review window opened.
245
+ *
246
+ * Read instead of the live policy so a project cannot relax its own standard
247
+ * out from under work already under review — the creator owns the policy and,
248
+ * for self-assigned work, is also the party the gate exists to constrain.
249
+ * Zero means no reviewer gate for this round, which is the genesis default.
250
+ */
251
+ required_verifiers?: number;
148
252
  }
149
253
  export interface InitiativeAminoMsg {
150
254
  type: "/sparkdream.rep.v1.Initiative";
@@ -1,13 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Initiative = exports.InitiativeStatusAmino = exports.InitiativeStatus = exports.InitiativeCategoryAmino = exports.InitiativeCategory = exports.InitiativeTierAmino = exports.InitiativeTier = void 0;
3
+ exports.Initiative = exports.ReviewEscalationAmino = exports.ReviewEscalation = exports.InitiativeStatusAmino = exports.InitiativeStatus = exports.InitiativeCategoryAmino = exports.InitiativeCategory = exports.InitiativeTierAmino = exports.InitiativeTier = void 0;
4
4
  exports.initiativeTierFromJSON = initiativeTierFromJSON;
5
5
  exports.initiativeTierToJSON = initiativeTierToJSON;
6
6
  exports.initiativeCategoryFromJSON = initiativeCategoryFromJSON;
7
7
  exports.initiativeCategoryToJSON = initiativeCategoryToJSON;
8
8
  exports.initiativeStatusFromJSON = initiativeStatusFromJSON;
9
9
  exports.initiativeStatusToJSON = initiativeStatusToJSON;
10
+ exports.reviewEscalationFromJSON = reviewEscalationFromJSON;
11
+ exports.reviewEscalationToJSON = reviewEscalationToJSON;
10
12
  //@ts-nocheck
13
+ const acceptance_criteria_1 = require("./acceptance_criteria");
11
14
  const binary_1 = require("../../../binary");
12
15
  const math_1 = require("@interchainjs/math");
13
16
  var InitiativeTier;
@@ -213,6 +216,65 @@ function initiativeStatusToJSON(object) {
213
216
  return "UNRECOGNIZED";
214
217
  }
215
218
  }
219
+ /**
220
+ * How an escalated review round was resolved by the Operations Committee.
221
+ *
222
+ * PASSED is also what committee *inaction* resolves to: silence must never wedge
223
+ * an initiative, and silence must never mint.
224
+ */
225
+ var ReviewEscalation;
226
+ (function (ReviewEscalation) {
227
+ ReviewEscalation[ReviewEscalation["REVIEW_ESCALATION_NONE"] = 0] = "REVIEW_ESCALATION_NONE";
228
+ /**
229
+ * REVIEW_ESCALATION_APPROVED - Committee satisfied the reviewer gate itself. Writes no RoleActivity — the
230
+ * committee holds no bond and carries no accuracy record.
231
+ */
232
+ ReviewEscalation[ReviewEscalation["REVIEW_ESCALATION_APPROVED"] = 1] = "REVIEW_ESCALATION_APPROVED";
233
+ /** REVIEW_ESCALATION_REJECTED - Committee rejected; same effect as a reviewer rejection. */
234
+ ReviewEscalation[ReviewEscalation["REVIEW_ESCALATION_REJECTED"] = 2] = "REVIEW_ESCALATION_REJECTED";
235
+ /**
236
+ * REVIEW_ESCALATION_PASSED - Committee declined to substitute its judgement. The initiative proceeds on
237
+ * conviction alone; the challenge window still runs.
238
+ */
239
+ ReviewEscalation[ReviewEscalation["REVIEW_ESCALATION_PASSED"] = 3] = "REVIEW_ESCALATION_PASSED";
240
+ ReviewEscalation[ReviewEscalation["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
241
+ })(ReviewEscalation || (exports.ReviewEscalation = ReviewEscalation = {}));
242
+ exports.ReviewEscalationAmino = ReviewEscalation;
243
+ function reviewEscalationFromJSON(object) {
244
+ switch (object) {
245
+ case 0:
246
+ case "REVIEW_ESCALATION_NONE":
247
+ return ReviewEscalation.REVIEW_ESCALATION_NONE;
248
+ case 1:
249
+ case "REVIEW_ESCALATION_APPROVED":
250
+ return ReviewEscalation.REVIEW_ESCALATION_APPROVED;
251
+ case 2:
252
+ case "REVIEW_ESCALATION_REJECTED":
253
+ return ReviewEscalation.REVIEW_ESCALATION_REJECTED;
254
+ case 3:
255
+ case "REVIEW_ESCALATION_PASSED":
256
+ return ReviewEscalation.REVIEW_ESCALATION_PASSED;
257
+ case -1:
258
+ case "UNRECOGNIZED":
259
+ default:
260
+ return ReviewEscalation.UNRECOGNIZED;
261
+ }
262
+ }
263
+ function reviewEscalationToJSON(object) {
264
+ switch (object) {
265
+ case ReviewEscalation.REVIEW_ESCALATION_NONE:
266
+ return "REVIEW_ESCALATION_NONE";
267
+ case ReviewEscalation.REVIEW_ESCALATION_APPROVED:
268
+ return "REVIEW_ESCALATION_APPROVED";
269
+ case ReviewEscalation.REVIEW_ESCALATION_REJECTED:
270
+ return "REVIEW_ESCALATION_REJECTED";
271
+ case ReviewEscalation.REVIEW_ESCALATION_PASSED:
272
+ return "REVIEW_ESCALATION_PASSED";
273
+ case ReviewEscalation.UNRECOGNIZED:
274
+ default:
275
+ return "UNRECOGNIZED";
276
+ }
277
+ }
216
278
  function createBaseInitiative() {
217
279
  return {
218
280
  id: BigInt(0),
@@ -222,7 +284,6 @@ function createBaseInitiative() {
222
284
  tags: [],
223
285
  tier: 0,
224
286
  category: 0,
225
- templateId: "",
226
287
  budget: "",
227
288
  assignee: "",
228
289
  apprentice: "",
@@ -241,7 +302,12 @@ function createBaseInitiative() {
241
302
  completedAt: BigInt(0),
242
303
  propagatedConviction: "",
243
304
  selfAssignBond: "",
244
- creator: ""
305
+ acceptanceCriteria: [],
306
+ reviewRound: 0,
307
+ reviewDeadline: BigInt(0),
308
+ reviewEscalation: 0,
309
+ creator: "",
310
+ requiredVerifiers: 0
245
311
  };
246
312
  }
247
313
  /**
@@ -274,65 +340,77 @@ exports.Initiative = {
274
340
  if (message.category !== 0) {
275
341
  writer.uint32(56).int32(message.category);
276
342
  }
277
- if (message.templateId !== "") {
278
- writer.uint32(66).string(message.templateId);
279
- }
280
343
  if (message.budget !== "") {
281
- writer.uint32(74).string(message.budget);
344
+ writer.uint32(66).string(message.budget);
282
345
  }
283
346
  if (message.assignee !== "") {
284
- writer.uint32(82).string(message.assignee);
347
+ writer.uint32(74).string(message.assignee);
285
348
  }
286
349
  if (message.apprentice !== "") {
287
- writer.uint32(90).string(message.apprentice);
350
+ writer.uint32(82).string(message.apprentice);
288
351
  }
289
352
  if (message.assignedAt !== BigInt(0)) {
290
- writer.uint32(96).int64(message.assignedAt);
353
+ writer.uint32(88).int64(message.assignedAt);
291
354
  }
292
355
  if (message.deliverableUri !== "") {
293
- writer.uint32(106).string(message.deliverableUri);
356
+ writer.uint32(98).string(message.deliverableUri);
294
357
  }
295
358
  if (message.submittedAt !== BigInt(0)) {
296
- writer.uint32(112).int64(message.submittedAt);
359
+ writer.uint32(104).int64(message.submittedAt);
297
360
  }
298
361
  if (message.requiredConviction !== "") {
299
- writer.uint32(122).string(math_1.Decimal.fromUserInput(message.requiredConviction, 18).atomics);
362
+ writer.uint32(114).string(math_1.Decimal.fromUserInput(message.requiredConviction, 18).atomics);
300
363
  }
301
364
  if (message.currentConviction !== "") {
302
- writer.uint32(130).string(math_1.Decimal.fromUserInput(message.currentConviction, 18).atomics);
365
+ writer.uint32(122).string(math_1.Decimal.fromUserInput(message.currentConviction, 18).atomics);
303
366
  }
304
367
  if (message.externalConviction !== "") {
305
- writer.uint32(138).string(math_1.Decimal.fromUserInput(message.externalConviction, 18).atomics);
368
+ writer.uint32(130).string(math_1.Decimal.fromUserInput(message.externalConviction, 18).atomics);
306
369
  }
307
370
  if (message.convictionLastUpdated !== BigInt(0)) {
308
- writer.uint32(144).int64(message.convictionLastUpdated);
371
+ writer.uint32(136).int64(message.convictionLastUpdated);
309
372
  }
310
373
  if (message.reviewPeriodEnd !== BigInt(0)) {
311
- writer.uint32(152).int64(message.reviewPeriodEnd);
374
+ writer.uint32(144).int64(message.reviewPeriodEnd);
312
375
  }
313
376
  if (message.challengePeriodEnd !== BigInt(0)) {
314
- writer.uint32(160).int64(message.challengePeriodEnd);
377
+ writer.uint32(152).int64(message.challengePeriodEnd);
315
378
  }
316
379
  for (const v of message.approvals) {
317
- writer.uint32(170).string(v);
380
+ writer.uint32(162).string(v);
318
381
  }
319
382
  if (message.status !== 0) {
320
- writer.uint32(176).int32(message.status);
383
+ writer.uint32(168).int32(message.status);
321
384
  }
322
385
  if (message.createdAt !== BigInt(0)) {
323
- writer.uint32(184).int64(message.createdAt);
386
+ writer.uint32(176).int64(message.createdAt);
324
387
  }
325
388
  if (message.completedAt !== BigInt(0)) {
326
- writer.uint32(192).int64(message.completedAt);
389
+ writer.uint32(184).int64(message.completedAt);
327
390
  }
328
391
  if (message.propagatedConviction !== "") {
329
- writer.uint32(202).string(math_1.Decimal.fromUserInput(message.propagatedConviction, 18).atomics);
392
+ writer.uint32(194).string(math_1.Decimal.fromUserInput(message.propagatedConviction, 18).atomics);
330
393
  }
331
394
  if (message.selfAssignBond !== "") {
332
- writer.uint32(210).string(message.selfAssignBond);
395
+ writer.uint32(202).string(message.selfAssignBond);
396
+ }
397
+ for (const v of message.acceptanceCriteria) {
398
+ acceptance_criteria_1.VerificationCriteria.encode(v, writer.uint32(218).fork()).ldelim();
399
+ }
400
+ if (message.reviewRound !== 0) {
401
+ writer.uint32(224).uint32(message.reviewRound);
402
+ }
403
+ if (message.reviewDeadline !== BigInt(0)) {
404
+ writer.uint32(232).int64(message.reviewDeadline);
405
+ }
406
+ if (message.reviewEscalation !== 0) {
407
+ writer.uint32(240).int32(message.reviewEscalation);
333
408
  }
334
409
  if (message.creator !== "") {
335
- writer.uint32(218).string(message.creator);
410
+ writer.uint32(210).string(message.creator);
411
+ }
412
+ if (message.requiredVerifiers !== 0) {
413
+ writer.uint32(248).uint32(message.requiredVerifiers);
336
414
  }
337
415
  return writer;
338
416
  },
@@ -365,65 +443,77 @@ exports.Initiative = {
365
443
  message.category = reader.int32();
366
444
  break;
367
445
  case 8:
368
- message.templateId = reader.string();
369
- break;
370
- case 9:
371
446
  message.budget = reader.string();
372
447
  break;
373
- case 10:
448
+ case 9:
374
449
  message.assignee = reader.string();
375
450
  break;
376
- case 11:
451
+ case 10:
377
452
  message.apprentice = reader.string();
378
453
  break;
379
- case 12:
454
+ case 11:
380
455
  message.assignedAt = reader.int64();
381
456
  break;
382
- case 13:
457
+ case 12:
383
458
  message.deliverableUri = reader.string();
384
459
  break;
385
- case 14:
460
+ case 13:
386
461
  message.submittedAt = reader.int64();
387
462
  break;
388
- case 15:
463
+ case 14:
389
464
  message.requiredConviction = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
390
465
  break;
391
- case 16:
466
+ case 15:
392
467
  message.currentConviction = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
393
468
  break;
394
- case 17:
469
+ case 16:
395
470
  message.externalConviction = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
396
471
  break;
397
- case 18:
472
+ case 17:
398
473
  message.convictionLastUpdated = reader.int64();
399
474
  break;
400
- case 19:
475
+ case 18:
401
476
  message.reviewPeriodEnd = reader.int64();
402
477
  break;
403
- case 20:
478
+ case 19:
404
479
  message.challengePeriodEnd = reader.int64();
405
480
  break;
406
- case 21:
481
+ case 20:
407
482
  message.approvals.push(reader.string());
408
483
  break;
409
- case 22:
484
+ case 21:
410
485
  message.status = reader.int32();
411
486
  break;
412
- case 23:
487
+ case 22:
413
488
  message.createdAt = reader.int64();
414
489
  break;
415
- case 24:
490
+ case 23:
416
491
  message.completedAt = reader.int64();
417
492
  break;
418
- case 25:
493
+ case 24:
419
494
  message.propagatedConviction = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
420
495
  break;
421
- case 26:
496
+ case 25:
422
497
  message.selfAssignBond = reader.string();
423
498
  break;
424
499
  case 27:
500
+ message.acceptanceCriteria.push(acceptance_criteria_1.VerificationCriteria.decode(reader, reader.uint32()));
501
+ break;
502
+ case 28:
503
+ message.reviewRound = reader.uint32();
504
+ break;
505
+ case 29:
506
+ message.reviewDeadline = reader.int64();
507
+ break;
508
+ case 30:
509
+ message.reviewEscalation = reader.int32();
510
+ break;
511
+ case 26:
425
512
  message.creator = reader.string();
426
513
  break;
514
+ case 31:
515
+ message.requiredVerifiers = reader.uint32();
516
+ break;
427
517
  default:
428
518
  reader.skipType(tag & 7);
429
519
  break;
@@ -440,7 +530,6 @@ exports.Initiative = {
440
530
  message.tags = object.tags?.map(e => e) || [];
441
531
  message.tier = object.tier ?? 0;
442
532
  message.category = object.category ?? 0;
443
- message.templateId = object.templateId ?? "";
444
533
  message.budget = object.budget ?? "";
445
534
  message.assignee = object.assignee ?? "";
446
535
  message.apprentice = object.apprentice ?? "";
@@ -459,7 +548,12 @@ exports.Initiative = {
459
548
  message.completedAt = object.completedAt !== undefined && object.completedAt !== null ? BigInt(object.completedAt.toString()) : BigInt(0);
460
549
  message.propagatedConviction = object.propagatedConviction ?? "";
461
550
  message.selfAssignBond = object.selfAssignBond ?? "";
551
+ message.acceptanceCriteria = object.acceptanceCriteria?.map(e => acceptance_criteria_1.VerificationCriteria.fromPartial(e)) || [];
552
+ message.reviewRound = object.reviewRound ?? 0;
553
+ message.reviewDeadline = object.reviewDeadline !== undefined && object.reviewDeadline !== null ? BigInt(object.reviewDeadline.toString()) : BigInt(0);
554
+ message.reviewEscalation = object.reviewEscalation ?? 0;
462
555
  message.creator = object.creator ?? "";
556
+ message.requiredVerifiers = object.requiredVerifiers ?? 0;
463
557
  return message;
464
558
  },
465
559
  fromAmino(object) {
@@ -483,9 +577,6 @@ exports.Initiative = {
483
577
  if (object.category !== undefined && object.category !== null) {
484
578
  message.category = object.category;
485
579
  }
486
- if (object.template_id !== undefined && object.template_id !== null) {
487
- message.templateId = object.template_id;
488
- }
489
580
  if (object.budget !== undefined && object.budget !== null) {
490
581
  message.budget = object.budget;
491
582
  }
@@ -538,9 +629,22 @@ exports.Initiative = {
538
629
  if (object.self_assign_bond !== undefined && object.self_assign_bond !== null) {
539
630
  message.selfAssignBond = object.self_assign_bond;
540
631
  }
632
+ message.acceptanceCriteria = object.acceptance_criteria?.map(e => acceptance_criteria_1.VerificationCriteria.fromAmino(e)) || [];
633
+ if (object.review_round !== undefined && object.review_round !== null) {
634
+ message.reviewRound = object.review_round;
635
+ }
636
+ if (object.review_deadline !== undefined && object.review_deadline !== null) {
637
+ message.reviewDeadline = BigInt(object.review_deadline);
638
+ }
639
+ if (object.review_escalation !== undefined && object.review_escalation !== null) {
640
+ message.reviewEscalation = object.review_escalation;
641
+ }
541
642
  if (object.creator !== undefined && object.creator !== null) {
542
643
  message.creator = object.creator;
543
644
  }
645
+ if (object.required_verifiers !== undefined && object.required_verifiers !== null) {
646
+ message.requiredVerifiers = object.required_verifiers;
647
+ }
544
648
  return message;
545
649
  },
546
650
  toAmino(message) {
@@ -557,7 +661,6 @@ exports.Initiative = {
557
661
  }
558
662
  obj.tier = message.tier === 0 ? undefined : message.tier;
559
663
  obj.category = message.category === 0 ? undefined : message.category;
560
- obj.template_id = message.templateId === "" ? undefined : message.templateId;
561
664
  obj.budget = message.budget === "" ? undefined : message.budget;
562
665
  obj.assignee = message.assignee === "" ? undefined : message.assignee;
563
666
  obj.apprentice = message.apprentice === "" ? undefined : message.apprentice;
@@ -581,7 +684,17 @@ exports.Initiative = {
581
684
  obj.completed_at = message.completedAt !== BigInt(0) ? message.completedAt?.toString() : undefined;
582
685
  obj.propagated_conviction = message.propagatedConviction === "" ? undefined : message.propagatedConviction;
583
686
  obj.self_assign_bond = message.selfAssignBond === "" ? undefined : message.selfAssignBond;
687
+ if (message.acceptanceCriteria) {
688
+ obj.acceptance_criteria = message.acceptanceCriteria.map(e => e ? acceptance_criteria_1.VerificationCriteria.toAmino(e) : undefined);
689
+ }
690
+ else {
691
+ obj.acceptance_criteria = message.acceptanceCriteria;
692
+ }
693
+ obj.review_round = message.reviewRound === 0 ? undefined : message.reviewRound;
694
+ obj.review_deadline = message.reviewDeadline !== BigInt(0) ? message.reviewDeadline?.toString() : undefined;
695
+ obj.review_escalation = message.reviewEscalation === 0 ? undefined : message.reviewEscalation;
584
696
  obj.creator = message.creator === "" ? undefined : message.creator;
697
+ obj.required_verifiers = message.requiredVerifiers === 0 ? undefined : message.requiredVerifiers;
585
698
  return obj;
586
699
  },
587
700
  fromAminoMsg(object) {
@@ -0,0 +1,121 @@
1
+ import { CriteriaVote, CriteriaVoteAmino } from "./jury_review";
2
+ import { BinaryReader, BinaryWriter } from "../../../binary";
3
+ import { DeepPartial } from "../../../helpers";
4
+ /**
5
+ * One bonded reviewer's verdict on a round of submitted work.
6
+ *
7
+ * Keyed by (initiative_id, round, reviewer): a rejection sends the initiative
8
+ * back to ASSIGNED for the assignee to fix and resubmit, and each resubmission
9
+ * opens a new round, so the same reviewer may legitimately file again on the
10
+ * same initiative. Rounds are bounded by max_review_rounds.
11
+ *
12
+ * Reviewers are paid per verdict filed, never per approval — the whole point of
13
+ * the role is that judging pays and the outcome does not.
14
+ * @name InitiativeReview
15
+ * @package sparkdream.rep.v1
16
+ * @see proto type: sparkdream.rep.v1.InitiativeReview
17
+ */
18
+ export interface InitiativeReview {
19
+ initiativeId: bigint;
20
+ /**
21
+ * Which review round this verdict belongs to, from Initiative.review_round.
22
+ */
23
+ round: number;
24
+ reviewer: string;
25
+ approved: boolean;
26
+ /**
27
+ * Per-criterion verdicts, validated against the initiative's
28
+ * acceptance_criteria. This is CriteriaVote's proper home: a per-item verdict
29
+ * belongs to somebody accountable for getting it right.
30
+ */
31
+ criteriaVotes: CriteriaVote[];
32
+ comments: string;
33
+ createdAt: bigint;
34
+ /**
35
+ * Bond committed against this verdict, released when the challenge window
36
+ * closes unchallenged and slashed when a jury overturns it. Scales with the
37
+ * initiative budget, so liability tracks what the review could mint.
38
+ */
39
+ bondReserved: string;
40
+ /**
41
+ * Set once the verdict's bond has been released or slashed, so the sweep does
42
+ * not settle the same verdict twice.
43
+ */
44
+ settled: boolean;
45
+ }
46
+ export interface InitiativeReviewProtoMsg {
47
+ typeUrl: "/sparkdream.rep.v1.InitiativeReview";
48
+ value: Uint8Array;
49
+ }
50
+ /**
51
+ * One bonded reviewer's verdict on a round of submitted work.
52
+ *
53
+ * Keyed by (initiative_id, round, reviewer): a rejection sends the initiative
54
+ * back to ASSIGNED for the assignee to fix and resubmit, and each resubmission
55
+ * opens a new round, so the same reviewer may legitimately file again on the
56
+ * same initiative. Rounds are bounded by max_review_rounds.
57
+ *
58
+ * Reviewers are paid per verdict filed, never per approval — the whole point of
59
+ * the role is that judging pays and the outcome does not.
60
+ * @name InitiativeReviewAmino
61
+ * @package sparkdream.rep.v1
62
+ * @see proto type: sparkdream.rep.v1.InitiativeReview
63
+ */
64
+ export interface InitiativeReviewAmino {
65
+ initiative_id?: string;
66
+ /**
67
+ * Which review round this verdict belongs to, from Initiative.review_round.
68
+ */
69
+ round?: number;
70
+ reviewer?: string;
71
+ approved?: boolean;
72
+ /**
73
+ * Per-criterion verdicts, validated against the initiative's
74
+ * acceptance_criteria. This is CriteriaVote's proper home: a per-item verdict
75
+ * belongs to somebody accountable for getting it right.
76
+ */
77
+ criteria_votes?: CriteriaVoteAmino[];
78
+ comments?: string;
79
+ created_at?: string;
80
+ /**
81
+ * Bond committed against this verdict, released when the challenge window
82
+ * closes unchallenged and slashed when a jury overturns it. Scales with the
83
+ * initiative budget, so liability tracks what the review could mint.
84
+ */
85
+ bond_reserved?: string;
86
+ /**
87
+ * Set once the verdict's bond has been released or slashed, so the sweep does
88
+ * not settle the same verdict twice.
89
+ */
90
+ settled?: boolean;
91
+ }
92
+ export interface InitiativeReviewAminoMsg {
93
+ type: "/sparkdream.rep.v1.InitiativeReview";
94
+ value: InitiativeReviewAmino;
95
+ }
96
+ /**
97
+ * One bonded reviewer's verdict on a round of submitted work.
98
+ *
99
+ * Keyed by (initiative_id, round, reviewer): a rejection sends the initiative
100
+ * back to ASSIGNED for the assignee to fix and resubmit, and each resubmission
101
+ * opens a new round, so the same reviewer may legitimately file again on the
102
+ * same initiative. Rounds are bounded by max_review_rounds.
103
+ *
104
+ * Reviewers are paid per verdict filed, never per approval — the whole point of
105
+ * the role is that judging pays and the outcome does not.
106
+ * @name InitiativeReview
107
+ * @package sparkdream.rep.v1
108
+ * @see proto type: sparkdream.rep.v1.InitiativeReview
109
+ */
110
+ export declare const InitiativeReview: {
111
+ typeUrl: string;
112
+ encode(message: InitiativeReview, writer?: BinaryWriter): BinaryWriter;
113
+ decode(input: BinaryReader | Uint8Array, length?: number): InitiativeReview;
114
+ fromPartial(object: DeepPartial<InitiativeReview>): InitiativeReview;
115
+ fromAmino(object: InitiativeReviewAmino): InitiativeReview;
116
+ toAmino(message: InitiativeReview): InitiativeReviewAmino;
117
+ fromAminoMsg(object: InitiativeReviewAminoMsg): InitiativeReview;
118
+ fromProtoMsg(message: InitiativeReviewProtoMsg): InitiativeReview;
119
+ toProto(message: InitiativeReview): Uint8Array;
120
+ toProtoMsg(message: InitiativeReview): InitiativeReviewProtoMsg;
121
+ };