@sparkdreamnft/sparkdreamjs 0.0.36 → 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.
Files changed (33) hide show
  1. package/esm/sparkdream/federation/v1/genesis.js +101 -3
  2. package/esm/sparkdream/federation/v1/params.js +129 -117
  3. package/esm/sparkdream/federation/v1/query.js +204 -7
  4. package/esm/sparkdream/federation/v1/query.lcd.js +11 -2
  5. package/esm/sparkdream/federation/v1/query.rpc.Query.js +16 -3
  6. package/esm/sparkdream/federation/v1/types.js +73 -1
  7. package/esm/sparkdream/federation/v1/verifier_activity.js +143 -45
  8. package/esm/sparkdream/rep/v1/bonded_role.js +37 -1
  9. package/esm/sparkdream/rep/v1/params.js +194 -2
  10. package/esm/sparkdream/rep/v1/role_activity.js +13 -1
  11. package/package.json +1 -1
  12. package/sparkdream/bundle.d.ts +50 -0
  13. package/sparkdream/federation/v1/genesis.d.ts +66 -0
  14. package/sparkdream/federation/v1/genesis.js +102 -4
  15. package/sparkdream/federation/v1/params.d.ts +72 -10
  16. package/sparkdream/federation/v1/params.js +129 -117
  17. package/sparkdream/federation/v1/query.d.ts +120 -3
  18. package/sparkdream/federation/v1/query.js +204 -7
  19. package/sparkdream/federation/v1/query.lcd.d.ts +2 -1
  20. package/sparkdream/federation/v1/query.lcd.js +11 -2
  21. package/sparkdream/federation/v1/query.rpc.Query.d.ts +13 -3
  22. package/sparkdream/federation/v1/query.rpc.Query.js +15 -2
  23. package/sparkdream/federation/v1/types.d.ts +44 -0
  24. package/sparkdream/federation/v1/types.js +73 -1
  25. package/sparkdream/federation/v1/verifier_activity.d.ts +151 -68
  26. package/sparkdream/federation/v1/verifier_activity.js +144 -46
  27. package/sparkdream/rep/v1/bonded_role.d.ts +42 -0
  28. package/sparkdream/rep/v1/bonded_role.js +37 -1
  29. package/sparkdream/rep/v1/params.d.ts +96 -0
  30. package/sparkdream/rep/v1/params.js +194 -2
  31. package/sparkdream/rep/v1/role_activity.d.ts +26 -0
  32. package/sparkdream/rep/v1/role_activity.js +13 -1
  33. package/sparkdream/rpc.query.d.ts +1 -0
@@ -1,10 +1,25 @@
1
1
  import { BinaryReader, BinaryWriter } from "../../../binary";
2
2
  import { DeepPartial } from "../../../helpers";
