@sparkdreamnft/sparkdreamjs 0.0.20 → 0.0.22

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.
@@ -30,7 +30,8 @@ function createBaseGenesisState() {
30
30
  threadMetadataMap: [],
31
31
  threadFollowMap: [],
32
32
  threadFollowCountMap: [],
33
- archiveMetadataMap: []
33
+ archiveMetadataMap: [],
34
+ postCount: BigInt(0)
34
35
  };
35
36
  }
36
37
  /**
@@ -87,6 +88,9 @@ export const GenesisState = {
87
88
  for (const v of message.archiveMetadataMap) {
88
89
  ArchiveMetadata.encode(v, writer.uint32(122).fork()).ldelim();
89
90
  }
91
+ if (message.postCount !== BigInt(0)) {
92
+ writer.uint32(128).uint64(message.postCount);
93
+ }
90
94
  return writer;
91
95
  },
92
96
  decode(input, length) {
@@ -141,6 +145,9 @@ export const GenesisState = {
141
145
  case 15:
142
146
  message.archiveMetadataMap.push(ArchiveMetadata.decode(reader, reader.uint32()));
143
147
  break;
148
+ case 16:
149
+ message.postCount = reader.uint64();
150
+ break;
144
151
  default:
145
152
  reader.skipType(tag & 7);
146
153
  break;
@@ -165,6 +172,7 @@ export const GenesisState = {
165
172
  message.threadFollowMap = object.threadFollowMap?.map(e => ThreadFollow.fromPartial(e)) || [];
166
173
  message.threadFollowCountMap = object.threadFollowCountMap?.map(e => ThreadFollowCount.fromPartial(e)) || [];
167
174
  message.archiveMetadataMap = object.archiveMetadataMap?.map(e => ArchiveMetadata.fromPartial(e)) || [];
175
+ message.postCount = object.postCount !== undefined && object.postCount !== null ? BigInt(object.postCount.toString()) : BigInt(0);
168
176
  return message;
169
177
  },
170
178
  fromAmino(object) {
@@ -188,6 +196,9 @@ export const GenesisState = {
188
196
  message.threadFollowMap = object.thread_follow_map?.map(e => ThreadFollow.fromAmino(e)) || [];
189
197
  message.threadFollowCountMap = object.thread_follow_count_map?.map(e => ThreadFollowCount.fromAmino(e)) || [];
190
198
  message.archiveMetadataMap = object.archive_metadata_map?.map(e => ArchiveMetadata.fromAmino(e)) || [];
199
+ if (object.post_count !== undefined && object.post_count !== null) {
200
+ message.postCount = BigInt(object.post_count);
201
+ }
191
202
  return message;
192
203
  },
193
204
  toAmino(message) {
@@ -272,6 +283,7 @@ export const GenesisState = {
272
283
  else {
273
284
  obj.archive_metadata_map = message.archiveMetadataMap;
274
285
  }
286
+ obj.post_count = message.postCount !== BigInt(0) ? message.postCount?.toString() : undefined;
275
287
  return obj;
276
288
  },
277
289
  fromAminoMsg(object) {
@@ -1,6 +1,66 @@
1
1
  //@ts-nocheck
2
2
  import { Params, ForumOperationalParams } from "./params";
3
3
  import { BinaryReader, BinaryWriter } from "../../../binary";
4
+ /**
5
+ * HideAuthority selects which authority the caller of MsgHidePost is invoking.
6
+ * It disambiguates the case where an account is BOTH a bonded forum sentinel
7
+ * and a Commons Operations Committee member: without it the handler would
8
+ * silently pick the council (gov) path — a strictly more powerful, less
9
+ * accountable action chosen by accident. See
10
+ * docs/HANDOFF_HIDE_AUTHORITY_DISAMBIGUATION.md.
11
+ */
12
+ export var HideAuthority;
13
+ (function (HideAuthority) {
14
+ /**
15
+ * HIDE_AUTHORITY_AUTO - AUTO (default, back-compat): resolve to the sentinel path whenever the
16
+ * account holds an eligible sentinel bond (NORMAL/RECOVERY), else fall
17
+ * through to the council path if council-authorized, else error. AUTO
18
+ * prefers the accountable (bonded + author-appealable) sentinel path.
19
+ */
20
+ HideAuthority[HideAuthority["HIDE_AUTHORITY_AUTO"] = 0] = "HIDE_AUTHORITY_AUTO";
21
+ /**
22
+ * HIDE_AUTHORITY_SENTINEL - SENTINEL: force the sentinel path; error if the account is not an
23
+ * eligible sentinel (no silent fallback to council).
24
+ */
25
+ HideAuthority[HideAuthority["HIDE_AUTHORITY_SENTINEL"] = 1] = "HIDE_AUTHORITY_SENTINEL";
26
+ /**
27
+ * HIDE_AUTHORITY_COUNCIL - COUNCIL: force the council (gov-authority) path; error if the account is
28
+ * not council-authorized. The deliberate "act as committee" choice.
29
+ */
30
+ HideAuthority[HideAuthority["HIDE_AUTHORITY_COUNCIL"] = 2] = "HIDE_AUTHORITY_COUNCIL";
31
+ HideAuthority[HideAuthority["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
32
+ })(HideAuthority || (HideAuthority = {}));
33
+ export const HideAuthorityAmino = HideAuthority;
34
+ export function hideAuthorityFromJSON(object) {
35
+ switch (object) {
36
+ case 0:
37
+ case "HIDE_AUTHORITY_AUTO":
38
+ return HideAuthority.HIDE_AUTHORITY_AUTO;
39
+ case 1:
40
+ case "HIDE_AUTHORITY_SENTINEL":
41
+ return HideAuthority.HIDE_AUTHORITY_SENTINEL;
42
+ case 2:
43
+ case "HIDE_AUTHORITY_COUNCIL":
44
+ return HideAuthority.HIDE_AUTHORITY_COUNCIL;
45
+ case -1:
46
+ case "UNRECOGNIZED":
47
+ default:
48
+ return HideAuthority.UNRECOGNIZED;
49
+ }
50
+ }
51
+ export function hideAuthorityToJSON(object) {
52
+ switch (object) {
53
+ case HideAuthority.HIDE_AUTHORITY_AUTO:
54
+ return "HIDE_AUTHORITY_AUTO";
55
+ case HideAuthority.HIDE_AUTHORITY_SENTINEL:
56
+ return "HIDE_AUTHORITY_SENTINEL";
57
+ case HideAuthority.HIDE_AUTHORITY_COUNCIL:
58
+ return "HIDE_AUTHORITY_COUNCIL";
59
+ case HideAuthority.UNRECOGNIZED:
60
+ default:
61
+ return "UNRECOGNIZED";
62
+ }
63
+ }
4
64
  function createBaseMsgUpdateParams() {
5
65
  return {
6
66
  authority: "",
@@ -3259,7 +3319,8 @@ function createBaseMsgHidePost() {
3259
3319
  creator: "",
3260
3320
  postId: BigInt(0),
3261
3321
  reasonCode: BigInt(0),
3262
- reasonText: ""
3322
+ reasonText: "",
3323
+ authority: 0
3263
3324
  };
3264
3325
  }
3265
3326
  /**
@@ -3284,6 +3345,9 @@ export const MsgHidePost = {
3284
3345
  if (message.reasonText !== "") {
3285
3346
  writer.uint32(34).string(message.reasonText);
3286
3347
  }
3348
+ if (message.authority !== 0) {
3349
+ writer.uint32(40).int32(message.authority);
3350
+ }
3287
3351
  return writer;
3288
3352
  },
3289
3353
  decode(input, length) {
@@ -3305,6 +3369,9 @@ export const MsgHidePost = {
3305
3369
  case 4:
3306
3370
  message.reasonText = reader.string();
3307
3371
  break;
3372
+ case 5:
3373
+ message.authority = reader.int32();
3374
+ break;
3308
3375
  default:
3309
3376
  reader.skipType(tag & 7);
3310
3377
  break;
@@ -3318,6 +3385,7 @@ export const MsgHidePost = {
3318
3385
  message.postId = object.postId !== undefined && object.postId !== null ? BigInt(object.postId.toString()) : BigInt(0);
3319
3386
  message.reasonCode = object.reasonCode !== undefined && object.reasonCode !== null ? BigInt(object.reasonCode.toString()) : BigInt(0);
3320
3387
  message.reasonText = object.reasonText ?? "";
3388
+ message.authority = object.authority ?? 0;
3321
3389
  return message;
3322
3390
  },
3323
3391
  fromAmino(object) {
@@ -3334,6 +3402,9 @@ export const MsgHidePost = {
3334
3402
  if (object.reason_text !== undefined && object.reason_text !== null) {
3335
3403
  message.reasonText = object.reason_text;
3336
3404
  }
3405
+ if (object.authority !== undefined && object.authority !== null) {
3406
+ message.authority = object.authority;
3407
+ }
3337
3408
  return message;
3338
3409
  },
3339
3410
  toAmino(message) {
@@ -3342,6 +3413,7 @@ export const MsgHidePost = {
3342
3413
  obj.post_id = message.postId !== BigInt(0) ? message.postId?.toString() : undefined;
3343
3414
  obj.reason_code = message.reasonCode !== BigInt(0) ? message.reasonCode?.toString() : undefined;
3344
3415
  obj.reason_text = message.reasonText === "" ? undefined : message.reasonText;
3416
+ obj.authority = message.authority === 0 ? undefined : message.authority;
3345
3417
  return obj;
3346
3418
  },
3347
3419
  fromAminoMsg(object) {
@@ -12340,3 +12340,168 @@ export const QueryRequiredInvitationStakeResponse = {
12340
12340
  };
12341
12341
  }
12342
12342
  };
12343
+ function createBaseQueryAuthorBondsByTypeRequest() {
12344
+ return {
12345
+ targetType: BigInt(0),
12346
+ pagination: undefined
12347
+ };
12348
+ }
12349
+ /**
12350
+ * QueryAuthorBondsByTypeRequest defines the QueryAuthorBondsByTypeRequest message.
12351
+ * @name QueryAuthorBondsByTypeRequest
12352
+ * @package sparkdream.rep.v1
12353
+ * @see proto type: sparkdream.rep.v1.QueryAuthorBondsByTypeRequest
12354
+ */
12355
+ export const QueryAuthorBondsByTypeRequest = {
12356
+ typeUrl: "/sparkdream.rep.v1.QueryAuthorBondsByTypeRequest",
12357
+ encode(message, writer = BinaryWriter.create()) {
12358
+ if (message.targetType !== BigInt(0)) {
12359
+ writer.uint32(8).uint64(message.targetType);
12360
+ }
12361
+ if (message.pagination !== undefined) {
12362
+ PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
12363
+ }
12364
+ return writer;
12365
+ },
12366
+ decode(input, length) {
12367
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
12368
+ let end = length === undefined ? reader.len : reader.pos + length;
12369
+ const message = createBaseQueryAuthorBondsByTypeRequest();
12370
+ while (reader.pos < end) {
12371
+ const tag = reader.uint32();
12372
+ switch (tag >>> 3) {
12373
+ case 1:
12374
+ message.targetType = reader.uint64();
12375
+ break;
12376
+ case 2:
12377
+ message.pagination = PageRequest.decode(reader, reader.uint32());
12378
+ break;
12379
+ default:
12380
+ reader.skipType(tag & 7);
12381
+ break;
12382
+ }
12383
+ }
12384
+ return message;
12385
+ },
12386
+ fromPartial(object) {
12387
+ const message = createBaseQueryAuthorBondsByTypeRequest();
12388
+ message.targetType = object.targetType !== undefined && object.targetType !== null ? BigInt(object.targetType.toString()) : BigInt(0);
12389
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
12390
+ return message;
12391
+ },
12392
+ fromAmino(object) {
12393
+ const message = createBaseQueryAuthorBondsByTypeRequest();
12394
+ if (object.target_type !== undefined && object.target_type !== null) {
12395
+ message.targetType = BigInt(object.target_type);
12396
+ }
12397
+ if (object.pagination !== undefined && object.pagination !== null) {
12398
+ message.pagination = PageRequest.fromAmino(object.pagination);
12399
+ }
12400
+ return message;
12401
+ },
12402
+ toAmino(message) {
12403
+ const obj = {};
12404
+ obj.target_type = message.targetType !== BigInt(0) ? message.targetType?.toString() : undefined;
12405
+ obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined;
12406
+ return obj;
12407
+ },
12408
+ fromAminoMsg(object) {
12409
+ return QueryAuthorBondsByTypeRequest.fromAmino(object.value);
12410
+ },
12411
+ fromProtoMsg(message) {
12412
+ return QueryAuthorBondsByTypeRequest.decode(message.value);
12413
+ },
12414
+ toProto(message) {
12415
+ return QueryAuthorBondsByTypeRequest.encode(message).finish();
12416
+ },
12417
+ toProtoMsg(message) {
12418
+ return {
12419
+ typeUrl: "/sparkdream.rep.v1.QueryAuthorBondsByTypeRequest",
12420
+ value: QueryAuthorBondsByTypeRequest.encode(message).finish()
12421
+ };
12422
+ }
12423
+ };
12424
+ function createBaseQueryAuthorBondsByTypeResponse() {
12425
+ return {
12426
+ bonds: [],
12427
+ pagination: undefined
12428
+ };
12429
+ }
12430
+ /**
12431
+ * QueryAuthorBondsByTypeResponse defines the QueryAuthorBondsByTypeResponse message.
12432
+ * @name QueryAuthorBondsByTypeResponse
12433
+ * @package sparkdream.rep.v1
12434
+ * @see proto type: sparkdream.rep.v1.QueryAuthorBondsByTypeResponse
12435
+ */
12436
+ export const QueryAuthorBondsByTypeResponse = {
12437
+ typeUrl: "/sparkdream.rep.v1.QueryAuthorBondsByTypeResponse",
12438
+ encode(message, writer = BinaryWriter.create()) {
12439
+ for (const v of message.bonds) {
12440
+ Stake.encode(v, writer.uint32(10).fork()).ldelim();
12441
+ }
12442
+ if (message.pagination !== undefined) {
12443
+ PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
12444
+ }
12445
+ return writer;
12446
+ },
12447
+ decode(input, length) {
12448
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
12449
+ let end = length === undefined ? reader.len : reader.pos + length;
12450
+ const message = createBaseQueryAuthorBondsByTypeResponse();
12451
+ while (reader.pos < end) {
12452
+ const tag = reader.uint32();
12453
+ switch (tag >>> 3) {
12454
+ case 1:
12455
+ message.bonds.push(Stake.decode(reader, reader.uint32()));
12456
+ break;
12457
+ case 2:
12458
+ message.pagination = PageResponse.decode(reader, reader.uint32());
12459
+ break;
12460
+ default:
12461
+ reader.skipType(tag & 7);
12462
+ break;
12463
+ }
12464
+ }
12465
+ return message;
12466
+ },
12467
+ fromPartial(object) {
12468
+ const message = createBaseQueryAuthorBondsByTypeResponse();
12469
+ message.bonds = object.bonds?.map(e => Stake.fromPartial(e)) || [];
12470
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
12471
+ return message;
12472
+ },
12473
+ fromAmino(object) {
12474
+ const message = createBaseQueryAuthorBondsByTypeResponse();
12475
+ message.bonds = object.bonds?.map(e => Stake.fromAmino(e)) || [];
12476
+ if (object.pagination !== undefined && object.pagination !== null) {
12477
+ message.pagination = PageResponse.fromAmino(object.pagination);
12478
+ }
12479
+ return message;
12480
+ },
12481
+ toAmino(message) {
12482
+ const obj = {};
12483
+ if (message.bonds) {
12484
+ obj.bonds = message.bonds.map(e => e ? Stake.toAmino(e) : undefined);
12485
+ }
12486
+ else {
12487
+ obj.bonds = message.bonds;
12488
+ }
12489
+ obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined;
12490
+ return obj;
12491
+ },
12492
+ fromAminoMsg(object) {
12493
+ return QueryAuthorBondsByTypeResponse.fromAmino(object.value);
12494
+ },
12495
+ fromProtoMsg(message) {
12496
+ return QueryAuthorBondsByTypeResponse.decode(message.value);
12497
+ },
12498
+ toProto(message) {
12499
+ return QueryAuthorBondsByTypeResponse.encode(message).finish();
12500
+ },
12501
+ toProtoMsg(message) {
12502
+ return {
12503
+ typeUrl: "/sparkdream.rep.v1.QueryAuthorBondsByTypeResponse",
12504
+ value: QueryAuthorBondsByTypeResponse.encode(message).finish()
12505
+ };
12506
+ }
12507
+ };
@@ -672,4 +672,15 @@ export class LCDQueryClient {
672
672
  const endpoint = `sparkdream/rep/v1/required_invitation_stake/${params.inviter}`;
673
673
  return await this.req.get(endpoint);
674
674
  };
675
+ /* AuthorBondsByType Queries a list of AuthorBondsByType items. */
676
+ authorBondsByType = async (params) => {
677
+ const options = {
678
+ params: {}
679
+ };
680
+ if (typeof params?.pagination !== "undefined") {
681
+ setPaginationParams(options, params.pagination);
682
+ }
683
+ const endpoint = `sparkdream/rep/v1/author_bonds_by_type/${params.targetType}`;
684
+ return await this.req.get(endpoint, options);
685
+ };
675
686
  }
@@ -1,6 +1,6 @@
1
1
  import { BinaryReader } from "../../../binary";
2
2
  import { createProtobufRpcClient } from "@cosmjs/stargate";
3
- import { QueryParamsRequest, QueryParamsResponse, QueryGetMemberRequest, QueryGetMemberResponse, QueryAllMemberRequest, QueryAllMemberResponse, QueryGetInvitationRequest, QueryGetInvitationResponse, QueryAllInvitationRequest, QueryAllInvitationResponse, QueryGetProjectRequest, QueryGetProjectResponse, QueryAllProjectRequest, QueryAllProjectResponse, QueryGetInitiativeRequest, QueryGetInitiativeResponse, QueryAllInitiativeRequest, QueryAllInitiativeResponse, QueryGetStakeRequest, QueryGetStakeResponse, QueryAllStakeRequest, QueryAllStakeResponse, QueryGetChallengeRequest, QueryGetChallengeResponse, QueryAllChallengeRequest, QueryAllChallengeResponse, QueryGetJuryReviewRequest, QueryGetJuryReviewResponse, QueryAllJuryReviewRequest, QueryAllJuryReviewResponse, QueryGetInterimRequest, QueryGetInterimResponse, QueryAllInterimRequest, QueryAllInterimResponse, QueryGetInterimTemplateRequest, QueryGetInterimTemplateResponse, QueryAllInterimTemplateRequest, QueryAllInterimTemplateResponse, QueryMembersByTrustLevelRequest, QueryMembersByTrustLevelResponse, QueryInvitationsByInviterRequest, QueryInvitationsByInviterResponse, QueryInterimsByAssigneeRequest, QueryInterimsByAssigneeResponse, QueryInterimsByTypeRequest, QueryInterimsByTypeResponse, QueryInterimsByReferenceRequest, QueryInterimsByReferenceResponse, QueryProjectsByCouncilRequest, QueryProjectsByCouncilResponse, QueryInitiativesByProjectRequest, QueryInitiativesByProjectResponse, QueryInitiativesByAssigneeRequest, QueryInitiativesByAssigneeResponse, QueryAvailableInitiativesRequest, QueryAvailableInitiativesResponse, QueryStakesByStakerRequest, QueryStakesByStakerResponse, QueryStakesByTargetRequest, QueryStakesByTargetResponse, QueryInitiativeConvictionRequest, QueryInitiativeConvictionResponse, QueryChallengesByInitiativeRequest, QueryChallengesByInitiativeResponse, QueryReputationRequest, QueryReputationResponse, QueryPendingStakeRewardsRequest, QueryPendingStakeRewardsResponse, QueryGetMemberStakePoolRequest, QueryGetMemberStakePoolResponse, QueryGetTagStakePoolRequest, QueryGetTagStakePoolResponse, QueryListTagStakePoolsRequest, QueryListTagStakePoolsResponse, QueryGetProjectStakeInfoRequest, QueryGetProjectStakeInfoResponse, QueryContentConvictionRequest, QueryContentConvictionResponse, QueryAuthorBondRequest, QueryAuthorBondResponse, QueryGetContentChallengeRequest, QueryGetContentChallengeResponse, QueryAllContentChallengeRequest, QueryAllContentChallengeResponse, QueryContentChallengesByTargetRequest, QueryContentChallengesByTargetResponse, QueryContentByInitiativeRequest, QueryContentByInitiativeResponse, QueryDreamSupplyStatsRequest, QueryDreamSupplyStatsResponse, QueryMintBurnRatioRequest, QueryMintBurnRatioResponse, QueryEffectiveApyRequest, QueryEffectiveApyResponse, QueryTreasuryStatusRequest, QueryTreasuryStatusResponse, QueryGetTagRequest, QueryGetTagResponse, QueryAllTagRequest, QueryAllTagResponse, QueryGetReservedTagRequest, QueryGetReservedTagResponse, QueryAllReservedTagRequest, QueryAllReservedTagResponse, QueryTagExistsRequest, QueryTagExistsResponse, QueryGetTagReportRequest, QueryGetTagReportResponse, QueryAllTagReportRequest, QueryAllTagReportResponse, QueryTagReportsRequest, QueryTagReportsResponse, QueryGetTagBudgetRequest, QueryGetTagBudgetResponse, QueryAllTagBudgetRequest, QueryAllTagBudgetResponse, QueryGetTagBudgetAwardRequest, QueryGetTagBudgetAwardResponse, QueryAllTagBudgetAwardRequest, QueryAllTagBudgetAwardResponse, QueryTagBudgetByTagRequest, QueryTagBudgetByTagResponse, QueryTagBudgetsRequest, QueryTagBudgetsResponse, QueryTagBudgetAwardsRequest, QueryTagBudgetAwardsResponse, QueryBondedRoleRequest, QueryBondedRoleResponse, QueryBondedRolesByTypeRequest, QueryBondedRolesByTypeResponse, QueryBondedRoleConfigRequest, QueryBondedRoleConfigResponse, QueryGetMemberReportRequest, QueryGetMemberReportResponse, QueryAllMemberReportRequest, QueryAllMemberReportResponse, QueryGetMemberWarningRequest, QueryGetMemberWarningResponse, QueryAllMemberWarningRequest, QueryAllMemberWarningResponse, QueryGetGovActionAppealRequest, QueryGetGovActionAppealResponse, QueryAllGovActionAppealRequest, QueryAllGovActionAppealResponse, QueryGetJuryParticipationRequest, QueryGetJuryParticipationResponse, QueryAllJuryParticipationRequest, QueryAllJuryParticipationResponse, QueryMemberReportsRequest, QueryMemberReportsResponse, QueryMemberWarningsRequest, QueryMemberWarningsResponse, QueryMemberStandingRequest, QueryMemberStandingResponse, QueryRequiredInvitationStakeRequest, QueryRequiredInvitationStakeResponse } from "./query";
3
+ import { QueryParamsRequest, QueryParamsResponse, QueryGetMemberRequest, QueryGetMemberResponse, QueryAllMemberRequest, QueryAllMemberResponse, QueryGetInvitationRequest, QueryGetInvitationResponse, QueryAllInvitationRequest, QueryAllInvitationResponse, QueryGetProjectRequest, QueryGetProjectResponse, QueryAllProjectRequest, QueryAllProjectResponse, QueryGetInitiativeRequest, QueryGetInitiativeResponse, QueryAllInitiativeRequest, QueryAllInitiativeResponse, QueryGetStakeRequest, QueryGetStakeResponse, QueryAllStakeRequest, QueryAllStakeResponse, QueryGetChallengeRequest, QueryGetChallengeResponse, QueryAllChallengeRequest, QueryAllChallengeResponse, QueryGetJuryReviewRequest, QueryGetJuryReviewResponse, QueryAllJuryReviewRequest, QueryAllJuryReviewResponse, QueryGetInterimRequest, QueryGetInterimResponse, QueryAllInterimRequest, QueryAllInterimResponse, QueryGetInterimTemplateRequest, QueryGetInterimTemplateResponse, QueryAllInterimTemplateRequest, QueryAllInterimTemplateResponse, QueryMembersByTrustLevelRequest, QueryMembersByTrustLevelResponse, QueryInvitationsByInviterRequest, QueryInvitationsByInviterResponse, QueryInterimsByAssigneeRequest, QueryInterimsByAssigneeResponse, QueryInterimsByTypeRequest, QueryInterimsByTypeResponse, QueryInterimsByReferenceRequest, QueryInterimsByReferenceResponse, QueryProjectsByCouncilRequest, QueryProjectsByCouncilResponse, QueryInitiativesByProjectRequest, QueryInitiativesByProjectResponse, QueryInitiativesByAssigneeRequest, QueryInitiativesByAssigneeResponse, QueryAvailableInitiativesRequest, QueryAvailableInitiativesResponse, QueryStakesByStakerRequest, QueryStakesByStakerResponse, QueryStakesByTargetRequest, QueryStakesByTargetResponse, QueryInitiativeConvictionRequest, QueryInitiativeConvictionResponse, QueryChallengesByInitiativeRequest, QueryChallengesByInitiativeResponse, QueryReputationRequest, QueryReputationResponse, QueryPendingStakeRewardsRequest, QueryPendingStakeRewardsResponse, QueryGetMemberStakePoolRequest, QueryGetMemberStakePoolResponse, QueryGetTagStakePoolRequest, QueryGetTagStakePoolResponse, QueryListTagStakePoolsRequest, QueryListTagStakePoolsResponse, QueryGetProjectStakeInfoRequest, QueryGetProjectStakeInfoResponse, QueryContentConvictionRequest, QueryContentConvictionResponse, QueryAuthorBondRequest, QueryAuthorBondResponse, QueryGetContentChallengeRequest, QueryGetContentChallengeResponse, QueryAllContentChallengeRequest, QueryAllContentChallengeResponse, QueryContentChallengesByTargetRequest, QueryContentChallengesByTargetResponse, QueryContentByInitiativeRequest, QueryContentByInitiativeResponse, QueryDreamSupplyStatsRequest, QueryDreamSupplyStatsResponse, QueryMintBurnRatioRequest, QueryMintBurnRatioResponse, QueryEffectiveApyRequest, QueryEffectiveApyResponse, QueryTreasuryStatusRequest, QueryTreasuryStatusResponse, QueryGetTagRequest, QueryGetTagResponse, QueryAllTagRequest, QueryAllTagResponse, QueryGetReservedTagRequest, QueryGetReservedTagResponse, QueryAllReservedTagRequest, QueryAllReservedTagResponse, QueryTagExistsRequest, QueryTagExistsResponse, QueryGetTagReportRequest, QueryGetTagReportResponse, QueryAllTagReportRequest, QueryAllTagReportResponse, QueryTagReportsRequest, QueryTagReportsResponse, QueryGetTagBudgetRequest, QueryGetTagBudgetResponse, QueryAllTagBudgetRequest, QueryAllTagBudgetResponse, QueryGetTagBudgetAwardRequest, QueryGetTagBudgetAwardResponse, QueryAllTagBudgetAwardRequest, QueryAllTagBudgetAwardResponse, QueryTagBudgetByTagRequest, QueryTagBudgetByTagResponse, QueryTagBudgetsRequest, QueryTagBudgetsResponse, QueryTagBudgetAwardsRequest, QueryTagBudgetAwardsResponse, QueryBondedRoleRequest, QueryBondedRoleResponse, QueryBondedRolesByTypeRequest, QueryBondedRolesByTypeResponse, QueryBondedRoleConfigRequest, QueryBondedRoleConfigResponse, QueryGetMemberReportRequest, QueryGetMemberReportResponse, QueryAllMemberReportRequest, QueryAllMemberReportResponse, QueryGetMemberWarningRequest, QueryGetMemberWarningResponse, QueryAllMemberWarningRequest, QueryAllMemberWarningResponse, QueryGetGovActionAppealRequest, QueryGetGovActionAppealResponse, QueryAllGovActionAppealRequest, QueryAllGovActionAppealResponse, QueryGetJuryParticipationRequest, QueryGetJuryParticipationResponse, QueryAllJuryParticipationRequest, QueryAllJuryParticipationResponse, QueryMemberReportsRequest, QueryMemberReportsResponse, QueryMemberWarningsRequest, QueryMemberWarningsResponse, QueryMemberStandingRequest, QueryMemberStandingResponse, QueryRequiredInvitationStakeRequest, QueryRequiredInvitationStakeResponse, QueryAuthorBondsByTypeRequest, QueryAuthorBondsByTypeResponse } from "./query";
4
4
  export class QueryClientImpl {
5
5
  rpc;
6
6
  constructor(rpc) {
@@ -523,6 +523,12 @@ export class QueryClientImpl {
523
523
  const promise = this.rpc.request("sparkdream.rep.v1.Query", "RequiredInvitationStake", data);
524
524
  return promise.then(data => QueryRequiredInvitationStakeResponse.decode(new BinaryReader(data)));
525
525
  };
526
+ /* AuthorBondsByType Queries a list of AuthorBondsByType items. */
527
+ authorBondsByType = async (request) => {
528
+ const data = QueryAuthorBondsByTypeRequest.encode(request).finish();
529
+ const promise = this.rpc.request("sparkdream.rep.v1.Query", "AuthorBondsByType", data);
530
+ return promise.then(data => QueryAuthorBondsByTypeResponse.decode(new BinaryReader(data)));
531
+ };
526
532
  }
527
533
  export const createRpcQueryExtension = (base) => {
528
534
  const rpc = createProtobufRpcClient(base);
@@ -761,6 +767,9 @@ export const createRpcQueryExtension = (base) => {
761
767
  },
762
768
  requiredInvitationStake(request) {
763
769
  return queryService.requiredInvitationStake(request);
770
+ },
771
+ authorBondsByType(request) {
772
+ return queryService.authorBondsByType(request);
764
773
  }
765
774
  };
766
775
  };
@@ -20,10 +20,16 @@ export var StakeTargetType;
20
20
  StakeTargetType[StakeTargetType["STAKE_TARGET_COLLECTION_CONTENT"] = 6] = "STAKE_TARGET_COLLECTION_CONTENT";
21
21
  /** STAKE_TARGET_BLOG_AUTHOR_BOND - Author bonds (no DREAM rewards, slashable on moderation) */
22
22
  StakeTargetType[StakeTargetType["STAKE_TARGET_BLOG_AUTHOR_BOND"] = 7] = "STAKE_TARGET_BLOG_AUTHOR_BOND";
23
- /** STAKE_TARGET_FORUM_AUTHOR_BOND - Author bond on x/forum content */
23
+ /** STAKE_TARGET_FORUM_AUTHOR_BOND - Author bond on x/forum content (posts and replies share one id space) */
24
24
  StakeTargetType[StakeTargetType["STAKE_TARGET_FORUM_AUTHOR_BOND"] = 8] = "STAKE_TARGET_FORUM_AUTHOR_BOND";
25
25
  /** STAKE_TARGET_COLLECTION_AUTHOR_BOND - Author bond on x/collect content */
26
26
  StakeTargetType[StakeTargetType["STAKE_TARGET_COLLECTION_AUTHOR_BOND"] = 9] = "STAKE_TARGET_COLLECTION_AUTHOR_BOND";
27
+ /**
28
+ * STAKE_TARGET_BLOG_REPLY_AUTHOR_BOND - Blog replies have their own id sequence independent of blog posts, so
29
+ * reply bonds need a distinct target type: sharing BLOG_AUTHOR_BOND would
30
+ * make post N and reply N collide (one-bond-per-target, queries, challenges).
31
+ */
32
+ StakeTargetType[StakeTargetType["STAKE_TARGET_BLOG_REPLY_AUTHOR_BOND"] = 10] = "STAKE_TARGET_BLOG_REPLY_AUTHOR_BOND";
27
33
  StakeTargetType[StakeTargetType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
28
34
  })(StakeTargetType || (StakeTargetType = {}));
29
35
  export const StakeTargetTypeAmino = StakeTargetType;
@@ -59,6 +65,9 @@ export function stakeTargetTypeFromJSON(object) {
59
65
  case 9:
60
66
  case "STAKE_TARGET_COLLECTION_AUTHOR_BOND":
61
67
  return StakeTargetType.STAKE_TARGET_COLLECTION_AUTHOR_BOND;
68
+ case 10:
69
+ case "STAKE_TARGET_BLOG_REPLY_AUTHOR_BOND":
70
+ return StakeTargetType.STAKE_TARGET_BLOG_REPLY_AUTHOR_BOND;
62
71
  case -1:
63
72
  case "UNRECOGNIZED":
64
73
  default:
@@ -87,6 +96,8 @@ export function stakeTargetTypeToJSON(object) {
87
96
  return "STAKE_TARGET_FORUM_AUTHOR_BOND";
88
97
  case StakeTargetType.STAKE_TARGET_COLLECTION_AUTHOR_BOND:
89
98
  return "STAKE_TARGET_COLLECTION_AUTHOR_BOND";
99
+ case StakeTargetType.STAKE_TARGET_BLOG_REPLY_AUTHOR_BOND:
100
+ return "STAKE_TARGET_BLOG_REPLY_AUTHOR_BOND";
90
101
  case StakeTargetType.UNRECOGNIZED:
91
102
  default:
92
103
  return "UNRECOGNIZED";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sparkdreamnft/sparkdreamjs",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "author": "kob <kob@sparkdream.io>",
5
5
  "description": "Spark Dream blockchain TypeScript library",
6
6
  "main": "index.js",
@@ -8305,6 +8305,10 @@ export declare namespace sparkdream {
8305
8305
  toProto(message: _230.PostConvictionStake): Uint8Array;
8306
8306
  toProtoMsg(message: _230.PostConvictionStake): _230.PostConvictionStakeProtoMsg;
8307
8307
  };
8308
+ hideAuthorityFromJSON(object: any): _229.HideAuthority;
8309
+ hideAuthorityToJSON(object: _229.HideAuthority): string;
8310
+ HideAuthority: typeof _229.HideAuthority;
8311
+ HideAuthorityAmino: typeof _229.HideAuthority;
8308
8312
  MsgUpdateParams: {
8309
8313
  typeUrl: string;
8310
8314
  aminoType: string;
@@ -12358,6 +12362,7 @@ export declare namespace sparkdream {
12358
12362
  memberWarnings(request: _272.QueryMemberWarningsRequest): Promise<_272.QueryMemberWarningsResponse>;
12359
12363
  memberStanding(request: _272.QueryMemberStandingRequest): Promise<_272.QueryMemberStandingResponse>;
12360
12364
  requiredInvitationStake(request: _272.QueryRequiredInvitationStakeRequest): Promise<_272.QueryRequiredInvitationStakeResponse>;
12365
+ authorBondsByType(request: _272.QueryAuthorBondsByTypeRequest): Promise<_272.QueryAuthorBondsByTypeResponse>;
12361
12366
  };
12362
12367
  LCDQueryClient: typeof _546.LCDQueryClient;
12363
12368
  registry: ReadonlyArray<[string, import("..").TelescopeGeneratedType<any, any, any>]>;
@@ -16393,6 +16398,30 @@ export declare namespace sparkdream {
16393
16398
  toProto(message: _272.QueryRequiredInvitationStakeResponse): Uint8Array;
16394
16399
  toProtoMsg(message: _272.QueryRequiredInvitationStakeResponse): _272.QueryRequiredInvitationStakeResponseProtoMsg;
16395
16400
  };
16401
+ QueryAuthorBondsByTypeRequest: {
16402
+ typeUrl: string;
16403
+ encode(message: _272.QueryAuthorBondsByTypeRequest, writer?: import("..").BinaryWriter): import("..").BinaryWriter;
16404
+ decode(input: import("..").BinaryReader | Uint8Array, length?: number): _272.QueryAuthorBondsByTypeRequest;
16405
+ fromPartial(object: import("../helpers").DeepPartial<_272.QueryAuthorBondsByTypeRequest>): _272.QueryAuthorBondsByTypeRequest;
16406
+ fromAmino(object: _272.QueryAuthorBondsByTypeRequestAmino): _272.QueryAuthorBondsByTypeRequest;
16407
+ toAmino(message: _272.QueryAuthorBondsByTypeRequest): _272.QueryAuthorBondsByTypeRequestAmino;
16408
+ fromAminoMsg(object: _272.QueryAuthorBondsByTypeRequestAminoMsg): _272.QueryAuthorBondsByTypeRequest;
16409
+ fromProtoMsg(message: _272.QueryAuthorBondsByTypeRequestProtoMsg): _272.QueryAuthorBondsByTypeRequest;
16410
+ toProto(message: _272.QueryAuthorBondsByTypeRequest): Uint8Array;
16411
+ toProtoMsg(message: _272.QueryAuthorBondsByTypeRequest): _272.QueryAuthorBondsByTypeRequestProtoMsg;
16412
+ };
16413
+ QueryAuthorBondsByTypeResponse: {
16414
+ typeUrl: string;
16415
+ encode(message: _272.QueryAuthorBondsByTypeResponse, writer?: import("..").BinaryWriter): import("..").BinaryWriter;
16416
+ decode(input: import("..").BinaryReader | Uint8Array, length?: number): _272.QueryAuthorBondsByTypeResponse;
16417
+ fromPartial(object: import("../helpers").DeepPartial<_272.QueryAuthorBondsByTypeResponse>): _272.QueryAuthorBondsByTypeResponse;
16418
+ fromAmino(object: _272.QueryAuthorBondsByTypeResponseAmino): _272.QueryAuthorBondsByTypeResponse;
16419
+ toAmino(message: _272.QueryAuthorBondsByTypeResponse): _272.QueryAuthorBondsByTypeResponseAmino;
16420
+ fromAminoMsg(object: _272.QueryAuthorBondsByTypeResponseAminoMsg): _272.QueryAuthorBondsByTypeResponse;
16421
+ fromProtoMsg(message: _272.QueryAuthorBondsByTypeResponseProtoMsg): _272.QueryAuthorBondsByTypeResponse;
16422
+ toProto(message: _272.QueryAuthorBondsByTypeResponse): Uint8Array;
16423
+ toProtoMsg(message: _272.QueryAuthorBondsByTypeResponse): _272.QueryAuthorBondsByTypeResponseProtoMsg;
16424
+ };
16396
16425
  projectCategoryFromJSON(object: any): _271.ProjectCategory;
16397
16426
  projectCategoryToJSON(object: _271.ProjectCategory): string;
16398
16427
  projectStatusFromJSON(object: any): _271.ProjectStatus;
@@ -25416,6 +25445,7 @@ export declare namespace sparkdream {
25416
25445
  memberWarnings(request: _272.QueryMemberWarningsRequest): Promise<_272.QueryMemberWarningsResponse>;
25417
25446
  memberStanding(request: _272.QueryMemberStandingRequest): Promise<_272.QueryMemberStandingResponse>;
25418
25447
  requiredInvitationStake(request: _272.QueryRequiredInvitationStakeRequest): Promise<_272.QueryRequiredInvitationStakeResponse>;
25448
+ authorBondsByType(request: _272.QueryAuthorBondsByTypeRequest): Promise<_272.QueryAuthorBondsByTypeResponse>;
25419
25449
  };
25420
25450
  };
25421
25451
  reveal: {
@@ -39,6 +39,13 @@ export interface GenesisState {
39
39
  threadFollowMap: ThreadFollow[];
40
40
  threadFollowCountMap: ThreadFollowCount[];
41
41
  archiveMetadataMap: ArchiveMetadata[];
42
+ /**
43
+ * post_count persists the PostSeq counter (next post ID) across
44
+ * export/import. Post IDs start at 1; 0 is reserved (parent_id=0 means
45
+ * "no parent"). InitGenesis floors the restored value above every
46
+ * imported post ID, so legacy exports without this field stay safe.
47
+ */
48
+ postCount: bigint;
42
49
  }
43
50
  export interface GenesisStateProtoMsg {
44
51
  typeUrl: "/sparkdream.forum.v1.GenesisState";
@@ -69,6 +76,13 @@ export interface GenesisStateAmino {
69
76
  thread_follow_map?: ThreadFollowAmino[];
70
77
  thread_follow_count_map?: ThreadFollowCountAmino[];
71
78
  archive_metadata_map?: ArchiveMetadataAmino[];
79
+ /**
80
+ * post_count persists the PostSeq counter (next post ID) across
81
+ * export/import. Post IDs start at 1; 0 is reserved (parent_id=0 means
82
+ * "no parent"). InitGenesis floors the restored value above every
83
+ * imported post ID, so legacy exports without this field stay safe.
84
+ */
85
+ post_count?: string;
72
86
  }
73
87
  export interface GenesisStateAminoMsg {
74
88
  type: "/sparkdream.forum.v1.GenesisState";
@@ -33,7 +33,8 @@ function createBaseGenesisState() {
33
33
  threadMetadataMap: [],
34
34
  threadFollowMap: [],
35
35
  threadFollowCountMap: [],
36
- archiveMetadataMap: []
36
+ archiveMetadataMap: [],
37
+ postCount: BigInt(0)
37
38
  };
38
39
  }
39
40
  /**
@@ -90,6 +91,9 @@ exports.GenesisState = {
90
91
  for (const v of message.archiveMetadataMap) {
91
92
  archive_metadata_1.ArchiveMetadata.encode(v, writer.uint32(122).fork()).ldelim();
92
93
  }
94
+ if (message.postCount !== BigInt(0)) {
95
+ writer.uint32(128).uint64(message.postCount);
96
+ }
93
97
  return writer;
94
98
  },
95
99
  decode(input, length) {
@@ -144,6 +148,9 @@ exports.GenesisState = {
144
148
  case 15:
145
149
  message.archiveMetadataMap.push(archive_metadata_1.ArchiveMetadata.decode(reader, reader.uint32()));
146
150
  break;
151
+ case 16:
152
+ message.postCount = reader.uint64();
153
+ break;
147
154
  default:
148
155
  reader.skipType(tag & 7);
149
156
  break;
@@ -168,6 +175,7 @@ exports.GenesisState = {
168
175
  message.threadFollowMap = object.threadFollowMap?.map(e => thread_follow_1.ThreadFollow.fromPartial(e)) || [];
169
176
  message.threadFollowCountMap = object.threadFollowCountMap?.map(e => thread_follow_count_1.ThreadFollowCount.fromPartial(e)) || [];
170
177
  message.archiveMetadataMap = object.archiveMetadataMap?.map(e => archive_metadata_1.ArchiveMetadata.fromPartial(e)) || [];
178
+ message.postCount = object.postCount !== undefined && object.postCount !== null ? BigInt(object.postCount.toString()) : BigInt(0);
171
179
  return message;
172
180
  },
173
181
  fromAmino(object) {
@@ -191,6 +199,9 @@ exports.GenesisState = {
191
199
  message.threadFollowMap = object.thread_follow_map?.map(e => thread_follow_1.ThreadFollow.fromAmino(e)) || [];
192
200
  message.threadFollowCountMap = object.thread_follow_count_map?.map(e => thread_follow_count_1.ThreadFollowCount.fromAmino(e)) || [];
193
201
  message.archiveMetadataMap = object.archive_metadata_map?.map(e => archive_metadata_1.ArchiveMetadata.fromAmino(e)) || [];
202
+ if (object.post_count !== undefined && object.post_count !== null) {
203
+ message.postCount = BigInt(object.post_count);
204
+ }
194
205
  return message;
195
206
  },
196
207
  toAmino(message) {
@@ -275,6 +286,7 @@ exports.GenesisState = {
275
286
  else {
276
287
  obj.archive_metadata_map = message.archiveMetadataMap;
277
288
  }
289
+ obj.post_count = message.postCount !== BigInt(0) ? message.postCount?.toString() : undefined;
278
290
  return obj;
279
291
  },
280
292
  fromAminoMsg(object) {
@@ -2,6 +2,37 @@ import { Params, ParamsAmino, ForumOperationalParams, ForumOperationalParamsAmin
2
2
  import { ContentType } from "../../common/v1/content_type";
3
3
  import { BinaryReader, BinaryWriter } from "../../../binary";
4
4
  import { DeepPartial } from "../../../helpers";
5
+ /**
6
+ * HideAuthority selects which authority the caller of MsgHidePost is invoking.
7
+ * It disambiguates the case where an account is BOTH a bonded forum sentinel
8
+ * and a Commons Operations Committee member: without it the handler would
9
+ * silently pick the council (gov) path — a strictly more powerful, less
10
+ * accountable action chosen by accident. See
11
+ * docs/HANDOFF_HIDE_AUTHORITY_DISAMBIGUATION.md.
12
+ */
13
+ export declare enum HideAuthority {
14
+ /**
15
+ * HIDE_AUTHORITY_AUTO - AUTO (default, back-compat): resolve to the sentinel path whenever the
16
+ * account holds an eligible sentinel bond (NORMAL/RECOVERY), else fall
17
+ * through to the council path if council-authorized, else error. AUTO
18
+ * prefers the accountable (bonded + author-appealable) sentinel path.
19
+ */
20
+ HIDE_AUTHORITY_AUTO = 0,
21
+ /**
22
+ * HIDE_AUTHORITY_SENTINEL - SENTINEL: force the sentinel path; error if the account is not an
23
+ * eligible sentinel (no silent fallback to council).
24
+ */
25
+ HIDE_AUTHORITY_SENTINEL = 1,
26
+ /**
27
+ * HIDE_AUTHORITY_COUNCIL - COUNCIL: force the council (gov-authority) path; error if the account is
28
+ * not council-authorized. The deliberate "act as committee" choice.
29
+ */
30
+ HIDE_AUTHORITY_COUNCIL = 2,
31
+ UNRECOGNIZED = -1
32
+ }
33
+ export declare const HideAuthorityAmino: typeof HideAuthority;
34
+ export declare function hideAuthorityFromJSON(object: any): HideAuthority;
35
+ export declare function hideAuthorityToJSON(object: HideAuthority): string;
5
36
  /**
6
37
  * MsgUpdateParams is the Msg/UpdateParams request type.
7
38
  * @name MsgUpdateParams
@@ -1197,6 +1228,11 @@ export interface MsgHidePost {
1197
1228
  postId: bigint;
1198
1229
  reasonCode: bigint;
1199
1230
  reasonText: string;
1231
+ /**
1232
+ * authority selects which moderation authority the caller is invoking.
1233
+ * Defaults to AUTO for backward compatibility.
1234
+ */
1235
+ authority: HideAuthority;
1200
1236
  }
1201
1237
  export interface MsgHidePostProtoMsg {
1202
1238
  typeUrl: "/sparkdream.forum.v1.MsgHidePost";
@@ -1213,6 +1249,11 @@ export interface MsgHidePostAmino {
1213
1249
  post_id?: string;
1214
1250
  reason_code?: string;
1215
1251
  reason_text?: string;
1252
+ /**
1253
+ * authority selects which moderation authority the caller is invoking.
1254
+ * Defaults to AUTO for backward compatibility.
1255
+ */
1256
+ authority?: HideAuthority;
1216
1257
  }
1217
1258
  export interface MsgHidePostAminoMsg {
1218
1259
  type: "sparkdream/x/forum/MsgHidePost";