@sparkdreamnft/sparkdreamjs 0.0.34 → 0.0.36
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.
- package/akash/bundle.d.ts +134 -134
- package/akash/bundle.js +150 -150
- package/cosmos/bundle.d.ts +160 -160
- package/cosmos/bundle.js +182 -182
- package/esm/akash/bundle.js +150 -150
- package/esm/cosmos/bundle.js +182 -182
- package/esm/ibc/bundle.js +116 -116
- package/esm/sparkdream/bundle.js +305 -301
- package/esm/sparkdream/rep/v1/{interim_template.js → acceptance_criteria.js} +13 -123
- package/esm/sparkdream/rep/v1/accountability.js +11 -0
- package/esm/sparkdream/rep/v1/bonded_role.js +13 -0
- package/esm/sparkdream/rep/v1/challenge.js +21 -9
- package/esm/sparkdream/rep/v1/genesis.js +198 -59
- package/esm/sparkdream/rep/v1/initiative.js +170 -47
- package/esm/sparkdream/rep/v1/initiative_review.js +179 -0
- package/esm/sparkdream/rep/v1/jury_participation.js +39 -9
- package/esm/sparkdream/rep/v1/jury_review.js +40 -1
- package/esm/sparkdream/rep/v1/member_report.js +8 -8
- package/esm/sparkdream/rep/v1/member_warning.js +2 -2
- package/esm/sparkdream/rep/v1/params.js +614 -2
- package/esm/sparkdream/rep/v1/query.js +4900 -3425
- package/esm/sparkdream/rep/v1/query.lcd.js +77 -16
- package/esm/sparkdream/rep/v1/query.rpc.Query.js +85 -21
- package/esm/sparkdream/rep/v1/review_bounty.js +215 -0
- package/esm/sparkdream/rep/v1/tag_report.js +2 -2
- package/esm/sparkdream/rep/v1/tx.js +2610 -1442
- package/esm/sparkdream/rep/v1/tx.registry.js +128 -2
- package/esm/sparkdream/rep/v1/tx.rpc.msg.js +43 -1
- package/esm/tendermint/bundle.js +18 -18
- package/ibc/bundle.d.ts +99 -99
- package/ibc/bundle.js +116 -116
- package/package.json +1 -1
- package/sparkdream/bundle.d.ts +9671 -9159
- package/sparkdream/bundle.js +305 -301
- package/sparkdream/rep/v1/{interim_template.d.ts → acceptance_criteria.d.ts} +39 -52
- package/sparkdream/rep/v1/{interim_template.js → acceptance_criteria.js} +14 -124
- package/sparkdream/rep/v1/accountability.d.ts +6 -0
- package/sparkdream/rep/v1/accountability.js +11 -0
- package/sparkdream/rep/v1/bonded_role.d.ts +8 -0
- package/sparkdream/rep/v1/bonded_role.js +13 -0
- package/sparkdream/rep/v1/challenge.d.ts +14 -0
- package/sparkdream/rep/v1/challenge.js +21 -9
- package/sparkdream/rep/v1/genesis.d.ts +100 -3
- package/sparkdream/rep/v1/genesis.js +199 -60
- package/sparkdream/rep/v1/initiative.d.ts +120 -2
- package/sparkdream/rep/v1/initiative.js +173 -48
- package/sparkdream/rep/v1/initiative_review.d.ts +121 -0
- package/sparkdream/rep/v1/initiative_review.js +182 -0
- package/sparkdream/rep/v1/jury_participation.d.ts +89 -5
- package/sparkdream/rep/v1/jury_participation.js +39 -9
- package/sparkdream/rep/v1/jury_review.d.ts +38 -0
- package/sparkdream/rep/v1/jury_review.js +40 -1
- package/sparkdream/rep/v1/member_report.js +8 -8
- package/sparkdream/rep/v1/member_warning.js +2 -2
- package/sparkdream/rep/v1/params.d.ts +668 -16
- package/sparkdream/rep/v1/params.js +614 -2
- package/sparkdream/rep/v1/query.d.ts +1214 -264
- package/sparkdream/rep/v1/query.js +4904 -3429
- package/sparkdream/rep/v1/query.lcd.d.ts +9 -3
- package/sparkdream/rep/v1/query.lcd.js +77 -16
- package/sparkdream/rep/v1/query.rpc.Query.d.ts +55 -9
- package/sparkdream/rep/v1/query.rpc.Query.js +84 -20
- package/sparkdream/rep/v1/review_bounty.d.ts +168 -0
- package/sparkdream/rep/v1/review_bounty.js +218 -0
- package/sparkdream/rep/v1/tag_report.js +2 -2
- package/sparkdream/rep/v1/tx.d.ts +816 -9
- package/sparkdream/rep/v1/tx.js +2612 -1443
- package/sparkdream/rep/v1/tx.registry.d.ts +85 -1
- package/sparkdream/rep/v1/tx.registry.js +127 -1
- package/sparkdream/rep/v1/tx.rpc.msg.d.ts +20 -1
- package/sparkdream/rep/v1/tx.rpc.msg.js +42 -0
- package/sparkdream/rpc.query.d.ts +8 -2
- package/tendermint/bundle.d.ts +844 -844
- package/tendermint/bundle.js +18 -18
|
@@ -138,31 +138,39 @@ export class LCDQueryClient {
|
|
|
138
138
|
const endpoint = `sparkdream/rep/v1/jury_review`;
|
|
139
139
|
return await this.req.get(endpoint, options);
|
|
140
140
|
};
|
|
141
|
-
/*
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
/* ListInterim defines the ListInterim RPC. */
|
|
147
|
-
listInterim = async (params = {
|
|
148
|
-
pagination: undefined
|
|
149
|
-
}) => {
|
|
141
|
+
/* JuryReviewsByJuror lists the reviews a juror has been seated on. This is
|
|
142
|
+
how a juror (or their monitoring client) discovers an outstanding summons:
|
|
143
|
+
jury duty pays but is infrequent, and there is no other way to ask "am I
|
|
144
|
+
seated" short of paging through every review ever created. */
|
|
145
|
+
juryReviewsByJuror = async (params) => {
|
|
150
146
|
const options = {
|
|
151
147
|
params: {}
|
|
152
148
|
};
|
|
149
|
+
if (typeof params?.pendingOnly !== "undefined") {
|
|
150
|
+
options.params.pending_only = params.pendingOnly;
|
|
151
|
+
}
|
|
153
152
|
if (typeof params?.pagination !== "undefined") {
|
|
154
153
|
setPaginationParams(options, params.pagination);
|
|
155
154
|
}
|
|
156
|
-
const endpoint = `sparkdream/rep/v1/
|
|
155
|
+
const endpoint = `sparkdream/rep/v1/jury_reviews_by_juror/${params.juror}`;
|
|
157
156
|
return await this.req.get(endpoint, options);
|
|
158
157
|
};
|
|
159
|
-
/*
|
|
160
|
-
|
|
161
|
-
|
|
158
|
+
/* RoleActivity returns a bonded role holder's shared accountability record —
|
|
159
|
+
per-kind action counters, verdict streaks, overturn cooldown and the
|
|
160
|
+
accuracy ring. x/forum projects the sentinel view of this; reviewers and
|
|
161
|
+
curators had no way to inspect theirs at all, which matters because the
|
|
162
|
+
record gates pay and drives demotion. */
|
|
163
|
+
roleActivity = async (params) => {
|
|
164
|
+
const endpoint = `sparkdream/rep/v1/role_activity/${params.roleType}/${params.address}`;
|
|
162
165
|
return await this.req.get(endpoint);
|
|
163
166
|
};
|
|
164
|
-
/*
|
|
165
|
-
|
|
167
|
+
/* ListInterim Queries a list of Interim items. */
|
|
168
|
+
getInterim = async (params) => {
|
|
169
|
+
const endpoint = `sparkdream/rep/v1/interim/${params.id}`;
|
|
170
|
+
return await this.req.get(endpoint);
|
|
171
|
+
};
|
|
172
|
+
/* ListInterim defines the ListInterim RPC. */
|
|
173
|
+
listInterim = async (params = {
|
|
166
174
|
pagination: undefined
|
|
167
175
|
}) => {
|
|
168
176
|
const options = {
|
|
@@ -171,7 +179,7 @@ export class LCDQueryClient {
|
|
|
171
179
|
if (typeof params?.pagination !== "undefined") {
|
|
172
180
|
setPaginationParams(options, params.pagination);
|
|
173
181
|
}
|
|
174
|
-
const endpoint = `sparkdream/rep/v1/
|
|
182
|
+
const endpoint = `sparkdream/rep/v1/interim`;
|
|
175
183
|
return await this.req.get(endpoint, options);
|
|
176
184
|
};
|
|
177
185
|
/* MembersByTrustLevel Queries a list of MembersByTrustLevel items. */
|
|
@@ -271,6 +279,34 @@ export class LCDQueryClient {
|
|
|
271
279
|
const endpoint = `sparkdream/rep/v1/initiatives_by_assignee/${params.assignee}`;
|
|
272
280
|
return await this.req.get(endpoint, options);
|
|
273
281
|
};
|
|
282
|
+
/* InitiativesByCreator Queries a list of InitiativesByCreator items. */
|
|
283
|
+
initiativesByCreator = async (params) => {
|
|
284
|
+
const options = {
|
|
285
|
+
params: {}
|
|
286
|
+
};
|
|
287
|
+
if (typeof params?.pagination !== "undefined") {
|
|
288
|
+
setPaginationParams(options, params.pagination);
|
|
289
|
+
}
|
|
290
|
+
if (typeof params?.sortBy !== "undefined") {
|
|
291
|
+
options.params.sort_by = params.sortBy;
|
|
292
|
+
}
|
|
293
|
+
const endpoint = `sparkdream/rep/v1/initiatives_by_creator/${params.creator}`;
|
|
294
|
+
return await this.req.get(endpoint, options);
|
|
295
|
+
};
|
|
296
|
+
/* ProjectsByCreator Queries a list of ProjectsByCreator items. */
|
|
297
|
+
projectsByCreator = async (params) => {
|
|
298
|
+
const options = {
|
|
299
|
+
params: {}
|
|
300
|
+
};
|
|
301
|
+
if (typeof params?.pagination !== "undefined") {
|
|
302
|
+
setPaginationParams(options, params.pagination);
|
|
303
|
+
}
|
|
304
|
+
if (typeof params?.sortBy !== "undefined") {
|
|
305
|
+
options.params.sort_by = params.sortBy;
|
|
306
|
+
}
|
|
307
|
+
const endpoint = `sparkdream/rep/v1/projects_by_creator/${params.creator}`;
|
|
308
|
+
return await this.req.get(endpoint, options);
|
|
309
|
+
};
|
|
274
310
|
/* AvailableInitiatives Queries a list of AvailableInitiatives items. */
|
|
275
311
|
availableInitiatives = async (params) => {
|
|
276
312
|
const options = {
|
|
@@ -695,4 +731,29 @@ export class LCDQueryClient {
|
|
|
695
731
|
const endpoint = `sparkdream/rep/v1/author_bonds_by_type/${params.targetType}`;
|
|
696
732
|
return await this.req.get(endpoint, options);
|
|
697
733
|
};
|
|
734
|
+
/* InitiativeReviews returns the bonded reviewers' verdicts on one initiative. */
|
|
735
|
+
initiativeReviews = async (params) => {
|
|
736
|
+
const endpoint = `sparkdream/rep/v1/initiative_reviews/${params.initiativeId}`;
|
|
737
|
+
return await this.req.get(endpoint);
|
|
738
|
+
};
|
|
739
|
+
/* ReviewBounty returns the DREAM escrowed against an initiative to attract
|
|
740
|
+
reviewers, and when each contribution becomes reclaimable. */
|
|
741
|
+
reviewBounty = async (params) => {
|
|
742
|
+
const endpoint = `sparkdream/rep/v1/review_bounty/${params.initiativeId}`;
|
|
743
|
+
return await this.req.get(endpoint);
|
|
744
|
+
};
|
|
745
|
+
/* EscalatedReviews lists the review rounds awaiting an Operations Committee
|
|
746
|
+
decision. */
|
|
747
|
+
escalatedReviews = async (_params = {}) => {
|
|
748
|
+
const endpoint = `sparkdream/rep/v1/escalated_reviews`;
|
|
749
|
+
return await this.req.get(endpoint);
|
|
750
|
+
};
|
|
751
|
+
/* RoleRewardPools reports the funding state of every bonded-role SPARK
|
|
752
|
+
reward pool, plus how much of today's community-pool allowance x/rep has
|
|
753
|
+
already drawn. Automatic funding is otherwise invisible: the pools are
|
|
754
|
+
derived sub-addresses with no other read surface. */
|
|
755
|
+
roleRewardPools = async (_params = {}) => {
|
|
756
|
+
const endpoint = `sparkdream/rep/v1/role_reward_pools`;
|
|
757
|
+
return await this.req.get(endpoint);
|
|
758
|
+
};
|
|
698
759
|
}
|
|
@@ -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,
|
|
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, QueryJuryReviewsByJurorRequest, QueryJuryReviewsByJurorResponse, QueryRoleActivityRequest, QueryRoleActivityResponse, QueryGetInterimRequest, QueryGetInterimResponse, QueryAllInterimRequest, QueryAllInterimResponse, QueryMembersByTrustLevelRequest, QueryMembersByTrustLevelResponse, QueryInvitationsByInviterRequest, QueryInvitationsByInviterResponse, QueryInterimsByAssigneeRequest, QueryInterimsByAssigneeResponse, QueryInterimsByTypeRequest, QueryInterimsByTypeResponse, QueryInterimsByReferenceRequest, QueryInterimsByReferenceResponse, QueryProjectsByCouncilRequest, QueryProjectsByCouncilResponse, QueryInitiativesByProjectRequest, QueryInitiativesByProjectResponse, QueryInitiativesByAssigneeRequest, QueryInitiativesByAssigneeResponse, QueryInitiativesByCreatorRequest, QueryInitiativesByCreatorResponse, QueryProjectsByCreatorRequest, QueryProjectsByCreatorResponse, 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, QueryInitiativeReviewsRequest, QueryInitiativeReviewsResponse, QueryReviewBountyRequest, QueryReviewBountyResponse, QueryEscalatedReviewsRequest, QueryEscalatedReviewsResponse, QueryRoleRewardPoolsRequest, QueryRoleRewardPoolsResponse } from "./query";
|
|
4
4
|
export class QueryClientImpl {
|
|
5
5
|
rpc;
|
|
6
6
|
constructor(rpc) {
|
|
@@ -106,6 +106,25 @@ export class QueryClientImpl {
|
|
|
106
106
|
const promise = this.rpc.request("sparkdream.rep.v1.Query", "ListJuryReview", data);
|
|
107
107
|
return promise.then(data => QueryAllJuryReviewResponse.decode(new BinaryReader(data)));
|
|
108
108
|
};
|
|
109
|
+
/* JuryReviewsByJuror lists the reviews a juror has been seated on. This is
|
|
110
|
+
how a juror (or their monitoring client) discovers an outstanding summons:
|
|
111
|
+
jury duty pays but is infrequent, and there is no other way to ask "am I
|
|
112
|
+
seated" short of paging through every review ever created. */
|
|
113
|
+
juryReviewsByJuror = async (request) => {
|
|
114
|
+
const data = QueryJuryReviewsByJurorRequest.encode(request).finish();
|
|
115
|
+
const promise = this.rpc.request("sparkdream.rep.v1.Query", "JuryReviewsByJuror", data);
|
|
116
|
+
return promise.then(data => QueryJuryReviewsByJurorResponse.decode(new BinaryReader(data)));
|
|
117
|
+
};
|
|
118
|
+
/* RoleActivity returns a bonded role holder's shared accountability record —
|
|
119
|
+
per-kind action counters, verdict streaks, overturn cooldown and the
|
|
120
|
+
accuracy ring. x/forum projects the sentinel view of this; reviewers and
|
|
121
|
+
curators had no way to inspect theirs at all, which matters because the
|
|
122
|
+
record gates pay and drives demotion. */
|
|
123
|
+
roleActivity = async (request) => {
|
|
124
|
+
const data = QueryRoleActivityRequest.encode(request).finish();
|
|
125
|
+
const promise = this.rpc.request("sparkdream.rep.v1.Query", "RoleActivity", data);
|
|
126
|
+
return promise.then(data => QueryRoleActivityResponse.decode(new BinaryReader(data)));
|
|
127
|
+
};
|
|
109
128
|
/* ListInterim Queries a list of Interim items. */
|
|
110
129
|
getInterim = async (request) => {
|
|
111
130
|
const data = QueryGetInterimRequest.encode(request).finish();
|
|
@@ -120,20 +139,6 @@ export class QueryClientImpl {
|
|
|
120
139
|
const promise = this.rpc.request("sparkdream.rep.v1.Query", "ListInterim", data);
|
|
121
140
|
return promise.then(data => QueryAllInterimResponse.decode(new BinaryReader(data)));
|
|
122
141
|
};
|
|
123
|
-
/* ListInterimTemplate Queries a list of InterimTemplate items. */
|
|
124
|
-
getInterimTemplate = async (request) => {
|
|
125
|
-
const data = QueryGetInterimTemplateRequest.encode(request).finish();
|
|
126
|
-
const promise = this.rpc.request("sparkdream.rep.v1.Query", "GetInterimTemplate", data);
|
|
127
|
-
return promise.then(data => QueryGetInterimTemplateResponse.decode(new BinaryReader(data)));
|
|
128
|
-
};
|
|
129
|
-
/* ListInterimTemplate defines the ListInterimTemplate RPC. */
|
|
130
|
-
listInterimTemplate = async (request = {
|
|
131
|
-
pagination: undefined
|
|
132
|
-
}) => {
|
|
133
|
-
const data = QueryAllInterimTemplateRequest.encode(request).finish();
|
|
134
|
-
const promise = this.rpc.request("sparkdream.rep.v1.Query", "ListInterimTemplate", data);
|
|
135
|
-
return promise.then(data => QueryAllInterimTemplateResponse.decode(new BinaryReader(data)));
|
|
136
|
-
};
|
|
137
142
|
/* MembersByTrustLevel Queries a list of MembersByTrustLevel items. */
|
|
138
143
|
membersByTrustLevel = async (request) => {
|
|
139
144
|
const data = QueryMembersByTrustLevelRequest.encode(request).finish();
|
|
@@ -182,6 +187,18 @@ export class QueryClientImpl {
|
|
|
182
187
|
const promise = this.rpc.request("sparkdream.rep.v1.Query", "InitiativesByAssignee", data);
|
|
183
188
|
return promise.then(data => QueryInitiativesByAssigneeResponse.decode(new BinaryReader(data)));
|
|
184
189
|
};
|
|
190
|
+
/* InitiativesByCreator Queries a list of InitiativesByCreator items. */
|
|
191
|
+
initiativesByCreator = async (request) => {
|
|
192
|
+
const data = QueryInitiativesByCreatorRequest.encode(request).finish();
|
|
193
|
+
const promise = this.rpc.request("sparkdream.rep.v1.Query", "InitiativesByCreator", data);
|
|
194
|
+
return promise.then(data => QueryInitiativesByCreatorResponse.decode(new BinaryReader(data)));
|
|
195
|
+
};
|
|
196
|
+
/* ProjectsByCreator Queries a list of ProjectsByCreator items. */
|
|
197
|
+
projectsByCreator = async (request) => {
|
|
198
|
+
const data = QueryProjectsByCreatorRequest.encode(request).finish();
|
|
199
|
+
const promise = this.rpc.request("sparkdream.rep.v1.Query", "ProjectsByCreator", data);
|
|
200
|
+
return promise.then(data => QueryProjectsByCreatorResponse.decode(new BinaryReader(data)));
|
|
201
|
+
};
|
|
185
202
|
/* AvailableInitiatives Queries a list of AvailableInitiatives items. */
|
|
186
203
|
availableInitiatives = async (request) => {
|
|
187
204
|
const data = QueryAvailableInitiativesRequest.encode(request).finish();
|
|
@@ -523,6 +540,35 @@ export class QueryClientImpl {
|
|
|
523
540
|
const promise = this.rpc.request("sparkdream.rep.v1.Query", "AuthorBondsByType", data);
|
|
524
541
|
return promise.then(data => QueryAuthorBondsByTypeResponse.decode(new BinaryReader(data)));
|
|
525
542
|
};
|
|
543
|
+
/* InitiativeReviews returns the bonded reviewers' verdicts on one initiative. */
|
|
544
|
+
initiativeReviews = async (request) => {
|
|
545
|
+
const data = QueryInitiativeReviewsRequest.encode(request).finish();
|
|
546
|
+
const promise = this.rpc.request("sparkdream.rep.v1.Query", "InitiativeReviews", data);
|
|
547
|
+
return promise.then(data => QueryInitiativeReviewsResponse.decode(new BinaryReader(data)));
|
|
548
|
+
};
|
|
549
|
+
/* ReviewBounty returns the DREAM escrowed against an initiative to attract
|
|
550
|
+
reviewers, and when each contribution becomes reclaimable. */
|
|
551
|
+
reviewBounty = async (request) => {
|
|
552
|
+
const data = QueryReviewBountyRequest.encode(request).finish();
|
|
553
|
+
const promise = this.rpc.request("sparkdream.rep.v1.Query", "ReviewBounty", data);
|
|
554
|
+
return promise.then(data => QueryReviewBountyResponse.decode(new BinaryReader(data)));
|
|
555
|
+
};
|
|
556
|
+
/* EscalatedReviews lists the review rounds awaiting an Operations Committee
|
|
557
|
+
decision. */
|
|
558
|
+
escalatedReviews = async (request = {}) => {
|
|
559
|
+
const data = QueryEscalatedReviewsRequest.encode(request).finish();
|
|
560
|
+
const promise = this.rpc.request("sparkdream.rep.v1.Query", "EscalatedReviews", data);
|
|
561
|
+
return promise.then(data => QueryEscalatedReviewsResponse.decode(new BinaryReader(data)));
|
|
562
|
+
};
|
|
563
|
+
/* RoleRewardPools reports the funding state of every bonded-role SPARK
|
|
564
|
+
reward pool, plus how much of today's community-pool allowance x/rep has
|
|
565
|
+
already drawn. Automatic funding is otherwise invisible: the pools are
|
|
566
|
+
derived sub-addresses with no other read surface. */
|
|
567
|
+
roleRewardPools = async (request = {}) => {
|
|
568
|
+
const data = QueryRoleRewardPoolsRequest.encode(request).finish();
|
|
569
|
+
const promise = this.rpc.request("sparkdream.rep.v1.Query", "RoleRewardPools", data);
|
|
570
|
+
return promise.then(data => QueryRoleRewardPoolsResponse.decode(new BinaryReader(data)));
|
|
571
|
+
};
|
|
526
572
|
}
|
|
527
573
|
export const createRpcQueryExtension = (base) => {
|
|
528
574
|
const rpc = createProtobufRpcClient(base);
|
|
@@ -573,18 +619,18 @@ export const createRpcQueryExtension = (base) => {
|
|
|
573
619
|
listJuryReview(request) {
|
|
574
620
|
return queryService.listJuryReview(request);
|
|
575
621
|
},
|
|
622
|
+
juryReviewsByJuror(request) {
|
|
623
|
+
return queryService.juryReviewsByJuror(request);
|
|
624
|
+
},
|
|
625
|
+
roleActivity(request) {
|
|
626
|
+
return queryService.roleActivity(request);
|
|
627
|
+
},
|
|
576
628
|
getInterim(request) {
|
|
577
629
|
return queryService.getInterim(request);
|
|
578
630
|
},
|
|
579
631
|
listInterim(request) {
|
|
580
632
|
return queryService.listInterim(request);
|
|
581
633
|
},
|
|
582
|
-
getInterimTemplate(request) {
|
|
583
|
-
return queryService.getInterimTemplate(request);
|
|
584
|
-
},
|
|
585
|
-
listInterimTemplate(request) {
|
|
586
|
-
return queryService.listInterimTemplate(request);
|
|
587
|
-
},
|
|
588
634
|
membersByTrustLevel(request) {
|
|
589
635
|
return queryService.membersByTrustLevel(request);
|
|
590
636
|
},
|
|
@@ -609,6 +655,12 @@ export const createRpcQueryExtension = (base) => {
|
|
|
609
655
|
initiativesByAssignee(request) {
|
|
610
656
|
return queryService.initiativesByAssignee(request);
|
|
611
657
|
},
|
|
658
|
+
initiativesByCreator(request) {
|
|
659
|
+
return queryService.initiativesByCreator(request);
|
|
660
|
+
},
|
|
661
|
+
projectsByCreator(request) {
|
|
662
|
+
return queryService.projectsByCreator(request);
|
|
663
|
+
},
|
|
612
664
|
availableInitiatives(request) {
|
|
613
665
|
return queryService.availableInitiatives(request);
|
|
614
666
|
},
|
|
@@ -764,6 +816,18 @@ export const createRpcQueryExtension = (base) => {
|
|
|
764
816
|
},
|
|
765
817
|
authorBondsByType(request) {
|
|
766
818
|
return queryService.authorBondsByType(request);
|
|
819
|
+
},
|
|
820
|
+
initiativeReviews(request) {
|
|
821
|
+
return queryService.initiativeReviews(request);
|
|
822
|
+
},
|
|
823
|
+
reviewBounty(request) {
|
|
824
|
+
return queryService.reviewBounty(request);
|
|
825
|
+
},
|
|
826
|
+
escalatedReviews(request) {
|
|
827
|
+
return queryService.escalatedReviews(request);
|
|
828
|
+
},
|
|
829
|
+
roleRewardPools(request) {
|
|
830
|
+
return queryService.roleRewardPools(request);
|
|
767
831
|
}
|
|
768
832
|
};
|
|
769
833
|
};
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
3
|
+
function createBaseReviewBounty() {
|
|
4
|
+
return {
|
|
5
|
+
initiativeId: BigInt(0),
|
|
6
|
+
amount: "",
|
|
7
|
+
contributions: [],
|
|
8
|
+
committed: false
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* ReviewBounty is DREAM escrowed against one initiative to attract reviewer
|
|
13
|
+
* attention to it.
|
|
14
|
+
*
|
|
15
|
+
* The DREAM review fee pays for the act of reviewing at a rate fixed by the
|
|
16
|
+
* budget. A bounty is how the people who actually want a particular initiative
|
|
17
|
+
* looked at — its creator, its stakers, anyone — bid that attention up. Review
|
|
18
|
+
* is the scarcest input in the system once the completion gate is mandatory,
|
|
19
|
+
* and a flat fee cannot express "this one matters more".
|
|
20
|
+
*
|
|
21
|
+
* Paid out per verdict filed and split across the round's reviewers, exactly
|
|
22
|
+
* like the fee: outcome-blind. A bounty released on successful completion would
|
|
23
|
+
* be a straightforward bribe to approve, which is the bias the reviewer role
|
|
24
|
+
* exists to remove.
|
|
25
|
+
* @name ReviewBounty
|
|
26
|
+
* @package sparkdream.rep.v1
|
|
27
|
+
* @see proto type: sparkdream.rep.v1.ReviewBounty
|
|
28
|
+
*/
|
|
29
|
+
export const ReviewBounty = {
|
|
30
|
+
typeUrl: "/sparkdream.rep.v1.ReviewBounty",
|
|
31
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
32
|
+
if (message.initiativeId !== BigInt(0)) {
|
|
33
|
+
writer.uint32(8).uint64(message.initiativeId);
|
|
34
|
+
}
|
|
35
|
+
if (message.amount !== "") {
|
|
36
|
+
writer.uint32(18).string(message.amount);
|
|
37
|
+
}
|
|
38
|
+
for (const v of message.contributions) {
|
|
39
|
+
ReviewBountyContribution.encode(v, writer.uint32(26).fork()).ldelim();
|
|
40
|
+
}
|
|
41
|
+
if (message.committed === true) {
|
|
42
|
+
writer.uint32(32).bool(message.committed);
|
|
43
|
+
}
|
|
44
|
+
return writer;
|
|
45
|
+
},
|
|
46
|
+
decode(input, length) {
|
|
47
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
48
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
49
|
+
const message = createBaseReviewBounty();
|
|
50
|
+
while (reader.pos < end) {
|
|
51
|
+
const tag = reader.uint32();
|
|
52
|
+
switch (tag >>> 3) {
|
|
53
|
+
case 1:
|
|
54
|
+
message.initiativeId = reader.uint64();
|
|
55
|
+
break;
|
|
56
|
+
case 2:
|
|
57
|
+
message.amount = reader.string();
|
|
58
|
+
break;
|
|
59
|
+
case 3:
|
|
60
|
+
message.contributions.push(ReviewBountyContribution.decode(reader, reader.uint32()));
|
|
61
|
+
break;
|
|
62
|
+
case 4:
|
|
63
|
+
message.committed = reader.bool();
|
|
64
|
+
break;
|
|
65
|
+
default:
|
|
66
|
+
reader.skipType(tag & 7);
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return message;
|
|
71
|
+
},
|
|
72
|
+
fromPartial(object) {
|
|
73
|
+
const message = createBaseReviewBounty();
|
|
74
|
+
message.initiativeId = object.initiativeId !== undefined && object.initiativeId !== null ? BigInt(object.initiativeId.toString()) : BigInt(0);
|
|
75
|
+
message.amount = object.amount ?? "";
|
|
76
|
+
message.contributions = object.contributions?.map(e => ReviewBountyContribution.fromPartial(e)) || [];
|
|
77
|
+
message.committed = object.committed ?? false;
|
|
78
|
+
return message;
|
|
79
|
+
},
|
|
80
|
+
fromAmino(object) {
|
|
81
|
+
const message = createBaseReviewBounty();
|
|
82
|
+
if (object.initiative_id !== undefined && object.initiative_id !== null) {
|
|
83
|
+
message.initiativeId = BigInt(object.initiative_id);
|
|
84
|
+
}
|
|
85
|
+
if (object.amount !== undefined && object.amount !== null) {
|
|
86
|
+
message.amount = object.amount;
|
|
87
|
+
}
|
|
88
|
+
message.contributions = object.contributions?.map(e => ReviewBountyContribution.fromAmino(e)) || [];
|
|
89
|
+
if (object.committed !== undefined && object.committed !== null) {
|
|
90
|
+
message.committed = object.committed;
|
|
91
|
+
}
|
|
92
|
+
return message;
|
|
93
|
+
},
|
|
94
|
+
toAmino(message) {
|
|
95
|
+
const obj = {};
|
|
96
|
+
obj.initiative_id = message.initiativeId !== BigInt(0) ? message.initiativeId?.toString() : undefined;
|
|
97
|
+
obj.amount = message.amount === "" ? undefined : message.amount;
|
|
98
|
+
if (message.contributions) {
|
|
99
|
+
obj.contributions = message.contributions.map(e => e ? ReviewBountyContribution.toAmino(e) : undefined);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
obj.contributions = message.contributions;
|
|
103
|
+
}
|
|
104
|
+
obj.committed = message.committed === false ? undefined : message.committed;
|
|
105
|
+
return obj;
|
|
106
|
+
},
|
|
107
|
+
fromAminoMsg(object) {
|
|
108
|
+
return ReviewBounty.fromAmino(object.value);
|
|
109
|
+
},
|
|
110
|
+
fromProtoMsg(message) {
|
|
111
|
+
return ReviewBounty.decode(message.value);
|
|
112
|
+
},
|
|
113
|
+
toProto(message) {
|
|
114
|
+
return ReviewBounty.encode(message).finish();
|
|
115
|
+
},
|
|
116
|
+
toProtoMsg(message) {
|
|
117
|
+
return {
|
|
118
|
+
typeUrl: "/sparkdream.rep.v1.ReviewBounty",
|
|
119
|
+
value: ReviewBounty.encode(message).finish()
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
function createBaseReviewBountyContribution() {
|
|
124
|
+
return {
|
|
125
|
+
funder: "",
|
|
126
|
+
amount: "",
|
|
127
|
+
fundedAt: BigInt(0)
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* ReviewBountyContribution is one funder's stake in a bounty.
|
|
132
|
+
* @name ReviewBountyContribution
|
|
133
|
+
* @package sparkdream.rep.v1
|
|
134
|
+
* @see proto type: sparkdream.rep.v1.ReviewBountyContribution
|
|
135
|
+
*/
|
|
136
|
+
export const ReviewBountyContribution = {
|
|
137
|
+
typeUrl: "/sparkdream.rep.v1.ReviewBountyContribution",
|
|
138
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
139
|
+
if (message.funder !== "") {
|
|
140
|
+
writer.uint32(10).string(message.funder);
|
|
141
|
+
}
|
|
142
|
+
if (message.amount !== "") {
|
|
143
|
+
writer.uint32(18).string(message.amount);
|
|
144
|
+
}
|
|
145
|
+
if (message.fundedAt !== BigInt(0)) {
|
|
146
|
+
writer.uint32(24).int64(message.fundedAt);
|
|
147
|
+
}
|
|
148
|
+
return writer;
|
|
149
|
+
},
|
|
150
|
+
decode(input, length) {
|
|
151
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
152
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
153
|
+
const message = createBaseReviewBountyContribution();
|
|
154
|
+
while (reader.pos < end) {
|
|
155
|
+
const tag = reader.uint32();
|
|
156
|
+
switch (tag >>> 3) {
|
|
157
|
+
case 1:
|
|
158
|
+
message.funder = reader.string();
|
|
159
|
+
break;
|
|
160
|
+
case 2:
|
|
161
|
+
message.amount = reader.string();
|
|
162
|
+
break;
|
|
163
|
+
case 3:
|
|
164
|
+
message.fundedAt = reader.int64();
|
|
165
|
+
break;
|
|
166
|
+
default:
|
|
167
|
+
reader.skipType(tag & 7);
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return message;
|
|
172
|
+
},
|
|
173
|
+
fromPartial(object) {
|
|
174
|
+
const message = createBaseReviewBountyContribution();
|
|
175
|
+
message.funder = object.funder ?? "";
|
|
176
|
+
message.amount = object.amount ?? "";
|
|
177
|
+
message.fundedAt = object.fundedAt !== undefined && object.fundedAt !== null ? BigInt(object.fundedAt.toString()) : BigInt(0);
|
|
178
|
+
return message;
|
|
179
|
+
},
|
|
180
|
+
fromAmino(object) {
|
|
181
|
+
const message = createBaseReviewBountyContribution();
|
|
182
|
+
if (object.funder !== undefined && object.funder !== null) {
|
|
183
|
+
message.funder = object.funder;
|
|
184
|
+
}
|
|
185
|
+
if (object.amount !== undefined && object.amount !== null) {
|
|
186
|
+
message.amount = object.amount;
|
|
187
|
+
}
|
|
188
|
+
if (object.funded_at !== undefined && object.funded_at !== null) {
|
|
189
|
+
message.fundedAt = BigInt(object.funded_at);
|
|
190
|
+
}
|
|
191
|
+
return message;
|
|
192
|
+
},
|
|
193
|
+
toAmino(message) {
|
|
194
|
+
const obj = {};
|
|
195
|
+
obj.funder = message.funder === "" ? undefined : message.funder;
|
|
196
|
+
obj.amount = message.amount === "" ? undefined : message.amount;
|
|
197
|
+
obj.funded_at = message.fundedAt !== BigInt(0) ? message.fundedAt?.toString() : undefined;
|
|
198
|
+
return obj;
|
|
199
|
+
},
|
|
200
|
+
fromAminoMsg(object) {
|
|
201
|
+
return ReviewBountyContribution.fromAmino(object.value);
|
|
202
|
+
},
|
|
203
|
+
fromProtoMsg(message) {
|
|
204
|
+
return ReviewBountyContribution.decode(message.value);
|
|
205
|
+
},
|
|
206
|
+
toProto(message) {
|
|
207
|
+
return ReviewBountyContribution.encode(message).finish();
|
|
208
|
+
},
|
|
209
|
+
toProtoMsg(message) {
|
|
210
|
+
return {
|
|
211
|
+
typeUrl: "/sparkdream.rep.v1.ReviewBountyContribution",
|
|
212
|
+
value: ReviewBountyContribution.encode(message).finish()
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
};
|
|
@@ -31,7 +31,7 @@ export const TagReport = {
|
|
|
31
31
|
writer.uint32(32).bool(message.underReview);
|
|
32
32
|
}
|
|
33
33
|
for (const v of message.reporters) {
|
|
34
|
-
writer.uint32(
|
|
34
|
+
writer.uint32(42).string(v);
|
|
35
35
|
}
|
|
36
36
|
return writer;
|
|
37
37
|
},
|
|
@@ -54,7 +54,7 @@ export const TagReport = {
|
|
|
54
54
|
case 4:
|
|
55
55
|
message.underReview = reader.bool();
|
|
56
56
|
break;
|
|
57
|
-
case
|
|
57
|
+
case 5:
|
|
58
58
|
message.reporters.push(reader.string());
|
|
59
59
|
break;
|
|
60
60
|
default:
|