@sparkdreamnft/sparkdreamjs 0.0.34 → 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 +170 -47
  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 +4900 -3425
  22. package/esm/sparkdream/rep/v1/query.lcd.js +77 -16
  23. package/esm/sparkdream/rep/v1/query.rpc.Query.js +85 -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 +9671 -9159
  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 +120 -2
  46. package/sparkdream/rep/v1/initiative.js +173 -48
  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 +1214 -264
  58. package/sparkdream/rep/v1/query.js +4904 -3429
  59. package/sparkdream/rep/v1/query.lcd.d.ts +9 -3
  60. package/sparkdream/rep/v1/query.lcd.js +77 -16
  61. package/sparkdream/rep/v1/query.rpc.Query.d.ts +55 -9
  62. package/sparkdream/rep/v1/query.rpc.Query.js +84 -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 +8 -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: "",
@@ -240,7 +301,13 @@ function createBaseInitiative() {
240
301
  createdAt: BigInt(0),
241
302
  completedAt: BigInt(0),
242
303
  propagatedConviction: "",
243
- selfAssignBond: ""
304
+ selfAssignBond: "",
305
+ acceptanceCriteria: [],
306
+ reviewRound: 0,
307
+ reviewDeadline: BigInt(0),
308
+ reviewEscalation: 0,
309
+ creator: "",
310
+ requiredVerifiers: 0
244
311
  };
245
312
  }
