@sparkdreamnft/sparkdreamjs 0.0.26 → 0.0.27

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 (43) hide show
  1. package/cosmos/bundle.d.ts +160 -160
  2. package/cosmos/bundle.js +181 -181
  3. package/esm/cosmos/bundle.js +181 -181
  4. package/esm/ibc/bundle.js +105 -105
  5. package/esm/sparkdream/bundle.js +275 -273
  6. package/esm/sparkdream/collect/v1/params.js +24 -0
  7. package/esm/sparkdream/collect/v1/tx.js +216 -1
  8. package/esm/sparkdream/collect/v1/tx.registry.js +20 -2
  9. package/esm/sparkdream/collect/v1/tx.rpc.msg.js +11 -1
  10. package/esm/sparkdream/collect/v1/types.js +92 -2
  11. package/esm/sparkdream/forum/v1/sentinel_activity.js +58 -1
  12. package/esm/sparkdream/forum/v1/tx.js +1 -1
  13. package/esm/sparkdream/rep/v1/bonded_role.js +17 -5
  14. package/esm/sparkdream/rep/v1/genesis.js +17 -1
  15. package/esm/sparkdream/rep/v1/role_activity.js +670 -0
  16. package/esm/tendermint/bundle.js +17 -17
  17. package/ibc/bundle.d.ts +90 -90
  18. package/ibc/bundle.js +105 -105
  19. package/package.json +1 -1
  20. package/sparkdream/bundle.d.ts +7168 -7061
  21. package/sparkdream/bundle.js +275 -273
  22. package/sparkdream/collect/v1/params.d.ts +28 -0
  23. package/sparkdream/collect/v1/params.js +24 -0
  24. package/sparkdream/collect/v1/tx.d.ts +130 -6
  25. package/sparkdream/collect/v1/tx.js +220 -3
  26. package/sparkdream/collect/v1/tx.registry.d.ts +13 -1
  27. package/sparkdream/collect/v1/tx.registry.js +19 -1
  28. package/sparkdream/collect/v1/tx.rpc.msg.d.ts +10 -1
  29. package/sparkdream/collect/v1/tx.rpc.msg.js +10 -0
  30. package/sparkdream/collect/v1/types.d.ts +72 -0
  31. package/sparkdream/collect/v1/types.js +92 -2
  32. package/sparkdream/forum/v1/sentinel_activity.d.ts +53 -0
  33. package/sparkdream/forum/v1/sentinel_activity.js +58 -1
  34. package/sparkdream/forum/v1/tx.d.ts +1 -1
  35. package/sparkdream/forum/v1/tx.js +1 -1
  36. package/sparkdream/rep/v1/bonded_role.d.ts +13 -1
  37. package/sparkdream/rep/v1/bonded_role.js +17 -5
  38. package/sparkdream/rep/v1/genesis.d.ts +3 -0
  39. package/sparkdream/rep/v1/genesis.js +17 -1
  40. package/sparkdream/rep/v1/role_activity.d.ts +395 -0
  41. package/sparkdream/rep/v1/role_activity.js +673 -0
  42. package/tendermint/bundle.d.ts +844 -844
  43. package/tendermint/bundle.js +17 -17
@@ -126,13 +126,26 @@ function createBaseSentinelActivity() {
126
126
  confirmedProposals: BigInt(0),
127
127
  rejectedProposals: BigInt(0),
128
128
  epochCurations: BigInt(0),
129
- accuracyWindow: []
129
+ accuracyWindow: [],
130
+ totalCollectHides: BigInt(0),
131
+ upheldCollectHides: BigInt(0),
132
+ overturnedCollectHides: BigInt(0),
133
+ epochCollectHides: BigInt(0)
130
134
  };
131
135
  }
