@sparkdreamnft/sparkdreamjs 0.0.24 → 0.0.26
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/forum/v1/genesis.js +110 -1
- package/esm/sparkdream/forum/v1/params.js +74 -2
- package/esm/sparkdream/forum/v1/sentinel_activity.js +160 -1
- package/esm/sparkdream/forum/v1/thread_metadata.js +37 -1
- package/esm/sparkdream/forum/v1/tx.js +156 -0
- package/esm/sparkdream/forum/v1/tx.registry.js +20 -2
- package/esm/sparkdream/forum/v1/tx.rpc.msg.js +7 -1
- package/esm/sparkdream/rep/v1/params.js +24 -0
- package/esm/sparkdream/rep/v1/tx.js +159 -0
- package/esm/sparkdream/rep/v1/tx.registry.js +20 -2
- package/esm/sparkdream/rep/v1/tx.rpc.msg.js +8 -1
- package/package.json +1 -1
- package/sparkdream/bundle.d.ts +100 -0
- package/sparkdream/forum/v1/genesis.d.ts +65 -0
- package/sparkdream/forum/v1/genesis.js +111 -2
- package/sparkdream/forum/v1/params.d.ts +78 -0
- package/sparkdream/forum/v1/params.js +74 -2
- package/sparkdream/forum/v1/sentinel_activity.d.ts +125 -0
- package/sparkdream/forum/v1/sentinel_activity.js +161 -2
- package/sparkdream/forum/v1/thread_metadata.d.ts +48 -0
- package/sparkdream/forum/v1/thread_metadata.js +37 -1
- package/sparkdream/forum/v1/tx.d.ts +92 -6
- package/sparkdream/forum/v1/tx.js +157 -1
- package/sparkdream/forum/v1/tx.registry.d.ts +13 -1
- package/sparkdream/forum/v1/tx.registry.js +19 -1
- package/sparkdream/forum/v1/tx.rpc.msg.d.ts +4 -1
- package/sparkdream/forum/v1/tx.rpc.msg.js +6 -0
- package/sparkdream/rep/v1/params.d.ts +24 -0
- package/sparkdream/rep/v1/params.js +24 -0
- package/sparkdream/rep/v1/tx.d.ts +101 -0
- package/sparkdream/rep/v1/tx.js +160 -1
- package/sparkdream/rep/v1/tx.registry.d.ts +13 -1
- package/sparkdream/rep/v1/tx.registry.js +19 -1
- package/sparkdream/rep/v1/tx.rpc.msg.d.ts +7 -1
- package/sparkdream/rep/v1/tx.rpc.msg.js +7 -0
|
@@ -61,7 +61,10 @@ function createBaseParams() {
|
|
|
61
61
|
postConvictionLockSeconds: BigInt(0),
|
|
62
62
|
postConvictionStreamRatePerBlock: "",
|
|
63
63
|
maxForumRepPerTagPerEpoch: "",
|
|
64
|
-
postConvictionStakerSlashBps: BigInt(0)
|
|
64
|
+
postConvictionStakerSlashBps: BigInt(0),
|
|
65
|
+
curationDreamReward: "",
|
|
66
|
+
acceptProposalTimeout: BigInt(0),
|
|
67
|
+
maxAcceptProposalsPerSentinelPerThread: 0
|
|
65
68
|
};
|
|
66
69
|
}
|
|
67
70
|
/**
|
|
@@ -244,6 +247,15 @@ exports.Params = {
|
|
|
244
247
|
if (message.postConvictionStakerSlashBps !== BigInt(0)) {
|
|
245
248
|
writer.uint32(512).uint64(message.postConvictionStakerSlashBps);
|
|
246
249
|
}
|
|
250
|
+
if (message.curationDreamReward !== "") {
|
|
251
|
+
writer.uint32(522).string(message.curationDreamReward);
|
|
252
|
+
}
|
|
253
|
+
if (message.acceptProposalTimeout !== BigInt(0)) {
|
|
254
|
+
writer.uint32(528).int64(message.acceptProposalTimeout);
|
|
255
|
+
}
|
|
256
|
+
if (message.maxAcceptProposalsPerSentinelPerThread !== 0) {
|
|
257
|
+
writer.uint32(536).uint32(message.maxAcceptProposalsPerSentinelPerThread);
|
|
258
|
+
}
|
|
247
259
|
return writer;
|
|
248
260
|
},
|
|
249
261
|
decode(input, length) {
|
|
@@ -421,6 +433,15 @@ exports.Params = {
|
|
|
421
433
|
case 64:
|
|
422
434
|
message.postConvictionStakerSlashBps = reader.uint64();
|
|
423
435
|
break;
|
|
436
|
+
case 65:
|
|
437
|
+
message.curationDreamReward = reader.string();
|
|
438
|
+
break;
|
|
439
|
+
case 66:
|
|
440
|
+
message.acceptProposalTimeout = reader.int64();
|
|
441
|
+
break;
|
|
442
|
+
case 67:
|
|
443
|
+
message.maxAcceptProposalsPerSentinelPerThread = reader.uint32();
|
|
444
|
+
break;
|
|
424
445
|
default:
|
|
425
446
|
reader.skipType(tag & 7);
|
|
426
447
|
break;
|
|
@@ -486,6 +507,9 @@ exports.Params = {
|
|
|
486
507
|
message.postConvictionStreamRatePerBlock = object.postConvictionStreamRatePerBlock ?? "";
|
|
487
508
|
message.maxForumRepPerTagPerEpoch = object.maxForumRepPerTagPerEpoch ?? "";
|
|
488
509
|
message.postConvictionStakerSlashBps = object.postConvictionStakerSlashBps !== undefined && object.postConvictionStakerSlashBps !== null ? BigInt(object.postConvictionStakerSlashBps.toString()) : BigInt(0);
|
|
510
|
+
message.curationDreamReward = object.curationDreamReward ?? "";
|
|
511
|
+
message.acceptProposalTimeout = object.acceptProposalTimeout !== undefined && object.acceptProposalTimeout !== null ? BigInt(object.acceptProposalTimeout.toString()) : BigInt(0);
|
|
512
|
+
message.maxAcceptProposalsPerSentinelPerThread = object.maxAcceptProposalsPerSentinelPerThread ?? 0;
|
|
489
513
|
return message;
|
|
490
514
|
},
|
|
491
515
|
fromAmino(object) {
|
|
@@ -658,6 +682,15 @@ exports.Params = {
|
|
|
658
682
|
if (object.post_conviction_staker_slash_bps !== undefined && object.post_conviction_staker_slash_bps !== null) {
|
|
659
683
|
message.postConvictionStakerSlashBps = BigInt(object.post_conviction_staker_slash_bps);
|
|
660
684
|
}
|
|
685
|
+
if (object.curation_dream_reward !== undefined && object.curation_dream_reward !== null) {
|
|
686
|
+
message.curationDreamReward = object.curation_dream_reward;
|
|
687
|
+
}
|
|
688
|
+
if (object.accept_proposal_timeout !== undefined && object.accept_proposal_timeout !== null) {
|
|
689
|
+
message.acceptProposalTimeout = BigInt(object.accept_proposal_timeout);
|
|
690
|
+
}
|
|
691
|
+
if (object.max_accept_proposals_per_sentinel_per_thread !== undefined && object.max_accept_proposals_per_sentinel_per_thread !== null) {
|
|
692
|
+
message.maxAcceptProposalsPerSentinelPerThread = object.max_accept_proposals_per_sentinel_per_thread;
|
|
693
|
+
}
|
|
661
694
|
return message;
|
|
662
695
|
},
|
|
663
696
|
toAmino(message) {
|
|
@@ -718,6 +751,9 @@ exports.Params = {
|
|
|
718
751
|
obj.post_conviction_stream_rate_per_block = message.postConvictionStreamRatePerBlock === "" ? undefined : message.postConvictionStreamRatePerBlock;
|
|
719
752
|
obj.max_forum_rep_per_tag_per_epoch = message.maxForumRepPerTagPerEpoch === "" ? undefined : message.maxForumRepPerTagPerEpoch;
|
|
720
753
|
obj.post_conviction_staker_slash_bps = message.postConvictionStakerSlashBps !== BigInt(0) ? message.postConvictionStakerSlashBps?.toString() : undefined;
|
|
754
|
+
obj.curation_dream_reward = message.curationDreamReward === "" ? undefined : message.curationDreamReward;
|
|
755
|
+
obj.accept_proposal_timeout = message.acceptProposalTimeout !== BigInt(0) ? message.acceptProposalTimeout?.toString() : undefined;
|
|
756
|
+
obj.max_accept_proposals_per_sentinel_per_thread = message.maxAcceptProposalsPerSentinelPerThread === 0 ? undefined : message.maxAcceptProposalsPerSentinelPerThread;
|
|
721
757
|
return obj;
|
|
722
758
|
},
|
|
723
759
|
fromAminoMsg(object) {
|
|
@@ -793,7 +829,10 @@ function createBaseForumOperationalParams() {
|
|
|
793
829
|
postConvictionLockSeconds: BigInt(0),
|
|
794
830
|
postConvictionStreamRatePerBlock: "",
|
|
795
831
|
maxForumRepPerTagPerEpoch: "",
|
|
796
|
-
postConvictionStakerSlashBps: BigInt(0)
|
|
832
|
+
postConvictionStakerSlashBps: BigInt(0),
|
|
833
|
+
curationDreamReward: "",
|
|
834
|
+
acceptProposalTimeout: BigInt(0),
|
|
835
|
+
maxAcceptProposalsPerSentinelPerThread: 0
|
|
797
836
|
};
|
|
798
837
|
}
|
|
799
838
|
/**
|
|
@@ -959,6 +998,15 @@ exports.ForumOperationalParams = {
|
|
|
959
998
|
if (message.postConvictionStakerSlashBps !== BigInt(0)) {
|
|
960
999
|
writer.uint32(512).uint64(message.postConvictionStakerSlashBps);
|
|
961
1000
|
}
|
|
1001
|
+
if (message.curationDreamReward !== "") {
|
|
1002
|
+
writer.uint32(522).string(message.curationDreamReward);
|
|
1003
|
+
}
|
|
1004
|
+
if (message.acceptProposalTimeout !== BigInt(0)) {
|
|
1005
|
+
writer.uint32(528).int64(message.acceptProposalTimeout);
|
|
1006
|
+
}
|
|
1007
|
+
if (message.maxAcceptProposalsPerSentinelPerThread !== 0) {
|
|
1008
|
+
writer.uint32(536).uint32(message.maxAcceptProposalsPerSentinelPerThread);
|
|
1009
|
+
}
|
|
962
1010
|
return writer;
|
|
963
1011
|
},
|
|
964
1012
|
decode(input, length) {
|
|
@@ -1118,6 +1166,15 @@ exports.ForumOperationalParams = {
|
|
|
1118
1166
|
case 64:
|
|
1119
1167
|
message.postConvictionStakerSlashBps = reader.uint64();
|
|
1120
1168
|
break;
|
|
1169
|
+
case 65:
|
|
1170
|
+
message.curationDreamReward = reader.string();
|
|
1171
|
+
break;
|
|
1172
|
+
case 66:
|
|
1173
|
+
message.acceptProposalTimeout = reader.int64();
|
|
1174
|
+
break;
|
|
1175
|
+
case 67:
|
|
1176
|
+
message.maxAcceptProposalsPerSentinelPerThread = reader.uint32();
|
|
1177
|
+
break;
|
|
1121
1178
|
default:
|
|
1122
1179
|
reader.skipType(tag & 7);
|
|
1123
1180
|
break;
|
|
@@ -1177,6 +1234,9 @@ exports.ForumOperationalParams = {
|
|
|
1177
1234
|
message.postConvictionStreamRatePerBlock = object.postConvictionStreamRatePerBlock ?? "";
|
|
1178
1235
|
message.maxForumRepPerTagPerEpoch = object.maxForumRepPerTagPerEpoch ?? "";
|
|
1179
1236
|
message.postConvictionStakerSlashBps = object.postConvictionStakerSlashBps !== undefined && object.postConvictionStakerSlashBps !== null ? BigInt(object.postConvictionStakerSlashBps.toString()) : BigInt(0);
|
|
1237
|
+
message.curationDreamReward = object.curationDreamReward ?? "";
|
|
1238
|
+
message.acceptProposalTimeout = object.acceptProposalTimeout !== undefined && object.acceptProposalTimeout !== null ? BigInt(object.acceptProposalTimeout.toString()) : BigInt(0);
|
|
1239
|
+
message.maxAcceptProposalsPerSentinelPerThread = object.maxAcceptProposalsPerSentinelPerThread ?? 0;
|
|
1180
1240
|
return message;
|
|
1181
1241
|
},
|
|
1182
1242
|
fromAmino(object) {
|
|
@@ -1331,6 +1391,15 @@ exports.ForumOperationalParams = {
|
|
|
1331
1391
|
if (object.post_conviction_staker_slash_bps !== undefined && object.post_conviction_staker_slash_bps !== null) {
|
|
1332
1392
|
message.postConvictionStakerSlashBps = BigInt(object.post_conviction_staker_slash_bps);
|
|
1333
1393
|
}
|
|
1394
|
+
if (object.curation_dream_reward !== undefined && object.curation_dream_reward !== null) {
|
|
1395
|
+
message.curationDreamReward = object.curation_dream_reward;
|
|
1396
|
+
}
|
|
1397
|
+
if (object.accept_proposal_timeout !== undefined && object.accept_proposal_timeout !== null) {
|
|
1398
|
+
message.acceptProposalTimeout = BigInt(object.accept_proposal_timeout);
|
|
1399
|
+
}
|
|
1400
|
+
if (object.max_accept_proposals_per_sentinel_per_thread !== undefined && object.max_accept_proposals_per_sentinel_per_thread !== null) {
|
|
1401
|
+
message.maxAcceptProposalsPerSentinelPerThread = object.max_accept_proposals_per_sentinel_per_thread;
|
|
1402
|
+
}
|
|
1334
1403
|
return message;
|
|
1335
1404
|
},
|
|
1336
1405
|
toAmino(message) {
|
|
@@ -1385,6 +1454,9 @@ exports.ForumOperationalParams = {
|
|
|
1385
1454
|
obj.post_conviction_stream_rate_per_block = message.postConvictionStreamRatePerBlock === "" ? undefined : message.postConvictionStreamRatePerBlock;
|
|
1386
1455
|
obj.max_forum_rep_per_tag_per_epoch = message.maxForumRepPerTagPerEpoch === "" ? undefined : message.maxForumRepPerTagPerEpoch;
|
|
1387
1456
|
obj.post_conviction_staker_slash_bps = message.postConvictionStakerSlashBps !== BigInt(0) ? message.postConvictionStakerSlashBps?.toString() : undefined;
|
|
1457
|
+
obj.curation_dream_reward = message.curationDreamReward === "" ? undefined : message.curationDreamReward;
|
|
1458
|
+
obj.accept_proposal_timeout = message.acceptProposalTimeout !== BigInt(0) ? message.acceptProposalTimeout?.toString() : undefined;
|
|
1459
|
+
obj.max_accept_proposals_per_sentinel_per_thread = message.maxAcceptProposalsPerSentinelPerThread === 0 ? undefined : message.maxAcceptProposalsPerSentinelPerThread;
|
|
1388
1460
|
return obj;
|
|
1389
1461
|
},
|
|
1390
1462
|
fromAminoMsg(object) {
|
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
2
2
|
import { DeepPartial } from "../../../helpers";
|
|
3
|
+
/**
|
|
4
|
+
* AccuracyEpochBucket holds one reward-epoch's resolved-appeal tally for a
|
|
5
|
+
* sentinel. Stored in a fixed-size ring on SentinelActivity (slot index =
|
|
6
|
+
* epoch % SentinelAccuracyRingSize); the `epoch` stamp disambiguates a live
|
|
7
|
+
* slot from a stale one left behind by an inactive epoch.
|
|
8
|
+
* @name AccuracyEpochBucket
|
|
9
|
+
* @package sparkdream.forum.v1
|
|
10
|
+
* @see proto type: sparkdream.forum.v1.AccuracyEpochBucket
|
|
11
|
+
*/
|
|
12
|
+
export interface AccuracyEpochBucket {
|
|
13
|
+
epoch: bigint;
|
|
14
|
+
/**
|
|
15
|
+
* upheld_hides + upheld_locks + upheld_moves resolved this epoch
|
|
16
|
+
*/
|
|
17
|
+
upheld: bigint;
|
|
18
|
+
/**
|
|
19
|
+
* overturned_* resolved this epoch
|
|
20
|
+
*/
|
|
21
|
+
overturned: bigint;
|
|
22
|
+
}
|
|
23
|
+
export interface AccuracyEpochBucketProtoMsg {
|
|
24
|
+
typeUrl: "/sparkdream.forum.v1.AccuracyEpochBucket";
|
|
25
|
+
value: Uint8Array;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* AccuracyEpochBucket holds one reward-epoch's resolved-appeal tally for a
|
|
29
|
+
* sentinel. Stored in a fixed-size ring on SentinelActivity (slot index =
|
|
30
|
+
* epoch % SentinelAccuracyRingSize); the `epoch` stamp disambiguates a live
|
|
31
|
+
* slot from a stale one left behind by an inactive epoch.
|
|
32
|
+
* @name AccuracyEpochBucketAmino
|
|
33
|
+
* @package sparkdream.forum.v1
|
|
34
|
+
* @see proto type: sparkdream.forum.v1.AccuracyEpochBucket
|
|
35
|
+
*/
|
|
36
|
+
export interface AccuracyEpochBucketAmino {
|
|
37
|
+
epoch?: string;
|
|
38
|
+
/**
|
|
39
|
+
* upheld_hides + upheld_locks + upheld_moves resolved this epoch
|
|
40
|
+
*/
|
|
41
|
+
upheld?: string;
|
|
42
|
+
/**
|
|
43
|
+
* overturned_* resolved this epoch
|
|
44
|
+
*/
|
|
45
|
+
overturned?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface AccuracyEpochBucketAminoMsg {
|
|
48
|
+
type: "/sparkdream.forum.v1.AccuracyEpochBucket";
|
|
49
|
+
value: AccuracyEpochBucketAmino;
|
|
50
|
+
}
|
|
3
51
|
/**
|
|
4
52
|
* SentinelActivity holds forum-specific action counters and local cooldowns
|
|
5
53
|
* for a sentinel. The accountability record (bond, bond status, activity
|
|
@@ -39,6 +87,34 @@ export interface SentinelActivity {
|
|
|
39
87
|
upheldPins: bigint;
|
|
40
88
|
overturnedPins: bigint;
|
|
41
89
|
epochPins: bigint;
|
|
90
|
+
/**
|
|
91
|
+
* Curation-proposal tracking. A sentinel may propose a reply as a thread's
|
|
92
|
+
* accepted answer (MsgMarkAcceptedReply on someone else's thread); the author
|
|
93
|
+
* confirms/rejects or it auto-confirms after a timeout.
|
|
94
|
+
* total_proposals — lifetime proposals created (incremented at propose).
|
|
95
|
+
* confirmed_proposals — lifetime proposals confirmed (author confirm or
|
|
96
|
+
* auto-confirm); credited to the proposing sentinel.
|
|
97
|
+
* rejected_proposals — lifetime proposals rejected by the author.
|
|
98
|
+
* epoch_curations — confirmed proposals in the current reward epoch.
|
|
99
|
+
* Feeds the sentinel reward score; reset each epoch.
|
|
100
|
+
* Incremented on CONFIRM (success), not on propose, so
|
|
101
|
+
* it cannot be farmed by spamming unconfirmed proposals.
|
|
102
|
+
*/
|
|
103
|
+
totalProposals: bigint;
|
|
104
|
+
confirmedProposals: bigint;
|
|
105
|
+
rejectedProposals: bigint;
|
|
106
|
+
epochCurations: bigint;
|
|
107
|
+
/**
|
|
108
|
+
* Rolling-window accuracy ring. Fixed length SentinelAccuracyRingSize once
|
|
109
|
+
* first written; slot e % C holds reward-epoch e's resolved-appeal tally.
|
|
110
|
+
* x/rep's reward distribution computes accuracy over the last
|
|
111
|
+
* SentinelAccuracyWindowEpochs slots from this ring. The lifetime
|
|
112
|
+
* upheld_*\/overturned_* counters above are retained for display/audit and are
|
|
113
|
+
* NO LONGER used for reward accuracy. Append-only field — empty on records
|
|
114
|
+
* written before this field existed (no migration needed; an empty ring reads
|
|
115
|
+
* as zero decided appeals).
|
|
116
|
+
*/
|
|
117
|
+
accuracyWindow: AccuracyEpochBucket[];
|
|
42
118
|
}
|
|
43
119
|
export interface SentinelActivityProtoMsg {
|
|
44
120
|
typeUrl: "/sparkdream.forum.v1.SentinelActivity";
|
|
@@ -83,11 +159,60 @@ export interface SentinelActivityAmino {
|
|
|
83
159
|
upheld_pins?: string;
|
|
84
160
|
overturned_pins?: string;
|
|
85
161
|
epoch_pins?: string;
|
|
162
|
+
/**
|
|
163
|
+
* Curation-proposal tracking. A sentinel may propose a reply as a thread's
|
|
164
|
+
* accepted answer (MsgMarkAcceptedReply on someone else's thread); the author
|
|
165
|
+
* confirms/rejects or it auto-confirms after a timeout.
|
|
166
|
+
* total_proposals — lifetime proposals created (incremented at propose).
|
|
167
|
+
* confirmed_proposals — lifetime proposals confirmed (author confirm or
|
|
168
|
+
* auto-confirm); credited to the proposing sentinel.
|
|
169
|
+
* rejected_proposals — lifetime proposals rejected by the author.
|
|
170
|
+
* epoch_curations — confirmed proposals in the current reward epoch.
|
|
171
|
+
* Feeds the sentinel reward score; reset each epoch.
|
|
172
|
+
* Incremented on CONFIRM (success), not on propose, so
|
|
173
|
+
* it cannot be farmed by spamming unconfirmed proposals.
|
|
174
|
+
*/
|
|
175
|
+
total_proposals?: string;
|
|
176
|
+
confirmed_proposals?: string;
|
|
177
|
+
rejected_proposals?: string;
|
|
178
|
+
epoch_curations?: string;
|
|
179
|
+
/**
|
|
180
|
+
* Rolling-window accuracy ring. Fixed length SentinelAccuracyRingSize once
|
|
181
|
+
* first written; slot e % C holds reward-epoch e's resolved-appeal tally.
|
|
182
|
+
* x/rep's reward distribution computes accuracy over the last
|
|
183
|
+
* SentinelAccuracyWindowEpochs slots from this ring. The lifetime
|
|
184
|
+
* upheld_*\/overturned_* counters above are retained for display/audit and are
|
|
185
|
+
* NO LONGER used for reward accuracy. Append-only field — empty on records
|
|
186
|
+
* written before this field existed (no migration needed; an empty ring reads
|
|
187
|
+
* as zero decided appeals).
|
|
188
|
+
*/
|
|
189
|
+
accuracy_window?: AccuracyEpochBucketAmino[];
|
|
86
190
|
}
|
|
87
191
|
export interface SentinelActivityAminoMsg {
|
|
88
192
|
type: "/sparkdream.forum.v1.SentinelActivity";
|
|
89
193
|
value: SentinelActivityAmino;
|
|
90
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* AccuracyEpochBucket holds one reward-epoch's resolved-appeal tally for a
|
|
197
|
+
* sentinel. Stored in a fixed-size ring on SentinelActivity (slot index =
|
|
198
|
+
* epoch % SentinelAccuracyRingSize); the `epoch` stamp disambiguates a live
|
|
199
|
+
* slot from a stale one left behind by an inactive epoch.
|
|
200
|
+
* @name AccuracyEpochBucket
|
|
201
|
+
* @package sparkdream.forum.v1
|
|
202
|
+
* @see proto type: sparkdream.forum.v1.AccuracyEpochBucket
|
|
203
|
+
*/
|
|
204
|
+
export declare const AccuracyEpochBucket: {
|
|
205
|
+
typeUrl: string;
|
|
206
|
+
encode(message: AccuracyEpochBucket, writer?: BinaryWriter): BinaryWriter;
|
|
207
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AccuracyEpochBucket;
|
|
208
|
+
fromPartial(object: DeepPartial<AccuracyEpochBucket>): AccuracyEpochBucket;
|
|
209
|
+
fromAmino(object: AccuracyEpochBucketAmino): AccuracyEpochBucket;
|
|
210
|
+
toAmino(message: AccuracyEpochBucket): AccuracyEpochBucketAmino;
|
|
211
|
+
fromAminoMsg(object: AccuracyEpochBucketAminoMsg): AccuracyEpochBucket;
|
|
212
|
+
fromProtoMsg(message: AccuracyEpochBucketProtoMsg): AccuracyEpochBucket;
|
|
213
|
+
toProto(message: AccuracyEpochBucket): Uint8Array;
|
|
214
|
+
toProtoMsg(message: AccuracyEpochBucket): AccuracyEpochBucketProtoMsg;
|
|
215
|
+
};
|
|
91
216
|
/**
|
|
92
217
|
* SentinelActivity holds forum-specific action counters and local cooldowns
|
|
93
218
|
* for a sentinel. The accountability record (bond, bond status, activity
|
|
@@ -1,8 +1,104 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SentinelActivity = void 0;
|
|
3
|
+
exports.SentinelActivity = exports.AccuracyEpochBucket = void 0;
|
|
4
4
|
//@ts-nocheck
|
|
5
5
|
const binary_1 = require("../../../binary");
|
|
6
|
+
function createBaseAccuracyEpochBucket() {
|
|
7
|
+
return {
|
|
8
|
+
epoch: BigInt(0),
|
|
9
|
+
upheld: BigInt(0),
|
|
10
|
+
overturned: BigInt(0)
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* AccuracyEpochBucket holds one reward-epoch's resolved-appeal tally for a
|
|
15
|
+
* sentinel. Stored in a fixed-size ring on SentinelActivity (slot index =
|
|
16
|
+
* epoch % SentinelAccuracyRingSize); the `epoch` stamp disambiguates a live
|
|
17
|
+
* slot from a stale one left behind by an inactive epoch.
|
|
18
|
+
* @name AccuracyEpochBucket
|
|
19
|
+
* @package sparkdream.forum.v1
|
|
20
|
+
* @see proto type: sparkdream.forum.v1.AccuracyEpochBucket
|
|
21
|
+
*/
|
|
22
|
+
exports.AccuracyEpochBucket = {
|
|
23
|
+
typeUrl: "/sparkdream.forum.v1.AccuracyEpochBucket",
|
|
24
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
25
|
+
if (message.epoch !== BigInt(0)) {
|
|
26
|
+
writer.uint32(8).uint64(message.epoch);
|
|
27
|
+
}
|
|
28
|
+
if (message.upheld !== BigInt(0)) {
|
|
29
|
+
writer.uint32(16).uint64(message.upheld);
|
|
30
|
+
}
|
|
31
|
+
if (message.overturned !== BigInt(0)) {
|
|
32
|
+
writer.uint32(24).uint64(message.overturned);
|
|
33
|
+
}
|
|
34
|
+
return writer;
|
|
35
|
+
},
|
|
36
|
+
decode(input, length) {
|
|
37
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
38
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
39
|
+
const message = createBaseAccuracyEpochBucket();
|
|
40
|
+
while (reader.pos < end) {
|
|
41
|
+
const tag = reader.uint32();
|
|
42
|
+
switch (tag >>> 3) {
|
|
43
|
+
case 1:
|
|
44
|
+
message.epoch = reader.uint64();
|
|
45
|
+
break;
|
|
46
|
+
case 2:
|
|
47
|
+
message.upheld = reader.uint64();
|
|
48
|
+
break;
|
|
49
|
+
case 3:
|
|
50
|
+
message.overturned = reader.uint64();
|
|
51
|
+
break;
|
|
52
|
+
default:
|
|
53
|
+
reader.skipType(tag & 7);
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return message;
|
|
58
|
+
},
|
|
59
|
+
fromPartial(object) {
|
|
60
|
+
const message = createBaseAccuracyEpochBucket();
|
|
61
|
+
message.epoch = object.epoch !== undefined && object.epoch !== null ? BigInt(object.epoch.toString()) : BigInt(0);
|
|
62
|
+
message.upheld = object.upheld !== undefined && object.upheld !== null ? BigInt(object.upheld.toString()) : BigInt(0);
|
|
63
|
+
message.overturned = object.overturned !== undefined && object.overturned !== null ? BigInt(object.overturned.toString()) : BigInt(0);
|
|
64
|
+
return message;
|
|
65
|
+
},
|
|
66
|
+
fromAmino(object) {
|
|
67
|
+
const message = createBaseAccuracyEpochBucket();
|
|
68
|
+
if (object.epoch !== undefined && object.epoch !== null) {
|
|
69
|
+
message.epoch = BigInt(object.epoch);
|
|
70
|
+
}
|
|
71
|
+
if (object.upheld !== undefined && object.upheld !== null) {
|
|
72
|
+
message.upheld = BigInt(object.upheld);
|
|
73
|
+
}
|
|
74
|
+
if (object.overturned !== undefined && object.overturned !== null) {
|
|
75
|
+
message.overturned = BigInt(object.overturned);
|
|
76
|
+
}
|
|
77
|
+
return message;
|
|
78
|
+
},
|
|
79
|
+
toAmino(message) {
|
|
80
|
+
const obj = {};
|
|
81
|
+
obj.epoch = message.epoch !== BigInt(0) ? message.epoch?.toString() : undefined;
|
|
82
|
+
obj.upheld = message.upheld !== BigInt(0) ? message.upheld?.toString() : undefined;
|
|
83
|
+
obj.overturned = message.overturned !== BigInt(0) ? message.overturned?.toString() : undefined;
|
|
84
|
+
return obj;
|
|
85
|
+
},
|
|
86
|
+
fromAminoMsg(object) {
|
|
87
|
+
return exports.AccuracyEpochBucket.fromAmino(object.value);
|
|
88
|
+
},
|
|
89
|
+
fromProtoMsg(message) {
|
|
90
|
+
return exports.AccuracyEpochBucket.decode(message.value);
|
|
91
|
+
},
|
|
92
|
+
toProto(message) {
|
|
93
|
+
return exports.AccuracyEpochBucket.encode(message).finish();
|
|
94
|
+
},
|
|
95
|
+
toProtoMsg(message) {
|
|
96
|
+
return {
|
|
97
|
+
typeUrl: "/sparkdream.forum.v1.AccuracyEpochBucket",
|
|
98
|
+
value: exports.AccuracyEpochBucket.encode(message).finish()
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
};
|
|
6
102
|
function createBaseSentinelActivity() {
|
|
7
103
|
return {
|
|
8
104
|
address: "",
|
|
@@ -28,7 +124,12 @@ function createBaseSentinelActivity() {
|
|
|
28
124
|
totalPins: BigInt(0),
|
|
29
125
|
upheldPins: BigInt(0),
|
|
30
126
|
overturnedPins: BigInt(0),
|
|
31
|
-
epochPins: BigInt(0)
|
|
127
|
+
epochPins: BigInt(0),
|
|
128
|
+
totalProposals: BigInt(0),
|
|
129
|
+
confirmedProposals: BigInt(0),
|
|
130
|
+
rejectedProposals: BigInt(0),
|
|
131
|
+
epochCurations: BigInt(0),
|
|
132
|
+
accuracyWindow: []
|
|
32
133
|
};
|
|
33
134
|
}
|
|
34
135
|
/**
|
|
@@ -114,6 +215,21 @@ exports.SentinelActivity = {
|
|
|
114
215
|
if (message.epochPins !== BigInt(0)) {
|
|
115
216
|
writer.uint32(192).uint64(message.epochPins);
|
|
116
217
|
}
|
|
218
|
+
if (message.totalProposals !== BigInt(0)) {
|
|
219
|
+
writer.uint32(200).uint64(message.totalProposals);
|
|
220
|
+
}
|
|
221
|
+
if (message.confirmedProposals !== BigInt(0)) {
|
|
222
|
+
writer.uint32(208).uint64(message.confirmedProposals);
|
|
223
|
+
}
|
|
224
|
+
if (message.rejectedProposals !== BigInt(0)) {
|
|
225
|
+
writer.uint32(216).uint64(message.rejectedProposals);
|
|
226
|
+
}
|
|
227
|
+
if (message.epochCurations !== BigInt(0)) {
|
|
228
|
+
writer.uint32(224).uint64(message.epochCurations);
|
|
229
|
+
}
|
|
230
|
+
for (const v of message.accuracyWindow) {
|
|
231
|
+
exports.AccuracyEpochBucket.encode(v, writer.uint32(234).fork()).ldelim();
|
|
232
|
+
}
|
|
117
233
|
return writer;
|
|
118
234
|
},
|
|
119
235
|
decode(input, length) {
|
|
@@ -195,6 +311,21 @@ exports.SentinelActivity = {
|
|
|
195
311
|
case 24:
|
|
196
312
|
message.epochPins = reader.uint64();
|
|
197
313
|
break;
|
|
314
|
+
case 25:
|
|
315
|
+
message.totalProposals = reader.uint64();
|
|
316
|
+
break;
|
|
317
|
+
case 26:
|
|
318
|
+
message.confirmedProposals = reader.uint64();
|
|
319
|
+
break;
|
|
320
|
+
case 27:
|
|
321
|
+
message.rejectedProposals = reader.uint64();
|
|
322
|
+
break;
|
|
323
|
+
case 28:
|
|
324
|
+
message.epochCurations = reader.uint64();
|
|
325
|
+
break;
|
|
326
|
+
case 29:
|
|
327
|
+
message.accuracyWindow.push(exports.AccuracyEpochBucket.decode(reader, reader.uint32()));
|
|
328
|
+
break;
|
|
198
329
|
default:
|
|
199
330
|
reader.skipType(tag & 7);
|
|
200
331
|
break;
|
|
@@ -228,6 +359,11 @@ exports.SentinelActivity = {
|
|
|
228
359
|
message.upheldPins = object.upheldPins !== undefined && object.upheldPins !== null ? BigInt(object.upheldPins.toString()) : BigInt(0);
|
|
229
360
|
message.overturnedPins = object.overturnedPins !== undefined && object.overturnedPins !== null ? BigInt(object.overturnedPins.toString()) : BigInt(0);
|
|
230
361
|
message.epochPins = object.epochPins !== undefined && object.epochPins !== null ? BigInt(object.epochPins.toString()) : BigInt(0);
|
|
362
|
+
message.totalProposals = object.totalProposals !== undefined && object.totalProposals !== null ? BigInt(object.totalProposals.toString()) : BigInt(0);
|
|
363
|
+
message.confirmedProposals = object.confirmedProposals !== undefined && object.confirmedProposals !== null ? BigInt(object.confirmedProposals.toString()) : BigInt(0);
|
|
364
|
+
message.rejectedProposals = object.rejectedProposals !== undefined && object.rejectedProposals !== null ? BigInt(object.rejectedProposals.toString()) : BigInt(0);
|
|
365
|
+
message.epochCurations = object.epochCurations !== undefined && object.epochCurations !== null ? BigInt(object.epochCurations.toString()) : BigInt(0);
|
|
366
|
+
message.accuracyWindow = object.accuracyWindow?.map(e => exports.AccuracyEpochBucket.fromPartial(e)) || [];
|
|
231
367
|
return message;
|
|
232
368
|
},
|
|
233
369
|
fromAmino(object) {
|
|
@@ -304,6 +440,19 @@ exports.SentinelActivity = {
|
|
|
304
440
|
if (object.epoch_pins !== undefined && object.epoch_pins !== null) {
|
|
305
441
|
message.epochPins = BigInt(object.epoch_pins);
|
|
306
442
|
}
|
|
443
|
+
if (object.total_proposals !== undefined && object.total_proposals !== null) {
|
|
444
|
+
message.totalProposals = BigInt(object.total_proposals);
|
|
445
|
+
}
|
|
446
|
+
if (object.confirmed_proposals !== undefined && object.confirmed_proposals !== null) {
|
|
447
|
+
message.confirmedProposals = BigInt(object.confirmed_proposals);
|
|
448
|
+
}
|
|
449
|
+
if (object.rejected_proposals !== undefined && object.rejected_proposals !== null) {
|
|
450
|
+
message.rejectedProposals = BigInt(object.rejected_proposals);
|
|
451
|
+
}
|
|
452
|
+
if (object.epoch_curations !== undefined && object.epoch_curations !== null) {
|
|
453
|
+
message.epochCurations = BigInt(object.epoch_curations);
|
|
454
|
+
}
|
|
455
|
+
message.accuracyWindow = object.accuracy_window?.map(e => exports.AccuracyEpochBucket.fromAmino(e)) || [];
|
|
307
456
|
return message;
|
|
308
457
|
},
|
|
309
458
|
toAmino(message) {
|
|
@@ -332,6 +481,16 @@ exports.SentinelActivity = {
|
|
|
332
481
|
obj.upheld_pins = message.upheldPins !== BigInt(0) ? message.upheldPins?.toString() : undefined;
|
|
333
482
|
obj.overturned_pins = message.overturnedPins !== BigInt(0) ? message.overturnedPins?.toString() : undefined;
|
|
334
483
|
obj.epoch_pins = message.epochPins !== BigInt(0) ? message.epochPins?.toString() : undefined;
|
|
484
|
+
obj.total_proposals = message.totalProposals !== BigInt(0) ? message.totalProposals?.toString() : undefined;
|
|
485
|
+
obj.confirmed_proposals = message.confirmedProposals !== BigInt(0) ? message.confirmedProposals?.toString() : undefined;
|
|
486
|
+
obj.rejected_proposals = message.rejectedProposals !== BigInt(0) ? message.rejectedProposals?.toString() : undefined;
|
|
487
|
+
obj.epoch_curations = message.epochCurations !== BigInt(0) ? message.epochCurations?.toString() : undefined;
|
|
488
|
+
if (message.accuracyWindow) {
|
|
489
|
+
obj.accuracy_window = message.accuracyWindow.map(e => e ? exports.AccuracyEpochBucket.toAmino(e) : undefined);
|
|
490
|
+
}
|
|
491
|
+
else {
|
|
492
|
+
obj.accuracy_window = message.accuracyWindow;
|
|
493
|
+
}
|
|
335
494
|
return obj;
|
|
336
495
|
},
|
|
337
496
|
fromAminoMsg(object) {
|
|
@@ -15,8 +15,32 @@ export interface ThreadMetadata {
|
|
|
15
15
|
proposedReplyId: bigint;
|
|
16
16
|
proposedBy: string;
|
|
17
17
|
proposedAt: bigint;
|
|
18
|
+
/**
|
|
19
|
+
* proposal_extended is set true once the auto-confirm EndBlocker has granted
|
|
20
|
+
* the one-time inactivity extension to a pending proposal (author appeared
|
|
21
|
+
* inactive when the timeout first elapsed). Prevents an indefinite extension
|
|
22
|
+
* loop — the next timeout auto-confirms regardless. Cleared when the proposal
|
|
23
|
+
* resolves (confirm/reject/auto-confirm).
|
|
24
|
+
*/
|
|
25
|
+
proposalExtended: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* proposal_fire_at is the exact ProposalAutoConfirmQueue key (unix seconds)
|
|
28
|
+
* under which the current pending proposal is enqueued. Stored so the manual
|
|
29
|
+
* confirm/reject paths can remove the precise queue entry, and so the
|
|
30
|
+
* EndBlocker can detect-and-drop stale entries (a key whose fire_at no longer
|
|
31
|
+
* matches the live proposal). 0 = no pending proposal.
|
|
32
|
+
*/
|
|
33
|
+
proposalFireAt: bigint;
|
|
18
34
|
pinnedReplyIds: bigint[];
|
|
19
35
|
pinnedRecords: PinnedReplyRecord[];
|
|
36
|
+
/**
|
|
37
|
+
* proposals_locked, when true, closes the thread to sentinel accepted-reply
|
|
38
|
+
* proposals: proposeAcceptedReply rejects with ErrThreadProposalsLocked. Set
|
|
39
|
+
* by the thread author via MsgSetThreadProposalsLock so a discussion thread (or
|
|
40
|
+
* a thread with no good answer) can be definitively closed to curation without
|
|
41
|
+
* being forced into an irreversible acceptance. Author-only to set/clear.
|
|
42
|
+
*/
|
|
43
|
+
proposalsLocked: boolean;
|
|
20
44
|
}
|
|
21
45
|
export interface ThreadMetadataProtoMsg {
|
|
22
46
|
typeUrl: "/sparkdream.forum.v1.ThreadMetadata";
|
|
@@ -36,8 +60,32 @@ export interface ThreadMetadataAmino {
|
|
|
36
60
|
proposed_reply_id?: string;
|
|
37
61
|
proposed_by?: string;
|
|
38
62
|
proposed_at?: string;
|
|
63
|
+
/**
|
|
64
|
+
* proposal_extended is set true once the auto-confirm EndBlocker has granted
|
|
65
|
+
* the one-time inactivity extension to a pending proposal (author appeared
|
|
66
|
+
* inactive when the timeout first elapsed). Prevents an indefinite extension
|
|
67
|
+
* loop — the next timeout auto-confirms regardless. Cleared when the proposal
|
|
68
|
+
* resolves (confirm/reject/auto-confirm).
|
|
69
|
+
*/
|
|
70
|
+
proposal_extended?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* proposal_fire_at is the exact ProposalAutoConfirmQueue key (unix seconds)
|
|
73
|
+
* under which the current pending proposal is enqueued. Stored so the manual
|
|
74
|
+
* confirm/reject paths can remove the precise queue entry, and so the
|
|
75
|
+
* EndBlocker can detect-and-drop stale entries (a key whose fire_at no longer
|
|
76
|
+
* matches the live proposal). 0 = no pending proposal.
|
|
77
|
+
*/
|
|
78
|
+
proposal_fire_at?: string;
|
|
39
79
|
pinned_reply_ids?: string[];
|
|
40
80
|
pinned_records?: PinnedReplyRecordAmino[];
|
|
81
|
+
/**
|
|
82
|
+
* proposals_locked, when true, closes the thread to sentinel accepted-reply
|
|
83
|
+
* proposals: proposeAcceptedReply rejects with ErrThreadProposalsLocked. Set
|
|
84
|
+
* by the thread author via MsgSetThreadProposalsLock so a discussion thread (or
|
|
85
|
+
* a thread with no good answer) can be definitively closed to curation without
|
|
86
|
+
* being forced into an irreversible acceptance. Author-only to set/clear.
|
|
87
|
+
*/
|
|
88
|
+
proposals_locked?: boolean;
|
|
41
89
|
}
|
|
42
90
|
export interface ThreadMetadataAminoMsg {
|
|
43
91
|
type: "/sparkdream.forum.v1.ThreadMetadata";
|