@sparkdreamnft/sparkdreamjs 0.0.25 → 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 (67) 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/genesis.js +110 -1
  12. package/esm/sparkdream/forum/v1/params.js +26 -2
  13. package/esm/sparkdream/forum/v1/sentinel_activity.js +58 -1
  14. package/esm/sparkdream/forum/v1/thread_metadata.js +13 -1
  15. package/esm/sparkdream/forum/v1/tx.js +157 -1
  16. package/esm/sparkdream/forum/v1/tx.registry.js +20 -2
  17. package/esm/sparkdream/forum/v1/tx.rpc.msg.js +7 -1
  18. package/esm/sparkdream/rep/v1/bonded_role.js +17 -5
  19. package/esm/sparkdream/rep/v1/genesis.js +17 -1
  20. package/esm/sparkdream/rep/v1/role_activity.js +670 -0
  21. package/esm/sparkdream/rep/v1/tx.js +159 -0
  22. package/esm/sparkdream/rep/v1/tx.registry.js +20 -2
  23. package/esm/sparkdream/rep/v1/tx.rpc.msg.js +8 -1
  24. package/esm/tendermint/bundle.js +17 -17
  25. package/ibc/bundle.d.ts +90 -90
  26. package/ibc/bundle.js +105 -105
  27. package/package.json +1 -1
  28. package/sparkdream/bundle.d.ts +7232 -7037
  29. package/sparkdream/bundle.js +275 -273
  30. package/sparkdream/collect/v1/params.d.ts +28 -0
  31. package/sparkdream/collect/v1/params.js +24 -0
  32. package/sparkdream/collect/v1/tx.d.ts +130 -6
  33. package/sparkdream/collect/v1/tx.js +220 -3
  34. package/sparkdream/collect/v1/tx.registry.d.ts +13 -1
  35. package/sparkdream/collect/v1/tx.registry.js +19 -1
  36. package/sparkdream/collect/v1/tx.rpc.msg.d.ts +10 -1
  37. package/sparkdream/collect/v1/tx.rpc.msg.js +10 -0
  38. package/sparkdream/collect/v1/types.d.ts +72 -0
  39. package/sparkdream/collect/v1/types.js +92 -2
  40. package/sparkdream/forum/v1/genesis.d.ts +65 -0
  41. package/sparkdream/forum/v1/genesis.js +111 -2
  42. package/sparkdream/forum/v1/params.d.ts +30 -0
  43. package/sparkdream/forum/v1/params.js +26 -2
  44. package/sparkdream/forum/v1/sentinel_activity.d.ts +53 -0
  45. package/sparkdream/forum/v1/sentinel_activity.js +58 -1
  46. package/sparkdream/forum/v1/thread_metadata.d.ts +16 -0
  47. package/sparkdream/forum/v1/thread_metadata.js +13 -1
  48. package/sparkdream/forum/v1/tx.d.ts +93 -7
  49. package/sparkdream/forum/v1/tx.js +158 -2
  50. package/sparkdream/forum/v1/tx.registry.d.ts +13 -1
  51. package/sparkdream/forum/v1/tx.registry.js +19 -1
  52. package/sparkdream/forum/v1/tx.rpc.msg.d.ts +4 -1
  53. package/sparkdream/forum/v1/tx.rpc.msg.js +6 -0
  54. package/sparkdream/rep/v1/bonded_role.d.ts +13 -1
  55. package/sparkdream/rep/v1/bonded_role.js +17 -5
  56. package/sparkdream/rep/v1/genesis.d.ts +3 -0
  57. package/sparkdream/rep/v1/genesis.js +17 -1
  58. package/sparkdream/rep/v1/role_activity.d.ts +395 -0
  59. package/sparkdream/rep/v1/role_activity.js +673 -0
  60. package/sparkdream/rep/v1/tx.d.ts +101 -0
  61. package/sparkdream/rep/v1/tx.js +160 -1
  62. package/sparkdream/rep/v1/tx.registry.d.ts +13 -1
  63. package/sparkdream/rep/v1/tx.registry.js +19 -1
  64. package/sparkdream/rep/v1/tx.rpc.msg.d.ts +7 -1
  65. package/sparkdream/rep/v1/tx.rpc.msg.js +7 -0
  66. package/tendermint/bundle.d.ts +844 -844
  67. package/tendermint/bundle.js +17 -17
@@ -1,5 +1,5 @@
1
1
  import { TxRpc } from "../../../types";