132
136
  /**
133
137
  * SentinelActivity holds forum-specific action counters and local cooldowns
134
138
  * for a sentinel. The accountability record (bond, bond status, activity
135
139
  * stamps) lives in sparkdream.rep.v1.SentinelActivity.
140
+ * STORAGE vs PROJECTION: the shared accountability record lives on
141
+ * x/rep's RoleActivity (see docs/x-rep-spec.md); forum PERSISTS only the
142
+ * forum-local fields — pending_hide_count, unchallenged_hides, and the
143
+ * curation-proposal lifecycle counters (total/confirmed/rejected_proposals).
144
+ * Every other field (per-action totals/upheld/overturned/epoch counters,
145
+ * streaks, overturn_cooldown_until, accuracy_window, collect counters) is
146
+ * PROJECTION-ONLY: sourced from x/rep's shared RoleActivity record at query
147
+ * time by get-sentinel-activity so client field paths stay stable. Those
148
+ * fields are zero in stored records and must not be written.
136
149
  * @name SentinelActivity
137
150
  * @package sparkdream.forum.v1
138
151
  * @see proto type: sparkdream.forum.v1.SentinelActivity
@@ -227,6 +240,18 @@ export const SentinelActivity = {
227
240
  for (const v of message.accuracyWindow) {
228
241
  AccuracyEpochBucket.encode(v, writer.uint32(234).fork()).ldelim();
229
242
  }
243
+ if (message.totalCollectHides !== BigInt(0)) {
244
+ writer.uint32(240).uint64(message.totalCollectHides);
245
+ }
246
+ if (message.upheldCollectHides !== BigInt(0)) {
247
+ writer.uint32(248).uint64(message.upheldCollectHides);
248
+ }
249
+ if (message.overturnedCollectHides !== BigInt(0)) {
250
+ writer.uint32(256).uint64(message.overturnedCollectHides);
251
+ }
252
+ if (message.epochCollectHides !== BigInt(0)) {
253
+ writer.uint32(264).uint64(message.epochCollectHides);
254
+ }
230
255
  return writer;
231
256
  },
232
257
  decode(input, length) {
@@ -323,6 +348,18 @@ export const SentinelActivity = {
323
348
  case 29:
324
349
  message.accuracyWindow.push(AccuracyEpochBucket.decode(reader, reader.uint32()));
325
350
  break;
351
+ case 30:
352
+ message.totalCollectHides = reader.uint64();
353
+ break;
354
+ case 31:
355
+ message.upheldCollectHides = reader.uint64();
356
+ break;
357
+ case 32:
358
+ message.overturnedCollectHides = reader.uint64();
359
+ break;
360
+ case 33:
361
+ message.epochCollectHides = reader.uint64();
362
+ break;
326
363
  default:
327
364
  reader.skipType(tag & 7);
328
365
  break;
@@ -361,6 +398,10 @@ export const SentinelActivity = {
361
398
  message.rejectedProposals = object.rejectedProposals !== undefined && object.rejectedProposals !== null ? BigInt(object.rejectedProposals.toString()) : BigInt(0);
362
399
  message.epochCurations = object.epochCurations !== undefined && object.epochCurations !== null ? BigInt(object.epochCurations.toString()) : BigInt(0);
363
400
  message.accuracyWindow = object.accuracyWindow?.map(e => AccuracyEpochBucket.fromPartial(e)) || [];
401
+ message.totalCollectHides = object.totalCollectHides !== undefined && object.totalCollectHides !== null ? BigInt(object.totalCollectHides.toString()) : BigInt(0);
402
+ message.upheldCollectHides = object.upheldCollectHides !== undefined && object.upheldCollectHides !== null ? BigInt(object.upheldCollectHides.toString()) : BigInt(0);
403
+ message.overturnedCollectHides = object.overturnedCollectHides !== undefined && object.overturnedCollectHides !== null ? BigInt(object.overturnedCollectHides.toString()) : BigInt(0);
404
+ message.epochCollectHides = object.epochCollectHides !== undefined && object.epochCollectHides !== null ? BigInt(object.epochCollectHides.toString()) : BigInt(0);
364
405
  return message;
365
406
  },
366
407
  fromAmino(object) {
@@ -450,6 +491,18 @@ export const SentinelActivity = {
450
491
  message.epochCurations = BigInt(object.epoch_curations);
451
492
  }
452
493
  message.accuracyWindow = object.accuracy_window?.map(e => AccuracyEpochBucket.fromAmino(e)) || [];
494
+ if (object.total_collect_hides !== undefined && object.total_collect_hides !== null) {
495
+ message.totalCollectHides = BigInt(object.total_collect_hides);
496
+ }
497
+ if (object.upheld_collect_hides !== undefined && object.upheld_collect_hides !== null) {
498
+ message.upheldCollectHides = BigInt(object.upheld_collect_hides);
499
+ }
500
+ if (object.overturned_collect_hides !== undefined && object.overturned_collect_hides !== null) {
501
+ message.overturnedCollectHides = BigInt(object.overturned_collect_hides);
502
+ }
503
+ if (object.epoch_collect_hides !== undefined && object.epoch_collect_hides !== null) {
504
+ message.epochCollectHides = BigInt(object.epoch_collect_hides);
505
+ }
453
506
  return message;
454
507
  },
455
508
  toAmino(message) {
@@ -488,6 +541,10 @@ export const SentinelActivity = {
488
541
  else {
489
542
  obj.accuracy_window = message.accuracyWindow;
490
543
  }
544
+ obj.total_collect_hides = message.totalCollectHides !== BigInt(0) ? message.totalCollectHides?.toString() : undefined;
545
+ obj.upheld_collect_hides = message.upheldCollectHides !== BigInt(0) ? message.upheldCollectHides?.toString() : undefined;
546
+ obj.overturned_collect_hides = message.overturnedCollectHides !== BigInt(0) ? message.overturnedCollectHides?.toString() : undefined;
547
+ obj.epoch_collect_hides = message.epochCollectHides !== BigInt(0) ? message.epochCollectHides?.toString() : undefined;
491
548
  return obj;
492
549
  },
493
550
  fromAminoMsg(object) {
@@ -7,7 +7,7 @@ import { BinaryReader, BinaryWriter } from "../../../binary";
7
7
  * where an account is BOTH a bonded forum sentinel and a Commons Operations
8
8
  * Committee member: without it the handler would silently pick the council
9
9
  * (gov) path — a strictly more powerful, less accountable action chosen by
10
- * accident. See docs/HANDOFF_HIDE_AUTHORITY_DISAMBIGUATION.md.
10
+ * accident. See docs/x-forum-spec.md (Shared ModerationAuthority).
11
11
  */
