@sparkdreamnft/sparkdreamjs 0.0.37 → 0.0.39

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 (36) hide show
  1. package/esm/sparkdream/rep/v1/challenge.js +13 -2
  2. package/esm/sparkdream/rep/v1/genesis.js +362 -2
  3. package/esm/sparkdream/rep/v1/initiative.js +11 -14
  4. package/esm/sparkdream/rep/v1/interim.js +58 -1
  5. package/esm/sparkdream/rep/v1/member.js +25 -1
  6. package/esm/sparkdream/rep/v1/params.js +361 -1
  7. package/esm/sparkdream/rep/v1/query.js +16 -16
  8. package/esm/sparkdream/rep/v1/tx.amino.js +66 -5
  9. package/esm/sparkdream/rep/v1/tx.js +88 -64
  10. package/esm/sparkdream/rep/v1/tx.registry.js +18 -18
  11. package/esm/sparkdream/rep/v1/tx.rpc.msg.js +11 -11
  12. package/package.json +1 -1
  13. package/sparkdream/bundle.d.ts +128 -55
  14. package/sparkdream/client.d.ts +48 -3
  15. package/sparkdream/rep/v1/challenge.d.ts +23 -0
  16. package/sparkdream/rep/v1/challenge.js +13 -2
  17. package/sparkdream/rep/v1/genesis.d.ts +170 -1
  18. package/sparkdream/rep/v1/genesis.js +362 -2
  19. package/sparkdream/rep/v1/initiative.d.ts +7 -5
  20. package/sparkdream/rep/v1/initiative.js +11 -14
  21. package/sparkdream/rep/v1/interim.d.ts +32 -0
  22. package/sparkdream/rep/v1/interim.js +61 -2
  23. package/sparkdream/rep/v1/member.d.ts +54 -0
  24. package/sparkdream/rep/v1/member.js +25 -1
  25. package/sparkdream/rep/v1/params.d.ts +388 -2
  26. package/sparkdream/rep/v1/params.js +361 -1
  27. package/sparkdream/rep/v1/query.d.ts +26 -4
  28. package/sparkdream/rep/v1/query.js +16 -16
  29. package/sparkdream/rep/v1/tx.amino.d.ts +49 -4
  30. package/sparkdream/rep/v1/tx.amino.js +65 -4
  31. package/sparkdream/rep/v1/tx.d.ts +158 -110
  32. package/sparkdream/rep/v1/tx.js +90 -66
  33. package/sparkdream/rep/v1/tx.registry.d.ts +11 -11
  34. package/sparkdream/rep/v1/tx.registry.js +17 -17
  35. package/sparkdream/rep/v1/tx.rpc.msg.d.ts +7 -7
  36. package/sparkdream/rep/v1/tx.rpc.msg.js +10 -10
@@ -35,13 +35,15 @@ export declare enum InitiativeStatus {
35
35
  INITIATIVE_STATUS_CHALLENGED = 4,
36
36
  INITIATIVE_STATUS_COMPLETED = 5,
37
37
  INITIATIVE_STATUS_REJECTED = 6,
38
- INITIATIVE_STATUS_ABANDONED = 7,
39
38
  /**
40
- * INITIATIVE_STATUS_CANCELLED - Retired by the project creator (or Operations Committee) while still
41
- * OPEN and unassigned. Distinct from ABANDONED, which records an assignee
42
- * walking away from work they had taken on.
39
+ * INITIATIVE_STATUS_CLOSED - Retired by the project creator or the Operations Committee. The work is
40
+ * not being done and its budget has gone back to the project.
41
+ *
42
+ * Distinct from COMPLETED, which is narrower: COMPLETED means the work was
43
+ * delivered, passed its gates and paid out. CLOSED carries no claim about
44
+ * the work at all, only that the project stopped funding it.
43
45
  */
44
- INITIATIVE_STATUS_CANCELLED = 8,
46
+ INITIATIVE_STATUS_CLOSED = 7,
45
47
  UNRECOGNIZED = -1
46
48
  }
47
49
  export declare const InitiativeStatusAmino: typeof InitiativeStatus;
