@sparkdreamnft/sparkdreamjs 0.0.35 → 0.0.37
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/federation/v1/genesis.js +101 -3
- package/esm/sparkdream/federation/v1/params.js +129 -117
- package/esm/sparkdream/federation/v1/query.js +204 -7
- package/esm/sparkdream/federation/v1/query.lcd.js +11 -2
- package/esm/sparkdream/federation/v1/query.rpc.Query.js +16 -3
- package/esm/sparkdream/federation/v1/types.js +73 -1
- package/esm/sparkdream/federation/v1/verifier_activity.js +143 -45
- 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 +50 -1
- 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 +160 -49
- 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 +806 -2
- package/esm/sparkdream/rep/v1/query.js +1446 -325
- package/esm/sparkdream/rep/v1/query.lcd.js +49 -16
- package/esm/sparkdream/rep/v1/query.rpc.Query.js +67 -21
- package/esm/sparkdream/rep/v1/review_bounty.js +215 -0
- package/esm/sparkdream/rep/v1/role_activity.js +13 -1
- 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 +9709 -9199
- package/sparkdream/bundle.js +305 -301
- package/sparkdream/federation/v1/genesis.d.ts +66 -0
- package/sparkdream/federation/v1/genesis.js +102 -4
- package/sparkdream/federation/v1/params.d.ts +72 -10
- package/sparkdream/federation/v1/params.js +129 -117
- package/sparkdream/federation/v1/query.d.ts +120 -3
- package/sparkdream/federation/v1/query.js +204 -7
- package/sparkdream/federation/v1/query.lcd.d.ts +2 -1
- package/sparkdream/federation/v1/query.lcd.js +11 -2
- package/sparkdream/federation/v1/query.rpc.Query.d.ts +13 -3
- package/sparkdream/federation/v1/query.rpc.Query.js +15 -2
- package/sparkdream/federation/v1/types.d.ts +44 -0
- package/sparkdream/federation/v1/types.js +73 -1
- package/sparkdream/federation/v1/verifier_activity.d.ts +151 -68
- package/sparkdream/federation/v1/verifier_activity.js +144 -46
- 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 +50 -0
- package/sparkdream/rep/v1/bonded_role.js +50 -1
- 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 +106 -2
- package/sparkdream/rep/v1/initiative.js +163 -50
- 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 +764 -16
- package/sparkdream/rep/v1/params.js +806 -2
- package/sparkdream/rep/v1/query.d.ts +929 -179
- package/sparkdream/rep/v1/query.js +1450 -329
- package/sparkdream/rep/v1/query.lcd.d.ts +7 -3
- package/sparkdream/rep/v1/query.lcd.js +49 -16
- package/sparkdream/rep/v1/query.rpc.Query.d.ts +47 -9
- package/sparkdream/rep/v1/query.rpc.Query.js +66 -20
- package/sparkdream/rep/v1/review_bounty.d.ts +168 -0
- package/sparkdream/rep/v1/review_bounty.js +218 -0
- package/sparkdream/rep/v1/role_activity.d.ts +26 -0
- package/sparkdream/rep/v1/role_activity.js +13 -1
- 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 +7 -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. */
|
|
@@ -723,4 +731,29 @@ export class LCDQueryClient {
|
|
|
723
731
|
const endpoint = `sparkdream/rep/v1/author_bonds_by_type/${params.targetType}`;
|
|
724
732
|
return await this.req.get(endpoint, options);
|
|
725
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
|
+
};
|
|
726
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();
|
|
@@ -535,6 +540,35 @@ export class QueryClientImpl {
|
|
|
535
540
|
const promise = this.rpc.request("sparkdream.rep.v1.Query", "AuthorBondsByType", data);
|
|
536
541
|
return promise.then(data => QueryAuthorBondsByTypeResponse.decode(new BinaryReader(data)));
|
|
537
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
|
+
};
|
|
538
572
|
}
|
|
539
573
|
export const createRpcQueryExtension = (base) => {
|
|
540
574
|
const rpc = createProtobufRpcClient(base);
|
|
@@ -585,18 +619,18 @@ export const createRpcQueryExtension = (base) => {
|
|
|
585
619
|
listJuryReview(request) {
|
|
586
620
|
return queryService.listJuryReview(request);
|
|
587
621
|
},
|
|
622
|
+
juryReviewsByJuror(request) {
|
|
623
|
+
return queryService.juryReviewsByJuror(request);
|
|
624
|
+
},
|
|
625
|
+
roleActivity(request) {
|
|
626
|
+
return queryService.roleActivity(request);
|
|
627
|
+
},
|
|
588
628
|
getInterim(request) {
|
|
589
629
|
return queryService.getInterim(request);
|
|
590
630
|
},
|
|
591
631
|
listInterim(request) {
|
|
592
632
|
return queryService.listInterim(request);
|
|
593
633
|
},
|
|
594
|
-
getInterimTemplate(request) {
|
|
595
|
-
return queryService.getInterimTemplate(request);
|
|
596
|
-
},
|
|
597
|
-
listInterimTemplate(request) {
|
|
598
|
-
return queryService.listInterimTemplate(request);
|
|
599
|
-
},
|
|
600
634
|
membersByTrustLevel(request) {
|
|
601
635
|
return queryService.membersByTrustLevel(request);
|
|
602
636
|
},
|
|
@@ -782,6 +816,18 @@ export const createRpcQueryExtension = (base) => {
|
|
|
782
816
|
},
|
|
783
817
|
authorBondsByType(request) {
|
|
784
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);
|
|
785
831
|
}
|
|
786
832
|
};
|
|
787
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
|
+
};
|
|
@@ -399,7 +399,8 @@ function createBaseRoleActivity() {
|
|
|
399
399
|
epochActions: {},
|
|
400
400
|
totalActions: {},
|
|
401
401
|
upheldActions: {},
|
|
402
|
-
overturnedActions: {}
|
|
402
|
+
overturnedActions: {},
|
|
403
|
+
lastSlashEpoch: BigInt(0)
|
|
403
404
|
};
|
|
404
405
|
}
|
|
405
406
|
/**
|
|
@@ -469,6 +470,9 @@ export const RoleActivity = {
|
|
|
469
470
|
value
|
|
470
471
|
}, writer.uint32(88).fork()).ldelim();
|
|
471
472
|
});
|
|
473
|
+
if (message.lastSlashEpoch !== BigInt(0)) {
|
|
474
|
+
writer.uint32(96).int64(message.lastSlashEpoch);
|
|
475
|
+
}
|
|
472
476
|
return writer;
|
|
473
477
|
},
|
|
474
478
|
decode(input, length) {
|
|
@@ -523,6 +527,9 @@ export const RoleActivity = {
|
|
|
523
527
|
message.overturnedActions[entry11.key] = entry11.value;
|
|
524
528
|
}
|
|
525
529
|
break;
|
|
530
|
+
case 12:
|
|
531
|
+
message.lastSlashEpoch = reader.int64();
|
|
532
|
+
break;
|
|
526
533
|
default:
|
|
527
534
|
reader.skipType(tag & 7);
|
|
528
535
|
break;
|
|
@@ -563,6 +570,7 @@ export const RoleActivity = {
|
|
|
563
570
|
}
|
|
564
571
|
return acc;
|
|
565
572
|
}, {});
|
|
573
|
+
message.lastSlashEpoch = object.lastSlashEpoch !== undefined && object.lastSlashEpoch !== null ? BigInt(object.lastSlashEpoch.toString()) : BigInt(0);
|
|
566
574
|
return message;
|
|
567
575
|
},
|
|
568
576
|
fromAmino(object) {
|
|
@@ -610,6 +618,9 @@ export const RoleActivity = {
|
|
|
610
618
|
}
|
|
611
619
|
return acc;
|
|
612
620
|
}, {});
|
|
621
|
+
if (object.last_slash_epoch !== undefined && object.last_slash_epoch !== null) {
|
|
622
|
+
message.lastSlashEpoch = BigInt(object.last_slash_epoch);
|
|
623
|
+
}
|
|
613
624
|
return message;
|
|
614
625
|
},
|
|
615
626
|
toAmino(message) {
|
|
@@ -650,6 +661,7 @@ export const RoleActivity = {
|
|
|
650
661
|
obj.overturned_actions[k] = v.toString();
|
|
651
662
|
});
|
|
652
663
|
}
|
|
664
|
+
obj.last_slash_epoch = message.lastSlashEpoch !== BigInt(0) ? message.lastSlashEpoch?.toString() : undefined;
|
|
653
665
|
return obj;
|
|
654
666
|
},
|
|
655
667
|
fromAminoMsg(object) {
|
|
@@ -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:
|