@sparkdreamnft/sparkdreamjs 0.0.35 → 0.0.36

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 (74) 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/rep/v1/{interim_template.js → acceptance_criteria.js} +13 -123
  10. package/esm/sparkdream/rep/v1/accountability.js +11 -0
  11. package/esm/sparkdream/rep/v1/bonded_role.js +13 -0
  12. package/esm/sparkdream/rep/v1/challenge.js +21 -9
  13. package/esm/sparkdream/rep/v1/genesis.js +198 -59
  14. package/esm/sparkdream/rep/v1/initiative.js +160 -49
  15. package/esm/sparkdream/rep/v1/initiative_review.js +179 -0
  16. package/esm/sparkdream/rep/v1/jury_participation.js +39 -9
  17. package/esm/sparkdream/rep/v1/jury_review.js +40 -1
  18. package/esm/sparkdream/rep/v1/member_report.js +8 -8
  19. package/esm/sparkdream/rep/v1/member_warning.js +2 -2
  20. package/esm/sparkdream/rep/v1/params.js +614 -2
  21. package/esm/sparkdream/rep/v1/query.js +1446 -325
  22. package/esm/sparkdream/rep/v1/query.lcd.js +49 -16
  23. package/esm/sparkdream/rep/v1/query.rpc.Query.js +67 -21
  24. package/esm/sparkdream/rep/v1/review_bounty.js +215 -0
  25. package/esm/sparkdream/rep/v1/tag_report.js +2 -2
  26. package/esm/sparkdream/rep/v1/tx.js +2610 -1442
  27. package/esm/sparkdream/rep/v1/tx.registry.js +128 -2
  28. package/esm/sparkdream/rep/v1/tx.rpc.msg.js +43 -1
  29. package/esm/tendermint/bundle.js +18 -18
  30. package/ibc/bundle.d.ts +99 -99
  31. package/ibc/bundle.js +116 -116
  32. package/package.json +1 -1
  33. package/sparkdream/bundle.d.ts +9659 -9199
  34. package/sparkdream/bundle.js +305 -301
  35. package/sparkdream/rep/v1/{interim_template.d.ts → acceptance_criteria.d.ts} +39 -52
  36. package/sparkdream/rep/v1/{interim_template.js → acceptance_criteria.js} +14 -124
  37. package/sparkdream/rep/v1/accountability.d.ts +6 -0
  38. package/sparkdream/rep/v1/accountability.js +11 -0
  39. package/sparkdream/rep/v1/bonded_role.d.ts +8 -0
  40. package/sparkdream/rep/v1/bonded_role.js +13 -0
  41. package/sparkdream/rep/v1/challenge.d.ts +14 -0
  42. package/sparkdream/rep/v1/challenge.js +21 -9
  43. package/sparkdream/rep/v1/genesis.d.ts +100 -3
  44. package/sparkdream/rep/v1/genesis.js +199 -60
  45. package/sparkdream/rep/v1/initiative.d.ts +106 -2
  46. package/sparkdream/rep/v1/initiative.js +163 -50
  47. package/sparkdream/rep/v1/initiative_review.d.ts +121 -0
  48. package/sparkdream/rep/v1/initiative_review.js +182 -0
  49. package/sparkdream/rep/v1/jury_participation.d.ts +89 -5
  50. package/sparkdream/rep/v1/jury_participation.js +39 -9
  51. package/sparkdream/rep/v1/jury_review.d.ts +38 -0
  52. package/sparkdream/rep/v1/jury_review.js +40 -1
  53. package/sparkdream/rep/v1/member_report.js +8 -8
  54. package/sparkdream/rep/v1/member_warning.js +2 -2
  55. package/sparkdream/rep/v1/params.d.ts +668 -16
  56. package/sparkdream/rep/v1/params.js +614 -2
  57. package/sparkdream/rep/v1/query.d.ts +929 -179
  58. package/sparkdream/rep/v1/query.js +1450 -329
  59. package/sparkdream/rep/v1/query.lcd.d.ts +7 -3
  60. package/sparkdream/rep/v1/query.lcd.js +49 -16
  61. package/sparkdream/rep/v1/query.rpc.Query.d.ts +47 -9
  62. package/sparkdream/rep/v1/query.rpc.Query.js +66 -20
  63. package/sparkdream/rep/v1/review_bounty.d.ts +168 -0
  64. package/sparkdream/rep/v1/review_bounty.js +218 -0
  65. package/sparkdream/rep/v1/tag_report.js +2 -2
  66. package/sparkdream/rep/v1/tx.d.ts +816 -9
  67. package/sparkdream/rep/v1/tx.js +2612 -1443
  68. package/sparkdream/rep/v1/tx.registry.d.ts +85 -1
  69. package/sparkdream/rep/v1/tx.registry.js +127 -1
  70. package/sparkdream/rep/v1/tx.rpc.msg.d.ts +20 -1
  71. package/sparkdream/rep/v1/tx.rpc.msg.js +42 -0
  72. package/sparkdream/rpc.query.d.ts +6 -2
  73. package/tendermint/bundle.d.ts +844 -844
  74. package/tendermint/bundle.js +18 -18
