@sparkdreamnft/sparkdreamjs 0.0.38 → 0.0.39
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/esm/sparkdream/rep/v1/challenge.js +13 -2
- package/esm/sparkdream/rep/v1/genesis.js +362 -2
- package/esm/sparkdream/rep/v1/interim.js +58 -1
- package/esm/sparkdream/rep/v1/member.js +25 -1
- package/esm/sparkdream/rep/v1/params.js +193 -1
- package/esm/sparkdream/rep/v1/query.js +16 -16
- package/esm/sparkdream/rep/v1/tx.js +13 -1
- package/package.json +1 -1
- package/sparkdream/bundle.d.ts +28 -0
- package/sparkdream/rep/v1/challenge.d.ts +23 -0
- package/sparkdream/rep/v1/challenge.js +13 -2
- package/sparkdream/rep/v1/genesis.d.ts +170 -1
- package/sparkdream/rep/v1/genesis.js +362 -2
- package/sparkdream/rep/v1/interim.d.ts +32 -0
- package/sparkdream/rep/v1/interim.js +61 -2
- package/sparkdream/rep/v1/member.d.ts +54 -0
- package/sparkdream/rep/v1/member.js +25 -1
- package/sparkdream/rep/v1/params.d.ts +242 -0
- package/sparkdream/rep/v1/params.js +193 -1
- package/sparkdream/rep/v1/query.d.ts +26 -4
- package/sparkdream/rep/v1/query.js +16 -16
- package/sparkdream/rep/v1/tx.d.ts +13 -1
- package/sparkdream/rep/v1/tx.js +13 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { InitiativeStatus } from "./initiative";
|
|
1
2
|
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
2
3
|
import { DeepPartial } from "../../../helpers";
|
|
3
4
|
export declare enum ChallengeStatus {
|
|
@@ -42,6 +43,17 @@ export interface Challenge {
|
|
|
42
43
|
* actually adjudicate against a standard the author agreed to up front.
|
|
43
44
|
*/
|
|
44
45
|
criteriaId: string;
|
|
46
|
+
/**
|
|
47
|
+
* The initiative status to restore if this challenge is rejected. Challenges
|
|
48
|
+
* may be filed while the work is still SUBMITTED — before its challenge
|
|
49
|
+
* window has opened — and rejecting such a challenge must not skip that
|
|
50
|
+
* window: restoring SUBMITTED hands the initiative back to the ordinary
|
|
51
|
+
* transition, which sets a fresh review + challenge period. Challenges filed
|
|
52
|
+
* on IN_REVIEW work restore IN_REVIEW, whose window has already run. The
|
|
53
|
+
* zero value (OPEN, on chains predating the snapshot) also restores
|
|
54
|
+
* IN_REVIEW, the historical behaviour.
|
|
55
|
+
*/
|
|
56
|
+
statusBeforeChallenge: InitiativeStatus;
|
|
45
57
|
}
|
|
46
58
|
export interface ChallengeProtoMsg {
|
|
47
59
|
typeUrl: "/sparkdream.rep.v1.Challenge";
|
|
@@ -71,6 +83,17 @@ export interface ChallengeAmino {
|
|
|
71
83
|
* actually adjudicate against a standard the author agreed to up front.
|
|
72
84
|
*/
|
|
73
85
|
criteria_id?: string;
|
|
86
|
+
/**
|
|
87
|
+
* The initiative status to restore if this challenge is rejected. Challenges
|
|
88
|
+
* may be filed while the work is still SUBMITTED — before its challenge
|
|
89
|
+
* window has opened — and rejecting such a challenge must not skip that
|
|
90
|
+
* window: restoring SUBMITTED hands the initiative back to the ordinary
|
|
91
|
+
* transition, which sets a fresh review + challenge period. Challenges filed
|
|
92
|
+
* on IN_REVIEW work restore IN_REVIEW, whose window has already run. The
|
|
93
|
+
* zero value (OPEN, on chains predating the snapshot) also restores
|
|
94
|
+
* IN_REVIEW, the historical behaviour.
|
|
95
|
+
*/
|
|
96
|
+
status_before_challenge?: InitiativeStatus;
|
|
74
97
|
}
|
|
75
98
|
export interface ChallengeAminoMsg {
|
|
76
99
|
type: "/sparkdream.rep.v1.Challenge";
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Challenge = exports.ChallengeStatusAmino = exports.ChallengeStatus = void 0;
|
|
4
4
|
exports.challengeStatusFromJSON = challengeStatusFromJSON;
|
|
5
5
|
exports.challengeStatusToJSON = challengeStatusToJSON;
|
|
6
|
-
//@ts-nocheck
|
|
7
6
|
const binary_1 = require("../../../binary");
|
|
8
7
|
var ChallengeStatus;
|
|
9
8
|
(function (ChallengeStatus) {
|
|
@@ -74,7 +73,8 @@ function createBaseChallenge() {
|
|
|
74
73
|
createdAt: BigInt(0),
|
|
75
74
|
resolvedAt: BigInt(0),
|
|
76
75
|
responseDeadline: BigInt(0),
|
|
77
|
-
criteriaId: ""
|
|
76
|
+
criteriaId: "",
|
|
77
|
+
statusBeforeChallenge: 0
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
@@ -119,6 +119,9 @@ exports.Challenge = {
|
|
|
119
119
|
if (message.criteriaId !== "") {
|
|
120
120
|
writer.uint32(90).string(message.criteriaId);
|
|
121
121
|
}
|
|
122
|
+
if (message.statusBeforeChallenge !== 0) {
|
|
123
|
+
writer.uint32(96).int32(message.statusBeforeChallenge);
|
|
124
|
+
}
|
|
122
125
|
return writer;
|
|
123
126
|
},
|
|
124
127
|
decode(input, length) {
|
|
@@ -161,6 +164,9 @@ exports.Challenge = {
|
|
|
161
164
|
case 11:
|
|
162
165
|
message.criteriaId = reader.string();
|
|
163
166
|
break;
|
|
167
|
+
case 12:
|
|
168
|
+
message.statusBeforeChallenge = reader.int32();
|
|
169
|
+
break;
|
|
164
170
|
default:
|
|
165
171
|
reader.skipType(tag & 7);
|
|
166
172
|
break;
|
|
@@ -181,6 +187,7 @@ exports.Challenge = {
|
|
|
181
187
|
message.resolvedAt = object.resolvedAt !== undefined && object.resolvedAt !== null ? BigInt(object.resolvedAt.toString()) : BigInt(0);
|
|
182
188
|
message.responseDeadline = object.responseDeadline !== undefined && object.responseDeadline !== null ? BigInt(object.responseDeadline.toString()) : BigInt(0);
|
|
183
189
|
message.criteriaId = object.criteriaId ?? "";
|
|
190
|
+
message.statusBeforeChallenge = object.statusBeforeChallenge ?? 0;
|
|
184
191
|
return message;
|
|
185
192
|
},
|
|
186
193
|
fromAmino(object) {
|
|
@@ -216,6 +223,9 @@ exports.Challenge = {
|
|
|
216
223
|
if (object.criteria_id !== undefined && object.criteria_id !== null) {
|
|
217
224
|
message.criteriaId = object.criteria_id;
|
|
218
225
|
}
|
|
226
|
+
if (object.status_before_challenge !== undefined && object.status_before_challenge !== null) {
|
|
227
|
+
message.statusBeforeChallenge = object.status_before_challenge;
|
|
228
|
+
}
|
|
219
229
|
return message;
|
|
220
230
|
},
|
|
221
231
|
toAmino(message) {
|
|
@@ -236,6 +246,7 @@ exports.Challenge = {
|
|
|
236
246
|
obj.resolved_at = message.resolvedAt !== BigInt(0) ? message.resolvedAt?.toString() : undefined;
|
|
237
247
|
obj.response_deadline = message.responseDeadline !== BigInt(0) ? message.responseDeadline?.toString() : undefined;
|
|
238
248
|
obj.criteria_id = message.criteriaId === "" ? undefined : message.criteriaId;
|
|
249
|
+
obj.status_before_challenge = message.statusBeforeChallenge === 0 ? undefined : message.statusBeforeChallenge;
|
|
239
250
|
return obj;
|
|
240
251
|
},
|
|
241
252
|
fromAminoMsg(object) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Params, ParamsAmino } from "./params";
|
|
2
|
-
import { Member, MemberAmino } from "./member";
|
|
2
|
+
import { Member, MemberAmino, GiftRecord, GiftRecordAmino } from "./member";
|
|
3
3
|
import { Invitation, InvitationAmino } from "./invitation";
|
|
4
4
|
import { Project, ProjectAmino } from "./project";
|
|
5
5
|
import { Initiative, InitiativeAmino } from "./initiative";
|
|
@@ -118,6 +118,21 @@ export interface GenesisState {
|
|
|
118
118
|
* on import would strand the escrow with nothing able to pay or refund it.
|
|
119
119
|
*/
|
|
120
120
|
reviewBountyList: ReviewBounty[];
|
|
121
|
+
/**
|
|
122
|
+
* The module's own token ledger and accumulators. x/rep keeps DREAM outside
|
|
123
|
+
* x/bank, so none of this is recoverable from anywhere else — an export that
|
|
124
|
+
* omits it hands the importing chain a zero treasury, zero season counters
|
|
125
|
+
* (re-opening every per-season cap mid-season), a zero seasonal pool (so the
|
|
126
|
+
* "only seed an uninitialised pool" guard in InitGenesis refills a whole
|
|
127
|
+
* season budget on every import), a reset per-epoch mint allowance, and a
|
|
128
|
+
* decay clock that re-applies an extra epoch.
|
|
129
|
+
*/
|
|
130
|
+
economicState?: EconomicState;
|
|
131
|
+
/**
|
|
132
|
+
* Per-recipient gift cooldown records. Not exported meant a capped gift
|
|
133
|
+
* re-enabled itself across a restart.
|
|
134
|
+
*/
|
|
135
|
+
giftRecordList: GiftRecordEntry[];
|
|
121
136
|
}
|
|
122
137
|
export interface GenesisStateProtoMsg {
|
|
123
138
|
typeUrl: "/sparkdream.rep.v1.GenesisState";
|
|
@@ -218,11 +233,126 @@ export interface GenesisStateAmino {
|
|
|
218
233
|
* on import would strand the escrow with nothing able to pay or refund it.
|
|
219
234
|
*/
|
|
220
235
|
review_bounty_list?: ReviewBountyAmino[];
|
|
236
|
+
/**
|
|
237
|
+
* The module's own token ledger and accumulators. x/rep keeps DREAM outside
|
|
238
|
+
* x/bank, so none of this is recoverable from anywhere else — an export that
|
|
239
|
+
* omits it hands the importing chain a zero treasury, zero season counters
|
|
240
|
+
* (re-opening every per-season cap mid-season), a zero seasonal pool (so the
|
|
241
|
+
* "only seed an uninitialised pool" guard in InitGenesis refills a whole
|
|
242
|
+
* season budget on every import), a reset per-epoch mint allowance, and a
|
|
243
|
+
* decay clock that re-applies an extra epoch.
|
|
244
|
+
*/
|
|
245
|
+
economic_state?: EconomicStateAmino;
|
|
246
|
+
/**
|
|
247
|
+
* Per-recipient gift cooldown records. Not exported meant a capped gift
|
|
248
|
+
* re-enabled itself across a restart.
|
|
249
|
+
*/
|
|
250
|
+
gift_record_list?: GiftRecordEntryAmino[];
|
|
221
251
|
}
|
|
222
252
|
export interface GenesisStateAminoMsg {
|
|
223
253
|
type: "/sparkdream.rep.v1.GenesisState";
|
|
224
254
|
value: GenesisStateAmino;
|
|
225
255
|
}
|
|
256
|
+
/**
|
|
257
|
+
* EconomicState carries x/rep's token ledger across a genesis round trip.
|
|
258
|
+
* Int and Dec values travel as strings so an absent field reads as zero rather
|
|
259
|
+
* than as a malformed number.
|
|
260
|
+
* @name EconomicState
|
|
261
|
+
* @package sparkdream.rep.v1
|
|
262
|
+
* @see proto type: sparkdream.rep.v1.EconomicState
|
|
263
|
+
*/
|
|
264
|
+
export interface EconomicState {
|
|
265
|
+
treasuryBalance: string;
|
|
266
|
+
seasonMinted: string;
|
|
267
|
+
seasonBurned: string;
|
|
268
|
+
seasonInitiativeRewardsMinted: string;
|
|
269
|
+
seasonStakingRewardsMinted: string;
|
|
270
|
+
seasonInterimRewardsMinted: string;
|
|
271
|
+
seasonTreasuryInflow: string;
|
|
272
|
+
seasonTreasuryOutflow: string;
|
|
273
|
+
seasonalPoolRemaining: string;
|
|
274
|
+
/**
|
|
275
|
+
* Monotonic for the life of the chain. Exporting it is what lets
|
|
276
|
+
* RebaseStakeRewardDebt be a no-op on a faithful round trip instead of the
|
|
277
|
+
* repair it has to be when the accumulator resets to zero.
|
|
278
|
+
*/
|
|
279
|
+
seasonalPoolAccPerShare: string;
|
|
280
|
+
seasonalPoolSeason: bigint;
|
|
281
|
+
seasonalPoolStartEpoch: bigint;
|
|
282
|
+
epochMintedEpoch: bigint;
|
|
283
|
+
epochMintedAmount: string;
|
|
284
|
+
decayLastProcessedEpoch: bigint;
|
|
285
|
+
}
|
|
286
|
+
export interface EconomicStateProtoMsg {
|
|
287
|
+
typeUrl: "/sparkdream.rep.v1.EconomicState";
|
|
288
|
+
value: Uint8Array;
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* EconomicState carries x/rep's token ledger across a genesis round trip.
|
|
292
|
+
* Int and Dec values travel as strings so an absent field reads as zero rather
|
|
293
|
+
* than as a malformed number.
|
|
294
|
+
* @name EconomicStateAmino
|
|
295
|
+
* @package sparkdream.rep.v1
|
|
296
|
+
* @see proto type: sparkdream.rep.v1.EconomicState
|
|
297
|
+
*/
|
|
298
|
+
export interface EconomicStateAmino {
|
|
299
|
+
treasury_balance?: string;
|
|
300
|
+
season_minted?: string;
|
|
301
|
+
season_burned?: string;
|
|
302
|
+
season_initiative_rewards_minted?: string;
|
|
303
|
+
season_staking_rewards_minted?: string;
|
|
304
|
+
season_interim_rewards_minted?: string;
|
|
305
|
+
season_treasury_inflow?: string;
|
|
306
|
+
season_treasury_outflow?: string;
|
|
307
|
+
seasonal_pool_remaining?: string;
|
|
308
|
+
/**
|
|
309
|
+
* Monotonic for the life of the chain. Exporting it is what lets
|
|
310
|
+
* RebaseStakeRewardDebt be a no-op on a faithful round trip instead of the
|
|
311
|
+
* repair it has to be when the accumulator resets to zero.
|
|
312
|
+
*/
|
|
313
|
+
seasonal_pool_acc_per_share?: string;
|
|
314
|
+
seasonal_pool_season?: string;
|
|
315
|
+
seasonal_pool_start_epoch?: string;
|
|
316
|
+
epoch_minted_epoch?: string;
|
|
317
|
+
epoch_minted_amount?: string;
|
|
318
|
+
decay_last_processed_epoch?: string;
|
|
319
|
+
}
|
|
320
|
+
export interface EconomicStateAminoMsg {
|
|
321
|
+
type: "/sparkdream.rep.v1.EconomicState";
|
|
322
|
+
value: EconomicStateAmino;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* GiftRecordEntry is one (sender, recipient) gift cooldown record, flattened
|
|
326
|
+
* for genesis because the live collection is keyed by the pair.
|
|
327
|
+
* @name GiftRecordEntry
|
|
328
|
+
* @package sparkdream.rep.v1
|
|
329
|
+
* @see proto type: sparkdream.rep.v1.GiftRecordEntry
|
|
330
|
+
*/
|
|
331
|
+
export interface GiftRecordEntry {
|
|
332
|
+
sender: string;
|
|
333
|
+
recipient: string;
|
|
334
|
+
record?: GiftRecord;
|
|
335
|
+
}
|
|
336
|
+
export interface GiftRecordEntryProtoMsg {
|
|
337
|
+
typeUrl: "/sparkdream.rep.v1.GiftRecordEntry";
|
|
338
|
+
value: Uint8Array;
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* GiftRecordEntry is one (sender, recipient) gift cooldown record, flattened
|
|
342
|
+
* for genesis because the live collection is keyed by the pair.
|
|
343
|
+
* @name GiftRecordEntryAmino
|
|
344
|
+
* @package sparkdream.rep.v1
|
|
345
|
+
* @see proto type: sparkdream.rep.v1.GiftRecordEntry
|
|
346
|
+
*/
|
|
347
|
+
export interface GiftRecordEntryAmino {
|
|
348
|
+
sender?: string;
|
|
349
|
+
recipient?: string;
|
|
350
|
+
record?: GiftRecordAmino;
|
|
351
|
+
}
|
|
352
|
+
export interface GiftRecordEntryAminoMsg {
|
|
353
|
+
type: "/sparkdream.rep.v1.GiftRecordEntry";
|
|
354
|
+
value: GiftRecordEntryAmino;
|
|
355
|
+
}
|
|
226
356
|
/**
|
|
227
357
|
* RoleRewardDayFunding is one UTC day's community-pool draw for the
|
|
228
358
|
* bonded-role reward pools, ledgered so role_reward_daily_funding bounds a day
|
|
@@ -315,6 +445,45 @@ export declare const GenesisState: {
|
|
|
315
445
|
toProto(message: GenesisState): Uint8Array;
|
|
316
446
|
toProtoMsg(message: GenesisState): GenesisStateProtoMsg;
|
|
317
447
|
};
|
|
448
|
+
/**
|
|
449
|
+
* EconomicState carries x/rep's token ledger across a genesis round trip.
|
|
450
|
+
* Int and Dec values travel as strings so an absent field reads as zero rather
|
|
451
|
+
* than as a malformed number.
|
|
452
|
+
* @name EconomicState
|
|
453
|
+
* @package sparkdream.rep.v1
|
|
454
|
+
* @see proto type: sparkdream.rep.v1.EconomicState
|
|
455
|
+
*/
|
|
456
|
+
export declare const EconomicState: {
|
|
457
|
+
typeUrl: string;
|
|
458
|
+
encode(message: EconomicState, writer?: BinaryWriter): BinaryWriter;
|
|
459
|
+
decode(input: BinaryReader | Uint8Array, length?: number): EconomicState;
|
|
460
|
+
fromPartial(object: DeepPartial<EconomicState>): EconomicState;
|
|
461
|
+
fromAmino(object: EconomicStateAmino): EconomicState;
|
|
462
|
+
toAmino(message: EconomicState): EconomicStateAmino;
|
|
463
|
+
fromAminoMsg(object: EconomicStateAminoMsg): EconomicState;
|
|
464
|
+
fromProtoMsg(message: EconomicStateProtoMsg): EconomicState;
|
|
465
|
+
toProto(message: EconomicState): Uint8Array;
|
|
466
|
+
toProtoMsg(message: EconomicState): EconomicStateProtoMsg;
|
|
467
|
+
};
|
|
468
|
+
/**
|
|
469
|
+
* GiftRecordEntry is one (sender, recipient) gift cooldown record, flattened
|
|
470
|
+
* for genesis because the live collection is keyed by the pair.
|
|
471
|
+
* @name GiftRecordEntry
|
|
472
|
+
* @package sparkdream.rep.v1
|
|
473
|
+
* @see proto type: sparkdream.rep.v1.GiftRecordEntry
|
|
474
|
+
*/
|
|
475
|
+
export declare const GiftRecordEntry: {
|
|
476
|
+
typeUrl: string;
|
|
477
|
+
encode(message: GiftRecordEntry, writer?: BinaryWriter): BinaryWriter;
|
|
478
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GiftRecordEntry;
|
|
479
|
+
fromPartial(object: DeepPartial<GiftRecordEntry>): GiftRecordEntry;
|
|
480
|
+
fromAmino(object: GiftRecordEntryAmino): GiftRecordEntry;
|
|
481
|
+
toAmino(message: GiftRecordEntry): GiftRecordEntryAmino;
|
|
482
|
+
fromAminoMsg(object: GiftRecordEntryAminoMsg): GiftRecordEntry;
|
|
483
|
+
fromProtoMsg(message: GiftRecordEntryProtoMsg): GiftRecordEntry;
|
|
484
|
+
toProto(message: GiftRecordEntry): Uint8Array;
|
|
485
|
+
toProtoMsg(message: GiftRecordEntry): GiftRecordEntryProtoMsg;
|
|
486
|
+
};
|
|
318
487
|
/**
|
|
319
488
|
* RoleRewardDayFunding is one UTC day's community-pool draw for the
|
|
320
489
|
* bonded-role reward pools, ledgered so role_reward_daily_funding bounds a day
|