@@ -146,13 +146,15 @@ var InitiativeStatus;
146
146
  InitiativeStatus[InitiativeStatus["INITIATIVE_STATUS_CHALLENGED"] = 4] = "INITIATIVE_STATUS_CHALLENGED";
147
147
  InitiativeStatus[InitiativeStatus["INITIATIVE_STATUS_COMPLETED"] = 5] = "INITIATIVE_STATUS_COMPLETED";
148
148
  InitiativeStatus[InitiativeStatus["INITIATIVE_STATUS_REJECTED"] = 6] = "INITIATIVE_STATUS_REJECTED";
149
- InitiativeStatus[InitiativeStatus["INITIATIVE_STATUS_ABANDONED"] = 7] = "INITIATIVE_STATUS_ABANDONED";
150
149
  /**
151
- * INITIATIVE_STATUS_CANCELLED - Retired by the project creator (or Operations Committee) while still
152
- * OPEN and unassigned. Distinct from ABANDONED, which records an assignee
153
- * walking away from work they had taken on.
150
+ * INITIATIVE_STATUS_CLOSED - Retired by the project creator or the Operations Committee. The work is
151
+ * not being done and its budget has gone back to the project.
152
+ *
153
+ * Distinct from COMPLETED, which is narrower: COMPLETED means the work was
154
+ * delivered, passed its gates and paid out. CLOSED carries no claim about
155
+ * the work at all, only that the project stopped funding it.
154
156
  */
155
- InitiativeStatus[InitiativeStatus["INITIATIVE_STATUS_CANCELLED"] = 8] = "INITIATIVE_STATUS_CANCELLED";
157
+ InitiativeStatus[InitiativeStatus["INITIATIVE_STATUS_CLOSED"] = 7] = "INITIATIVE_STATUS_CLOSED";
156
158
  InitiativeStatus[InitiativeStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
157
159
  })(InitiativeStatus || (exports.InitiativeStatus = InitiativeStatus = {}));
158
160
  exports.InitiativeStatusAmino = InitiativeStatus;
