@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,4 +1,5 @@
1
1
  //@ts-nocheck
2
+ import { VerificationCriteria } from "./acceptance_criteria";
2
3
  import { BinaryReader, BinaryWriter } from "../../../binary";
3
4
  import { Decimal } from "@interchainjs/math";
4
5
  export var InitiativeTier;
@@ -204,6 +205,65 @@ export function initiativeStatusToJSON(object) {
204
205
  return "UNRECOGNIZED";
205
206
  }
206
207
  }
208
+ /**
209
+ * How an escalated review round was resolved by the Operations Committee.
210
+ *
211
+ * PASSED is also what committee *inaction* resolves to: silence must never wedge
212
+ * an initiative, and silence must never mint.
213
+ */
214
+ export var ReviewEscalation;
215
+ (function (ReviewEscalation) {
216
+ ReviewEscalation[ReviewEscalation["REVIEW_ESCALATION_NONE"] = 0] = "REVIEW_ESCALATION_NONE";
217
+ /**
218
+ * REVIEW_ESCALATION_APPROVED - Committee satisfied the reviewer gate itself. Writes no RoleActivity — the
219
+ * committee holds no bond and carries no accuracy record.
220
+ */
221
+ ReviewEscalation[ReviewEscalation["REVIEW_ESCALATION_APPROVED"] = 1] = "REVIEW_ESCALATION_APPROVED";
222
+ /** REVIEW_ESCALATION_REJECTED - Committee rejected; same effect as a reviewer rejection. */
223
+ ReviewEscalation[ReviewEscalation["REVIEW_ESCALATION_REJECTED"] = 2] = "REVIEW_ESCALATION_REJECTED";
224
+ /**
225
+ * REVIEW_ESCALATION_PASSED - Committee declined to substitute its judgement. The initiative proceeds on
226
+ * conviction alone; the challenge window still runs.
227
+ */
228
+ ReviewEscalation[ReviewEscalation["REVIEW_ESCALATION_PASSED"] = 3] = "REVIEW_ESCALATION_PASSED";
229
+ ReviewEscalation[ReviewEscalation["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
230
+ })(ReviewEscalation || (ReviewEscalation = {}));
231
+ export const ReviewEscalationAmino = ReviewEscalation;
232
+ export function reviewEscalationFromJSON(object) {
233
+ switch (object) {
234
+ case 0:
235
+ case "REVIEW_ESCALATION_NONE":
236
+ return ReviewEscalation.REVIEW_ESCALATION_NONE;
237
+ case 1:
238
+ case "REVIEW_ESCALATION_APPROVED":
239
+ return ReviewEscalation.REVIEW_ESCALATION_APPROVED;
240
+ case 2:
241
+ case "REVIEW_ESCALATION_REJECTED":
242
+ return ReviewEscalation.REVIEW_ESCALATION_REJECTED;
243
+ case 3:
244
+ case "REVIEW_ESCALATION_PASSED":
245
+ return ReviewEscalation.REVIEW_ESCALATION_PASSED;
246
+ case -1:
247
+ case "UNRECOGNIZED":
248
+ default:
249
+ return ReviewEscalation.UNRECOGNIZED;
250
+ }
251
+ }
252
+ export function reviewEscalationToJSON(object) {
253
+ switch (object) {
254
+ case ReviewEscalation.REVIEW_ESCALATION_NONE:
255
+ return "REVIEW_ESCALATION_NONE";
256
+ case ReviewEscalation.REVIEW_ESCALATION_APPROVED:
257
+ return "REVIEW_ESCALATION_APPROVED";
258
+ case ReviewEscalation.REVIEW_ESCALATION_REJECTED:
259
+ return "REVIEW_ESCALATION_REJECTED";
260
+ case ReviewEscalation.REVIEW_ESCALATION_PASSED:
261
+ return "REVIEW_ESCALATION_PASSED";
262
+ case ReviewEscalation.UNRECOGNIZED:
263
+ default:
264
+ return "UNRECOGNIZED";
265
+ }
266
+ }
207
267
  function createBaseInitiative() {
208
268
  return {
209
269
  id: BigInt(0),
@@ -213,7 +273,6 @@ function createBaseInitiative() {
213
273
  tags: [],
214
274
  tier: 0,
215
275
  category: 0,
216
- templateId: "",
217
276
  budget: "",
218
277
  assignee: "",
219
278
  apprentice: "",
@@ -232,7 +291,12 @@ function createBaseInitiative() {
232
291
  completedAt: BigInt(0),
233
292
  propagatedConviction: "",
234
293
  selfAssignBond: "",
235
- creator: ""
294
+ acceptanceCriteria: [],
295
+ reviewRound: 0,
296
+ reviewDeadline: BigInt(0),
297
+ reviewEscalation: 0,
298
+ creator: "",
299
+ requiredVerifiers: 0
236
300
  };
237
301
  }
238
302
  /**
@@ -265,65 +329,77 @@ export const Initiative = {
265
329
  if (message.category !== 0) {
266
330
  writer.uint32(56).int32(message.category);
267
331
  }
268
- if (message.templateId !== "") {
269
- writer.uint32(66).string(message.templateId);
270
- }
271
332
  if (message.budget !== "") {
272
- writer.uint32(74).string(message.budget);
333
+ writer.uint32(66).string(message.budget);
273
334
  }
274
335
  if (message.assignee !== "") {
275
- writer.uint32(82).string(message.assignee);
336
+ writer.uint32(74).string(message.assignee);
276
337
  }
277
338
  if (message.apprentice !== "") {
278
- writer.uint32(90).string(message.apprentice);
339
+ writer.uint32(82).string(message.apprentice);
279
340
  }
280
341
  if (message.assignedAt !== BigInt(0)) {
281
- writer.uint32(96).int64(message.assignedAt);
342
+ writer.uint32(88).int64(message.assignedAt);
282
343
  }
283
344
  if (message.deliverableUri !== "") {
284
- writer.uint32(106).string(message.deliverableUri);
345
+ writer.uint32(98).string(message.deliverableUri);
285
346
  }
286
347
  if (message.submittedAt !== BigInt(0)) {
287
- writer.uint32(112).int64(message.submittedAt);
348
+ writer.uint32(104).int64(message.submittedAt);
288
349
  }
289
350
  if (message.requiredConviction !== "") {
290
- writer.uint32(122).string(Decimal.fromUserInput(message.requiredConviction, 18).atomics);
351
+ writer.uint32(114).string(Decimal.fromUserInput(message.requiredConviction, 18).atomics);
291
352
  }
292
353
  if (message.currentConviction !== "") {
293
- writer.uint32(130).string(Decimal.fromUserInput(message.currentConviction, 18).atomics);
354
+ writer.uint32(122).string(Decimal.fromUserInput(message.currentConviction, 18).atomics);
294
355
  }
295
356
  if (message.externalConviction !== "") {
296
- writer.uint32(138).string(Decimal.fromUserInput(message.externalConviction, 18).atomics);
357
+ writer.uint32(130).string(Decimal.fromUserInput(message.externalConviction, 18).atomics);
297
358
  }
298
359
  if (message.convictionLastUpdated !== BigInt(0)) {
299
- writer.uint32(144).int64(message.convictionLastUpdated);
360
+ writer.uint32(136).int64(message.convictionLastUpdated);
300
361
  }
301
362
  if (message.reviewPeriodEnd !== BigInt(0)) {
302
- writer.uint32(152).int64(message.reviewPeriodEnd);
363
+ writer.uint32(144).int64(message.reviewPeriodEnd);
303
364
  }
304
365
  if (message.challengePeriodEnd !== BigInt(0)) {
305
- writer.uint32(160).int64(message.challengePeriodEnd);
366
+ writer.uint32(152).int64(message.challengePeriodEnd);
306
367
  }
307
368
  for (const v of message.approvals) {
308
- writer.uint32(170).string(v);
369
+ writer.uint32(162).string(v);
309
370
  }
310
371
  if (message.status !== 0) {
311
- writer.uint32(176).int32(message.status);
372
+ writer.uint32(168).int32(message.status);
312
373
  }
313
374
  if (message.createdAt !== BigInt(0)) {
314
- writer.uint32(184).int64(message.createdAt);
375
+ writer.uint32(176).int64(message.createdAt);
315
376
  }
316
377
  if (message.completedAt !== BigInt(0)) {
317
- writer.uint32(192).int64(message.completedAt);
378
+ writer.uint32(184).int64(message.completedAt);
318
379
  }
319
380
  if (message.propagatedConviction !== "") {
320
- writer.uint32(202).string(Decimal.fromUserInput(message.propagatedConviction, 18).atomics);
381
+ writer.uint32(194).string(Decimal.fromUserInput(message.propagatedConviction, 18).atomics);
321
382
  }
322
383
  if (message.selfAssignBond !== "") {
323
- writer.uint32(210).string(message.selfAssignBond);
384
+ writer.uint32(202).string(message.selfAssignBond);
385
+ }
386
+ for (const v of message.acceptanceCriteria) {
387
+ VerificationCriteria.encode(v, writer.uint32(218).fork()).ldelim();
388
+ }
389
+ if (message.reviewRound !== 0) {
390
+ writer.uint32(224).uint32(message.reviewRound);
391
+ }
392
+ if (message.reviewDeadline !== BigInt(0)) {
393
+ writer.uint32(232).int64(message.reviewDeadline);
394
+ }
395
+ if (message.reviewEscalation !== 0) {
396
+ writer.uint32(240).int32(message.reviewEscalation);
324
397
  }
325
398
  if (message.creator !== "") {
326
- writer.uint32(218).string(message.creator);
399
+ writer.uint32(210).string(message.creator);
400
+ }
401
+ if (message.requiredVerifiers !== 0) {
402
+ writer.uint32(248).uint32(message.requiredVerifiers);
327
403
  }
328
404
  return writer;
329
405
  },
@@ -356,65 +432,77 @@ export const Initiative = {
356
432
  message.category = reader.int32();
357
433
  break;
358
434
  case 8:
359
- message.templateId = reader.string();
360
- break;
361
- case 9:
362
435
  message.budget = reader.string();
363
436
  break;
364
- case 10:
437
+ case 9:
365
438
  message.assignee = reader.string();
366
439
  break;
367
- case 11:
440
+ case 10:
368
441
  message.apprentice = reader.string();
369
442
  break;
370
- case 12:
443
+ case 11:
371
444
  message.assignedAt = reader.int64();
372
445
  break;
373
- case 13:
446
+ case 12:
374
447
  message.deliverableUri = reader.string();
375
448
  break;
376
- case 14:
449
+ case 13:
377
450
  message.submittedAt = reader.int64();
378
451
  break;
379
- case 15:
452
+ case 14:
380
453
  message.requiredConviction = Decimal.fromAtomics(reader.string(), 18).toString();
381
454
  break;
382
- case 16:
455
+ case 15:
383
456
  message.currentConviction = Decimal.fromAtomics(reader.string(), 18).toString();
384
457
  break;
385
- case 17:
458
+ case 16:
386
459
  message.externalConviction = Decimal.fromAtomics(reader.string(), 18).toString();
387
460
  break;
388
- case 18:
461
+ case 17:
389
462
  message.convictionLastUpdated = reader.int64();
390
463
  break;
391
- case 19:
464
+ case 18:
392
465
  message.reviewPeriodEnd = reader.int64();
393
466
  break;
394
- case 20:
467
+ case 19:
395
468
  message.challengePeriodEnd = reader.int64();
396
469
  break;
397
- case 21:
470
+ case 20:
398
471
  message.approvals.push(reader.string());
399
472
  break;
400
- case 22:
473
+ case 21:
401
474
  message.status = reader.int32();
402
475
  break;
403
- case 23:
476
+ case 22:
404
477
  message.createdAt = reader.int64();
405
478
  break;
406
- case 24:
479
+ case 23:
407
480
  message.completedAt = reader.int64();
408
481
  break;
409
- case 25:
482
+ case 24:
410
483
  message.propagatedConviction = Decimal.fromAtomics(reader.string(), 18).toString();
411
484
  break;
412
- case 26:
485
+ case 25:
413
486
  message.selfAssignBond = reader.string();
414
487
  break;
415
488
  case 27:
489
+ message.acceptanceCriteria.push(VerificationCriteria.decode(reader, reader.uint32()));
490
+ break;
491
+ case 28:
492
+ message.reviewRound = reader.uint32();
493
+ break;
494
+ case 29:
495
+ message.reviewDeadline = reader.int64();
496
+ break;
497
+ case 30:
498
+ message.reviewEscalation = reader.int32();
499
+ break;
500
+ case 26:
416
501
  message.creator = reader.string();
417
502
  break;
503
+ case 31:
504
+ message.requiredVerifiers = reader.uint32();
505
+ break;
418
506
  default:
419
507
  reader.skipType(tag & 7);
420
508
  break;
@@ -431,7 +519,6 @@ export const Initiative = {
431
519
  message.tags = object.tags?.map(e => e) || [];
432
520
  message.tier = object.tier ?? 0;
433
521
  message.category = object.category ?? 0;
434
- message.templateId = object.templateId ?? "";
435
522
  message.budget = object.budget ?? "";
436
523
  message.assignee = object.assignee ?? "";
437
524
  message.apprentice = object.apprentice ?? "";
@@ -450,7 +537,12 @@ export const Initiative = {
450
537
  message.completedAt = object.completedAt !== undefined && object.completedAt !== null ? BigInt(object.completedAt.toString()) : BigInt(0);
451
538
  message.propagatedConviction = object.propagatedConviction ?? "";
452
539
  message.selfAssignBond = object.selfAssignBond ?? "";
540
+ message.acceptanceCriteria = object.acceptanceCriteria?.map(e => VerificationCriteria.fromPartial(e)) || [];
541
+ message.reviewRound = object.reviewRound ?? 0;
542
+ message.reviewDeadline = object.reviewDeadline !== undefined && object.reviewDeadline !== null ? BigInt(object.reviewDeadline.toString()) : BigInt(0);
543
+ message.reviewEscalation = object.reviewEscalation ?? 0;
453
544
  message.creator = object.creator ?? "";
545
+ message.requiredVerifiers = object.requiredVerifiers ?? 0;
454
546
  return message;
455
547
  },
456
548
  fromAmino(object) {
@@ -474,9 +566,6 @@ export const Initiative = {
474
566
  if (object.category !== undefined && object.category !== null) {
475
567
  message.category = object.category;
476
568
  }
477
- if (object.template_id !== undefined && object.template_id !== null) {
478
- message.templateId = object.template_id;
479
- }
480
569
  if (object.budget !== undefined && object.budget !== null) {
481
570
  message.budget = object.budget;
482
571
  }
@@ -529,9 +618,22 @@ export const Initiative = {
529
618
  if (object.self_assign_bond !== undefined && object.self_assign_bond !== null) {
530
619
  message.selfAssignBond = object.self_assign_bond;
531
620
  }
621
+ message.acceptanceCriteria = object.acceptance_criteria?.map(e => VerificationCriteria.fromAmino(e)) || [];
622
+ if (object.review_round !== undefined && object.review_round !== null) {
623
+ message.reviewRound = object.review_round;
624
+ }
625
+ if (object.review_deadline !== undefined && object.review_deadline !== null) {
626
+ message.reviewDeadline = BigInt(object.review_deadline);
627
+ }
628
+ if (object.review_escalation !== undefined && object.review_escalation !== null) {
629
+ message.reviewEscalation = object.review_escalation;
630
+ }
532
631
  if (object.creator !== undefined && object.creator !== null) {
533
632
  message.creator = object.creator;
534
633
  }
634
+ if (object.required_verifiers !== undefined && object.required_verifiers !== null) {
635
+ message.requiredVerifiers = object.required_verifiers;
636
+ }
535
637
  return message;
536
638
  },
537
639
  toAmino(message) {
@@ -548,7 +650,6 @@ export const Initiative = {
548
650
  }
549
651
  obj.tier = message.tier === 0 ? undefined : message.tier;
550
652
  obj.category = message.category === 0 ? undefined : message.category;
551
- obj.template_id = message.templateId === "" ? undefined : message.templateId;
552
653
  obj.budget = message.budget === "" ? undefined : message.budget;
553
654
  obj.assignee = message.assignee === "" ? undefined : message.assignee;
554
655
  obj.apprentice = message.apprentice === "" ? undefined : message.apprentice;
@@ -572,7 +673,17 @@ export const Initiative = {
572
673
  obj.completed_at = message.completedAt !== BigInt(0) ? message.completedAt?.toString() : undefined;
573
674
  obj.propagated_conviction = message.propagatedConviction === "" ? undefined : message.propagatedConviction;
574
675
  obj.self_assign_bond = message.selfAssignBond === "" ? undefined : message.selfAssignBond;
676
+ if (message.acceptanceCriteria) {
677
+ obj.acceptance_criteria = message.acceptanceCriteria.map(e => e ? VerificationCriteria.toAmino(e) : undefined);
678
+ }
679
+ else {
680
+ obj.acceptance_criteria = message.acceptanceCriteria;
681
+ }
682
+ obj.review_round = message.reviewRound === 0 ? undefined : message.reviewRound;
683
+ obj.review_deadline = message.reviewDeadline !== BigInt(0) ? message.reviewDeadline?.toString() : undefined;
684
+ obj.review_escalation = message.reviewEscalation === 0 ? undefined : message.reviewEscalation;
575
685
  obj.creator = message.creator === "" ? undefined : message.creator;
686
+ obj.required_verifiers = message.requiredVerifiers === 0 ? undefined : message.requiredVerifiers;
576
687
  return obj;
577
688
  },
578
689
  fromAminoMsg(object) {
@@ -0,0 +1,179 @@
1
+ //@ts-nocheck
2
+ import { CriteriaVote } from "./jury_review";
3
+ import { BinaryReader, BinaryWriter } from "../../../binary";
4
+ function createBaseInitiativeReview() {
5
+ return {
6
+ initiativeId: BigInt(0),
7
+ round: 0,
8
+ reviewer: "",
9
+ approved: false,
10
+ criteriaVotes: [],
11
+ comments: "",
12
+ createdAt: BigInt(0),
13
+ bondReserved: "",
14
+ settled: false
15
+ };
16
+ }
17
+ /**
18
+ * One bonded reviewer's verdict on a round of submitted work.
19
+ *
20
+ * Keyed by (initiative_id, round, reviewer): a rejection sends the initiative
21
+ * back to ASSIGNED for the assignee to fix and resubmit, and each resubmission
22
+ * opens a new round, so the same reviewer may legitimately file again on the
23
+ * same initiative. Rounds are bounded by max_review_rounds.
24
+ *
25
+ * Reviewers are paid per verdict filed, never per approval — the whole point of
26
+ * the role is that judging pays and the outcome does not.
27
+ * @name InitiativeReview
28
+ * @package sparkdream.rep.v1
29
+ * @see proto type: sparkdream.rep.v1.InitiativeReview
30
+ */
31
+ export const InitiativeReview = {
32
+ typeUrl: "/sparkdream.rep.v1.InitiativeReview",
33
+ encode(message, writer = BinaryWriter.create()) {
34
+ if (message.initiativeId !== BigInt(0)) {
35
+ writer.uint32(8).uint64(message.initiativeId);
36
+ }
37
+ if (message.round !== 0) {
38
+ writer.uint32(16).uint32(message.round);
39
+ }
40
+ if (message.reviewer !== "") {
41
+ writer.uint32(26).string(message.reviewer);
42
+ }
43
+ if (message.approved === true) {
44
+ writer.uint32(32).bool(message.approved);
45
+ }
46
+ for (const v of message.criteriaVotes) {
47
+ CriteriaVote.encode(v, writer.uint32(42).fork()).ldelim();
48
+ }
49
+ if (message.comments !== "") {
50
+ writer.uint32(50).string(message.comments);
51
+ }
52
+ if (message.createdAt !== BigInt(0)) {
53
+ writer.uint32(56).int64(message.createdAt);
54
+ }
55
+ if (message.bondReserved !== "") {
56
+ writer.uint32(66).string(message.bondReserved);
57
+ }
58
+ if (message.settled === true) {
59
+ writer.uint32(72).bool(message.settled);
60
+ }
61
+ return writer;
62
+ },
63
+ decode(input, length) {
64
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
65
+ let end = length === undefined ? reader.len : reader.pos + length;
66
+ const message = createBaseInitiativeReview();
67
+ while (reader.pos < end) {
68
+ const tag = reader.uint32();
69
+ switch (tag >>> 3) {
70
+ case 1:
71
+ message.initiativeId = reader.uint64();
72
+ break;
73
+ case 2:
74
+ message.round = reader.uint32();
75
+ break;
76
+ case 3:
77
+ message.reviewer = reader.string();
78
+ break;
79
+ case 4:
80
+ message.approved = reader.bool();
81
+ break;
82
+ case 5:
83
+ message.criteriaVotes.push(CriteriaVote.decode(reader, reader.uint32()));
84
+ break;
85
+ case 6:
86
+ message.comments = reader.string();
87
+ break;
88
+ case 7:
89
+ message.createdAt = reader.int64();
90
+ break;
91
+ case 8:
92
+ message.bondReserved = reader.string();
93
+ break;
94
+ case 9:
95
+ message.settled = reader.bool();
96
+ break;
97
+ default:
98
+ reader.skipType(tag & 7);
99
+ break;
100
+ }
101
+ }
102
+ return message;
103
+ },
104
+ fromPartial(object) {
105
+ const message = createBaseInitiativeReview();
106
+ message.initiativeId = object.initiativeId !== undefined && object.initiativeId !== null ? BigInt(object.initiativeId.toString()) : BigInt(0);
107
+ message.round = object.round ?? 0;
108
+ message.reviewer = object.reviewer ?? "";
109
+ message.approved = object.approved ?? false;
110
+ message.criteriaVotes = object.criteriaVotes?.map(e => CriteriaVote.fromPartial(e)) || [];
111
+ message.comments = object.comments ?? "";
112
+ message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? BigInt(object.createdAt.toString()) : BigInt(0);
113
+ message.bondReserved = object.bondReserved ?? "";
114
+ message.settled = object.settled ?? false;
115
+ return message;
116
+ },
117
+ fromAmino(object) {
118
+ const message = createBaseInitiativeReview();
119
+ if (object.initiative_id !== undefined && object.initiative_id !== null) {
120
+ message.initiativeId = BigInt(object.initiative_id);
121
+ }
122
+ if (object.round !== undefined && object.round !== null) {
123
+ message.round = object.round;
124
+ }
125
+ if (object.reviewer !== undefined && object.reviewer !== null) {
126
+ message.reviewer = object.reviewer;
127
+ }
128
+ if (object.approved !== undefined && object.approved !== null) {
129
+ message.approved = object.approved;
130
+ }
131
+ message.criteriaVotes = object.criteria_votes?.map(e => CriteriaVote.fromAmino(e)) || [];
132
+ if (object.comments !== undefined && object.comments !== null) {
133
+ message.comments = object.comments;
134
+ }
135
+ if (object.created_at !== undefined && object.created_at !== null) {
136
+ message.createdAt = BigInt(object.created_at);
137
+ }
138
+ if (object.bond_reserved !== undefined && object.bond_reserved !== null) {
139
+ message.bondReserved = object.bond_reserved;
140
+ }
141
+ if (object.settled !== undefined && object.settled !== null) {
142
+ message.settled = object.settled;
143
+ }
144
+ return message;
145
+ },
146
+ toAmino(message) {
147
+ const obj = {};
148
+ obj.initiative_id = message.initiativeId !== BigInt(0) ? message.initiativeId?.toString() : undefined;
149
+ obj.round = message.round === 0 ? undefined : message.round;
150
+ obj.reviewer = message.reviewer === "" ? undefined : message.reviewer;
151
+ obj.approved = message.approved === false ? undefined : message.approved;
152
+ if (message.criteriaVotes) {
153
+ obj.criteria_votes = message.criteriaVotes.map(e => e ? CriteriaVote.toAmino(e) : undefined);
154
+ }
155
+ else {
156
+ obj.criteria_votes = message.criteriaVotes;
157
+ }
158
+ obj.comments = message.comments === "" ? undefined : message.comments;
159
+ obj.created_at = message.createdAt !== BigInt(0) ? message.createdAt?.toString() : undefined;
160
+ obj.bond_reserved = message.bondReserved === "" ? undefined : message.bondReserved;
161
+ obj.settled = message.settled === false ? undefined : message.settled;
162
+ return obj;
163
+ },
164
+ fromAminoMsg(object) {
165
+ return InitiativeReview.fromAmino(object.value);
166
+ },
167
+ fromProtoMsg(message) {
168
+ return InitiativeReview.decode(message.value);
169
+ },
170
+ toProto(message) {
171
+ return InitiativeReview.encode(message).finish();
172
+ },
173
+ toProtoMsg(message) {
174
+ return {
175
+ typeUrl: "/sparkdream.rep.v1.InitiativeReview",
176
+ value: InitiativeReview.encode(message).finish()
177
+ };
178
+ }
179
+ };
@@ -7,11 +7,30 @@ function createBaseJuryParticipation() {
7
7
  totalVoted: BigInt(0),
8
8
  totalTimeouts: BigInt(0),
9
9
  lastAssignedAt: BigInt(0),
10
- excluded: false
10
+ totalDeclined: BigInt(0),
11
+ totalAbandoned: BigInt(0)
11
12
  };
12
13
  }
13
14
  /**
14
- * JuryParticipation defines the JuryParticipation message.
15
+ * JuryParticipation is a juror's service record.
16
+ *
17
+ * Jurors are drawn by lot and paid a flat participation reward for voting.
18
+ * Ignoring a summons is **not** penalised: the adjudication terminal path
19
+ * resolves an inconclusive jury safely and the redraw sweep replaces an
20
+ * unanswered seat within the acceptance window, so what remains of a no-show is
21
+ * a few hours of delay in a week-long review. Pricing that would oblige every
22
+ * eligible member to monitor the chain for an event that reaches them roughly
23
+ * once a year, and under broad sortition non-response is the expected default
24
+ * of a population that never volunteered.
25
+ *
26
+ * This record instead feeds **selection weight**: a juror who never answers is
27
+ * drawn less often, never removed from the lot. Nobody loses eligibility, and an
28
+ * address can always earn its weight back — which an excluded one could not,
29
+ * since it would never be drawn again to demonstrate otherwise.
30
+ *
31
+ * The one penalised case is total_abandoned: accepting a summons and then
32
+ * letting it lapse. Accepting is voluntary and declining is free, so that is a
33
+ * broken commitment rather than an accident, and it is charged in reputation.
15
34
  * @name JuryParticipation
16
35
  * @package sparkdream.rep.v1
17
36
  * @see proto type: sparkdream.rep.v1.JuryParticipation
@@ -34,8 +53,11 @@ export const JuryParticipation = {
34
53
  if (message.lastAssignedAt !== BigInt(0)) {
35
54
  writer.uint32(40).int64(message.lastAssignedAt);
36
55
  }
37
- if (message.excluded === true) {
38
- writer.uint32(48).bool(message.excluded);
56
+ if (message.totalDeclined !== BigInt(0)) {
57
+ writer.uint32(48).uint64(message.totalDeclined);
58
+ }
59
+ if (message.totalAbandoned !== BigInt(0)) {
60
+ writer.uint32(56).uint64(message.totalAbandoned);
39
61
  }
40
62
  return writer;
41
63
  },
@@ -62,7 +84,10 @@ export const JuryParticipation = {
62
84
  message.lastAssignedAt = reader.int64();
63
85
  break;
64
86
  case 6:
65
- message.excluded = reader.bool();
87
+ message.totalDeclined = reader.uint64();
88
+ break;
89
+ case 7:
90
+ message.totalAbandoned = reader.uint64();
66
91
  break;
67
92
  default:
68
93
  reader.skipType(tag & 7);
@@ -78,7 +103,8 @@ export const JuryParticipation = {
78
103
  message.totalVoted = object.totalVoted !== undefined && object.totalVoted !== null ? BigInt(object.totalVoted.toString()) : BigInt(0);
79
104
  message.totalTimeouts = object.totalTimeouts !== undefined && object.totalTimeouts !== null ? BigInt(object.totalTimeouts.toString()) : BigInt(0);
80
105
  message.lastAssignedAt = object.lastAssignedAt !== undefined && object.lastAssignedAt !== null ? BigInt(object.lastAssignedAt.toString()) : BigInt(0);
81
- message.excluded = object.excluded ?? false;
106
+ message.totalDeclined = object.totalDeclined !== undefined && object.totalDeclined !== null ? BigInt(object.totalDeclined.toString()) : BigInt(0);
107
+ message.totalAbandoned = object.totalAbandoned !== undefined && object.totalAbandoned !== null ? BigInt(object.totalAbandoned.toString()) : BigInt(0);
82
108
  return message;
83
109
  },
84
110
  fromAmino(object) {
@@ -98,8 +124,11 @@ export const JuryParticipation = {
98
124
  if (object.last_assigned_at !== undefined && object.last_assigned_at !== null) {
99
125
  message.lastAssignedAt = BigInt(object.last_assigned_at);
100
126
  }
101
- if (object.excluded !== undefined && object.excluded !== null) {
102
- message.excluded = object.excluded;
127
+ if (object.total_declined !== undefined && object.total_declined !== null) {
128
+ message.totalDeclined = BigInt(object.total_declined);
129
+ }
130
+ if (object.total_abandoned !== undefined && object.total_abandoned !== null) {
131
+ message.totalAbandoned = BigInt(object.total_abandoned);
103
132
  }
104
133
  return message;
105
134
  },
@@ -110,7 +139,8 @@ export const JuryParticipation = {
110
139
  obj.total_voted = message.totalVoted !== BigInt(0) ? message.totalVoted?.toString() : undefined;
111
140
  obj.total_timeouts = message.totalTimeouts !== BigInt(0) ? message.totalTimeouts?.toString() : undefined;
112
141
  obj.last_assigned_at = message.lastAssignedAt !== BigInt(0) ? message.lastAssignedAt?.toString() : undefined;
113
- obj.excluded = message.excluded === false ? undefined : message.excluded;
142
+ obj.total_declined = message.totalDeclined !== BigInt(0) ? message.totalDeclined?.toString() : undefined;
143
+ obj.total_abandoned = message.totalAbandoned !== BigInt(0) ? message.totalAbandoned?.toString() : undefined;
114
144
  return obj;
115
145
  },
116
146
  fromAminoMsg(object) {