3
3
  /**
4
- * VerifierActivity holds federation-specific per-verifier counters. The
5
- * generic bond/status/activity record lives in x/rep as BondedRole
6
- * (ROLE_TYPE_FEDERATION_VERIFIER) — this proto only tracks what's
7
- * federation-specific: verification counts and dispute outcomes.
4
+ * VerifierActivity is federation's SLIM per-verifier record.
5
+ *
6
+ * Everything that is a property of the ROLE rather than of federation's
7
+ * surface -- verdict streaks, the overturn cooldown, the rolling accuracy
8
+ * ring, and the per-action counters -- lives on x/rep's shared RoleActivity
9
+ * under ROLE_TYPE_FEDERATION_VERIFIER, alongside the bond it governs.
10
+ * Federation reports actions (RecordRoleAction with
11
+ * ActionKindFederationVerify) and verdicts (RecordRoleOutcome); x/rep applies
12
+ * the consequences and pays the role. Same ownership split forum and collect
13
+ * already use for the content sentinel.
14
+ *
15
+ * Only unchallenged_verifications stays here: it is a federation-local
16
+ * bookkeeping stat with no shared meaning -- an unchallenged verification is
17
+ * not evidence of accuracy and deliberately earns nothing, so it must not
18
+ * reach the accuracy ring.
19
+ *
20
+ * The QueryVerifierActivityResponse still returns the FULL historical shape.
21
+ * Those fields are PROJECTED from rep at query time (see
22
+ * query_verifier_activity.go) and are not persisted here.
8
23
  * @name VerifierActivity
9
24
  * @package sparkdream.federation.v1
10
25
  * @see proto type: sparkdream.federation.v1.VerifierActivity
@@ -12,107 +27,155 @@ import { DeepPartial } from "../../../helpers";
12
27
  export interface VerifierActivity {
13
28
  address: string;
14
29
  /**
15
- * Lifetime metrics
30
+ * unchallenged_verifications counts verifications whose challenge window
31
+ * closed with no challenge filed. Bumped by the Phase 6 EndBlocker sweep.
32
+ */
33
+ unchallengedVerifications: bigint;
34
+ }
35
+ export interface VerifierActivityProtoMsg {
36
+ typeUrl: "/sparkdream.federation.v1.VerifierActivity";
37
+ value: Uint8Array;
38
+ }
39
+ /**
40
+ * VerifierActivity is federation's SLIM per-verifier record.
41
+ *
42
+ * Everything that is a property of the ROLE rather than of federation's
43
+ * surface -- verdict streaks, the overturn cooldown, the rolling accuracy
44
+ * ring, and the per-action counters -- lives on x/rep's shared RoleActivity
45
+ * under ROLE_TYPE_FEDERATION_VERIFIER, alongside the bond it governs.
46
+ * Federation reports actions (RecordRoleAction with
47
+ * ActionKindFederationVerify) and verdicts (RecordRoleOutcome); x/rep applies
48
+ * the consequences and pays the role. Same ownership split forum and collect
49
+ * already use for the content sentinel.
50
+ *
51
+ * Only unchallenged_verifications stays here: it is a federation-local
52
+ * bookkeeping stat with no shared meaning -- an unchallenged verification is
53
+ * not evidence of accuracy and deliberately earns nothing, so it must not
54
+ * reach the accuracy ring.
55
+ *
56
+ * The QueryVerifierActivityResponse still returns the FULL historical shape.
57
+ * Those fields are PROJECTED from rep at query time (see
58
+ * query_verifier_activity.go) and are not persisted here.
59
+ * @name VerifierActivityAmino
60
+ * @package sparkdream.federation.v1
61
+ * @see proto type: sparkdream.federation.v1.VerifierActivity
62
+ */
63
+ export interface VerifierActivityAmino {
64
+ address?: string;
65
+ /**
66
+ * unchallenged_verifications counts verifications whose challenge window
67
+ * closed with no challenge filed. Bumped by the Phase 6 EndBlocker sweep.
68
+ */
69
+ unchallenged_verifications?: string;
70
+ }
71
+ export interface VerifierActivityAminoMsg {
72
+ type: "/sparkdream.federation.v1.VerifierActivity";
73
+ value: VerifierActivityAmino;
74
+ }
75
+ /**
76
+ * VerifierActivityView is the read-only projection returned by the
77
+ * verifier-activity query: federation's slim stored record overlaid with the
78
+ * shared accountability state x/rep owns. Never persisted.
79
+ * @name VerifierActivityView
80
+ * @package sparkdream.federation.v1
81
+ * @see proto type: sparkdream.federation.v1.VerifierActivityView
82
+ */
83
+ export interface VerifierActivityView {
84
+ address: string;
85
+ /**
86
+ * Federation-local (stored).
16
87
  */
17
- totalVerifications: bigint;
18
- upheldVerifications: bigint;
19
- overturnedVerifications: bigint;
20
88
  unchallengedVerifications: bigint;
21
89
  /**
22
- * Epoch metrics
90
+ * Projected from rep RoleActivity per-kind counters
91
+ * (ActionKindFederationVerify).
23
92
  */
93
+ totalVerifications: bigint;
94
+ upheldVerifications: bigint;
95
+ overturnedVerifications: bigint;
24
96
  epochVerifications: bigint;
25
- epochChallengesResolved: bigint;
26
97
  /**
27
- * Consecutive-outcome tracking for demotion triggers. Slash streak beyond
28
- * UpheldToResetOverturns consecutive-overturn is the demotion signal.
98
+ * Projected from rep RoleActivity shared fields.
29
99
  */
100
+ epochChallengesResolved: bigint;
30
101
  consecutiveOverturns: bigint;
31
102
  consecutiveUpheld: bigint;
32
- /**
33
- * overturn_cooldown_until is the unix timestamp during which the verifier
34
- * cannot submit new verifications after an overturn. Managed by the
35
- * federation challenge-resolution flow.
36
- */
37
103
  overturnCooldownUntil: bigint;
104
+ lastSlashEpoch: bigint;
38
105
  /**
39
- * slash_count is the lifetime number of times this verifier has been
40
- * slashed (overturn verdicts).
106
+ * slash_count is DERIVED, not stored: every upheld challenge against a
107
+ * verifier slashes exactly once, so the overturned-verification count IS
108
+ * the slash count. It was a duplicate counter incremented on the same line
109
+ * as the overturn before the migration.
41
110
  */
42
111
  slashCount: bigint;
43
- /**
44
- * last_slash_epoch records the Phase 11 reward-epoch number
45
- * (height / GetVerifierRewardEpochBlocks) in which this verifier was
46
- * most recently slashed. Phase 11's "no slashing this epoch"
47
- * eligibility gate compares this against the current reward epoch —
48
- * an exact match disqualifies the verifier for the current epoch's
49
- * payout. Zero means "never slashed under the current accounting".
50
- */
51
- lastSlashEpoch: bigint;
52
112
  }