@@ -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
+ };
@@ -0,0 +1,182 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InitiativeReview = void 0;
4
+ //@ts-nocheck
5
+ const jury_review_1 = require("./jury_review");
6
+ const binary_1 = require("../../../binary");
7
+ function createBaseInitiativeReview() {
8
+ return {
9
+ initiativeId: BigInt(0),
10
+ round: 0,
11
+ reviewer: "",
12
+ approved: false,
13
+ criteriaVotes: [],
14
+ comments: "",
15
+ createdAt: BigInt(0),
16
+ bondReserved: "",
17
+ settled: false
18
+ };
19
+ }
20
+ /**
21
+ * One bonded reviewer's verdict on a round of submitted work.
22
+ *
23
+ * Keyed by (initiative_id, round, reviewer): a rejection sends the initiative
24
+ * back to ASSIGNED for the assignee to fix and resubmit, and each resubmission
25
+ * opens a new round, so the same reviewer may legitimately file again on the
26
+ * same initiative. Rounds are bounded by max_review_rounds.
27
+ *
28
+ * Reviewers are paid per verdict filed, never per approval — the whole point of
29
+ * the role is that judging pays and the outcome does not.
30
+ * @name InitiativeReview
31
+ * @package sparkdream.rep.v1
32
+ * @see proto type: sparkdream.rep.v1.InitiativeReview
33
+ */
34
+ exports.InitiativeReview = {
35
+ typeUrl: "/sparkdream.rep.v1.InitiativeReview",
36
+ encode(message, writer = binary_1.BinaryWriter.create()) {
37
+ if (message.initiativeId !== BigInt(0)) {
38
+ writer.uint32(8).uint64(message.initiativeId);
39
+ }
40
+ if (message.round !== 0) {
41
+ writer.uint32(16).uint32(message.round);
42
+ }
43
+ if (message.reviewer !== "") {
44
+ writer.uint32(26).string(message.reviewer);
45
+ }
46
+ if (message.approved === true) {
47
+ writer.uint32(32).bool(message.approved);
48
+ }
49
+ for (const v of message.criteriaVotes) {
50
+ jury_review_1.CriteriaVote.encode(v, writer.uint32(42).fork()).ldelim();
51
+ }
52
+ if (message.comments !== "") {
53
+ writer.uint32(50).string(message.comments);
54
+ }
55
+ if (message.createdAt !== BigInt(0)) {
56
+ writer.uint32(56).int64(message.createdAt);
57
+ }
58
+ if (message.bondReserved !== "") {
59
+ writer.uint32(66).string(message.bondReserved);
60
+ }
61
+ if (message.settled === true) {
62
+ writer.uint32(72).bool(message.settled);
63
+ }
64
+ return writer;
65
+ },
66
+ decode(input, length) {
67
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
68
+ let end = length === undefined ? reader.len : reader.pos + length;
69
+ const message = createBaseInitiativeReview();
70
+ while (reader.pos < end) {
71
+ const tag = reader.uint32();
72
+ switch (tag >>> 3) {
73
+ case 1:
74
+ message.initiativeId = reader.uint64();
75
+ break;
76
+ case 2:
77
+ message.round = reader.uint32();
78
+ break;
79
+ case 3:
80
+ message.reviewer = reader.string();
81
+ break;
82
+ case 4:
83
+ message.approved = reader.bool();
84
+ break;
85
+ case 5:
86
+ message.criteriaVotes.push(jury_review_1.CriteriaVote.decode(reader, reader.uint32()));
87
+ break;
88
+ case 6:
89
+ message.comments = reader.string();
90
+ break;
91
+ case 7:
92
+ message.createdAt = reader.int64();
93
+ break;
94
+ case 8:
95
+ message.bondReserved = reader.string();
96
+ break;
97
+ case 9:
98
+ message.settled = reader.bool();
99
+ break;
100
+ default:
101
+ reader.skipType(tag & 7);
102
+ break;
103
+ }
104
+ }
105
+ return message;
106
+ },
107
+ fromPartial(object) {
108
+ const message = createBaseInitiativeReview();
109
+ message.initiativeId = object.initiativeId !== undefined && object.initiativeId !== null ? BigInt(object.initiativeId.toString()) : BigInt(0);
110
+ message.round = object.round ?? 0;
111
+ message.reviewer = object.reviewer ?? "";
112
+ message.approved = object.approved ?? false;
113
+ message.criteriaVotes = object.criteriaVotes?.map(e => jury_review_1.CriteriaVote.fromPartial(e)) || [];
114
+ message.comments = object.comments ?? "";
115
+ message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? BigInt(object.createdAt.toString()) : BigInt(0);
116
+ message.bondReserved = object.bondReserved ?? "";
117
+ message.settled = object.settled ?? false;
118
+ return message;
119
+ },
120
+ fromAmino(object) {
121
+ const message = createBaseInitiativeReview();
122
+ if (object.initiative_id !== undefined && object.initiative_id !== null) {
123
+ message.initiativeId = BigInt(object.initiative_id);
124
+ }
125
+ if (object.round !== undefined && object.round !== null) {
126
+ message.round = object.round;
127
+ }
128
+ if (object.reviewer !== undefined && object.reviewer !== null) {
129
+ message.reviewer = object.reviewer;
130
+ }
131
+ if (object.approved !== undefined && object.approved !== null) {
132
+ message.approved = object.approved;
133
+ }
134
+ message.criteriaVotes = object.criteria_votes?.map(e => jury_review_1.CriteriaVote.fromAmino(e)) || [];
135
+ if (object.comments !== undefined && object.comments !== null) {
136
+ message.comments = object.comments;
137
+ }
138
+ if (object.created_at !== undefined && object.created_at !== null) {
139
+ message.createdAt = BigInt(object.created_at);
140
+ }
141
+ if (object.bond_reserved !== undefined && object.bond_reserved !== null) {
142
+ message.bondReserved = object.bond_reserved;
143
+ }
144
+ if (object.settled !== undefined && object.settled !== null) {
145
+ message.settled = object.settled;
146
+ }
147
+ return message;
148
+ },
149
+ toAmino(message) {
150
+ const obj = {};
151
+ obj.initiative_id = message.initiativeId !== BigInt(0) ? message.initiativeId?.toString() : undefined;
152
+ obj.round = message.round === 0 ? undefined : message.round;
153
+ obj.reviewer = message.reviewer === "" ? undefined : message.reviewer;
154
+ obj.approved = message.approved === false ? undefined : message.approved;
155
+ if (message.criteriaVotes) {
156
+ obj.criteria_votes = message.criteriaVotes.map(e => e ? jury_review_1.CriteriaVote.toAmino(e) : undefined);
157
+ }
158
+ else {
159
+ obj.criteria_votes = message.criteriaVotes;
160
+ }
161
+ obj.comments = message.comments === "" ? undefined : message.comments;
162
+ obj.created_at = message.createdAt !== BigInt(0) ? message.createdAt?.toString() : undefined;
163
+ obj.bond_reserved = message.bondReserved === "" ? undefined : message.bondReserved;
164
+ obj.settled = message.settled === false ? undefined : message.settled;
165
+ return obj;
166
+ },
167
+ fromAminoMsg(object) {
168
+ return exports.InitiativeReview.fromAmino(object.value);
169
+ },
170
+ fromProtoMsg(message) {
171
+ return exports.InitiativeReview.decode(message.value);
172
+ },
173
+ toProto(message) {
174
+ return exports.InitiativeReview.encode(message).finish();
175
+ },
176
+ toProtoMsg(message) {
177
+ return {
178
+ typeUrl: "/sparkdream.rep.v1.InitiativeReview",
179
+ value: exports.InitiativeReview.encode(message).finish()
180
+ };
181
+ }
182
+ };