@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.
- package/akash/bundle.d.ts +134 -134
- package/akash/bundle.js +150 -150
- package/cosmos/bundle.d.ts +160 -160
- package/cosmos/bundle.js +182 -182
- package/esm/akash/bundle.js +150 -150
- package/esm/cosmos/bundle.js +182 -182
- package/esm/ibc/bundle.js +116 -116
- package/esm/sparkdream/bundle.js +305 -301
- package/esm/sparkdream/rep/v1/{interim_template.js → acceptance_criteria.js} +13 -123
- package/esm/sparkdream/rep/v1/accountability.js +11 -0
- package/esm/sparkdream/rep/v1/bonded_role.js +13 -0
- package/esm/sparkdream/rep/v1/challenge.js +21 -9
- package/esm/sparkdream/rep/v1/genesis.js +198 -59
- package/esm/sparkdream/rep/v1/initiative.js +170 -47
- package/esm/sparkdream/rep/v1/initiative_review.js +179 -0
- package/esm/sparkdream/rep/v1/jury_participation.js +39 -9
- package/esm/sparkdream/rep/v1/jury_review.js +40 -1
- package/esm/sparkdream/rep/v1/member_report.js +8 -8
- package/esm/sparkdream/rep/v1/member_warning.js +2 -2
- package/esm/sparkdream/rep/v1/params.js +614 -2
- package/esm/sparkdream/rep/v1/query.js +4900 -3425
- package/esm/sparkdream/rep/v1/query.lcd.js +77 -16
- package/esm/sparkdream/rep/v1/query.rpc.Query.js +85 -21
- package/esm/sparkdream/rep/v1/review_bounty.js +215 -0
- package/esm/sparkdream/rep/v1/tag_report.js +2 -2
- package/esm/sparkdream/rep/v1/tx.js +2610 -1442
- package/esm/sparkdream/rep/v1/tx.registry.js +128 -2
- package/esm/sparkdream/rep/v1/tx.rpc.msg.js +43 -1
- package/esm/tendermint/bundle.js +18 -18
- package/ibc/bundle.d.ts +99 -99
- package/ibc/bundle.js +116 -116
- package/package.json +1 -1
- package/sparkdream/bundle.d.ts +9671 -9159
- package/sparkdream/bundle.js +305 -301
- package/sparkdream/rep/v1/{interim_template.d.ts → acceptance_criteria.d.ts} +39 -52
- package/sparkdream/rep/v1/{interim_template.js → acceptance_criteria.js} +14 -124
- package/sparkdream/rep/v1/accountability.d.ts +6 -0
- package/sparkdream/rep/v1/accountability.js +11 -0
- package/sparkdream/rep/v1/bonded_role.d.ts +8 -0
- package/sparkdream/rep/v1/bonded_role.js +13 -0
- package/sparkdream/rep/v1/challenge.d.ts +14 -0
- package/sparkdream/rep/v1/challenge.js +21 -9
- package/sparkdream/rep/v1/genesis.d.ts +100 -3
- package/sparkdream/rep/v1/genesis.js +199 -60
- package/sparkdream/rep/v1/initiative.d.ts +120 -2
- package/sparkdream/rep/v1/initiative.js +173 -48
- package/sparkdream/rep/v1/initiative_review.d.ts +121 -0
- package/sparkdream/rep/v1/initiative_review.js +182 -0
- package/sparkdream/rep/v1/jury_participation.d.ts +89 -5
- package/sparkdream/rep/v1/jury_participation.js +39 -9
- package/sparkdream/rep/v1/jury_review.d.ts +38 -0
- package/sparkdream/rep/v1/jury_review.js +40 -1
- package/sparkdream/rep/v1/member_report.js +8 -8
- package/sparkdream/rep/v1/member_warning.js +2 -2
- package/sparkdream/rep/v1/params.d.ts +668 -16
- package/sparkdream/rep/v1/params.js +614 -2
- package/sparkdream/rep/v1/query.d.ts +1214 -264
- package/sparkdream/rep/v1/query.js +4904 -3429
- package/sparkdream/rep/v1/query.lcd.d.ts +9 -3
- package/sparkdream/rep/v1/query.lcd.js +77 -16
- package/sparkdream/rep/v1/query.rpc.Query.d.ts +55 -9
- package/sparkdream/rep/v1/query.rpc.Query.js +84 -20
- package/sparkdream/rep/v1/review_bounty.d.ts +168 -0
- package/sparkdream/rep/v1/review_bounty.js +218 -0
- package/sparkdream/rep/v1/tag_report.js +2 -2
- package/sparkdream/rep/v1/tx.d.ts +816 -9
- package/sparkdream/rep/v1/tx.js +2612 -1443
- package/sparkdream/rep/v1/tx.registry.d.ts +85 -1
- package/sparkdream/rep/v1/tx.registry.js +127 -1
- package/sparkdream/rep/v1/tx.rpc.msg.d.ts +20 -1
- package/sparkdream/rep/v1/tx.rpc.msg.js +42 -0
- package/sparkdream/rpc.query.d.ts +8 -2
- package/tendermint/bundle.d.ts +844 -844
- 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: "",
|
|
@@ -231,7 +290,13 @@ function createBaseInitiative() {
|
|
|
231
290
|
createdAt: BigInt(0),
|
|
232
291
|
completedAt: BigInt(0),
|
|
233
292
|
propagatedConviction: "",
|
|
234
|
-
selfAssignBond: ""
|
|
293
|
+
selfAssignBond: "",
|
|
294
|
+
acceptanceCriteria: [],
|
|
295
|
+
reviewRound: 0,
|
|
296
|
+
reviewDeadline: BigInt(0),
|
|
297
|
+
reviewEscalation: 0,
|
|
298
|
+
creator: "",
|
|
299
|
+
requiredVerifiers: 0
|
|
235
300
|
};
|
|
236
301
|
}
|
|
237
302
|
/**
|
|
@@ -264,62 +329,77 @@ export const Initiative = {
|
|
|
264
329
|
if (message.category !== 0) {
|
|
265
330
|
writer.uint32(56).int32(message.category);
|
|
266
331
|
}
|
|
267
|
-
if (message.templateId !== "") {
|
|
268
|
-
writer.uint32(66).string(message.templateId);
|
|
269
|
-
}
|
|
270
332
|
if (message.budget !== "") {
|
|
271
|
-
writer.uint32(
|
|
333
|
+
writer.uint32(66).string(message.budget);
|
|
272
334
|
}
|
|
273
335
|
if (message.assignee !== "") {
|
|
274
|
-
writer.uint32(
|
|
336
|
+
writer.uint32(74).string(message.assignee);
|
|
275
337
|
}
|
|
276
338
|
if (message.apprentice !== "") {
|
|
277
|
-
writer.uint32(
|
|
339
|
+
writer.uint32(82).string(message.apprentice);
|
|
278
340
|
}
|
|
279
341
|
if (message.assignedAt !== BigInt(0)) {
|
|
280
|
-
writer.uint32(
|
|
342
|
+
writer.uint32(88).int64(message.assignedAt);
|
|
281
343
|
}
|
|
282
344
|
if (message.deliverableUri !== "") {
|
|
283
|
-
writer.uint32(
|
|
345
|
+
writer.uint32(98).string(message.deliverableUri);
|
|
284
346
|
}
|
|
285
347
|
if (message.submittedAt !== BigInt(0)) {
|
|
286
|
-
writer.uint32(
|
|
348
|
+
writer.uint32(104).int64(message.submittedAt);
|
|
287
349
|
}
|
|
288
350
|
if (message.requiredConviction !== "") {
|
|
289
|
-
writer.uint32(
|
|
351
|
+
writer.uint32(114).string(Decimal.fromUserInput(message.requiredConviction, 18).atomics);
|
|
290
352
|
}
|
|
291
353
|
if (message.currentConviction !== "") {
|
|
292
|
-
writer.uint32(
|
|
354
|
+
writer.uint32(122).string(Decimal.fromUserInput(message.currentConviction, 18).atomics);
|
|
293
355
|
}
|
|
294
356
|
if (message.externalConviction !== "") {
|
|
295
|
-
writer.uint32(
|
|
357
|
+
writer.uint32(130).string(Decimal.fromUserInput(message.externalConviction, 18).atomics);
|
|
296
358
|
}
|
|
297
359
|
if (message.convictionLastUpdated !== BigInt(0)) {
|
|
298
|
-
writer.uint32(
|
|
360
|
+
writer.uint32(136).int64(message.convictionLastUpdated);
|
|
299
361
|
}
|
|
300
362
|
if (message.reviewPeriodEnd !== BigInt(0)) {
|
|
301
|
-
writer.uint32(
|
|
363
|
+
writer.uint32(144).int64(message.reviewPeriodEnd);
|
|
302
364
|
}
|
|
303
365
|
if (message.challengePeriodEnd !== BigInt(0)) {
|
|
304
|
-
writer.uint32(
|
|
366
|
+
writer.uint32(152).int64(message.challengePeriodEnd);
|
|
305
367
|
}
|
|
306
368
|
for (const v of message.approvals) {
|
|
307
|
-
writer.uint32(
|
|
369
|
+
writer.uint32(162).string(v);
|
|
308
370
|
}
|
|
309
371
|
if (message.status !== 0) {
|
|
310
|
-
writer.uint32(
|
|
372
|
+
writer.uint32(168).int32(message.status);
|
|
311
373
|
}
|
|
312
374
|
if (message.createdAt !== BigInt(0)) {
|
|
313
|
-
writer.uint32(
|
|
375
|
+
writer.uint32(176).int64(message.createdAt);
|
|
314
376
|
}
|
|
315
377
|
if (message.completedAt !== BigInt(0)) {
|
|
316
|
-
writer.uint32(
|
|
378
|
+
writer.uint32(184).int64(message.completedAt);
|
|
317
379
|
}
|
|
318
380
|
if (message.propagatedConviction !== "") {
|
|
319
|
-
writer.uint32(
|
|
381
|
+
writer.uint32(194).string(Decimal.fromUserInput(message.propagatedConviction, 18).atomics);
|
|
320
382
|
}
|
|
321
383
|
if (message.selfAssignBond !== "") {
|
|
322
|
-
writer.uint32(
|
|
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);
|
|
397
|
+
}
|
|
398
|
+
if (message.creator !== "") {
|
|
399
|
+
writer.uint32(210).string(message.creator);
|
|
400
|
+
}
|
|
401
|
+
if (message.requiredVerifiers !== 0) {
|
|
402
|
+
writer.uint32(248).uint32(message.requiredVerifiers);
|
|
323
403
|
}
|
|
324
404
|
return writer;
|
|
325
405
|
},
|
|
@@ -352,61 +432,76 @@ export const Initiative = {
|
|
|
352
432
|
message.category = reader.int32();
|
|
353
433
|
break;
|
|
354
434
|
case 8:
|
|
355
|
-
message.
|
|
435
|
+
message.budget = reader.string();
|
|
356
436
|
break;
|
|
357
437
|
case 9:
|
|
358
|
-
message.
|
|
438
|
+
message.assignee = reader.string();
|
|
359
439
|
break;
|
|
360
440
|
case 10:
|
|
361
|
-
message.
|
|
441
|
+
message.apprentice = reader.string();
|
|
362
442
|
break;
|
|
363
443
|
case 11:
|
|
364
|
-
message.
|
|
444
|
+
message.assignedAt = reader.int64();
|
|
365
445
|
break;
|
|
366
446
|
case 12:
|
|
367
|
-
message.
|
|
447
|
+
message.deliverableUri = reader.string();
|
|
368
448
|
break;
|
|
369
449
|
case 13:
|
|
370
|
-
message.
|
|
450
|
+
message.submittedAt = reader.int64();
|
|
371
451
|
break;
|
|
372
452
|
case 14:
|
|
373
|
-
message.
|
|
453
|
+
message.requiredConviction = Decimal.fromAtomics(reader.string(), 18).toString();
|
|
374
454
|
break;
|
|
375
455
|
case 15:
|
|
376
|
-
message.
|
|
456
|
+
message.currentConviction = Decimal.fromAtomics(reader.string(), 18).toString();
|
|
377
457
|
break;
|
|
378
458
|
case 16:
|
|
379
|
-
message.
|
|
459
|
+
message.externalConviction = Decimal.fromAtomics(reader.string(), 18).toString();
|
|
380
460
|
break;
|
|
381
461
|
case 17:
|
|
382
|
-
message.
|
|
462
|
+
message.convictionLastUpdated = reader.int64();
|
|
383
463
|
break;
|
|
384
464
|
case 18:
|
|
385
|
-
message.
|
|
465
|
+
message.reviewPeriodEnd = reader.int64();
|
|
386
466
|
break;
|
|
387
467
|
case 19:
|
|
388
|
-
message.
|
|
468
|
+
message.challengePeriodEnd = reader.int64();
|
|
389
469
|
break;
|
|
390
470
|
case 20:
|
|
391
|
-
message.
|
|
471
|
+
message.approvals.push(reader.string());
|
|
392
472
|
break;
|
|
393
473
|
case 21:
|
|
394
|
-
message.
|
|
474
|
+
message.status = reader.int32();
|
|
395
475
|
break;
|
|
396
476
|
case 22:
|
|
397
|
-
message.
|
|
477
|
+
message.createdAt = reader.int64();
|
|
398
478
|
break;
|
|
399
479
|
case 23:
|
|
400
|
-
message.
|
|
480
|
+
message.completedAt = reader.int64();
|
|
401
481
|
break;
|
|
402
482
|
case 24:
|
|
403
|
-
message.
|
|
483
|
+
message.propagatedConviction = Decimal.fromAtomics(reader.string(), 18).toString();
|
|
404
484
|
break;
|
|
405
485
|
case 25:
|
|
406
|
-
message.
|
|
486
|
+
message.selfAssignBond = reader.string();
|
|
487
|
+
break;
|
|
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();
|
|
407
499
|
break;
|
|
408
500
|
case 26:
|
|
409
|
-
message.
|
|
501
|
+
message.creator = reader.string();
|
|
502
|
+
break;
|
|
503
|
+
case 31:
|
|
504
|
+
message.requiredVerifiers = reader.uint32();
|
|
410
505
|
break;
|
|
411
506
|
default:
|
|
412
507
|
reader.skipType(tag & 7);
|
|
@@ -424,7 +519,6 @@ export const Initiative = {
|
|
|
424
519
|
message.tags = object.tags?.map(e => e) || [];
|
|
425
520
|
message.tier = object.tier ?? 0;
|
|
426
521
|
message.category = object.category ?? 0;
|
|
427
|
-
message.templateId = object.templateId ?? "";
|
|
428
522
|
message.budget = object.budget ?? "";
|
|
429
523
|
message.assignee = object.assignee ?? "";
|
|
430
524
|
message.apprentice = object.apprentice ?? "";
|
|
@@ -443,6 +537,12 @@ export const Initiative = {
|
|
|
443
537
|
message.completedAt = object.completedAt !== undefined && object.completedAt !== null ? BigInt(object.completedAt.toString()) : BigInt(0);
|
|
444
538
|
message.propagatedConviction = object.propagatedConviction ?? "";
|
|
445
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;
|
|
544
|
+
message.creator = object.creator ?? "";
|
|
545
|
+
message.requiredVerifiers = object.requiredVerifiers ?? 0;
|
|
446
546
|
return message;
|
|
447
547
|
},
|
|
448
548
|
fromAmino(object) {
|
|
@@ -466,9 +566,6 @@ export const Initiative = {
|
|
|
466
566
|
if (object.category !== undefined && object.category !== null) {
|
|
467
567
|
message.category = object.category;
|
|
468
568
|
}
|
|
469
|
-
if (object.template_id !== undefined && object.template_id !== null) {
|
|
470
|
-
message.templateId = object.template_id;
|
|
471
|
-
}
|
|
472
569
|
if (object.budget !== undefined && object.budget !== null) {
|
|
473
570
|
message.budget = object.budget;
|
|
474
571
|
}
|
|
@@ -521,6 +618,22 @@ export const Initiative = {
|
|
|
521
618
|
if (object.self_assign_bond !== undefined && object.self_assign_bond !== null) {
|
|
522
619
|
message.selfAssignBond = object.self_assign_bond;
|
|
523
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
|
+
}
|
|
631
|
+
if (object.creator !== undefined && object.creator !== null) {
|
|
632
|
+
message.creator = object.creator;
|
|
633
|
+
}
|
|
634
|
+
if (object.required_verifiers !== undefined && object.required_verifiers !== null) {
|
|
635
|
+
message.requiredVerifiers = object.required_verifiers;
|
|
636
|
+
}
|
|
524
637
|
return message;
|
|
525
638
|
},
|
|
526
639
|
toAmino(message) {
|
|
@@ -537,7 +650,6 @@ export const Initiative = {
|
|
|
537
650
|
}
|
|
538
651
|
obj.tier = message.tier === 0 ? undefined : message.tier;
|
|
539
652
|
obj.category = message.category === 0 ? undefined : message.category;
|
|
540
|
-
obj.template_id = message.templateId === "" ? undefined : message.templateId;
|
|
541
653
|
obj.budget = message.budget === "" ? undefined : message.budget;
|
|
542
654
|
obj.assignee = message.assignee === "" ? undefined : message.assignee;
|
|
543
655
|
obj.apprentice = message.apprentice === "" ? undefined : message.apprentice;
|
|
@@ -561,6 +673,17 @@ export const Initiative = {
|
|
|
561
673
|
obj.completed_at = message.completedAt !== BigInt(0) ? message.completedAt?.toString() : undefined;
|
|
562
674
|
obj.propagated_conviction = message.propagatedConviction === "" ? undefined : message.propagatedConviction;
|
|
563
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;
|
|
685
|
+
obj.creator = message.creator === "" ? undefined : message.creator;
|
|
686
|
+
obj.required_verifiers = message.requiredVerifiers === 0 ? undefined : message.requiredVerifiers;
|
|
564
687
|
return obj;
|
|
565
688
|
},
|
|
566
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
|
-
|
|
10
|
+
totalDeclined: BigInt(0),
|
|
11
|
+
totalAbandoned: BigInt(0)
|
|
11
12
|
};
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
|
-
* JuryParticipation
|
|
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.
|
|
38
|
-
writer.uint32(48).
|
|
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.
|
|
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.
|
|
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.
|
|
102
|
-
message.
|
|
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.
|
|
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) {
|