53
- export interface VerifierActivityProtoMsg {
54
- typeUrl: "/sparkdream.federation.v1.VerifierActivity";
113
+ export interface VerifierActivityViewProtoMsg {
114
+ typeUrl: "/sparkdream.federation.v1.VerifierActivityView";
55
115
  value: Uint8Array;
56
116
  }
57
117
  /**
58
- * VerifierActivity holds federation-specific per-verifier counters. The
59
- * generic bond/status/activity record lives in x/rep as BondedRole
60
- * (ROLE_TYPE_FEDERATION_VERIFIER) — this proto only tracks what's
61
- * federation-specific: verification counts and dispute outcomes.
62
- * @name VerifierActivityAmino
118
+ * VerifierActivityView is the read-only projection returned by the
119
+ * verifier-activity query: federation's slim stored record overlaid with the
120
+ * shared accountability state x/rep owns. Never persisted.
121
+ * @name VerifierActivityViewAmino
63
122
  * @package sparkdream.federation.v1
64
- * @see proto type: sparkdream.federation.v1.VerifierActivity
123
+ * @see proto type: sparkdream.federation.v1.VerifierActivityView
65
124
  */
66
- export interface VerifierActivityAmino {
125
+ export interface VerifierActivityViewAmino {
67
126
  address?: string;
68
127
  /**
69
- * Lifetime metrics
128
+ * Federation-local (stored).
70
129
  */
71
- total_verifications?: string;
72
- upheld_verifications?: string;
73
- overturned_verifications?: string;
74
130
  unchallenged_verifications?: string;
75
131
  /**
76
- * Epoch metrics
132
+ * Projected from rep RoleActivity per-kind counters
133
+ * (ActionKindFederationVerify).
77
134
  */
135
+ total_verifications?: string;
136
+ upheld_verifications?: string;
137
+ overturned_verifications?: string;
78
138
  epoch_verifications?: string;
79
- epoch_challenges_resolved?: string;
80
139
  /**
81
- * Consecutive-outcome tracking for demotion triggers. Slash streak beyond
82
- * UpheldToResetOverturns consecutive-overturn is the demotion signal.
140
+ * Projected from rep RoleActivity shared fields.
83
141
  */
142
+ epoch_challenges_resolved?: string;
84
143
  consecutive_overturns?: string;
85
144
  consecutive_upheld?: string;
86
- /**
87
- * overturn_cooldown_until is the unix timestamp during which the verifier
88
- * cannot submit new verifications after an overturn. Managed by the
89
- * federation challenge-resolution flow.
90
- */
91
145
  overturn_cooldown_until?: string;
146
+ last_slash_epoch?: string;
92
147
  /**
93
- * slash_count is the lifetime number of times this verifier has been
94
- * slashed (overturn verdicts).
148
+ * slash_count is DERIVED, not stored: every upheld challenge against a
149
+ * verifier slashes exactly once, so the overturned-verification count IS
150
+ * the slash count. It was a duplicate counter incremented on the same line
151
+ * as the overturn before the migration.
95
152
  */
96
153
  slash_count?: string;
97
- /**
98
- * last_slash_epoch records the Phase 11 reward-epoch number
99
- * (height / GetVerifierRewardEpochBlocks) in which this verifier was
100
- * most recently slashed. Phase 11's "no slashing this epoch"
101
- * eligibility gate compares this against the current reward epoch —
102
- * an exact match disqualifies the verifier for the current epoch's
103
- * payout. Zero means "never slashed under the current accounting".
104
- */
105
- last_slash_epoch?: string;
106
154
  }
107
- export interface VerifierActivityAminoMsg {
108
- type: "/sparkdream.federation.v1.VerifierActivity";
109
- value: VerifierActivityAmino;
155
+ export interface VerifierActivityViewAminoMsg {
156
+ type: "/sparkdream.federation.v1.VerifierActivityView";
157
+ value: VerifierActivityViewAmino;
110
158
  }
111
159
  /**
112
- * VerifierActivity holds federation-specific per-verifier counters. The
113
- * generic bond/status/activity record lives in x/rep as BondedRole
114
- * (ROLE_TYPE_FEDERATION_VERIFIER) — this proto only tracks what's
115
- * federation-specific: verification counts and dispute outcomes.
160
+ * VerifierActivity is federation's SLIM per-verifier record.
161
+ *
162
+ * Everything that is a property of the ROLE rather than of federation's
163
+ * surface -- verdict streaks, the overturn cooldown, the rolling accuracy
164
+ * ring, and the per-action counters -- lives on x/rep's shared RoleActivity
165
+ * under ROLE_TYPE_FEDERATION_VERIFIER, alongside the bond it governs.
166
+ * Federation reports actions (RecordRoleAction with
167
+ * ActionKindFederationVerify) and verdicts (RecordRoleOutcome); x/rep applies
168
+ * the consequences and pays the role. Same ownership split forum and collect
169
+ * already use for the content sentinel.
170
+ *
171
+ * Only unchallenged_verifications stays here: it is a federation-local
172
+ * bookkeeping stat with no shared meaning -- an unchallenged verification is
173
+ * not evidence of accuracy and deliberately earns nothing, so it must not
174
+ * reach the accuracy ring.
175
+ *
176
+ * The QueryVerifierActivityResponse still returns the FULL historical shape.
177
+ * Those fields are PROJECTED from rep at query time (see
178
+ * query_verifier_activity.go) and are not persisted here.
116
179
  * @name VerifierActivity
117
180
  * @package sparkdream.federation.v1
118
181
  * @see proto type: sparkdream.federation.v1.VerifierActivity
@@ -129,3 +192,23 @@ export declare const VerifierActivity: {
129
192
  toProto(message: VerifierActivity): Uint8Array;
130
193
  toProtoMsg(message: VerifierActivity): VerifierActivityProtoMsg;
131
194
  };
195
+ /**
196
+ * VerifierActivityView is the read-only projection returned by the
197
+ * verifier-activity query: federation's slim stored record overlaid with the
198
+ * shared accountability state x/rep owns. Never persisted.
199
+ * @name VerifierActivityView
200
+ * @package sparkdream.federation.v1
201
+ * @see proto type: sparkdream.federation.v1.VerifierActivityView
202
+ */
203
+ export declare const VerifierActivityView: {
204
+ typeUrl: string;
205
+ encode(message: VerifierActivityView, writer?: BinaryWriter): BinaryWriter;
206
+ decode(input: BinaryReader | Uint8Array, length?: number): VerifierActivityView;
207
+ fromPartial(object: DeepPartial<VerifierActivityView>): VerifierActivityView;
208
+ fromAmino(object: VerifierActivityViewAmino): VerifierActivityView;
209
+ toAmino(message: VerifierActivityView): VerifierActivityViewAmino;
210
+ fromAminoMsg(object: VerifierActivityViewAminoMsg): VerifierActivityView;
211
+ fromProtoMsg(message: VerifierActivityViewProtoMsg): VerifierActivityView;
212
+ toProto(message: VerifierActivityView): Uint8Array;
213
+ toProtoMsg(message: VerifierActivityView): VerifierActivityViewProtoMsg;
214
+ };
@@ -1,50 +1,148 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VerifierActivity = void 0;
3
+ exports.VerifierActivityView = exports.VerifierActivity = void 0;
4
4
  //@ts-nocheck
5
5
  const binary_1 = require("../../../binary");
6
6
  function createBaseVerifierActivity() {
7
7
  return {
8
8
  address: "",
9
+ unchallengedVerifications: BigInt(0)
10
+ };
11
+ }
12
+ /**
13
+ * VerifierActivity is federation's SLIM per-verifier record.
14
+ *
15
+ * Everything that is a property of the ROLE rather than of federation's
16
+ * surface -- verdict streaks, the overturn cooldown, the rolling accuracy
17
+ * ring, and the per-action counters -- lives on x/rep's shared RoleActivity
18
+ * under ROLE_TYPE_FEDERATION_VERIFIER, alongside the bond it governs.
19
+ * Federation reports actions (RecordRoleAction with
20
+ * ActionKindFederationVerify) and verdicts (RecordRoleOutcome); x/rep applies
21
+ * the consequences and pays the role. Same ownership split forum and collect
22
+ * already use for the content sentinel.
23
+ *
24
+ * Only unchallenged_verifications stays here: it is a federation-local
25
+ * bookkeeping stat with no shared meaning -- an unchallenged verification is
26
+ * not evidence of accuracy and deliberately earns nothing, so it must not
27
+ * reach the accuracy ring.
28
+ *
29
+ * The QueryVerifierActivityResponse still returns the FULL historical shape.
30
+ * Those fields are PROJECTED from rep at query time (see
31
+ * query_verifier_activity.go) and are not persisted here.
32
+ * @name VerifierActivity
33
+ * @package sparkdream.federation.v1
34
+ * @see proto type: sparkdream.federation.v1.VerifierActivity
35
+ */
36
+ exports.VerifierActivity = {
37
+ typeUrl: "/sparkdream.federation.v1.VerifierActivity",
38
+ encode(message, writer = binary_1.BinaryWriter.create()) {
39
+ if (message.address !== "") {
40
+ writer.uint32(10).string(message.address);
41
+ }
42
+ if (message.unchallengedVerifications !== BigInt(0)) {
43
+ writer.uint32(16).uint64(message.unchallengedVerifications);
44
+ }
45
+ return writer;
46
+ },
47
+ decode(input, length) {
48
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
49
+ let end = length === undefined ? reader.len : reader.pos + length;
50
+ const message = createBaseVerifierActivity();
51
+ while (reader.pos < end) {
52
+ const tag = reader.uint32();
53
+ switch (tag >>> 3) {
54
+ case 1:
55
+ message.address = reader.string();
56
+ break;
57
+ case 2:
58
+ message.unchallengedVerifications = reader.uint64();
59
+ break;
60
+ default:
61
+ reader.skipType(tag & 7);
62
+ break;
63
+ }
64
+ }
65
+ return message;
66
+ },
67
+ fromPartial(object) {
68
+ const message = createBaseVerifierActivity();
69
+ message.address = object.address ?? "";
70
+ message.unchallengedVerifications = object.unchallengedVerifications !== undefined && object.unchallengedVerifications !== null ? BigInt(object.unchallengedVerifications.toString()) : BigInt(0);
71
+ return message;
72
+ },
73
+ fromAmino(object) {
74
+ const message = createBaseVerifierActivity();
75
+ if (object.address !== undefined && object.address !== null) {
76
+ message.address = object.address;
77
+ }
78
+ if (object.unchallenged_verifications !== undefined && object.unchallenged_verifications !== null) {
79
+ message.unchallengedVerifications = BigInt(object.unchallenged_verifications);
80
+ }
81
+ return message;
82
+ },
83
+ toAmino(message) {
84
+ const obj = {};
85
+ obj.address = message.address === "" ? undefined : message.address;
86
+ obj.unchallenged_verifications = message.unchallengedVerifications !== BigInt(0) ? message.unchallengedVerifications?.toString() : undefined;
87
+ return obj;
88
+ },
89
+ fromAminoMsg(object) {
90
+ return exports.VerifierActivity.fromAmino(object.value);
91
+ },
92
+ fromProtoMsg(message) {
93
+ return exports.VerifierActivity.decode(message.value);
94
+ },
95
+ toProto(message) {
96
+ return exports.VerifierActivity.encode(message).finish();
97
+ },
98
+ toProtoMsg(message) {
99
+ return {
100
+ typeUrl: "/sparkdream.federation.v1.VerifierActivity",
101
+ value: exports.VerifierActivity.encode(message).finish()
102
+ };
103
+ }
104
+ };
105
+ function createBaseVerifierActivityView() {
106
+ return {
107
+ address: "",
108
+ unchallengedVerifications: BigInt(0),
9
109
  totalVerifications: BigInt(0),
10
110
  upheldVerifications: BigInt(0),
11
111
  overturnedVerifications: BigInt(0),
12
- unchallengedVerifications: BigInt(0),
13
112
  epochVerifications: BigInt(0),
14
113
  epochChallengesResolved: BigInt(0),
15
114
  consecutiveOverturns: BigInt(0),
16
115
  consecutiveUpheld: BigInt(0),
17
116
  overturnCooldownUntil: BigInt(0),
18
- slashCount: BigInt(0),
19
- lastSlashEpoch: BigInt(0)
117
+ lastSlashEpoch: BigInt(0),
118
+ slashCount: BigInt(0)
20
119
  };
21
120
  }
22
121
  /**
23
- * VerifierActivity holds federation-specific per-verifier counters. The
24
- * generic bond/status/activity record lives in x/rep as BondedRole
25
- * (ROLE_TYPE_FEDERATION_VERIFIER) — this proto only tracks what's
26
- * federation-specific: verification counts and dispute outcomes.
27
- * @name VerifierActivity
122
+ * VerifierActivityView is the read-only projection returned by the
123
+ * verifier-activity query: federation's slim stored record overlaid with the
124
+ * shared accountability state x/rep owns. Never persisted.
125
+ * @name VerifierActivityView
28
126
  * @package sparkdream.federation.v1
29
- * @see proto type: sparkdream.federation.v1.VerifierActivity
127
+ * @see proto type: sparkdream.federation.v1.VerifierActivityView
30
128
  */
31
- exports.VerifierActivity = {
32
- typeUrl: "/sparkdream.federation.v1.VerifierActivity",
129
+ exports.VerifierActivityView = {
130
+ typeUrl: "/sparkdream.federation.v1.VerifierActivityView",
33
131
  encode(message, writer = binary_1.BinaryWriter.create()) {
34
132
  if (message.address !== "") {
35
133
  writer.uint32(10).string(message.address);
36
134
  }
135
+ if (message.unchallengedVerifications !== BigInt(0)) {
136
+ writer.uint32(16).uint64(message.unchallengedVerifications);
137
+ }
37
138
  if (message.totalVerifications !== BigInt(0)) {
38
- writer.uint32(16).uint64(message.totalVerifications);
139
+ writer.uint32(24).uint64(message.totalVerifications);
39
140
  }
40
141
  if (message.upheldVerifications !== BigInt(0)) {
41
- writer.uint32(24).uint64(message.upheldVerifications);
142
+ writer.uint32(32).uint64(message.upheldVerifications);
42
143
  }
43
144
  if (message.overturnedVerifications !== BigInt(0)) {
44
- writer.uint32(32).uint64(message.overturnedVerifications);
45
- }
46
- if (message.unchallengedVerifications !== BigInt(0)) {
47
- writer.uint32(40).uint64(message.unchallengedVerifications);
145
+ writer.uint32(40).uint64(message.overturnedVerifications);
48
146
  }
49
147
  if (message.epochVerifications !== BigInt(0)) {
50
148
  writer.uint32(48).uint64(message.epochVerifications);
@@ -61,18 +159,18 @@ exports.VerifierActivity = {
61
159
  if (message.overturnCooldownUntil !== BigInt(0)) {
62
160
  writer.uint32(80).int64(message.overturnCooldownUntil);
63
161
  }
64
- if (message.slashCount !== BigInt(0)) {
65
- writer.uint32(88).uint64(message.slashCount);
66
- }
67
162
  if (message.lastSlashEpoch !== BigInt(0)) {
68
- writer.uint32(96).int64(message.lastSlashEpoch);
163
+ writer.uint32(88).int64(message.lastSlashEpoch);
164
+ }
165
+ if (message.slashCount !== BigInt(0)) {
166
+ writer.uint32(96).uint64(message.slashCount);
69
167
  }
70
168
  return writer;
71
169
  },
72
170
  decode(input, length) {
73
171
  const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
74
172
  let end = length === undefined ? reader.len : reader.pos + length;
75
- const message = createBaseVerifierActivity();
173
+ const message = createBaseVerifierActivityView();
76
174
  while (reader.pos < end) {
77
175
  const tag = reader.uint32();
78
176
  switch (tag >>> 3) {
@@ -80,16 +178,16 @@ exports.VerifierActivity = {
80
178
  message.address = reader.string();
81
179
  break;
82
180
  case 2:
83
- message.totalVerifications = reader.uint64();
181
+ message.unchallengedVerifications = reader.uint64();
84
182
  break;
85
183
  case 3:
86
- message.upheldVerifications = reader.uint64();
184
+ message.totalVerifications = reader.uint64();
87
185
  break;
88
186
  case 4:
89
- message.overturnedVerifications = reader.uint64();
187
+ message.upheldVerifications = reader.uint64();
90
188
  break;
91
189
  case 5:
92
- message.unchallengedVerifications = reader.uint64();
190
+ message.overturnedVerifications = reader.uint64();
93
191
  break;
94
192
  case 6:
95
193
  message.epochVerifications = reader.uint64();
@@ -107,10 +205,10 @@ exports.VerifierActivity = {
107
205
  message.overturnCooldownUntil = reader.int64();
108
206
  break;
109
207
  case 11:
110
- message.slashCount = reader.uint64();
208
+ message.lastSlashEpoch = reader.int64();
111
209
  break;
112
210
  case 12:
113
- message.lastSlashEpoch = reader.int64();
211
+ message.slashCount = reader.uint64();
114
212
  break;
115
213
  default:
116
214
  reader.skipType(tag & 7);
@@ -120,26 +218,29 @@ exports.VerifierActivity = {
120
218
  return message;
121
219
  },
122
220
  fromPartial(object) {
123
- const message = createBaseVerifierActivity();
221
+ const message = createBaseVerifierActivityView();
124
222
  message.address = object.address ?? "";
223
+ message.unchallengedVerifications = object.unchallengedVerifications !== undefined && object.unchallengedVerifications !== null ? BigInt(object.unchallengedVerifications.toString()) : BigInt(0);
125
224
  message.totalVerifications = object.totalVerifications !== undefined && object.totalVerifications !== null ? BigInt(object.totalVerifications.toString()) : BigInt(0);
126
225
  message.upheldVerifications = object.upheldVerifications !== undefined && object.upheldVerifications !== null ? BigInt(object.upheldVerifications.toString()) : BigInt(0);
127
226
  message.overturnedVerifications = object.overturnedVerifications !== undefined && object.overturnedVerifications !== null ? BigInt(object.overturnedVerifications.toString()) : BigInt(0);
128
- message.unchallengedVerifications = object.unchallengedVerifications !== undefined && object.unchallengedVerifications !== null ? BigInt(object.unchallengedVerifications.toString()) : BigInt(0);
129
227
  message.epochVerifications = object.epochVerifications !== undefined && object.epochVerifications !== null ? BigInt(object.epochVerifications.toString()) : BigInt(0);
130
228
  message.epochChallengesResolved = object.epochChallengesResolved !== undefined && object.epochChallengesResolved !== null ? BigInt(object.epochChallengesResolved.toString()) : BigInt(0);
131
229
  message.consecutiveOverturns = object.consecutiveOverturns !== undefined && object.consecutiveOverturns !== null ? BigInt(object.consecutiveOverturns.toString()) : BigInt(0);
132
230
  message.consecutiveUpheld = object.consecutiveUpheld !== undefined && object.consecutiveUpheld !== null ? BigInt(object.consecutiveUpheld.toString()) : BigInt(0);
133
231
  message.overturnCooldownUntil = object.overturnCooldownUntil !== undefined && object.overturnCooldownUntil !== null ? BigInt(object.overturnCooldownUntil.toString()) : BigInt(0);
134
- message.slashCount = object.slashCount !== undefined && object.slashCount !== null ? BigInt(object.slashCount.toString()) : BigInt(0);
135
232
  message.lastSlashEpoch = object.lastSlashEpoch !== undefined && object.lastSlashEpoch !== null ? BigInt(object.lastSlashEpoch.toString()) : BigInt(0);
233
+ message.slashCount = object.slashCount !== undefined && object.slashCount !== null ? BigInt(object.slashCount.toString()) : BigInt(0);
136
234
  return message;
137
235
  },
138
236
  fromAmino(object) {
139
- const message = createBaseVerifierActivity();
237
+ const message = createBaseVerifierActivityView();
140
238
  if (object.address !== undefined && object.address !== null) {
141
239
  message.address = object.address;
142
240
  }
241
+ if (object.unchallenged_verifications !== undefined && object.unchallenged_verifications !== null) {
242
+ message.unchallengedVerifications = BigInt(object.unchallenged_verifications);
243
+ }
143
244
  if (object.total_verifications !== undefined && object.total_verifications !== null) {
144
245
  message.totalVerifications = BigInt(object.total_verifications);
145
246
  }
@@ -149,9 +250,6 @@ exports.VerifierActivity = {
149
250
  if (object.overturned_verifications !== undefined && object.overturned_verifications !== null) {
150
251
  message.overturnedVerifications = BigInt(object.overturned_verifications);
151
252
  }
152
- if (object.unchallenged_verifications !== undefined && object.unchallenged_verifications !== null) {
153
- message.unchallengedVerifications = BigInt(object.unchallenged_verifications);
154
- }
155
253
  if (object.epoch_verifications !== undefined && object.epoch_verifications !== null) {
156
254
  message.epochVerifications = BigInt(object.epoch_verifications);
157
255
  }
@@ -167,43 +265,43 @@ exports.VerifierActivity = {
167
265
  if (object.overturn_cooldown_until !== undefined && object.overturn_cooldown_until !== null) {
168
266
  message.overturnCooldownUntil = BigInt(object.overturn_cooldown_until);
169
267
  }
170
- if (object.slash_count !== undefined && object.slash_count !== null) {
171
- message.slashCount = BigInt(object.slash_count);
172
- }
173
268
  if (object.last_slash_epoch !== undefined && object.last_slash_epoch !== null) {
174
269
  message.lastSlashEpoch = BigInt(object.last_slash_epoch);
175
270
  }
271
+ if (object.slash_count !== undefined && object.slash_count !== null) {
272
+ message.slashCount = BigInt(object.slash_count);
273
+ }
176
274
  return message;
177
275
  },
178
276
  toAmino(message) {
179
277
  const obj = {};
180
278
  obj.address = message.address === "" ? undefined : message.address;
279
+ obj.unchallenged_verifications = message.unchallengedVerifications !== BigInt(0) ? message.unchallengedVerifications?.toString() : undefined;
181
280
  obj.total_verifications = message.totalVerifications !== BigInt(0) ? message.totalVerifications?.toString() : undefined;
182
281
  obj.upheld_verifications = message.upheldVerifications !== BigInt(0) ? message.upheldVerifications?.toString() : undefined;
183
282
  obj.overturned_verifications = message.overturnedVerifications !== BigInt(0) ? message.overturnedVerifications?.toString() : undefined;
184
- obj.unchallenged_verifications = message.unchallengedVerifications !== BigInt(0) ? message.unchallengedVerifications?.toString() : undefined;
185
283
  obj.epoch_verifications = message.epochVerifications !== BigInt(0) ? message.epochVerifications?.toString() : undefined;
186
284
  obj.epoch_challenges_resolved = message.epochChallengesResolved !== BigInt(0) ? message.epochChallengesResolved?.toString() : undefined;
187
285
  obj.consecutive_overturns = message.consecutiveOverturns !== BigInt(0) ? message.consecutiveOverturns?.toString() : undefined;
188
286
  obj.consecutive_upheld = message.consecutiveUpheld !== BigInt(0) ? message.consecutiveUpheld?.toString() : undefined;
189
287
  obj.overturn_cooldown_until = message.overturnCooldownUntil !== BigInt(0) ? message.overturnCooldownUntil?.toString() : undefined;
190
- obj.slash_count = message.slashCount !== BigInt(0) ? message.slashCount?.toString() : undefined;
191
288
  obj.last_slash_epoch = message.lastSlashEpoch !== BigInt(0) ? message.lastSlashEpoch?.toString() : undefined;
289
+ obj.slash_count = message.slashCount !== BigInt(0) ? message.slashCount?.toString() : undefined;
192
290
  return obj;
193
291
  },
194
292
  fromAminoMsg(object) {
195
- return exports.VerifierActivity.fromAmino(object.value);
293
+ return exports.VerifierActivityView.fromAmino(object.value);
196
294
  },
197
295
  fromProtoMsg(message) {
198
- return exports.VerifierActivity.decode(message.value);
296
+ return exports.VerifierActivityView.decode(message.value);
199
297
  },
200
298
  toProto(message) {
201
- return exports.VerifierActivity.encode(message).finish();
299
+ return exports.VerifierActivityView.encode(message).finish();
202
300
  },
203
301
  toProtoMsg(message) {
204
302
  return {
205
- typeUrl: "/sparkdream.federation.v1.VerifierActivity",
206
- value: exports.VerifierActivity.encode(message).finish()
303
+ typeUrl: "/sparkdream.federation.v1.VerifierActivityView",
304
+ value: exports.VerifierActivityView.encode(message).finish()
207
305
  };
208
306
  }
209
307
  };
@@ -284,6 +284,27 @@ export interface BondedRoleConfig {
284
284
  * the owning module's operational params.
285
285
  */
286
286
  unbondCooldown: bigint;
287
+ /**
288
+ * upheld_to_reset_overturns is how many CONSECUTIVE upheld verdicts clear
289
+ * an accumulated overturn streak. Zero or one = reset on the first upheld
290
+ * verdict (the moderation-role behavior). Higher values make the streak
291
+ * -- and therefore the demotion ratchet and the escalating cooldown --
292
+ * stickier, so a role cannot alternate wrong/right indefinitely and stay
293
+ * out of demotion range.
294
+ */
295
+ upheldToResetOverturns: bigint;
296
+ /**
297
+ * overturn_base_cooldown is the lockout in seconds applied on an
298
+ * overturned verdict for kinds in the CooldownOnOverturn policy table.
299
+ * Zero falls back to DefaultRoleOverturnCooldown (24h).
300
+ */
301
+ overturnBaseCooldown: bigint;
302
+ /**
303
+ * overturn_cooldown_escalates doubles the lockout per consecutive
304
+ * overturn -- base * 2^(streak-1), capped at 7 days. Off means every
305
+ * overturn draws the same flat base cooldown.
306
+ */
307
+ overturnCooldownEscalates: boolean;
287
308
  }
288
309
  export interface BondedRoleConfigProtoMsg {
289
310
  typeUrl: "/sparkdream.rep.v1.BondedRoleConfig";
@@ -348,6 +369,27 @@ export interface BondedRoleConfigAmino {
348
369
  * the owning module's operational params.
349
370
  */
350
371
  unbond_cooldown?: string;
372
+ /**
373
+ * upheld_to_reset_overturns is how many CONSECUTIVE upheld verdicts clear
374
+ * an accumulated overturn streak. Zero or one = reset on the first upheld
375
+ * verdict (the moderation-role behavior). Higher values make the streak
376
+ * -- and therefore the demotion ratchet and the escalating cooldown --
377
+ * stickier, so a role cannot alternate wrong/right indefinitely and stay
378
+ * out of demotion range.
379
+ */
380
+ upheld_to_reset_overturns?: string;
381
+ /**
382
+ * overturn_base_cooldown is the lockout in seconds applied on an
383
+ * overturned verdict for kinds in the CooldownOnOverturn policy table.
384
+ * Zero falls back to DefaultRoleOverturnCooldown (24h).
385
+ */
386
+ overturn_base_cooldown?: string;
387
+ /**
388
+ * overturn_cooldown_escalates doubles the lockout per consecutive
389
+ * overturn -- base * 2^(streak-1), capped at 7 days. Off means every
390
+ * overturn draws the same flat base cooldown.
391
+ */
392
+ overturn_cooldown_escalates?: boolean;
351
393
  }
352
394
  export interface BondedRoleConfigAminoMsg {
353
395
  type: "/sparkdream.rep.v1.BondedRoleConfig";