2
- import { MsgUpdateParams, MsgUpdateParamsResponse, MsgCreateCollection, MsgCreateCollectionResponse, MsgUpdateCollection, MsgUpdateCollectionResponse, MsgDeleteCollection, MsgDeleteCollectionResponse, MsgAddItem, MsgAddItemResponse, MsgAddItems, MsgAddItemsResponse, MsgUpdateItem, MsgUpdateItemResponse, MsgRemoveItem, MsgRemoveItemResponse, MsgRemoveItems, MsgRemoveItemsResponse, MsgReorderItem, MsgReorderItemResponse, MsgAddCollaborator, MsgAddCollaboratorResponse, MsgRemoveCollaborator, MsgRemoveCollaboratorResponse, MsgUpdateCollaboratorRole, MsgUpdateCollaboratorRoleResponse, MsgRateCollection, MsgRateCollectionResponse, MsgChallengeReview, MsgChallengeReviewResponse, MsgRequestSponsorship, MsgRequestSponsorshipResponse, MsgCancelSponsorshipRequest, MsgCancelSponsorshipRequestResponse, MsgSponsorCollection, MsgSponsorCollectionResponse, MsgUpdateOperationalParams, MsgUpdateOperationalParamsResponse, MsgUpvoteContent, MsgUpvoteContentResponse, MsgDownvoteContent, MsgDownvoteContentResponse, MsgFlagContent, MsgFlagContentResponse, MsgHideContent, MsgHideContentResponse, MsgAppealHide, MsgAppealHideResponse, MsgEndorseCollection, MsgEndorseCollectionResponse, MsgSetSeekingEndorsement, MsgSetSeekingEndorsementResponse, MsgPinCollection, MsgPinCollectionResponse, MsgUnpinCollection, MsgUnpinCollectionResponse, MsgMakeCollectionPermanent, MsgMakeCollectionPermanentResponse } from "./tx";
2
+ import { MsgUpdateParams, MsgUpdateParamsResponse, MsgCreateCollection, MsgCreateCollectionResponse, MsgUpdateCollection, MsgUpdateCollectionResponse, MsgDeleteCollection, MsgDeleteCollectionResponse, MsgAddItem, MsgAddItemResponse, MsgAddItems, MsgAddItemsResponse, MsgUpdateItem, MsgUpdateItemResponse, MsgRemoveItem, MsgRemoveItemResponse, MsgRemoveItems, MsgRemoveItemsResponse, MsgReorderItem, MsgReorderItemResponse, MsgAddCollaborator, MsgAddCollaboratorResponse, MsgRemoveCollaborator, MsgRemoveCollaboratorResponse, MsgUpdateCollaboratorRole, MsgUpdateCollaboratorRoleResponse, MsgRateCollection, MsgRateCollectionResponse, MsgChallengeReview, MsgChallengeReviewResponse, MsgRequestSponsorship, MsgRequestSponsorshipResponse, MsgCancelSponsorshipRequest, MsgCancelSponsorshipRequestResponse, MsgSponsorCollection, MsgSponsorCollectionResponse, MsgUpdateOperationalParams, MsgUpdateOperationalParamsResponse, MsgUpvoteContent, MsgUpvoteContentResponse, MsgDownvoteContent, MsgDownvoteContentResponse, MsgFlagContent, MsgFlagContentResponse, MsgHideContent, MsgHideContentResponse, MsgAppealHide, MsgAppealHideResponse, MsgEndorseCollection, MsgEndorseCollectionResponse, MsgSetSeekingEndorsement, MsgSetSeekingEndorsementResponse, MsgPinCollection, MsgPinCollectionResponse, MsgUnpinCollection, MsgUnpinCollectionResponse, MsgMakeCollectionPermanent, MsgMakeCollectionPermanentResponse, MsgUnhideContent, MsgUnhideContentResponse } from "./tx";
3
3
  /** Msg defines the Msg service. */
