@sparkdreamnft/sparkdreamjs 0.0.26 → 0.0.28

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 (56) 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/query.js +165 -0
  8. package/esm/sparkdream/collect/v1/query.lcd.js +11 -0
  9. package/esm/sparkdream/collect/v1/query.rpc.Query.js +10 -1
  10. package/esm/sparkdream/collect/v1/tx.js +216 -1
  11. package/esm/sparkdream/collect/v1/tx.registry.js +20 -2
  12. package/esm/sparkdream/collect/v1/tx.rpc.msg.js +11 -1
  13. package/esm/sparkdream/collect/v1/types.js +92 -2
  14. package/esm/sparkdream/forum/v1/sentinel_activity.js +58 -1
  15. package/esm/sparkdream/forum/v1/tx.js +1 -1
  16. package/esm/sparkdream/rep/v1/bonded_role.js +17 -5
  17. package/esm/sparkdream/rep/v1/genesis.js +17 -1
  18. package/esm/sparkdream/rep/v1/query.js +13 -34
  19. package/esm/sparkdream/rep/v1/role_activity.js +670 -0
  20. package/esm/tendermint/bundle.js +17 -17
  21. package/ibc/bundle.d.ts +90 -90
  22. package/ibc/bundle.js +105 -105
  23. package/package.json +1 -1
  24. package/sparkdream/bundle.d.ts +7194 -7061
  25. package/sparkdream/bundle.js +275 -273
  26. package/sparkdream/collect/v1/params.d.ts +28 -0
  27. package/sparkdream/collect/v1/params.js +24 -0
  28. package/sparkdream/collect/v1/query.d.ts +92 -0
  29. package/sparkdream/collect/v1/query.js +167 -1
  30. package/sparkdream/collect/v1/query.lcd.d.ts +2 -1
  31. package/sparkdream/collect/v1/query.lcd.js +11 -0
  32. package/sparkdream/collect/v1/query.rpc.Query.d.ts +5 -1
  33. package/sparkdream/collect/v1/query.rpc.Query.js +9 -0
  34. package/sparkdream/collect/v1/tx.d.ts +130 -6
  35. package/sparkdream/collect/v1/tx.js +220 -3
  36. package/sparkdream/collect/v1/tx.registry.d.ts +13 -1
  37. package/sparkdream/collect/v1/tx.registry.js +19 -1
  38. package/sparkdream/collect/v1/tx.rpc.msg.d.ts +10 -1
  39. package/sparkdream/collect/v1/tx.rpc.msg.js +10 -0
  40. package/sparkdream/collect/v1/types.d.ts +72 -0
  41. package/sparkdream/collect/v1/types.js +92 -2
  42. package/sparkdream/forum/v1/sentinel_activity.d.ts +53 -0
  43. package/sparkdream/forum/v1/sentinel_activity.js +58 -1
  44. package/sparkdream/forum/v1/tx.d.ts +1 -1
  45. package/sparkdream/forum/v1/tx.js +1 -1
  46. package/sparkdream/rep/v1/bonded_role.d.ts +13 -1
  47. package/sparkdream/rep/v1/bonded_role.js +17 -5
  48. package/sparkdream/rep/v1/genesis.d.ts +3 -0
  49. package/sparkdream/rep/v1/genesis.js +17 -1
  50. package/sparkdream/rep/v1/query.d.ts +2 -6
  51. package/sparkdream/rep/v1/query.js +13 -34
  52. package/sparkdream/rep/v1/role_activity.d.ts +395 -0
  53. package/sparkdream/rep/v1/role_activity.js +673 -0
  54. package/sparkdream/rpc.query.d.ts +1 -0
  55. package/tendermint/bundle.d.ts +844 -844
  56. package/tendermint/bundle.js +17 -17