@@ -180,11 +182,8 @@ function initiativeStatusFromJSON(object) {
180
182
  case "INITIATIVE_STATUS_REJECTED":
181
183
  return InitiativeStatus.INITIATIVE_STATUS_REJECTED;
182
184
  case 7:
183
- case "INITIATIVE_STATUS_ABANDONED":
184
- return InitiativeStatus.INITIATIVE_STATUS_ABANDONED;
185
- case 8:
186
- case "INITIATIVE_STATUS_CANCELLED":
187
- return InitiativeStatus.INITIATIVE_STATUS_CANCELLED;
185
+ case "INITIATIVE_STATUS_CLOSED":
186
+ return InitiativeStatus.INITIATIVE_STATUS_CLOSED;
188
187
  case -1:
189
188
  case "UNRECOGNIZED":
190
189
  default:
@@ -207,10 +206,8 @@ function initiativeStatusToJSON(object) {
207
206
  return "INITIATIVE_STATUS_COMPLETED";
208
207
  case InitiativeStatus.INITIATIVE_STATUS_REJECTED:
209
208
  return "INITIATIVE_STATUS_REJECTED";
210
- case InitiativeStatus.INITIATIVE_STATUS_ABANDONED:
211
- return "INITIATIVE_STATUS_ABANDONED";
212
- case InitiativeStatus.INITIATIVE_STATUS_CANCELLED:
213
- return "INITIATIVE_STATUS_CANCELLED";
209
+ case InitiativeStatus.INITIATIVE_STATUS_CLOSED:
210
+ return "INITIATIVE_STATUS_CLOSED";
214
211
  case InitiativeStatus.UNRECOGNIZED:
215
212
  default:
216
213
  return "UNRECOGNIZED";
@@ -1,5 +1,21 @@
1
1
  import { BinaryReader, BinaryWriter } from "../../../binary";
2
2
  import { DeepPartial } from "../../../helpers";
3
+ /**
4
+ * AdjudicationDecision is the Operations Committee's verdict on the challenge
5
+ * an ADJUDICATION interim was raised to settle — the terminal path for an
6
+ * inconclusive jury, and for challenges escalated when no jury could be seated.
7
+ */
8
+ export declare enum AdjudicationDecision {
9
+ ADJUDICATION_DECISION_UNSPECIFIED = 0,
10
+ /** ADJUDICATION_DECISION_UPHOLD - The challenge stands: the work failed. Resolves the challenge as UPHELD. */
11
+ ADJUDICATION_DECISION_UPHOLD = 1,
12
+ /** ADJUDICATION_DECISION_REJECT - The challenge fails: the work stands. Resolves the challenge as REJECTED. */
13
+ ADJUDICATION_DECISION_REJECT = 2,
14
+ UNRECOGNIZED = -1
15
+ }
16
+ export declare const AdjudicationDecisionAmino: typeof AdjudicationDecision;
17
+ export declare function adjudicationDecisionFromJSON(object: any): AdjudicationDecision;
18
+ export declare function adjudicationDecisionToJSON(object: AdjudicationDecision): string;
3
19
  export declare enum InterimType {
4
20
  /** INTERIM_TYPE_JURY_DUTY - Jury and dispute resolution */
5
21
  INTERIM_TYPE_JURY_DUTY = 0,
@@ -92,6 +108,14 @@ export interface Interim {
92
108
  */
93
109
  status: InterimStatus;
94
110
  completionNotes: string;
111
+ /**
112
+ * The committee's verdict, set when an ADJUDICATION interim is completed.
113
+ * Unset on every other type. Structured rather than parsed out of
114
+ * completion_notes: a free-text keyword that fails to match (or matches the
115
+ * wrong branch) used to leave the challenge it was raised to settle
116
+ * unresolved forever, with the interim completed and nothing left to retry.
117
+ */
118
+ decision: AdjudicationDecision;
95
119
  }
96
120
  export interface InterimProtoMsg {
97
121
  typeUrl: "/sparkdream.rep.v1.Interim";
@@ -138,6 +162,14 @@ export interface InterimAmino {
138
162
  */
139
163
  status?: InterimStatus;
140
164
  completion_notes?: string;
165
+ /**
166
+ * The committee's verdict, set when an ADJUDICATION interim is completed.
167
+ * Unset on every other type. Structured rather than parsed out of
168
+ * completion_notes: a free-text keyword that fails to match (or matches the
169
+ * wrong branch) used to leave the challenge it was raised to settle
170
+ * unresolved forever, with the interim completed and nothing left to retry.
171
+ */
172
+ decision?: AdjudicationDecision;
141
173
  }
142
174
  export interface InterimAminoMsg {
143
175
  type: "/sparkdream.rep.v1.Interim";
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Interim = exports.InterimStatusAmino = exports.InterimStatus = exports.InterimComplexityAmino = exports.InterimComplexity = exports.InterimTypeAmino = exports.InterimType = void 0;
3
+ exports.Interim = exports.InterimStatusAmino = exports.InterimStatus = exports.InterimComplexityAmino = exports.InterimComplexity = exports.InterimTypeAmino = exports.InterimType = exports.AdjudicationDecisionAmino = exports.AdjudicationDecision = void 0;
4
+ exports.adjudicationDecisionFromJSON = adjudicationDecisionFromJSON;
5
+ exports.adjudicationDecisionToJSON = adjudicationDecisionToJSON;
4
6
  exports.interimTypeFromJSON = interimTypeFromJSON;
5
7
  exports.interimTypeToJSON = interimTypeToJSON;
6
8
  exports.interimComplexityFromJSON = interimComplexityFromJSON;
@@ -9,6 +11,51 @@ exports.interimStatusFromJSON = interimStatusFromJSON;
9
11
  exports.interimStatusToJSON = interimStatusToJSON;
10
12
  //@ts-nocheck
11
13
  const binary_1 = require("../../../binary");
14
+ /**
15
+ * AdjudicationDecision is the Operations Committee's verdict on the challenge
16
+ * an ADJUDICATION interim was raised to settle — the terminal path for an
17
+ * inconclusive jury, and for challenges escalated when no jury could be seated.
18
+ */
19
+ var AdjudicationDecision;
20
+ (function (AdjudicationDecision) {
21
+ AdjudicationDecision[AdjudicationDecision["ADJUDICATION_DECISION_UNSPECIFIED"] = 0] = "ADJUDICATION_DECISION_UNSPECIFIED";
22
+ /** ADJUDICATION_DECISION_UPHOLD - The challenge stands: the work failed. Resolves the challenge as UPHELD. */
23
+ AdjudicationDecision[AdjudicationDecision["ADJUDICATION_DECISION_UPHOLD"] = 1] = "ADJUDICATION_DECISION_UPHOLD";
24
+ /** ADJUDICATION_DECISION_REJECT - The challenge fails: the work stands. Resolves the challenge as REJECTED. */
25
+ AdjudicationDecision[AdjudicationDecision["ADJUDICATION_DECISION_REJECT"] = 2] = "ADJUDICATION_DECISION_REJECT";
26
+ AdjudicationDecision[AdjudicationDecision["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
27
+ })(AdjudicationDecision || (exports.AdjudicationDecision = AdjudicationDecision = {}));
28
+ exports.AdjudicationDecisionAmino = AdjudicationDecision;
29
+ function adjudicationDecisionFromJSON(object) {
30
+ switch (object) {
31
+ case 0:
32
+ case "ADJUDICATION_DECISION_UNSPECIFIED":
33
+ return AdjudicationDecision.ADJUDICATION_DECISION_UNSPECIFIED;
34
+ case 1:
35
+ case "ADJUDICATION_DECISION_UPHOLD":
36
+ return AdjudicationDecision.ADJUDICATION_DECISION_UPHOLD;
37
+ case 2:
38
+ case "ADJUDICATION_DECISION_REJECT":
39
+ return AdjudicationDecision.ADJUDICATION_DECISION_REJECT;
40
+ case -1:
41
+ case "UNRECOGNIZED":
42
+ default:
43
+ return AdjudicationDecision.UNRECOGNIZED;
44
+ }
45
+ }
46
+ function adjudicationDecisionToJSON(object) {
47
+ switch (object) {
48
+ case AdjudicationDecision.ADJUDICATION_DECISION_UNSPECIFIED:
49
+ return "ADJUDICATION_DECISION_UNSPECIFIED";
50
+ case AdjudicationDecision.ADJUDICATION_DECISION_UPHOLD:
51
+ return "ADJUDICATION_DECISION_UPHOLD";
52
+ case AdjudicationDecision.ADJUDICATION_DECISION_REJECT:
53
+ return "ADJUDICATION_DECISION_REJECT";
54
+ case AdjudicationDecision.UNRECOGNIZED:
55
+ default:
56
+ return "UNRECOGNIZED";
57
+ }
58
+ }
12
59
  var InterimType;
13
60
  (function (InterimType) {
14
61
  /** INTERIM_TYPE_JURY_DUTY - Jury and dispute resolution */
@@ -231,7 +278,8 @@ function createBaseInterim() {
231
278
  createdAt: BigInt(0),
232
279
  completedAt: BigInt(0),
233
280
  status: 0,
234
- completionNotes: ""
281
+ completionNotes: "",
282
+ decision: 0
235
283
  };
236
284
  }
237
285
  /**
@@ -282,6 +330,9 @@ exports.Interim = {
282
330
  if (message.completionNotes !== "") {
283
331
  writer.uint32(106).string(message.completionNotes);
284
332
  }
333
+ if (message.decision !== 0) {
334
+ writer.uint32(112).int32(message.decision);
335
+ }
285
336
  return writer;
286
337
  },
287
338
  decode(input, length) {
@@ -330,6 +381,9 @@ exports.Interim = {
330
381
  case 13:
331
382
  message.completionNotes = reader.string();
332
383
  break;
384
+ case 14:
385
+ message.decision = reader.int32();
386
+ break;
333
387
  default:
334
388
  reader.skipType(tag & 7);
335
389
  break;
@@ -352,6 +406,7 @@ exports.Interim = {
352
406
  message.completedAt = object.completedAt !== undefined && object.completedAt !== null ? BigInt(object.completedAt.toString()) : BigInt(0);
353
407
  message.status = object.status ?? 0;
354
408
  message.completionNotes = object.completionNotes ?? "";
409
+ message.decision = object.decision ?? 0;
355
410
  return message;
356
411
  },
357
412
  fromAmino(object) {
@@ -393,6 +448,9 @@ exports.Interim = {
393
448
  if (object.completion_notes !== undefined && object.completion_notes !== null) {
394
449
  message.completionNotes = object.completion_notes;
395
450
  }
451
+ if (object.decision !== undefined && object.decision !== null) {
452
+ message.decision = object.decision;
453
+ }
396
454
  return message;
397
455
  },
398
456
  toAmino(message) {
@@ -415,6 +473,7 @@ exports.Interim = {
415
473
  obj.completed_at = message.completedAt !== BigInt(0) ? message.completedAt?.toString() : undefined;
416
474
  obj.status = message.status === 0 ? undefined : message.status;
417
475
  obj.completion_notes = message.completionNotes === "" ? undefined : message.completionNotes;
476
+ obj.decision = message.decision === 0 ? undefined : message.decision;
418
477
  return obj;
419
478
  },
420
479
  fromAminoMsg(object) {
@@ -273,6 +273,33 @@ export interface Member {
273
273
  lifetimeForumRepPerTag: {
274
274
  [key: string]: string;
275
275
  };
276
+ /**
277
+ * Block height at which the member joined. This is the height-domain
278
+ * twin of joined_at (a unix timestamp): the new-member decay grace
279
+ * window is denominated in epochs — height / epoch_blocks — so it must
280
+ * be measured against a height, not a timestamp. Dividing the unix
281
+ * timestamp by epoch_blocks produced an astronomically large "join
282
+ * epoch", a deeply negative member age, and a grace window that never
283
+ * expired for invited members (genesis-seeded members with joined_at=0
284
+ * were unaffected). Members restored from genesis written before this
285
+ * field carry 0, which reads as "joined at genesis" — they exit grace
286
+ * after NewMemberDecayGraceEpochs epochs, the same behaviour
287
+ * genesis-seeded members have always had.
288
+ */
289
+ joinedAtHeight: bigint;
290
+ /**
291
+ * Aggregate DREAM this member currently holds in content-conviction stakes
292
+ * across ALL content items (blog, forum, collection). Backs the per-member
293
+ * max_total_content_stake_per_member cap: the per-item cap only sets the
294
+ * granularity of parking DREAM here, so the aggregate is what bounds the
295
+ * total. (Content stakes earn no DREAM but do decay.) Maintained
296
+ * by updateStakePoolTotals — the single choke point for stake-amount
297
+ * mutations — and recomputed by ReconcileStakePoolTotals on genesis import.
298
+ * Author bonds are not counted here; they are slashable escrow with their
299
+ * own per-item cap. Nil on records written before this field existed;
300
+ * readers must treat nil as zero.
301
+ */
302
+ contentStakedDream: string;
276
303
  }
277
304
  export interface MemberProtoMsg {
278
305
  typeUrl: "/sparkdream.rep.v1.Member";
@@ -401,6 +428,33 @@ export interface MemberAmino {
401
428
  lifetime_forum_rep_per_tag?: {
402
429
  [key: string]: string;
403
430
  };
431
+ /**
432
+ * Block height at which the member joined. This is the height-domain
433
+ * twin of joined_at (a unix timestamp): the new-member decay grace
434
+ * window is denominated in epochs — height / epoch_blocks — so it must
435
+ * be measured against a height, not a timestamp. Dividing the unix
436
+ * timestamp by epoch_blocks produced an astronomically large "join
437
+ * epoch", a deeply negative member age, and a grace window that never
438
+ * expired for invited members (genesis-seeded members with joined_at=0
439
+ * were unaffected). Members restored from genesis written before this
440
+ * field carry 0, which reads as "joined at genesis" — they exit grace
441
+ * after NewMemberDecayGraceEpochs epochs, the same behaviour
442
+ * genesis-seeded members have always had.
443
+ */
444
+ joined_at_height?: string;
445
+ /**
446
+ * Aggregate DREAM this member currently holds in content-conviction stakes
447
+ * across ALL content items (blog, forum, collection). Backs the per-member
448
+ * max_total_content_stake_per_member cap: the per-item cap only sets the
449
+ * granularity of parking DREAM here, so the aggregate is what bounds the
450
+ * total. (Content stakes earn no DREAM but do decay.) Maintained
451
+ * by updateStakePoolTotals — the single choke point for stake-amount
452
+ * mutations — and recomputed by ReconcileStakePoolTotals on genesis import.
453
+ * Author bonds are not counted here; they are slashable escrow with their
454
+ * own per-item cap. Nil on records written before this field existed;
455
+ * readers must treat nil as zero.
456
+ */
457
+ content_staked_dream?: string;
404
458
  }
405
459
  export interface MemberAminoMsg {
406
460
  type: "/sparkdream.rep.v1.Member";
@@ -494,7 +494,9 @@ function createBaseMember() {
494
494
  epochSalvations: 0,
495
495
  lastSalvationEpoch: BigInt(0),
496
496
  forumRepPerTag: {},
497
- lifetimeForumRepPerTag: {}
497
+ lifetimeForumRepPerTag: {},
498
+ joinedAtHeight: BigInt(0),
499
+ contentStakedDream: ""
498
500
  };
499
501
  }
500
502
  /**
@@ -617,6 +619,12 @@ exports.Member = {
617
619
  value
618
620
  }, writer.uint32(258).fork()).ldelim();
619
621
  });
622
+ if (message.joinedAtHeight !== BigInt(0)) {
623
+ writer.uint32(264).int64(message.joinedAtHeight);
624
+ }
625
+ if (message.contentStakedDream !== "") {
626
+ writer.uint32(274).string(message.contentStakedDream);
627
+ }
620
628
  return writer;
621
629
  },
622
630
  decode(input, length) {
@@ -737,6 +745,12 @@ exports.Member = {
737
745
  message.lifetimeForumRepPerTag[entry32.key] = entry32.value;
738
746
  }
739
747
  break;
748
+ case 33:
749
+ message.joinedAtHeight = reader.int64();
750
+ break;
751
+ case 34:
752
+ message.contentStakedDream = reader.string();
753
+ break;
740
754
  default:
741
755
  reader.skipType(tag & 7);
742
756
  break;
@@ -803,6 +817,8 @@ exports.Member = {
803
817
  }
804
818
  return acc;
805
819
  }, {});
820
+ message.joinedAtHeight = object.joinedAtHeight !== undefined && object.joinedAtHeight !== null ? BigInt(object.joinedAtHeight.toString()) : BigInt(0);
821
+ message.contentStakedDream = object.contentStakedDream ?? "";
806
822
  return message;
807
823
  },
808
824
  fromAmino(object) {
@@ -916,6 +932,12 @@ exports.Member = {
916
932
  }
917
933
  return acc;
918
934
  }, {});
935
+ if (object.joined_at_height !== undefined && object.joined_at_height !== null) {
936
+ message.joinedAtHeight = BigInt(object.joined_at_height);
937
+ }
938
+ if (object.content_staked_dream !== undefined && object.content_staked_dream !== null) {
939
+ message.contentStakedDream = object.content_staked_dream;
940
+ }
919
941
  return message;
920
942
  },
921
943
  toAmino(message) {
@@ -982,6 +1004,8 @@ exports.Member = {
982
1004
  obj.lifetime_forum_rep_per_tag[k] = v;
983
1005
  });
984
1006
  }
1007
+ obj.joined_at_height = message.joinedAtHeight !== BigInt(0) ? message.joinedAtHeight?.toString() : undefined;
1008
+ obj.content_staked_dream = message.contentStakedDream === "" ? undefined : message.contentStakedDream;
985
1009
  return obj;
986
1010
  },
987
1011
  fromAminoMsg(object) {