4
4
  export interface Msg {
5
5
  updateParams(request: MsgUpdateParams): Promise<MsgUpdateParamsResponse>;
@@ -52,6 +52,14 @@ export interface Msg {
52
52
  * params.make_permanent_min_trust_level. Idempotent on permanent collections.
53
53
  */
54
54
  makeCollectionPermanent(request: MsgMakeCollectionPermanent): Promise<MsgMakeCollectionPermanentResponse>;
55
+ /**
56
+ * UnhideContent reverses MsgHideContent. Original sentinel only, within
57
+ * params.sentinel_unhide_window_blocks, and only before an appeal is
58
+ * filed. Restores the author bond and rep penalty slashed at hide time.
59
+ * The sentinel's committed bond stays reserved until the original
60
+ * appeal_deadline (anti hide/unhide cycling).
61
+ */
62
+ unhideContent(request: MsgUnhideContent): Promise<MsgUnhideContentResponse>;
55
63
  }
56
64
  export declare class MsgClientImpl implements Msg {
57
65
  private readonly rpc;
@@ -85,5 +93,6 @@ export declare class MsgClientImpl implements Msg {
85
93
  pinCollection: (request: MsgPinCollection) => Promise<MsgPinCollectionResponse>;
86
94
  unpinCollection: (request: MsgUnpinCollection) => Promise<MsgUnpinCollectionResponse>;
87
95
  makeCollectionPermanent: (request: MsgMakeCollectionPermanent) => Promise<MsgMakeCollectionPermanentResponse>;
96
+ unhideContent: (request: MsgUnhideContent) => Promise<MsgUnhideContentResponse>;
88
97
  }
89
98
  export declare const createClientImpl: (rpc: TxRpc) => MsgClientImpl;
@@ -186,6 +186,16 @@ class MsgClientImpl {
186
186
  const promise = this.rpc.request("sparkdream.collect.v1.Msg", "MakeCollectionPermanent", data);
187
187
  return promise.then(data => tx_1.MsgMakeCollectionPermanentResponse.decode(new binary_1.BinaryReader(data)));
188
188
  };
189
+ /* UnhideContent reverses MsgHideContent. Original sentinel only, within
190
+ params.sentinel_unhide_window_blocks, and only before an appeal is
191
+ filed. Restores the author bond and rep penalty slashed at hide time.
192
+ The sentinel's committed bond stays reserved until the original
193
+ appeal_deadline (anti hide/unhide cycling). */
194
+ unhideContent = async (request) => {
195
+ const data = tx_1.MsgUnhideContent.encode(request).finish();
196
+ const promise = this.rpc.request("sparkdream.collect.v1.Msg", "UnhideContent", data);
197
+ return promise.then(data => tx_1.MsgUnhideContentResponse.decode(new binary_1.BinaryReader(data)));
198
+ };
189
199
  }
190
200
  exports.MsgClientImpl = MsgClientImpl;
191
201
  const createClientImpl = (rpc) => {
@@ -764,6 +764,14 @@ export interface CollectOperationalParams {
764
764
  endorserRepPenalty: string;
765
765
  collabInviterRepPenalty: string;
766
766
  authorRepPenalty: string;
767
+ /**
768
+ * sentinel_unhide_window_blocks — see Params.sentinel_unhide_window_blocks.
769
+ */
770
+ sentinelUnhideWindowBlocks: bigint;
771
+ /**
772
+ * max_hides_per_sentinel_per_day — see Params.max_hides_per_sentinel_per_day.
773
+ */
774
+ maxHidesPerSentinelPerDay: number;
767
775
  }
768
776
  export interface CollectOperationalParamsProtoMsg {
769
777
  typeUrl: "/sparkdream.collect.v1.CollectOperationalParams";
@@ -856,6 +864,14 @@ export interface CollectOperationalParamsAmino {
856
864
  endorser_rep_penalty?: string;
857
865
  collab_inviter_rep_penalty?: string;
858
866
  author_rep_penalty?: string;
867
+ /**
868
+ * sentinel_unhide_window_blocks — see Params.sentinel_unhide_window_blocks.
869
+ */
870
+ sentinel_unhide_window_blocks?: string;
871
+ /**
872
+ * max_hides_per_sentinel_per_day — see Params.max_hides_per_sentinel_per_day.
873
+ */
874
+ max_hides_per_sentinel_per_day?: number;
859
875
  }
860
876
  export interface CollectOperationalParamsAminoMsg {
861
877
  type: "/sparkdream.collect.v1.CollectOperationalParams";
@@ -917,6 +933,34 @@ export interface HideRecord {
917
933
  appealDeadline: bigint;
918
934
  appealed: boolean;
919
935
  resolved: boolean;
936
+ /**
937
+ * Set true when the hiding sentinel self-corrected via MsgUnhideContent.
938
+ * The record is Resolved at that point, but the HideRecordExpiry entry
939
+ * is retained so the EndBlocker releases the committed bond at the
940
+ * original appeal_deadline (anti hide/unhide cycling).
941
+ */
942
+ selfCorrected: boolean;
943
+ /**
944
+ * Snapshot of the author bond amount slashed by MsgHideContent
945
+ * (SlashAuthorBond), so a self-correct can mint it back. Zero if no
946
+ * bond existed or the target is an item.
947
+ */
948
+ authorBondAmount: string;
949
+ /**
950
+ * Snapshot of the per-tag rep penalty PARAM at hide time (params may
951
+ * change before unhide) and the tags it was applied to (collection tags
952
+ * are owner-editable). Zero/empty when no deduction ran.
953
+ */
954
+ authorRepPenalty: string;
955
+ repPenaltyTags: string[];
956
+ /**
957
+ * Per-tag ACTUAL deducted amounts (LegacyDec strings), aligned with
958
+ * rep_penalty_tags. DeductReputation floors at zero, so the actual
959
+ * deduction is min(current_score, author_rep_penalty) — restoring the
960
+ * raw param instead would mint reputation from nothing on every
961
+ * hide/reversal cycle for authors with less rep than the penalty.
962
+ */
963
+ repPenaltyAmounts: string[];
920
964
  }
921
965
  export interface HideRecordProtoMsg {
922
966
  typeUrl: "/sparkdream.collect.v1.HideRecord";
@@ -940,6 +984,34 @@ export interface HideRecordAmino {
940
984
  appeal_deadline?: string;
941
985
  appealed?: boolean;
942
986
  resolved?: boolean;
987
+ /**
988
+ * Set true when the hiding sentinel self-corrected via MsgUnhideContent.
989
+ * The record is Resolved at that point, but the HideRecordExpiry entry
990
+ * is retained so the EndBlocker releases the committed bond at the
991
+ * original appeal_deadline (anti hide/unhide cycling).
992
+ */
993
+ self_corrected?: boolean;
994
+ /**
995
+ * Snapshot of the author bond amount slashed by MsgHideContent
996
+ * (SlashAuthorBond), so a self-correct can mint it back. Zero if no
997
+ * bond existed or the target is an item.
998
+ */
999
+ author_bond_amount?: string;
1000
+ /**
1001
+ * Snapshot of the per-tag rep penalty PARAM at hide time (params may
1002
+ * change before unhide) and the tags it was applied to (collection tags
1003
+ * are owner-editable). Zero/empty when no deduction ran.
1004
+ */
1005
+ author_rep_penalty?: string;
1006
+ rep_penalty_tags?: string[];
1007
+ /**
1008
+ * Per-tag ACTUAL deducted amounts (LegacyDec strings), aligned with
1009
+ * rep_penalty_tags. DeductReputation floors at zero, so the actual
1010
+ * deduction is min(current_score, author_rep_penalty) — restoring the
1011
+ * raw param instead would mint reputation from nothing on every
1012
+ * hide/reversal cycle for authors with less rep than the penalty.
1013
+ */
1014
+ rep_penalty_amounts?: string[];
943
1015
  }
944
1016
  export interface HideRecordAminoMsg {
945
1017
  type: "/sparkdream.collect.v1.HideRecord";
@@ -2423,7 +2423,9 @@ function createBaseCollectOperationalParams() {
2423
2423
  nonMemberCollabBurnFraction: "",
2424
2424
  endorserRepPenalty: "",
2425
2425
  collabInviterRepPenalty: "",
2426
- authorRepPenalty: ""
2426
+ authorRepPenalty: "",
2427
+ sentinelUnhideWindowBlocks: BigInt(0),
2428
+ maxHidesPerSentinelPerDay: 0
2427
2429
  };
2428
2430
  }
2429
2431
  /**
@@ -2588,6 +2590,12 @@ exports.CollectOperationalParams = {
2588
2590
  if (message.authorRepPenalty !== "") {
2589
2591
  writer.uint32(434).string(math_1.Decimal.fromUserInput(message.authorRepPenalty, 18).atomics);
2590
2592
  }
2593
+ if (message.sentinelUnhideWindowBlocks !== BigInt(0)) {
2594
+ writer.uint32(448).int64(message.sentinelUnhideWindowBlocks);
2595
+ }
2596
+ if (message.maxHidesPerSentinelPerDay !== 0) {
2597
+ writer.uint32(456).uint32(message.maxHidesPerSentinelPerDay);
2598
+ }
2591
2599
  return writer;
2592
2600
  },
2593
2601
  decode(input, length) {
@@ -2750,6 +2758,12 @@ exports.CollectOperationalParams = {
2750
2758
  case 54:
2751
2759
  message.authorRepPenalty = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
2752
2760
  break;
2761
+ case 56:
2762
+ message.sentinelUnhideWindowBlocks = reader.int64();
2763
+ break;
2764
+ case 57:
2765
+ message.maxHidesPerSentinelPerDay = reader.uint32();
2766
+ break;
2753
2767
  default:
2754
2768
  reader.skipType(tag & 7);
2755
2769
  break;
@@ -2810,6 +2824,8 @@ exports.CollectOperationalParams = {
2810
2824
  message.endorserRepPenalty = object.endorserRepPenalty ?? "";
2811
2825
  message.collabInviterRepPenalty = object.collabInviterRepPenalty ?? "";
2812
2826
  message.authorRepPenalty = object.authorRepPenalty ?? "";
2827
+ message.sentinelUnhideWindowBlocks = object.sentinelUnhideWindowBlocks !== undefined && object.sentinelUnhideWindowBlocks !== null ? BigInt(object.sentinelUnhideWindowBlocks.toString()) : BigInt(0);
2828
+ message.maxHidesPerSentinelPerDay = object.maxHidesPerSentinelPerDay ?? 0;
2813
2829
  return message;
2814
2830
  },
2815
2831
  fromAmino(object) {
@@ -2967,6 +2983,12 @@ exports.CollectOperationalParams = {
2967
2983
  if (object.author_rep_penalty !== undefined && object.author_rep_penalty !== null) {
2968
2984
  message.authorRepPenalty = object.author_rep_penalty;
2969
2985
  }
2986
+ if (object.sentinel_unhide_window_blocks !== undefined && object.sentinel_unhide_window_blocks !== null) {
2987
+ message.sentinelUnhideWindowBlocks = BigInt(object.sentinel_unhide_window_blocks);
2988
+ }
2989
+ if (object.max_hides_per_sentinel_per_day !== undefined && object.max_hides_per_sentinel_per_day !== null) {
2990
+ message.maxHidesPerSentinelPerDay = object.max_hides_per_sentinel_per_day;
2991
+ }
2970
2992
  return message;
2971
2993
  },
2972
2994
  toAmino(message) {
@@ -3022,6 +3044,8 @@ exports.CollectOperationalParams = {
3022
3044
  obj.endorser_rep_penalty = message.endorserRepPenalty === "" ? undefined : message.endorserRepPenalty;
3023
3045
  obj.collab_inviter_rep_penalty = message.collabInviterRepPenalty === "" ? undefined : message.collabInviterRepPenalty;
3024
3046
  obj.author_rep_penalty = message.authorRepPenalty === "" ? undefined : message.authorRepPenalty;
3047
+ obj.sentinel_unhide_window_blocks = message.sentinelUnhideWindowBlocks !== BigInt(0) ? message.sentinelUnhideWindowBlocks?.toString() : undefined;
3048
+ obj.max_hides_per_sentinel_per_day = message.maxHidesPerSentinelPerDay === 0 ? undefined : message.maxHidesPerSentinelPerDay;
3025
3049
  return obj;
3026
3050
  },
3027
3051
  fromAminoMsg(object) {
@@ -3196,7 +3220,12 @@ function createBaseHideRecord() {
3196
3220
  reasonText: "",
3197
3221
  appealDeadline: BigInt(0),
3198
3222
  appealed: false,
3199
- resolved: false
3223
+ resolved: false,
3224
+ selfCorrected: false,
3225
+ authorBondAmount: "",
3226
+ authorRepPenalty: "",
3227
+ repPenaltyTags: [],
3228
+ repPenaltyAmounts: []
3200
3229
  };
3201
3230
  }
3202
3231
  /**
@@ -3241,6 +3270,21 @@ exports.HideRecord = {
3241
3270
  if (message.resolved === true) {
3242
3271
  writer.uint32(88).bool(message.resolved);
3243
3272
  }
3273
+ if (message.selfCorrected === true) {
3274
+ writer.uint32(96).bool(message.selfCorrected);
3275
+ }
3276
+ if (message.authorBondAmount !== "") {
3277
+ writer.uint32(106).string(message.authorBondAmount);
3278
+ }
3279
+ if (message.authorRepPenalty !== "") {
3280
+ writer.uint32(114).string(math_1.Decimal.fromUserInput(message.authorRepPenalty, 18).atomics);
3281
+ }
3282
+ for (const v of message.repPenaltyTags) {
3283
+ writer.uint32(122).string(v);
3284
+ }
3285
+ for (const v of message.repPenaltyAmounts) {
3286
+ writer.uint32(130).string(v);
3287
+ }
3244
3288
  return writer;
3245
3289
  },
3246
3290
  decode(input, length) {
@@ -3283,6 +3327,21 @@ exports.HideRecord = {
3283
3327
  case 11:
3284
3328
  message.resolved = reader.bool();
3285
3329
  break;
3330
+ case 12:
3331
+ message.selfCorrected = reader.bool();
3332
+ break;
3333
+ case 13:
3334
+ message.authorBondAmount = reader.string();
3335
+ break;
3336
+ case 14:
3337
+ message.authorRepPenalty = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
3338
+ break;
3339
+ case 15:
3340
+ message.repPenaltyTags.push(reader.string());
3341
+ break;
3342
+ case 16:
3343
+ message.repPenaltyAmounts.push(reader.string());
3344
+ break;
3286
3345
  default:
3287
3346
  reader.skipType(tag & 7);
3288
3347
  break;
@@ -3303,6 +3362,11 @@ exports.HideRecord = {
3303
3362
  message.appealDeadline = object.appealDeadline !== undefined && object.appealDeadline !== null ? BigInt(object.appealDeadline.toString()) : BigInt(0);
3304
3363
  message.appealed = object.appealed ?? false;
3305
3364
  message.resolved = object.resolved ?? false;
3365
+ message.selfCorrected = object.selfCorrected ?? false;
3366
+ message.authorBondAmount = object.authorBondAmount ?? "";
3367
+ message.authorRepPenalty = object.authorRepPenalty ?? "";
3368
+ message.repPenaltyTags = object.repPenaltyTags?.map(e => e) || [];
3369
+ message.repPenaltyAmounts = object.repPenaltyAmounts?.map(e => e) || [];
3306
3370
  return message;
3307
3371
  },
3308
3372
  fromAmino(object) {
@@ -3340,6 +3404,17 @@ exports.HideRecord = {
3340
3404
  if (object.resolved !== undefined && object.resolved !== null) {
3341
3405
  message.resolved = object.resolved;
3342
3406
  }
3407
+ if (object.self_corrected !== undefined && object.self_corrected !== null) {
3408
+ message.selfCorrected = object.self_corrected;
3409
+ }
3410
+ if (object.author_bond_amount !== undefined && object.author_bond_amount !== null) {
3411
+ message.authorBondAmount = object.author_bond_amount;
3412
+ }
3413
+ if (object.author_rep_penalty !== undefined && object.author_rep_penalty !== null) {
3414
+ message.authorRepPenalty = object.author_rep_penalty;
3415
+ }
3416
+ message.repPenaltyTags = object.rep_penalty_tags?.map(e => e) || [];
3417
+ message.repPenaltyAmounts = object.rep_penalty_amounts?.map(e => e) || [];
3343
3418
  return message;
3344
3419
  },
3345
3420
  toAmino(message) {
@@ -3355,6 +3430,21 @@ exports.HideRecord = {
3355
3430
  obj.appeal_deadline = message.appealDeadline !== BigInt(0) ? message.appealDeadline?.toString() : undefined;
3356
3431
  obj.appealed = message.appealed === false ? undefined : message.appealed;
3357
3432
  obj.resolved = message.resolved === false ? undefined : message.resolved;
3433
+ obj.self_corrected = message.selfCorrected === false ? undefined : message.selfCorrected;
3434
+ obj.author_bond_amount = message.authorBondAmount === "" ? undefined : message.authorBondAmount;
3435
+ obj.author_rep_penalty = message.authorRepPenalty === "" ? undefined : message.authorRepPenalty;
3436
+ if (message.repPenaltyTags) {
3437
+ obj.rep_penalty_tags = message.repPenaltyTags.map(e => e);
3438
+ }
3439
+ else {
3440
+ obj.rep_penalty_tags = message.repPenaltyTags;
3441
+ }
3442
+ if (message.repPenaltyAmounts) {
3443
+ obj.rep_penalty_amounts = message.repPenaltyAmounts.map(e => e);
3444
+ }
3445
+ else {
3446
+ obj.rep_penalty_amounts = message.repPenaltyAmounts;
3447
+ }
3358
3448
  return obj;
3359
3449
  },
3360
3450
  fromAminoMsg(object) {
@@ -46,6 +46,13 @@ export interface GenesisState {
46
46
  * imported post ID, so legacy exports without this field stay safe.
47
47
  */
48
48
  postCount: bigint;
49
+ /**
50
+ * proposal_count_map persists the per-(thread, sentinel) accepted-reply
51
+ * proposal counter that backs the per-sentinel-per-thread proposal cap. Not
52
+ * derivable from other state (it is a historical tally), so it must round-trip
53
+ * through genesis like sentinel_activity_map.
54
+ */
55
+ proposalCountMap: ProposalCountEntry[];
49
56
  }
50
57
  export interface GenesisStateProtoMsg {
51
58
  typeUrl: "/sparkdream.forum.v1.GenesisState";
@@ -83,11 +90,50 @@ export interface GenesisStateAmino {
83
90
  * imported post ID, so legacy exports without this field stay safe.
84
91
  */
85
92
  post_count?: string;
93
+ /**
94
+ * proposal_count_map persists the per-(thread, sentinel) accepted-reply
95
+ * proposal counter that backs the per-sentinel-per-thread proposal cap. Not
96
+ * derivable from other state (it is a historical tally), so it must round-trip
97
+ * through genesis like sentinel_activity_map.
98
+ */
99
+ proposal_count_map?: ProposalCountEntryAmino[];
86
100
  }
87
101
  export interface GenesisStateAminoMsg {
88
102
  type: "/sparkdream.forum.v1.GenesisState";
89
103
  value: GenesisStateAmino;
90
104
  }
105
+ /**
106
+ * ProposalCountEntry is one (thread_id, sentinel) -> count tuple of the
107
+ * accepted-reply proposal cap counter, flattened for genesis import/export.
108
+ * @name ProposalCountEntry
109
+ * @package sparkdream.forum.v1
110
+ * @see proto type: sparkdream.forum.v1.ProposalCountEntry
111
+ */
112
+ export interface ProposalCountEntry {
113
+ threadId: bigint;
114
+ sentinel: string;
115
+ count: bigint;
116
+ }
117
+ export interface ProposalCountEntryProtoMsg {
118
+ typeUrl: "/sparkdream.forum.v1.ProposalCountEntry";
119
+ value: Uint8Array;
120
+ }
121
+ /**
122
+ * ProposalCountEntry is one (thread_id, sentinel) -> count tuple of the
123
+ * accepted-reply proposal cap counter, flattened for genesis import/export.
124
+ * @name ProposalCountEntryAmino
125
+ * @package sparkdream.forum.v1
126
+ * @see proto type: sparkdream.forum.v1.ProposalCountEntry
127
+ */
128
+ export interface ProposalCountEntryAmino {
129
+ thread_id?: string;
130
+ sentinel?: string;
131
+ count?: string;
132
+ }
133
+ export interface ProposalCountEntryAminoMsg {
134
+ type: "/sparkdream.forum.v1.ProposalCountEntry";
135
+ value: ProposalCountEntryAmino;
136
+ }
91
137
  /**
92
138
  * GenesisState defines the forum module's genesis state.
93
139
  * @name GenesisState
@@ -106,3 +152,22 @@ export declare const GenesisState: {
106
152
  toProto(message: GenesisState): Uint8Array;
107
153
  toProtoMsg(message: GenesisState): GenesisStateProtoMsg;
108
154
  };
155
+ /**
156
+ * ProposalCountEntry is one (thread_id, sentinel) -> count tuple of the
157
+ * accepted-reply proposal cap counter, flattened for genesis import/export.
158
+ * @name ProposalCountEntry
159
+ * @package sparkdream.forum.v1
160
+ * @see proto type: sparkdream.forum.v1.ProposalCountEntry
161
+ */
162
+ export declare const ProposalCountEntry: {
163
+ typeUrl: string;
164
+ encode(message: ProposalCountEntry, writer?: BinaryWriter): BinaryWriter;
165
+ decode(input: BinaryReader | Uint8Array, length?: number): ProposalCountEntry;
166
+ fromPartial(object: DeepPartial<ProposalCountEntry>): ProposalCountEntry;
167
+ fromAmino(object: ProposalCountEntryAmino): ProposalCountEntry;
168
+ toAmino(message: ProposalCountEntry): ProposalCountEntryAmino;
169
+ fromAminoMsg(object: ProposalCountEntryAminoMsg): ProposalCountEntry;
170
+ fromProtoMsg(message: ProposalCountEntryProtoMsg): ProposalCountEntry;
171
+ toProto(message: ProposalCountEntry): Uint8Array;
172
+ toProtoMsg(message: ProposalCountEntry): ProposalCountEntryProtoMsg;
173
+ };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GenesisState = void 0;
3
+ exports.ProposalCountEntry = exports.GenesisState = void 0;
4
4
  //@ts-nocheck
5
5
  const params_1 = require("./params");
6
6
  const post_1 = require("./post");
@@ -34,7 +34,8 @@ function createBaseGenesisState() {
34
34
  threadFollowMap: [],
35
35
  threadFollowCountMap: [],
36
36
  archiveMetadataMap: [],
37
- postCount: BigInt(0)
37
+ postCount: BigInt(0),
38
+ proposalCountMap: []
38
39
  };
39
40
  }
40
41
  /**
@@ -94,6 +95,9 @@ exports.GenesisState = {
94
95
  if (message.postCount !== BigInt(0)) {
95
96
  writer.uint32(128).uint64(message.postCount);
96
97
  }
98
+ for (const v of message.proposalCountMap) {
99
+ exports.ProposalCountEntry.encode(v, writer.uint32(138).fork()).ldelim();
100
+ }
97
101
  return writer;
98
102
  },
99
103
  decode(input, length) {
@@ -151,6 +155,9 @@ exports.GenesisState = {
151
155
  case 16:
152
156
  message.postCount = reader.uint64();
153
157
  break;
158
+ case 17:
159
+ message.proposalCountMap.push(exports.ProposalCountEntry.decode(reader, reader.uint32()));
160
+ break;
154
161
  default:
155
162
  reader.skipType(tag & 7);
156
163
  break;
@@ -176,6 +183,7 @@ exports.GenesisState = {
176
183
  message.threadFollowCountMap = object.threadFollowCountMap?.map(e => thread_follow_count_1.ThreadFollowCount.fromPartial(e)) || [];
177
184
  message.archiveMetadataMap = object.archiveMetadataMap?.map(e => archive_metadata_1.ArchiveMetadata.fromPartial(e)) || [];
178
185
  message.postCount = object.postCount !== undefined && object.postCount !== null ? BigInt(object.postCount.toString()) : BigInt(0);
186
+ message.proposalCountMap = object.proposalCountMap?.map(e => exports.ProposalCountEntry.fromPartial(e)) || [];
179
187
  return message;
180
188
  },
181
189
  fromAmino(object) {
@@ -202,6 +210,7 @@ exports.GenesisState = {
202
210
  if (object.post_count !== undefined && object.post_count !== null) {
203
211
  message.postCount = BigInt(object.post_count);
204
212
  }
213
+ message.proposalCountMap = object.proposal_count_map?.map(e => exports.ProposalCountEntry.fromAmino(e)) || [];
205
214
  return message;
206
215
  },
207
216
  toAmino(message) {
@@ -287,6 +296,12 @@ exports.GenesisState = {
287
296
  obj.archive_metadata_map = message.archiveMetadataMap;
288
297
  }
289
298
  obj.post_count = message.postCount !== BigInt(0) ? message.postCount?.toString() : undefined;
299
+ if (message.proposalCountMap) {
300
+ obj.proposal_count_map = message.proposalCountMap.map(e => e ? exports.ProposalCountEntry.toAmino(e) : undefined);
301
+ }
302
+ else {
303
+ obj.proposal_count_map = message.proposalCountMap;
304
+ }
290
305
  return obj;
291
306
  },
292
307
  fromAminoMsg(object) {
@@ -305,3 +320,97 @@ exports.GenesisState = {
305
320
  };
306
321
  }
307
322
  };
323
+ function createBaseProposalCountEntry() {
324
+ return {
325
+ threadId: BigInt(0),
326
+ sentinel: "",
327
+ count: BigInt(0)
328
+ };
329
+ }
330
+ /**
331
+ * ProposalCountEntry is one (thread_id, sentinel) -> count tuple of the
332
+ * accepted-reply proposal cap counter, flattened for genesis import/export.
333
+ * @name ProposalCountEntry
334
+ * @package sparkdream.forum.v1
335
+ * @see proto type: sparkdream.forum.v1.ProposalCountEntry
336
+ */
337
+ exports.ProposalCountEntry = {
338
+ typeUrl: "/sparkdream.forum.v1.ProposalCountEntry",
339
+ encode(message, writer = binary_1.BinaryWriter.create()) {
340
+ if (message.threadId !== BigInt(0)) {
341
+ writer.uint32(8).uint64(message.threadId);
342
+ }
343
+ if (message.sentinel !== "") {
344
+ writer.uint32(18).string(message.sentinel);
345
+ }
346
+ if (message.count !== BigInt(0)) {
347
+ writer.uint32(24).uint64(message.count);
348
+ }
349
+ return writer;
350
+ },
351
+ decode(input, length) {
352
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
353
+ let end = length === undefined ? reader.len : reader.pos + length;
354
+ const message = createBaseProposalCountEntry();
355
+ while (reader.pos < end) {
356
+ const tag = reader.uint32();
357
+ switch (tag >>> 3) {
358
+ case 1:
359
+ message.threadId = reader.uint64();
360
+ break;
361
+ case 2:
362
+ message.sentinel = reader.string();
363
+ break;
364
+ case 3:
365
+ message.count = reader.uint64();
366
+ break;
367
+ default:
368
+ reader.skipType(tag & 7);
369
+ break;
370
+ }
371
+ }
372
+ return message;
373
+ },
374
+ fromPartial(object) {
375
+ const message = createBaseProposalCountEntry();
376
+ message.threadId = object.threadId !== undefined && object.threadId !== null ? BigInt(object.threadId.toString()) : BigInt(0);
377
+ message.sentinel = object.sentinel ?? "";
378
+ message.count = object.count !== undefined && object.count !== null ? BigInt(object.count.toString()) : BigInt(0);
379
+ return message;
380
+ },
381
+ fromAmino(object) {
382
+ const message = createBaseProposalCountEntry();
383
+ if (object.thread_id !== undefined && object.thread_id !== null) {
384
+ message.threadId = BigInt(object.thread_id);
385
+ }
386
+ if (object.sentinel !== undefined && object.sentinel !== null) {
387
+ message.sentinel = object.sentinel;
388
+ }
389
+ if (object.count !== undefined && object.count !== null) {
390
+ message.count = BigInt(object.count);
391
+ }
392
+ return message;
393
+ },
394
+ toAmino(message) {
395
+ const obj = {};
396
+ obj.thread_id = message.threadId !== BigInt(0) ? message.threadId?.toString() : undefined;
397
+ obj.sentinel = message.sentinel === "" ? undefined : message.sentinel;
398
+ obj.count = message.count !== BigInt(0) ? message.count?.toString() : undefined;
399
+ return obj;
400
+ },
401
+ fromAminoMsg(object) {
402
+ return exports.ProposalCountEntry.fromAmino(object.value);
403
+ },
404
+ fromProtoMsg(message) {
405
+ return exports.ProposalCountEntry.decode(message.value);
406
+ },
407
+ toProto(message) {
408
+ return exports.ProposalCountEntry.encode(message).finish();
409
+ },
410
+ toProtoMsg(message) {
411
+ return {
412
+ typeUrl: "/sparkdream.forum.v1.ProposalCountEntry",
413
+ value: exports.ProposalCountEntry.encode(message).finish()
414
+ };
415
+ }
416
+ };
@@ -300,6 +300,16 @@ export interface Params {
300
300
  * genesis defaults (48h).
301
301
  */
302
302
  acceptProposalTimeout: bigint;
303
+ /**
304
+ * max_accept_proposals_per_sentinel_per_thread caps how many accepted-reply
305
+ * proposals a single sentinel may make on a given thread (counting all
306
+ * proposals, confirmed or rejected). Once a sentinel hits the cap on a thread,
307
+ * proposeAcceptedReply rejects with ErrMaxProposalsReached — that sentinel is
308
+ * done proposing there, permanently. Per-sentinel (not a thread-global cap) so
309
+ * one bad actor cannot exhaust a thread's quota and lock out honest curators.
310
+ * 0 disables the cap. Seeded by the genesis defaults (2).
311
+ */
312
+ maxAcceptProposalsPerSentinelPerThread: number;
303
313
  }
304
314
  export interface ParamsProtoMsg {
305
315
  typeUrl: "/sparkdream.forum.v1.Params";
@@ -605,6 +615,16 @@ export interface ParamsAmino {
605
615
  * genesis defaults (48h).
606
616
  */
607
617
  accept_proposal_timeout?: string;
618
+ /**
619
+ * max_accept_proposals_per_sentinel_per_thread caps how many accepted-reply
620
+ * proposals a single sentinel may make on a given thread (counting all
621
+ * proposals, confirmed or rejected). Once a sentinel hits the cap on a thread,
622
+ * proposeAcceptedReply rejects with ErrMaxProposalsReached — that sentinel is
623
+ * done proposing there, permanently. Per-sentinel (not a thread-global cap) so
624
+ * one bad actor cannot exhaust a thread's quota and lock out honest curators.
625
+ * 0 disables the cap. Seeded by the genesis defaults (2).
626
+ */
627
+ max_accept_proposals_per_sentinel_per_thread?: number;
608
628
  }
609
629
  export interface ParamsAminoMsg {
610
630
  type: "sparkdream/x/forum/Params";
@@ -773,6 +793,11 @@ export interface ForumOperationalParams {
773
793
  * accept_proposal_timeout — see Params.accept_proposal_timeout.
774
794
  */
775
795
  acceptProposalTimeout: bigint;
796
+ /**
797
+ * max_accept_proposals_per_sentinel_per_thread —
798
+ * see Params.max_accept_proposals_per_sentinel_per_thread.
799
+ */
800
+ maxAcceptProposalsPerSentinelPerThread: number;
776
801
  }
777
802
  export interface ForumOperationalParamsProtoMsg {
778
803
  typeUrl: "/sparkdream.forum.v1.ForumOperationalParams";
@@ -941,6 +966,11 @@ export interface ForumOperationalParamsAmino {
941
966
  * accept_proposal_timeout — see Params.accept_proposal_timeout.
942
967
  */
943
968
  accept_proposal_timeout?: string;
969
+ /**
970
+ * max_accept_proposals_per_sentinel_per_thread —
971
+ * see Params.max_accept_proposals_per_sentinel_per_thread.
972
+ */
973
+ max_accept_proposals_per_sentinel_per_thread?: number;
944
974
  }
945
975
  export interface ForumOperationalParamsAminoMsg {
946
976
  type: "sparkdream/x/forum/ForumOperationalParams";