12
12
  export var ModerationAuthority;
13
13
  (function (ModerationAuthority) {
@@ -7,11 +7,23 @@ import { BinaryReader, BinaryWriter } from "../../../binary";
7
7
  * BondedRoleConfig. Independent bond pools, configs, and slashing surfaces per
8
8
  * role; cross-role coupling (if ever needed) belongs in the gaining module, not
9
9
  * in this primitive.
10
+ *
11
+ * CONTENT_SENTINEL is the deliberate exception to the owning-module naming
12
+ * convention: one moderation corps (one bond, one accountability record)
13
+ * spans every content surface — forum posts/threads AND collect
14
+ * collections/items. x/forum is the role's CONFIG STEWARD: it is the sole
15
+ * writer of the role's BondedRoleConfig (via its sentinel operational
16
+ * params). The shared accountability record (RoleActivity: per-kind action
17
+ * counters, verdict streaks, overturn cooldown, accuracy ring) is owned by
18
+ * x/rep itself; forum and collect report actions and verdicts into it.
19
+ * Formerly named ROLE_TYPE_FORUM_SENTINEL (renamed pre-launch; see the
20
+ * docs/bonded-role-generalization.md addendum and docs/x-rep-spec.md,
21
+ * RoleActivity).
10
22
  */
11
23
  export var RoleType;
12
24
  (function (RoleType) {
13
25
  RoleType[RoleType["ROLE_TYPE_UNSPECIFIED"] = 0] = "ROLE_TYPE_UNSPECIFIED";
14
- RoleType[RoleType["ROLE_TYPE_FORUM_SENTINEL"] = 1] = "ROLE_TYPE_FORUM_SENTINEL";
26
+ RoleType[RoleType["ROLE_TYPE_CONTENT_SENTINEL"] = 1] = "ROLE_TYPE_CONTENT_SENTINEL";
15
27
  RoleType[RoleType["ROLE_TYPE_COLLECT_CURATOR"] = 2] = "ROLE_TYPE_COLLECT_CURATOR";
16
28
  RoleType[RoleType["ROLE_TYPE_FEDERATION_VERIFIER"] = 3] = "ROLE_TYPE_FEDERATION_VERIFIER";
17
29
  RoleType[RoleType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
@@ -23,8 +35,8 @@ export function roleTypeFromJSON(object) {
23
35
  case "ROLE_TYPE_UNSPECIFIED":
24
36
  return RoleType.ROLE_TYPE_UNSPECIFIED;
25
37
  case 1:
26
- case "ROLE_TYPE_FORUM_SENTINEL":
27
- return RoleType.ROLE_TYPE_FORUM_SENTINEL;
38
+ case "ROLE_TYPE_CONTENT_SENTINEL":
39
+ return RoleType.ROLE_TYPE_CONTENT_SENTINEL;
28
40
  case 2:
29
41
  case "ROLE_TYPE_COLLECT_CURATOR":
30
42
  return RoleType.ROLE_TYPE_COLLECT_CURATOR;
@@ -41,8 +53,8 @@ export function roleTypeToJSON(object) {
41
53
  switch (object) {
42
54
  case RoleType.ROLE_TYPE_UNSPECIFIED:
43
55
  return "ROLE_TYPE_UNSPECIFIED";
44
- case RoleType.ROLE_TYPE_FORUM_SENTINEL:
45
- return "ROLE_TYPE_FORUM_SENTINEL";
56
+ case RoleType.ROLE_TYPE_CONTENT_SENTINEL:
57
+ return "ROLE_TYPE_CONTENT_SENTINEL";
46
58
  case RoleType.ROLE_TYPE_COLLECT_CURATOR:
47
59
  return "ROLE_TYPE_COLLECT_CURATOR";
48
60
  case RoleType.ROLE_TYPE_FEDERATION_VERIFIER:
@@ -20,6 +20,7 @@ import { MemberReport } from "./member_report";
20
20
  import { MemberWarning } from "./member_warning";
21
21
  import { GovActionAppeal } from "./gov_action_appeal";
22
22
  import { BondedRole, BondedRoleConfig } from "./bonded_role";
23
+ import { RoleActivity } from "./role_activity";
23
24
  import { BinaryReader, BinaryWriter } from "../../../binary";
24
25
  function createBaseGenesisState() {
25
26
  return {
@@ -60,7 +61,8 @@ function createBaseGenesisState() {
60
61
  govActionAppealList: [],
61
62
  govActionAppealCount: BigInt(0),
62
63
  bondedRoleList: [],
63
- bondedRoleConfigList: []
64
+ bondedRoleConfigList: [],
65
+ roleActivityList: []
64
66
  };
65
67
  }
66
68
  /**
@@ -186,6 +188,9 @@ export const GenesisState = {
186
188
  for (const v of message.bondedRoleConfigList) {
187
189
  BondedRoleConfig.encode(v, writer.uint32(314).fork()).ldelim();
188
190
  }
191
+ for (const v of message.roleActivityList) {
192
+ RoleActivity.encode(v, writer.uint32(322).fork()).ldelim();
193
+ }
189
194
  return writer;
190
195
  },
191
196
  decode(input, length) {
@@ -309,6 +314,9 @@ export const GenesisState = {
309
314
  case 39:
310
315
  message.bondedRoleConfigList.push(BondedRoleConfig.decode(reader, reader.uint32()));
311
316
  break;
317
+ case 40:
318
+ message.roleActivityList.push(RoleActivity.decode(reader, reader.uint32()));
319
+ break;
312
320
  default:
313
321
  reader.skipType(tag & 7);
314
322
  break;
@@ -356,6 +364,7 @@ export const GenesisState = {
356
364
  message.govActionAppealCount = object.govActionAppealCount !== undefined && object.govActionAppealCount !== null ? BigInt(object.govActionAppealCount.toString()) : BigInt(0);
357
365
  message.bondedRoleList = object.bondedRoleList?.map(e => BondedRole.fromPartial(e)) || [];
358
366
  message.bondedRoleConfigList = object.bondedRoleConfigList?.map(e => BondedRoleConfig.fromPartial(e)) || [];
367
+ message.roleActivityList = object.roleActivityList?.map(e => RoleActivity.fromPartial(e)) || [];
359
368
  return message;
360
369
  },
361
370
  fromAmino(object) {
@@ -424,6 +433,7 @@ export const GenesisState = {
424
433
  }
425
434
  message.bondedRoleList = object.bonded_role_list?.map(e => BondedRole.fromAmino(e)) || [];
426
435
  message.bondedRoleConfigList = object.bonded_role_config_list?.map(e => BondedRoleConfig.fromAmino(e)) || [];
436
+ message.roleActivityList = object.role_activity_list?.map(e => RoleActivity.fromAmino(e)) || [];
427
437
  return message;
428
438
  },
429
439
  toAmino(message) {
@@ -591,6 +601,12 @@ export const GenesisState = {
591
601
  else {
592
602
  obj.bonded_role_config_list = message.bondedRoleConfigList;
593
603
  }
604
+ if (message.roleActivityList) {
605
+ obj.role_activity_list = message.roleActivityList.map(e => e ? RoleActivity.toAmino(e) : undefined);
606
+ }
607
+ else {
608
+ obj.role_activity_list = message.roleActivityList;
609
+ }
594
610
  return obj;
595
611
  },
596
612
  fromAminoMsg(object) {