@@ -51,6 +51,8 @@ function createBaseParams() {
51
51
  appealFee: "",
52
52
  appealCooldownBlocks: BigInt(0),
53
53
  appealDeadlineBlocks: BigInt(0),
54
+ sentinelUnhideWindowBlocks: BigInt(0),
55
+ maxHidesPerSentinelPerDay: 0,
54
56
  endorsementCreationFee: "",
55
57
  endorsementDreamStake: "",
56
58
  endorsementStakeDuration: BigInt(0),
@@ -230,6 +232,12 @@ export const Params = {
230
232
  if (message.appealDeadlineBlocks !== BigInt(0)) {
231
233
  writer.uint32(392).int64(message.appealDeadlineBlocks);
232
234
  }
235
+ if (message.sentinelUnhideWindowBlocks !== BigInt(0)) {
236
+ writer.uint32(608).int64(message.sentinelUnhideWindowBlocks);
237
+ }
238
+ if (message.maxHidesPerSentinelPerDay !== 0) {
239
+ writer.uint32(616).uint32(message.maxHidesPerSentinelPerDay);
240
+ }
233
241
  if (message.endorsementCreationFee !== "") {
234
242
  writer.uint32(402).string(message.endorsementCreationFee);
235
243
  }
@@ -452,6 +460,12 @@ export const Params = {
452
460
  case 49:
453
461
  message.appealDeadlineBlocks = reader.int64();
454
462
  break;
463
+ case 76:
464
+ message.sentinelUnhideWindowBlocks = reader.int64();
465
+ break;
466
+ case 77:
467
+ message.maxHidesPerSentinelPerDay = reader.uint32();
468
+ break;
455
469
  case 50:
456
470
  message.endorsementCreationFee = reader.string();
457
471
  break;
@@ -578,6 +592,8 @@ export const Params = {
578
592
  message.appealFee = object.appealFee ?? "";
579
593
  message.appealCooldownBlocks = object.appealCooldownBlocks !== undefined && object.appealCooldownBlocks !== null ? BigInt(object.appealCooldownBlocks.toString()) : BigInt(0);
580
594
  message.appealDeadlineBlocks = object.appealDeadlineBlocks !== undefined && object.appealDeadlineBlocks !== null ? BigInt(object.appealDeadlineBlocks.toString()) : BigInt(0);
595
+ message.sentinelUnhideWindowBlocks = object.sentinelUnhideWindowBlocks !== undefined && object.sentinelUnhideWindowBlocks !== null ? BigInt(object.sentinelUnhideWindowBlocks.toString()) : BigInt(0);
596
+ message.maxHidesPerSentinelPerDay = object.maxHidesPerSentinelPerDay ?? 0;
581
597
  message.endorsementCreationFee = object.endorsementCreationFee ?? "";
582
598
  message.endorsementDreamStake = object.endorsementDreamStake ?? "";
583
599
  message.endorsementStakeDuration = object.endorsementStakeDuration !== undefined && object.endorsementStakeDuration !== null ? BigInt(object.endorsementStakeDuration.toString()) : BigInt(0);
@@ -749,6 +765,12 @@ export const Params = {
749
765
  if (object.appeal_deadline_blocks !== undefined && object.appeal_deadline_blocks !== null) {
750
766
  message.appealDeadlineBlocks = BigInt(object.appeal_deadline_blocks);
751
767
  }
768
+ if (object.sentinel_unhide_window_blocks !== undefined && object.sentinel_unhide_window_blocks !== null) {
769
+ message.sentinelUnhideWindowBlocks = BigInt(object.sentinel_unhide_window_blocks);
770
+ }
771
+ if (object.max_hides_per_sentinel_per_day !== undefined && object.max_hides_per_sentinel_per_day !== null) {
772
+ message.maxHidesPerSentinelPerDay = object.max_hides_per_sentinel_per_day;
773
+ }
752
774
  if (object.endorsement_creation_fee !== undefined && object.endorsement_creation_fee !== null) {
753
775
  message.endorsementCreationFee = object.endorsement_creation_fee;
754
776
  }
@@ -870,6 +892,8 @@ export const Params = {
870
892
  obj.appeal_fee = message.appealFee === "" ? undefined : message.appealFee;
871
893
  obj.appeal_cooldown_blocks = message.appealCooldownBlocks !== BigInt(0) ? message.appealCooldownBlocks?.toString() : undefined;
872
894
  obj.appeal_deadline_blocks = message.appealDeadlineBlocks !== BigInt(0) ? message.appealDeadlineBlocks?.toString() : undefined;
895
+ obj.sentinel_unhide_window_blocks = message.sentinelUnhideWindowBlocks !== BigInt(0) ? message.sentinelUnhideWindowBlocks?.toString() : undefined;
896
+ obj.max_hides_per_sentinel_per_day = message.maxHidesPerSentinelPerDay === 0 ? undefined : message.maxHidesPerSentinelPerDay;
873
897
  obj.endorsement_creation_fee = message.endorsementCreationFee === "" ? undefined : message.endorsementCreationFee;
874
898
  obj.endorsement_dream_stake = message.endorsementDreamStake === "" ? undefined : message.endorsementDreamStake;
875
899
  obj.endorsement_stake_duration = message.endorsementStakeDuration !== BigInt(0) ? message.endorsementStakeDuration?.toString() : undefined;
@@ -2984,6 +2984,171 @@ export const QueryHideRecordsByTargetResponse = {
2984
2984
  };
2985
2985
  }
2986
2986
  };
2987
+ function createBaseQueryHideRecordsBySentinelRequest() {
2988
+ return {
2989
+ sentinel: "",
2990
+ pagination: undefined
2991
+ };
2992
+ }
2993
+ /**
2994
+ * QueryHideRecordsBySentinelRequest defines the QueryHideRecordsBySentinelRequest message.
2995
+ * @name QueryHideRecordsBySentinelRequest
2996
+ * @package sparkdream.collect.v1
2997
+ * @see proto type: sparkdream.collect.v1.QueryHideRecordsBySentinelRequest
2998
+ */
2999
+ export const QueryHideRecordsBySentinelRequest = {
3000
+ typeUrl: "/sparkdream.collect.v1.QueryHideRecordsBySentinelRequest",
3001
+ encode(message, writer = BinaryWriter.create()) {
3002
+ if (message.sentinel !== "") {
3003
+ writer.uint32(10).string(message.sentinel);
3004
+ }
3005
+ if (message.pagination !== undefined) {
3006
+ PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
3007
+ }
3008
+ return writer;
3009
+ },
3010
+ decode(input, length) {
3011
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3012
+ let end = length === undefined ? reader.len : reader.pos + length;
3013
+ const message = createBaseQueryHideRecordsBySentinelRequest();
3014
+ while (reader.pos < end) {
3015
+ const tag = reader.uint32();
3016
+ switch (tag >>> 3) {
3017
+ case 1:
3018
+ message.sentinel = reader.string();
3019
+ break;
3020
+ case 2:
3021
+ message.pagination = PageRequest.decode(reader, reader.uint32());
3022
+ break;
3023
+ default:
3024
+ reader.skipType(tag & 7);
3025
+ break;
3026
+ }
3027
+ }
3028
+ return message;
3029
+ },
3030
+ fromPartial(object) {
3031
+ const message = createBaseQueryHideRecordsBySentinelRequest();
3032
+ message.sentinel = object.sentinel ?? "";
3033
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
3034
+ return message;
3035
+ },
3036
+ fromAmino(object) {
3037
+ const message = createBaseQueryHideRecordsBySentinelRequest();
3038
+ if (object.sentinel !== undefined && object.sentinel !== null) {
3039
+ message.sentinel = object.sentinel;
3040
+ }
3041
+ if (object.pagination !== undefined && object.pagination !== null) {
3042
+ message.pagination = PageRequest.fromAmino(object.pagination);
3043
+ }
3044
+ return message;
3045
+ },
3046
+ toAmino(message) {
3047
+ const obj = {};
3048
+ obj.sentinel = message.sentinel === "" ? undefined : message.sentinel;
3049
+ obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined;
3050
+ return obj;
3051
+ },
3052
+ fromAminoMsg(object) {
3053
+ return QueryHideRecordsBySentinelRequest.fromAmino(object.value);
3054
+ },
3055
+ fromProtoMsg(message) {
3056
+ return QueryHideRecordsBySentinelRequest.decode(message.value);
3057
+ },
3058
+ toProto(message) {
3059
+ return QueryHideRecordsBySentinelRequest.encode(message).finish();
3060
+ },
3061
+ toProtoMsg(message) {
3062
+ return {
3063
+ typeUrl: "/sparkdream.collect.v1.QueryHideRecordsBySentinelRequest",
3064
+ value: QueryHideRecordsBySentinelRequest.encode(message).finish()
3065
+ };
3066
+ }
3067
+ };
3068
+ function createBaseQueryHideRecordsBySentinelResponse() {
3069
+ return {
3070
+ hideRecords: [],
3071
+ pagination: undefined
3072
+ };
3073
+ }
3074
+ /**
3075
+ * QueryHideRecordsBySentinelResponse defines the QueryHideRecordsBySentinelResponse message.
3076
+ * @name QueryHideRecordsBySentinelResponse
3077
+ * @package sparkdream.collect.v1
3078
+ * @see proto type: sparkdream.collect.v1.QueryHideRecordsBySentinelResponse
3079
+ */
3080
+ export const QueryHideRecordsBySentinelResponse = {
3081
+ typeUrl: "/sparkdream.collect.v1.QueryHideRecordsBySentinelResponse",
3082
+ encode(message, writer = BinaryWriter.create()) {
3083
+ for (const v of message.hideRecords) {
3084
+ HideRecord.encode(v, writer.uint32(10).fork()).ldelim();
3085
+ }
3086
+ if (message.pagination !== undefined) {
3087
+ PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
3088
+ }
3089
+ return writer;
3090
+ },
3091
+ decode(input, length) {
3092
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3093
+ let end = length === undefined ? reader.len : reader.pos + length;
3094
+ const message = createBaseQueryHideRecordsBySentinelResponse();
3095
+ while (reader.pos < end) {
3096
+ const tag = reader.uint32();
3097
+ switch (tag >>> 3) {
3098
+ case 1:
3099
+ message.hideRecords.push(HideRecord.decode(reader, reader.uint32()));
3100
+ break;
3101
+ case 2:
3102
+ message.pagination = PageResponse.decode(reader, reader.uint32());
3103
+ break;
3104
+ default:
3105
+ reader.skipType(tag & 7);
3106
+ break;
3107
+ }
3108
+ }
3109
+ return message;
3110
+ },
3111
+ fromPartial(object) {
3112
+ const message = createBaseQueryHideRecordsBySentinelResponse();
3113
+ message.hideRecords = object.hideRecords?.map(e => HideRecord.fromPartial(e)) || [];
3114
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
3115
+ return message;
3116
+ },
3117
+ fromAmino(object) {
3118
+ const message = createBaseQueryHideRecordsBySentinelResponse();
3119
+ message.hideRecords = object.hide_records?.map(e => HideRecord.fromAmino(e)) || [];
3120
+ if (object.pagination !== undefined && object.pagination !== null) {
3121
+ message.pagination = PageResponse.fromAmino(object.pagination);
3122
+ }
3123
+ return message;
3124
+ },
3125
+ toAmino(message) {
3126
+ const obj = {};
3127
+ if (message.hideRecords) {
3128
+ obj.hide_records = message.hideRecords.map(e => e ? HideRecord.toAmino(e) : undefined);
3129
+ }
3130
+ else {
3131
+ obj.hide_records = message.hideRecords;
3132
+ }
3133
+ obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined;
3134
+ return obj;
3135
+ },
3136
+ fromAminoMsg(object) {
3137
+ return QueryHideRecordsBySentinelResponse.fromAmino(object.value);
3138
+ },
3139
+ fromProtoMsg(message) {
3140
+ return QueryHideRecordsBySentinelResponse.decode(message.value);
3141
+ },
3142
+ toProto(message) {
3143
+ return QueryHideRecordsBySentinelResponse.encode(message).finish();
3144
+ },
3145
+ toProtoMsg(message) {
3146
+ return {
3147
+ typeUrl: "/sparkdream.collect.v1.QueryHideRecordsBySentinelResponse",
3148
+ value: QueryHideRecordsBySentinelResponse.encode(message).finish()
3149
+ };
3150
+ }
3151
+ };
2987
3152
  function createBaseQueryPendingCollectionsRequest() {
2988
3153
  return {
2989
3154
  pagination: undefined
@@ -173,6 +173,17 @@ export class LCDQueryClient {
173
173
  const endpoint = `sparkdream/collect/v1/hide_records_by_target/${params.targetId}/${params.targetType}`;
174
174
  return await this.req.get(endpoint);
175
175
  };
176
+ /* HideRecordsBySentinel Queries hide records created by a given sentinel. */
177
+ hideRecordsBySentinel = async (params) => {
178
+ const options = {
179
+ params: {}
180
+ };
181
+ if (typeof params?.pagination !== "undefined") {
182
+ setPaginationParams(options, params.pagination);
183
+ }
184
+ const endpoint = `sparkdream/collect/v1/hide_records_by_sentinel/${params.sentinel}`;
185
+ return await this.req.get(endpoint, options);
186
+ };
176
187
  /* PendingCollections Queries a list of PendingCollections items. */
177
188
  pendingCollections = async (params = {
178
189
  pagination: undefined
@@ -1,6 +1,6 @@
1
1
  import { BinaryReader } from "../../../binary";
2
2
  import { createProtobufRpcClient } from "@cosmjs/stargate";
3
- import { QueryParamsRequest, QueryParamsResponse, QueryCollectionRequest, QueryCollectionResponse, QueryCollectionsByOwnerRequest, QueryCollectionsByOwnerResponse, QueryPublicCollectionsRequest, QueryPublicCollectionsResponse, QueryPublicCollectionsByTypeRequest, QueryPublicCollectionsByTypeResponse, QueryCollectionsByCollaboratorRequest, QueryCollectionsByCollaboratorResponse, QueryItemRequest, QueryItemResponse, QueryItemsRequest, QueryItemsResponse, QueryItemsByOwnerRequest, QueryItemsByOwnerResponse, QueryCollaboratorsRequest, QueryCollaboratorsResponse, QueryCuratorActivityRequest, QueryCuratorActivityResponse, QueryCurationSummaryRequest, QueryCurationSummaryResponse, QueryCurationReviewsRequest, QueryCurationReviewsResponse, QueryCurationReviewsByCuratorRequest, QueryCurationReviewsByCuratorResponse, QuerySponsorshipRequestRequest, QuerySponsorshipRequestResponse, QuerySponsorshipRequestsRequest, QuerySponsorshipRequestsResponse, QueryContentFlagRequest, QueryContentFlagResponse, QueryFlaggedContentRequest, QueryFlaggedContentResponse, QueryHideRecordRequest, QueryHideRecordResponse, QueryHideRecordsByTargetRequest, QueryHideRecordsByTargetResponse, QueryPendingCollectionsRequest, QueryPendingCollectionsResponse, QueryEndorsementRequest, QueryEndorsementResponse, QueryCollectionsByContentRequest, QueryCollectionsByContentResponse, QueryCollectionConvictionRequest, QueryCollectionConvictionResponse, QueryListCollectionsByTagRequest, QueryListCollectionsByTagResponse } from "./query";
3
+ import { QueryParamsRequest, QueryParamsResponse, QueryCollectionRequest, QueryCollectionResponse, QueryCollectionsByOwnerRequest, QueryCollectionsByOwnerResponse, QueryPublicCollectionsRequest, QueryPublicCollectionsResponse, QueryPublicCollectionsByTypeRequest, QueryPublicCollectionsByTypeResponse, QueryCollectionsByCollaboratorRequest, QueryCollectionsByCollaboratorResponse, QueryItemRequest, QueryItemResponse, QueryItemsRequest, QueryItemsResponse, QueryItemsByOwnerRequest, QueryItemsByOwnerResponse, QueryCollaboratorsRequest, QueryCollaboratorsResponse, QueryCuratorActivityRequest, QueryCuratorActivityResponse, QueryCurationSummaryRequest, QueryCurationSummaryResponse, QueryCurationReviewsRequest, QueryCurationReviewsResponse, QueryCurationReviewsByCuratorRequest, QueryCurationReviewsByCuratorResponse, QuerySponsorshipRequestRequest, QuerySponsorshipRequestResponse, QuerySponsorshipRequestsRequest, QuerySponsorshipRequestsResponse, QueryContentFlagRequest, QueryContentFlagResponse, QueryFlaggedContentRequest, QueryFlaggedContentResponse, QueryHideRecordRequest, QueryHideRecordResponse, QueryHideRecordsByTargetRequest, QueryHideRecordsByTargetResponse, QueryHideRecordsBySentinelRequest, QueryHideRecordsBySentinelResponse, QueryPendingCollectionsRequest, QueryPendingCollectionsResponse, QueryEndorsementRequest, QueryEndorsementResponse, QueryCollectionsByContentRequest, QueryCollectionsByContentResponse, QueryCollectionConvictionRequest, QueryCollectionConvictionResponse, QueryListCollectionsByTagRequest, QueryListCollectionsByTagResponse } from "./query";
4
4
  export class QueryClientImpl {
5
5
  rpc;
6
6
  constructor(rpc) {
@@ -134,6 +134,12 @@ export class QueryClientImpl {
134
134
  const promise = this.rpc.request("sparkdream.collect.v1.Query", "HideRecordsByTarget", data);
135
135
  return promise.then(data => QueryHideRecordsByTargetResponse.decode(new BinaryReader(data)));
136
136
  };
137
+ /* HideRecordsBySentinel Queries hide records created by a given sentinel. */
138
+ hideRecordsBySentinel = async (request) => {
139
+ const data = QueryHideRecordsBySentinelRequest.encode(request).finish();
140
+ const promise = this.rpc.request("sparkdream.collect.v1.Query", "HideRecordsBySentinel", data);
141
+ return promise.then(data => QueryHideRecordsBySentinelResponse.decode(new BinaryReader(data)));
142
+ };
137
143
  /* PendingCollections Queries a list of PendingCollections items. */
138
144
  pendingCollections = async (request = {
139
145
  pagination: undefined
@@ -233,6 +239,9 @@ export const createRpcQueryExtension = (base) => {
233
239
  hideRecordsByTarget(request) {
234
240
  return queryService.hideRecordsByTarget(request);
235
241
  },
242
+ hideRecordsBySentinel(request) {
243
+ return queryService.hideRecordsBySentinel(request);
244
+ },
236
245
  pendingCollections(request) {
237
246
  return queryService.pendingCollections(request);
238
247
  },
@@ -3,6 +3,65 @@ import { Params } from "./params";
3
3
  import { NftReference, LinkReference, OnChainReference, CustomReference, KeyValuePair, AddItemEntry, CollectOperationalParams } from "./types";
4
4
  import { BinaryReader, BinaryWriter } from "../../../binary";
5
5
  import { bytesFromBase64, base64FromBytes } from "../../../helpers";
6
+ /**
7
+ * ModerationAuthority selects which authority the caller of MsgHideContent
8
+ * is invoking. Mirrors x/forum's enum: it disambiguates the case where an
9
+ * account is BOTH a bonded content sentinel and a Commons Operations
10
+ * Committee member — without it the handler would have to silently pick one
11
+ * path. See the authority-selection notes in docs/x-collect-spec.md
12
+ * (MsgHideContent).
13
+ */
14
+ export var ModerationAuthority;
15
+ (function (ModerationAuthority) {
16
+ /**
17
+ * MODERATION_AUTHORITY_AUTO - AUTO (default, back-compat): sentinel path whenever the account is an
18
+ * eligible bonded sentinel, else the council path if council-authorized,
19
+ * else error. Prefers the accountable (bonded) sentinel path.
20
+ */
21
+ ModerationAuthority[ModerationAuthority["MODERATION_AUTHORITY_AUTO"] = 0] = "MODERATION_AUTHORITY_AUTO";
22
+ /**
23
+ * MODERATION_AUTHORITY_SENTINEL - SENTINEL: force the sentinel path; error if not an eligible sentinel
24
+ * (no silent fallback to council).
25
+ */
26
+ ModerationAuthority[ModerationAuthority["MODERATION_AUTHORITY_SENTINEL"] = 1] = "MODERATION_AUTHORITY_SENTINEL";
27
+ /**
28
+ * MODERATION_AUTHORITY_COUNCIL - COUNCIL: force the council (gov-authority) path; error if not
29
+ * council-authorized. The deliberate "act as committee" choice.
30
+ */
31
+ ModerationAuthority[ModerationAuthority["MODERATION_AUTHORITY_COUNCIL"] = 2] = "MODERATION_AUTHORITY_COUNCIL";
32
+ ModerationAuthority[ModerationAuthority["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
33
+ })(ModerationAuthority || (ModerationAuthority = {}));
34
+ export const ModerationAuthorityAmino = ModerationAuthority;
35
+ export function moderationAuthorityFromJSON(object) {
36
+ switch (object) {
37
+ case 0:
38
+ case "MODERATION_AUTHORITY_AUTO":
39
+ return ModerationAuthority.MODERATION_AUTHORITY_AUTO;
40
+ case 1:
41
+ case "MODERATION_AUTHORITY_SENTINEL":
42
+ return ModerationAuthority.MODERATION_AUTHORITY_SENTINEL;
43
+ case 2:
44
+ case "MODERATION_AUTHORITY_COUNCIL":
45
+ return ModerationAuthority.MODERATION_AUTHORITY_COUNCIL;
46
+ case -1:
47
+ case "UNRECOGNIZED":
48
+ default:
49
+ return ModerationAuthority.UNRECOGNIZED;
50
+ }
51
+ }
52
+ export function moderationAuthorityToJSON(object) {
53
+ switch (object) {
54
+ case ModerationAuthority.MODERATION_AUTHORITY_AUTO:
55
+ return "MODERATION_AUTHORITY_AUTO";
56
+ case ModerationAuthority.MODERATION_AUTHORITY_SENTINEL:
57
+ return "MODERATION_AUTHORITY_SENTINEL";
58
+ case ModerationAuthority.MODERATION_AUTHORITY_COUNCIL:
59
+ return "MODERATION_AUTHORITY_COUNCIL";
60
+ case ModerationAuthority.UNRECOGNIZED:
61
+ default:
62
+ return "UNRECOGNIZED";
63
+ }
64
+ }
6
65
  function createBaseMsgUpdateParams() {
7
66
  return {
8
67
  authority: "",
@@ -3908,7 +3967,8 @@ function createBaseMsgHideContent() {
3908
3967
  targetId: BigInt(0),
3909
3968
  targetType: 0,
3910
3969
  reasonCode: 0,
3911
- reasonText: ""
3970
+ reasonText: "",
3971
+ authority: 0
3912
3972
  };
3913
3973
  }
3914
3974
  /**
@@ -3936,6 +3996,9 @@ export const MsgHideContent = {
3936
3996
  if (message.reasonText !== "") {
3937
3997
  writer.uint32(42).string(message.reasonText);
3938
3998
  }
3999
+ if (message.authority !== 0) {
4000
+ writer.uint32(48).int32(message.authority);
4001
+ }
3939
4002
  return writer;
3940
4003
  },
3941
4004
  decode(input, length) {
@@ -3960,6 +4023,9 @@ export const MsgHideContent = {
3960
4023
  case 5:
3961
4024
  message.reasonText = reader.string();
3962
4025
  break;
4026
+ case 6:
4027
+ message.authority = reader.int32();
4028
+ break;
3963
4029
  default:
3964
4030
  reader.skipType(tag & 7);
3965
4031
  break;
@@ -3974,6 +4040,7 @@ export const MsgHideContent = {
3974
4040
  message.targetType = object.targetType ?? 0;
3975
4041
  message.reasonCode = object.reasonCode ?? 0;
3976
4042
  message.reasonText = object.reasonText ?? "";
4043
+ message.authority = object.authority ?? 0;
3977
4044
  return message;
3978
4045
  },
3979
4046
  fromAmino(object) {
@@ -3993,6 +4060,9 @@ export const MsgHideContent = {
3993
4060
  if (object.reason_text !== undefined && object.reason_text !== null) {
3994
4061
  message.reasonText = object.reason_text;
3995
4062
  }
4063
+ if (object.authority !== undefined && object.authority !== null) {
4064
+ message.authority = object.authority;
4065
+ }
3996
4066
  return message;
3997
4067
  },
3998
4068
  toAmino(message) {
@@ -4002,6 +4072,7 @@ export const MsgHideContent = {
4002
4072
  obj.target_type = message.targetType === 0 ? undefined : message.targetType;
4003
4073
  obj.reason_code = message.reasonCode === 0 ? undefined : message.reasonCode;
4004
4074
  obj.reason_text = message.reasonText === "" ? undefined : message.reasonText;
4075
+ obj.authority = message.authority === 0 ? undefined : message.authority;
4005
4076
  return obj;
4006
4077
  },
4007
4078
  fromAminoMsg(object) {
@@ -4974,3 +5045,147 @@ export const MsgMakeCollectionPermanentResponse = {
4974
5045
  };
4975
5046
  }
4976
5047
  };
5048
+ function createBaseMsgUnhideContent() {
5049
+ return {
5050
+ creator: "",
5051
+ hideRecordId: BigInt(0)
5052
+ };
5053
+ }
5054
+ /**
5055
+ * MsgUnhideContent defines the MsgUnhideContent message.
5056
+ * @name MsgUnhideContent
5057
+ * @package sparkdream.collect.v1
5058
+ * @see proto type: sparkdream.collect.v1.MsgUnhideContent
5059
+ */
5060
+ export const MsgUnhideContent = {
5061
+ typeUrl: "/sparkdream.collect.v1.MsgUnhideContent",
5062
+ aminoType: "sparkdream/x/collect/MsgUnhideContent",
5063
+ encode(message, writer = BinaryWriter.create()) {
5064
+ if (message.creator !== "") {
5065
+ writer.uint32(10).string(message.creator);
5066
+ }
5067
+ if (message.hideRecordId !== BigInt(0)) {
5068
+ writer.uint32(16).uint64(message.hideRecordId);
5069
+ }
5070
+ return writer;
5071
+ },
5072
+ decode(input, length) {
5073
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5074
+ let end = length === undefined ? reader.len : reader.pos + length;
5075
+ const message = createBaseMsgUnhideContent();
5076
+ while (reader.pos < end) {
5077
+ const tag = reader.uint32();
5078
+ switch (tag >>> 3) {
5079
+ case 1:
5080
+ message.creator = reader.string();
5081
+ break;
5082
+ case 2:
5083
+ message.hideRecordId = reader.uint64();
5084
+ break;
5085
+ default:
5086
+ reader.skipType(tag & 7);
5087
+ break;
5088
+ }
5089
+ }
5090
+ return message;
5091
+ },
5092
+ fromPartial(object) {
5093
+ const message = createBaseMsgUnhideContent();
5094
+ message.creator = object.creator ?? "";
5095
+ message.hideRecordId = object.hideRecordId !== undefined && object.hideRecordId !== null ? BigInt(object.hideRecordId.toString()) : BigInt(0);
5096
+ return message;
5097
+ },
5098
+ fromAmino(object) {
5099
+ const message = createBaseMsgUnhideContent();
5100
+ if (object.creator !== undefined && object.creator !== null) {
5101
+ message.creator = object.creator;
5102
+ }
5103
+ if (object.hide_record_id !== undefined && object.hide_record_id !== null) {
5104
+ message.hideRecordId = BigInt(object.hide_record_id);
5105
+ }
5106
+ return message;
5107
+ },
5108
+ toAmino(message) {
5109
+ const obj = {};
5110
+ obj.creator = message.creator === "" ? undefined : message.creator;
5111
+ obj.hide_record_id = message.hideRecordId !== BigInt(0) ? message.hideRecordId?.toString() : undefined;
5112
+ return obj;
5113
+ },
5114
+ fromAminoMsg(object) {
5115
+ return MsgUnhideContent.fromAmino(object.value);
5116
+ },
5117
+ toAminoMsg(message) {
5118
+ return {
5119
+ type: "sparkdream/x/collect/MsgUnhideContent",
5120
+ value: MsgUnhideContent.toAmino(message)
5121
+ };
5122
+ },
5123
+ fromProtoMsg(message) {
5124
+ return MsgUnhideContent.decode(message.value);
5125
+ },
5126
+ toProto(message) {
5127
+ return MsgUnhideContent.encode(message).finish();
5128
+ },
5129
+ toProtoMsg(message) {
5130
+ return {
5131
+ typeUrl: "/sparkdream.collect.v1.MsgUnhideContent",
5132
+ value: MsgUnhideContent.encode(message).finish()
5133
+ };
5134
+ }
5135
+ };
5136
+ function createBaseMsgUnhideContentResponse() {
5137
+ return {};
5138
+ }
5139
+ /**
5140
+ * MsgUnhideContentResponse defines the MsgUnhideContentResponse message.
5141
+ * @name MsgUnhideContentResponse
5142
+ * @package sparkdream.collect.v1
5143
+ * @see proto type: sparkdream.collect.v1.MsgUnhideContentResponse
5144
+ */
5145
+ export const MsgUnhideContentResponse = {
5146
+ typeUrl: "/sparkdream.collect.v1.MsgUnhideContentResponse",
5147
+ encode(_, writer = BinaryWriter.create()) {
5148
+ return writer;
5149
+ },
5150
+ decode(input, length) {
5151
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5152
+ let end = length === undefined ? reader.len : reader.pos + length;
5153
+ const message = createBaseMsgUnhideContentResponse();
5154
+ while (reader.pos < end) {
5155
+ const tag = reader.uint32();
5156
+ switch (tag >>> 3) {
5157
+ default:
5158
+ reader.skipType(tag & 7);
5159
+ break;
5160
+ }
5161
+ }
5162
+ return message;
5163
+ },
5164
+ fromPartial(_) {
5165
+ const message = createBaseMsgUnhideContentResponse();
5166
+ return message;
5167
+ },
5168
+ fromAmino(_) {
5169
+ const message = createBaseMsgUnhideContentResponse();
5170
+ return message;
5171
+ },
5172
+ toAmino(_) {
5173
+ const obj = {};
5174
+ return obj;
5175
+ },
5176
+ fromAminoMsg(object) {
5177
+ return MsgUnhideContentResponse.fromAmino(object.value);
5178
+ },
5179
+ fromProtoMsg(message) {
5180
+ return MsgUnhideContentResponse.decode(message.value);
5181
+ },
5182
+ toProto(message) {
5183
+ return MsgUnhideContentResponse.encode(message).finish();
5184
+ },
5185
+ toProtoMsg(message) {
5186
+ return {
5187
+ typeUrl: "/sparkdream.collect.v1.MsgUnhideContentResponse",
5188
+ value: MsgUnhideContentResponse.encode(message).finish()
5189
+ };
5190
+ }
5191
+ };
@@ -1,5 +1,5 @@
1
- import { MsgUpdateParams, MsgCreateCollection, MsgUpdateCollection, MsgDeleteCollection, MsgAddItem, MsgAddItems, MsgUpdateItem, MsgRemoveItem, MsgRemoveItems, MsgReorderItem, MsgAddCollaborator, MsgRemoveCollaborator, MsgUpdateCollaboratorRole, MsgRateCollection, MsgChallengeReview, MsgRequestSponsorship, MsgCancelSponsorshipRequest, MsgSponsorCollection, MsgUpdateOperationalParams, MsgUpvoteContent, MsgDownvoteContent, MsgFlagContent, MsgHideContent, MsgAppealHide, MsgEndorseCollection, MsgSetSeekingEndorsement, MsgPinCollection, MsgUnpinCollection, MsgMakeCollectionPermanent } from "./tx";
2
- export const registry = [["/sparkdream.collect.v1.MsgUpdateParams", MsgUpdateParams], ["/sparkdream.collect.v1.MsgCreateCollection", MsgCreateCollection], ["/sparkdream.collect.v1.MsgUpdateCollection", MsgUpdateCollection], ["/sparkdream.collect.v1.MsgDeleteCollection", MsgDeleteCollection], ["/sparkdream.collect.v1.MsgAddItem", MsgAddItem], ["/sparkdream.collect.v1.MsgAddItems", MsgAddItems], ["/sparkdream.collect.v1.MsgUpdateItem", MsgUpdateItem], ["/sparkdream.collect.v1.MsgRemoveItem", MsgRemoveItem], ["/sparkdream.collect.v1.MsgRemoveItems", MsgRemoveItems], ["/sparkdream.collect.v1.MsgReorderItem", MsgReorderItem], ["/sparkdream.collect.v1.MsgAddCollaborator", MsgAddCollaborator], ["/sparkdream.collect.v1.MsgRemoveCollaborator", MsgRemoveCollaborator], ["/sparkdream.collect.v1.MsgUpdateCollaboratorRole", MsgUpdateCollaboratorRole], ["/sparkdream.collect.v1.MsgRateCollection", MsgRateCollection], ["/sparkdream.collect.v1.MsgChallengeReview", MsgChallengeReview], ["/sparkdream.collect.v1.MsgRequestSponsorship", MsgRequestSponsorship], ["/sparkdream.collect.v1.MsgCancelSponsorshipRequest", MsgCancelSponsorshipRequest], ["/sparkdream.collect.v1.MsgSponsorCollection", MsgSponsorCollection], ["/sparkdream.collect.v1.MsgUpdateOperationalParams", MsgUpdateOperationalParams], ["/sparkdream.collect.v1.MsgUpvoteContent", MsgUpvoteContent], ["/sparkdream.collect.v1.MsgDownvoteContent", MsgDownvoteContent], ["/sparkdream.collect.v1.MsgFlagContent", MsgFlagContent], ["/sparkdream.collect.v1.MsgHideContent", MsgHideContent], ["/sparkdream.collect.v1.MsgAppealHide", MsgAppealHide], ["/sparkdream.collect.v1.MsgEndorseCollection", MsgEndorseCollection], ["/sparkdream.collect.v1.MsgSetSeekingEndorsement", MsgSetSeekingEndorsement], ["/sparkdream.collect.v1.MsgPinCollection", MsgPinCollection], ["/sparkdream.collect.v1.MsgUnpinCollection", MsgUnpinCollection], ["/sparkdream.collect.v1.MsgMakeCollectionPermanent", MsgMakeCollectionPermanent]];
1
+ import { MsgUpdateParams, MsgCreateCollection, MsgUpdateCollection, MsgDeleteCollection, MsgAddItem, MsgAddItems, MsgUpdateItem, MsgRemoveItem, MsgRemoveItems, MsgReorderItem, MsgAddCollaborator, MsgRemoveCollaborator, MsgUpdateCollaboratorRole, MsgRateCollection, MsgChallengeReview, MsgRequestSponsorship, MsgCancelSponsorshipRequest, MsgSponsorCollection, MsgUpdateOperationalParams, MsgUpvoteContent, MsgDownvoteContent, MsgFlagContent, MsgHideContent, MsgAppealHide, MsgEndorseCollection, MsgSetSeekingEndorsement, MsgPinCollection, MsgUnpinCollection, MsgMakeCollectionPermanent, MsgUnhideContent } from "./tx";
2
+ export const registry = [["/sparkdream.collect.v1.MsgUpdateParams", MsgUpdateParams], ["/sparkdream.collect.v1.MsgCreateCollection", MsgCreateCollection], ["/sparkdream.collect.v1.MsgUpdateCollection", MsgUpdateCollection], ["/sparkdream.collect.v1.MsgDeleteCollection", MsgDeleteCollection], ["/sparkdream.collect.v1.MsgAddItem", MsgAddItem], ["/sparkdream.collect.v1.MsgAddItems", MsgAddItems], ["/sparkdream.collect.v1.MsgUpdateItem", MsgUpdateItem], ["/sparkdream.collect.v1.MsgRemoveItem", MsgRemoveItem], ["/sparkdream.collect.v1.MsgRemoveItems", MsgRemoveItems], ["/sparkdream.collect.v1.MsgReorderItem", MsgReorderItem], ["/sparkdream.collect.v1.MsgAddCollaborator", MsgAddCollaborator], ["/sparkdream.collect.v1.MsgRemoveCollaborator", MsgRemoveCollaborator], ["/sparkdream.collect.v1.MsgUpdateCollaboratorRole", MsgUpdateCollaboratorRole], ["/sparkdream.collect.v1.MsgRateCollection", MsgRateCollection], ["/sparkdream.collect.v1.MsgChallengeReview", MsgChallengeReview], ["/sparkdream.collect.v1.MsgRequestSponsorship", MsgRequestSponsorship], ["/sparkdream.collect.v1.MsgCancelSponsorshipRequest", MsgCancelSponsorshipRequest], ["/sparkdream.collect.v1.MsgSponsorCollection", MsgSponsorCollection], ["/sparkdream.collect.v1.MsgUpdateOperationalParams", MsgUpdateOperationalParams], ["/sparkdream.collect.v1.MsgUpvoteContent", MsgUpvoteContent], ["/sparkdream.collect.v1.MsgDownvoteContent", MsgDownvoteContent], ["/sparkdream.collect.v1.MsgFlagContent", MsgFlagContent], ["/sparkdream.collect.v1.MsgHideContent", MsgHideContent], ["/sparkdream.collect.v1.MsgAppealHide", MsgAppealHide], ["/sparkdream.collect.v1.MsgEndorseCollection", MsgEndorseCollection], ["/sparkdream.collect.v1.MsgSetSeekingEndorsement", MsgSetSeekingEndorsement], ["/sparkdream.collect.v1.MsgPinCollection", MsgPinCollection], ["/sparkdream.collect.v1.MsgUnpinCollection", MsgUnpinCollection], ["/sparkdream.collect.v1.MsgMakeCollectionPermanent", MsgMakeCollectionPermanent], ["/sparkdream.collect.v1.MsgUnhideContent", MsgUnhideContent]];
3
3
  export const load = (protoRegistry) => {
4
4
  registry.forEach(([typeUrl, mod]) => {
5
5
  protoRegistry.register(typeUrl, mod);
@@ -180,6 +180,12 @@ export const MessageComposer = {
180
180
  typeUrl: "/sparkdream.collect.v1.MsgMakeCollectionPermanent",
181
181
  value: MsgMakeCollectionPermanent.encode(value).finish()
182
182
  };
183
+ },
184
+ unhideContent(value) {
185
+ return {
186
+ typeUrl: "/sparkdream.collect.v1.MsgUnhideContent",
187
+ value: MsgUnhideContent.encode(value).finish()
188
+ };
183
189
  }
184
190
  },
185
191
  withTypeUrl: {
@@ -356,6 +362,12 @@ export const MessageComposer = {
356
362
  typeUrl: "/sparkdream.collect.v1.MsgMakeCollectionPermanent",
357
363
  value
358
364
  };
365
+ },
366
+ unhideContent(value) {
367
+ return {
368
+ typeUrl: "/sparkdream.collect.v1.MsgUnhideContent",
369
+ value
370
+ };
359
371
  }
360
372
  },
361
373
  fromPartial: {
@@ -532,6 +544,12 @@ export const MessageComposer = {
532
544
  typeUrl: "/sparkdream.collect.v1.MsgMakeCollectionPermanent",
533
545
  value: MsgMakeCollectionPermanent.fromPartial(value)
534
546
  };
547
+ },
548
+ unhideContent(value) {
549
+ return {
550
+ typeUrl: "/sparkdream.collect.v1.MsgUnhideContent",
551
+ value: MsgUnhideContent.fromPartial(value)
552
+ };
535
553
  }
536
554
  }
537
555
  };
@@ -1,5 +1,5 @@
1
1
  import { BinaryReader } from "../../../binary";
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
  export class MsgClientImpl {
4
4
  rpc;
5
5
  constructor(rpc) {
@@ -183,6 +183,16 @@ export class MsgClientImpl {
183
183
  const promise = this.rpc.request("sparkdream.collect.v1.Msg", "MakeCollectionPermanent", data);
184
184
  return promise.then(data => MsgMakeCollectionPermanentResponse.decode(new BinaryReader(data)));
185
185
  };
186
+ /* UnhideContent reverses MsgHideContent. Original sentinel only, within
187
+ params.sentinel_unhide_window_blocks, and only before an appeal is
188
+ filed. Restores the author bond and rep penalty slashed at hide time.
189
+ The sentinel's committed bond stays reserved until the original
190
+ appeal_deadline (anti hide/unhide cycling). */
191
+ unhideContent = async (request) => {
192
+ const data = MsgUnhideContent.encode(request).finish();
193
+ const promise = this.rpc.request("sparkdream.collect.v1.Msg", "UnhideContent", data);
194
+ return promise.then(data => MsgUnhideContentResponse.decode(new BinaryReader(data)));
195
+ };
186
196
  }
187
197
  export const createClientImpl = (rpc) => {
188
198
  return new MsgClientImpl(rpc);