246
313
  /**
@@ -273,62 +340,77 @@ exports.Initiative = {
273
340
  if (message.category !== 0) {
274
341
  writer.uint32(56).int32(message.category);
275
342
  }
276
- if (message.templateId !== "") {
277
- writer.uint32(66).string(message.templateId);
278
- }
279
343
  if (message.budget !== "") {
280
- writer.uint32(74).string(message.budget);
344
+ writer.uint32(66).string(message.budget);
281
345
  }
282
346
  if (message.assignee !== "") {
283
- writer.uint32(82).string(message.assignee);
347
+ writer.uint32(74).string(message.assignee);
284
348
  }
285
349
  if (message.apprentice !== "") {
286
- writer.uint32(90).string(message.apprentice);
350
+ writer.uint32(82).string(message.apprentice);
287
351
  }
288
352
  if (message.assignedAt !== BigInt(0)) {
289
- writer.uint32(96).int64(message.assignedAt);
353
+ writer.uint32(88).int64(message.assignedAt);
290
354
  }
291
355
  if (message.deliverableUri !== "") {
292
- writer.uint32(106).string(message.deliverableUri);
356
+ writer.uint32(98).string(message.deliverableUri);
293
357
  }
294
358
  if (message.submittedAt !== BigInt(0)) {
295
- writer.uint32(112).int64(message.submittedAt);
359
+ writer.uint32(104).int64(message.submittedAt);
296
360
  }
297
361
  if (message.requiredConviction !== "") {
298
- 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);
299
363
  }
300
364
  if (message.currentConviction !== "") {
301
- 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);
302
366
  }
303
367
  if (message.externalConviction !== "") {
304
- 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);
305
369
  }
306
370
  if (message.convictionLastUpdated !== BigInt(0)) {
307
- writer.uint32(144).int64(message.convictionLastUpdated);
371
+ writer.uint32(136).int64(message.convictionLastUpdated);
308
372
  }
309
373
  if (message.reviewPeriodEnd !== BigInt(0)) {
310
- writer.uint32(152).int64(message.reviewPeriodEnd);
374
+ writer.uint32(144).int64(message.reviewPeriodEnd);
311
375
  }
312
376
  if (message.challengePeriodEnd !== BigInt(0)) {
313
- writer.uint32(160).int64(message.challengePeriodEnd);
377
+ writer.uint32(152).int64(message.challengePeriodEnd);
314
378
  }
315
379
  for (const v of message.approvals) {
316
- writer.uint32(170).string(v);
380
+ writer.uint32(162).string(v);
317
381
  }
318
382
  if (message.status !== 0) {
319
- writer.uint32(176).int32(message.status);
383
+ writer.uint32(168).int32(message.status);
320
384
  }
321
385
  if (message.createdAt !== BigInt(0)) {
322
- writer.uint32(184).int64(message.createdAt);
386
+ writer.uint32(176).int64(message.createdAt);
323
387
  }
324
388
  if (message.completedAt !== BigInt(0)) {
325
- writer.uint32(192).int64(message.completedAt);
389
+ writer.uint32(184).int64(message.completedAt);
326
390
  }
327
391
  if (message.propagatedConviction !== "") {
328
- 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);
329
393
  }
330
394
  if (message.selfAssignBond !== "") {
331
- 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);
408
+ }
409
+ if (message.creator !== "") {
410
+ writer.uint32(210).string(message.creator);
411
+ }
412
+ if (message.requiredVerifiers !== 0) {
413
+ writer.uint32(248).uint32(message.requiredVerifiers);
332
414
  }
333
415
  return writer;
334
416
  },
@@ -361,61 +443,76 @@ exports.Initiative = {
361
443
  message.category = reader.int32();
362
444
  break;
363
445
  case 8:
364
- message.templateId = reader.string();
446
+ message.budget = reader.string();
365
447
  break;
366
448
  case 9:
367
- message.budget = reader.string();
449
+ message.assignee = reader.string();
368
450
  break;
369
451
  case 10:
370
- message.assignee = reader.string();
452
+ message.apprentice = reader.string();
371
453
  break;
372
454
  case 11:
373
- message.apprentice = reader.string();
455
+ message.assignedAt = reader.int64();
374
456
  break;
375
457
  case 12:
376
- message.assignedAt = reader.int64();
458
+ message.deliverableUri = reader.string();
377
459
  break;
378
460
  case 13:
379
- message.deliverableUri = reader.string();
461
+ message.submittedAt = reader.int64();
380
462
  break;
381
463
  case 14:
382
- message.submittedAt = reader.int64();
464
+ message.requiredConviction = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
383
465
  break;
384
466
  case 15:
385
- message.requiredConviction = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
467
+ message.currentConviction = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
386
468
  break;
387
469
  case 16:
388
- message.currentConviction = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
470
+ message.externalConviction = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
389
471
  break;
390
472
  case 17:
391
- message.externalConviction = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
473
+ message.convictionLastUpdated = reader.int64();
392
474
  break;
393
475
  case 18:
394
- message.convictionLastUpdated = reader.int64();
476
+ message.reviewPeriodEnd = reader.int64();
395
477
  break;
396
478
  case 19:
397
- message.reviewPeriodEnd = reader.int64();
479
+ message.challengePeriodEnd = reader.int64();
398
480
  break;
399
481
  case 20:
400
- message.challengePeriodEnd = reader.int64();
482
+ message.approvals.push(reader.string());
401
483
  break;
402
484
  case 21:
403
- message.approvals.push(reader.string());
485
+ message.status = reader.int32();
404
486
  break;
405
487
  case 22:
406
- message.status = reader.int32();
488
+ message.createdAt = reader.int64();
407
489
  break;
408
490
  case 23:
409
- message.createdAt = reader.int64();
491
+ message.completedAt = reader.int64();
410
492
  break;
411
493
  case 24:
412
- message.completedAt = reader.int64();
494
+ message.propagatedConviction = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
413
495
  break;
414
496
  case 25:
415
- message.propagatedConviction = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
497
+ message.selfAssignBond = reader.string();
498
+ break;
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();
416
510
  break;
417
511
  case 26:
418
- message.selfAssignBond = reader.string();
512
+ message.creator = reader.string();
513
+ break;
514
+ case 31:
515
+ message.requiredVerifiers = reader.uint32();
419
516
  break;
420
517
  default:
421
518
  reader.skipType(tag & 7);
@@ -433,7 +530,6 @@ exports.Initiative = {
433
530
  message.tags = object.tags?.map(e => e) || [];
434
531
  message.tier = object.tier ?? 0;
435
532
  message.category = object.category ?? 0;
436
- message.templateId = object.templateId ?? "";
437
533
  message.budget = object.budget ?? "";
438
534
  message.assignee = object.assignee ?? "";
439
535
  message.apprentice = object.apprentice ?? "";
@@ -452,6 +548,12 @@ exports.Initiative = {
452
548
  message.completedAt = object.completedAt !== undefined && object.completedAt !== null ? BigInt(object.completedAt.toString()) : BigInt(0);
453
549
  message.propagatedConviction = object.propagatedConviction ?? "";
454
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;
555
+ message.creator = object.creator ?? "";
556
+ message.requiredVerifiers = object.requiredVerifiers ?? 0;
455
557
  return message;
456
558
  },
457
559
  fromAmino(object) {
@@ -475,9 +577,6 @@ exports.Initiative = {
475
577
  if (object.category !== undefined && object.category !== null) {
476
578
  message.category = object.category;
477
579
  }
478
- if (object.template_id !== undefined && object.template_id !== null) {
479
- message.templateId = object.template_id;
480
- }
481
580
  if (object.budget !== undefined && object.budget !== null) {
482
581
  message.budget = object.budget;
483
582
  }
@@ -530,6 +629,22 @@ exports.Initiative = {
530
629
  if (object.self_assign_bond !== undefined && object.self_assign_bond !== null) {
531
630
  message.selfAssignBond = object.self_assign_bond;
532
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
+ }
642
+ if (object.creator !== undefined && object.creator !== null) {
643
+ message.creator = object.creator;
644
+ }
645
+ if (object.required_verifiers !== undefined && object.required_verifiers !== null) {
646
+ message.requiredVerifiers = object.required_verifiers;
647
+ }
533
648
  return message;
534
649
  },
535
650
  toAmino(message) {
@@ -546,7 +661,6 @@ exports.Initiative = {
546
661
  }
547
662
  obj.tier = message.tier === 0 ? undefined : message.tier;
548
663
  obj.category = message.category === 0 ? undefined : message.category;
549
- obj.template_id = message.templateId === "" ? undefined : message.templateId;
550
664
  obj.budget = message.budget === "" ? undefined : message.budget;
551
665
  obj.assignee = message.assignee === "" ? undefined : message.assignee;
552
666
  obj.apprentice = message.apprentice === "" ? undefined : message.apprentice;
@@ -570,6 +684,17 @@ exports.Initiative = {
570
684
  obj.completed_at = message.completedAt !== BigInt(0) ? message.completedAt?.toString() : undefined;
571
685
  obj.propagated_conviction = message.propagatedConviction === "" ? undefined : message.propagatedConviction;
572
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;
696
+ obj.creator = message.creator === "" ? undefined : message.creator;
697
+ obj.required_verifiers = message.requiredVerifiers === 0 ? undefined : message.requiredVerifiers;
573
698
  return obj;
574
699
  },
575
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
+ };