@sparkdreamnft/sparkdreamjs 0.0.38 → 0.0.40
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/federation/v1/params.js +68 -92
- package/esm/sparkdream/federation/v1/types.js +5 -17
- 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/federation/v1/params.d.ts +0 -4
- package/sparkdream/federation/v1/params.js +68 -92
- package/sparkdream/federation/v1/types.d.ts +0 -2
- package/sparkdream/federation/v1/types.js +5 -17
- 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
|
@@ -16,7 +16,6 @@ function createBaseParams() {
|
|
|
16
16
|
contentTtl: duration_1.Duration.fromPartial({}),
|
|
17
17
|
attestationTtl: duration_1.Duration.fromPartial({}),
|
|
18
18
|
globalMaxTrustCredit: 0,
|
|
19
|
-
trustDiscountRate: "",
|
|
20
19
|
maxIdentityLinksPerUser: 0,
|
|
21
20
|
unverifiedLinkTtl: duration_1.Duration.fromPartial({}),
|
|
22
21
|
challengeTtl: duration_1.Duration.fromPartial({}),
|
|
@@ -89,107 +88,104 @@ exports.Params = {
|
|
|
89
88
|
if (message.globalMaxTrustCredit !== 0) {
|
|
90
89
|
writer.uint32(72).uint32(message.globalMaxTrustCredit);
|
|
91
90
|
}
|
|
92
|
-
if (message.trustDiscountRate !== "") {
|
|
93
|
-
writer.uint32(82).string(math_1.Decimal.fromUserInput(message.trustDiscountRate, 18).atomics);
|
|
94
|
-
}
|
|
95
91
|
if (message.maxIdentityLinksPerUser !== 0) {
|
|
96
|
-
writer.uint32(
|
|
92
|
+
writer.uint32(80).uint32(message.maxIdentityLinksPerUser);
|
|
97
93
|
}
|
|
98
94
|
if (message.unverifiedLinkTtl !== undefined) {
|
|
99
|
-
duration_1.Duration.encode(message.unverifiedLinkTtl, writer.uint32(
|
|
95
|
+
duration_1.Duration.encode(message.unverifiedLinkTtl, writer.uint32(90).fork()).ldelim();
|
|
100
96
|
}
|
|
101
97
|
if (message.challengeTtl !== undefined) {
|
|
102
|
-
duration_1.Duration.encode(message.challengeTtl, writer.uint32(
|
|
98
|
+
duration_1.Duration.encode(message.challengeTtl, writer.uint32(98).fork()).ldelim();
|
|
103
99
|
}
|
|
104
100
|
if (message.bridgeInactivityThreshold !== BigInt(0)) {
|
|
105
|
-
writer.uint32(
|
|
101
|
+
writer.uint32(104).uint64(message.bridgeInactivityThreshold);
|
|
106
102
|
}
|
|
107
103
|
if (message.ibcPort !== "") {
|
|
108
|
-
writer.uint32(
|
|
104
|
+
writer.uint32(114).string(message.ibcPort);
|
|
109
105
|
}
|
|
110
106
|
if (message.ibcChannelVersion !== "") {
|
|
111
|
-
writer.uint32(
|
|
107
|
+
writer.uint32(122).string(message.ibcChannelVersion);
|
|
112
108
|
}
|
|
113
109
|
if (message.ibcPacketTimeout !== undefined) {
|
|
114
|
-
duration_1.Duration.encode(message.ibcPacketTimeout, writer.uint32(
|
|
110
|
+
duration_1.Duration.encode(message.ibcPacketTimeout, writer.uint32(130).fork()).ldelim();
|
|
115
111
|
}
|
|
116
112
|
if (message.maxPrunePerBlock !== BigInt(0)) {
|
|
117
|
-
writer.uint32(
|
|
113
|
+
writer.uint32(136).uint64(message.maxPrunePerBlock);
|
|
118
114
|
}
|
|
119
115
|
if (message.maxOutboundPerBlock !== BigInt(0)) {
|
|
120
|
-
writer.uint32(
|
|
116
|
+
writer.uint32(144).uint64(message.maxOutboundPerBlock);
|
|
121
117
|
}
|
|
122
118
|
if (message.rateLimitWindow !== undefined) {
|
|
123
|
-
duration_1.Duration.encode(message.rateLimitWindow, writer.uint32(
|
|
119
|
+
duration_1.Duration.encode(message.rateLimitWindow, writer.uint32(154).fork()).ldelim();
|
|
124
120
|
}
|
|
125
121
|
if (message.minVerifierTrustLevel !== 0) {
|
|
126
|
-
writer.uint32(
|
|
122
|
+
writer.uint32(160).uint32(message.minVerifierTrustLevel);
|
|
127
123
|
}
|
|
128
124
|
if (message.minVerifierBond !== "") {
|
|
129
|
-
writer.uint32(
|
|
125
|
+
writer.uint32(170).string(message.minVerifierBond);
|
|
130
126
|
}
|
|
131
127
|
if (message.verifierRecoveryThreshold !== "") {
|
|
132
|
-
writer.uint32(
|
|
128
|
+
writer.uint32(178).string(message.verifierRecoveryThreshold);
|
|
133
129
|
}
|
|
134
130
|
if (message.verifierSlashAmount !== "") {
|
|
135
|
-
writer.uint32(
|
|
131
|
+
writer.uint32(186).string(message.verifierSlashAmount);
|
|
136
132
|
}
|
|
137
133
|
if (message.verificationWindow !== undefined) {
|
|
138
|
-
duration_1.Duration.encode(message.verificationWindow, writer.uint32(
|
|
134
|
+
duration_1.Duration.encode(message.verificationWindow, writer.uint32(194).fork()).ldelim();
|
|
139
135
|
}
|
|
140
136
|
if (message.challengeWindow !== undefined) {
|
|
141
|
-
duration_1.Duration.encode(message.challengeWindow, writer.uint32(
|
|
137
|
+
duration_1.Duration.encode(message.challengeWindow, writer.uint32(202).fork()).ldelim();
|
|
142
138
|
}
|
|
143
139
|
if (message.challengeFeeAmount !== "") {
|
|
144
|
-
writer.uint32(
|
|
140
|
+
writer.uint32(210).string(message.challengeFeeAmount);
|
|
145
141
|
}
|
|
146
142
|
if (message.challengeJuryDeadline !== undefined) {
|
|
147
|
-
duration_1.Duration.encode(message.challengeJuryDeadline, writer.uint32(
|
|
143
|
+
duration_1.Duration.encode(message.challengeJuryDeadline, writer.uint32(218).fork()).ldelim();
|
|
148
144
|
}
|
|
149
145
|
if (message.verifierDemotionCooldown !== undefined) {
|
|
150
|
-
duration_1.Duration.encode(message.verifierDemotionCooldown, writer.uint32(
|
|
146
|
+
duration_1.Duration.encode(message.verifierDemotionCooldown, writer.uint32(226).fork()).ldelim();
|
|
151
147
|
}
|
|
152
148
|
if (message.verifierOverturnBaseCooldown !== undefined) {
|
|
153
|
-
duration_1.Duration.encode(message.verifierOverturnBaseCooldown, writer.uint32(
|
|
149
|
+
duration_1.Duration.encode(message.verifierOverturnBaseCooldown, writer.uint32(234).fork()).ldelim();
|
|
154
150
|
}
|
|
155
151
|
if (message.upheldToResetOverturns !== 0) {
|
|
156
|
-
writer.uint32(
|
|
152
|
+
writer.uint32(240).uint32(message.upheldToResetOverturns);
|
|
157
153
|
}
|
|
158
154
|
if (message.operatorRewardInflationShare !== "") {
|
|
159
|
-
writer.uint32(
|
|
155
|
+
writer.uint32(250).string(math_1.Decimal.fromUserInput(message.operatorRewardInflationShare, 18).atomics);
|
|
160
156
|
}
|
|
161
157
|
if (message.maxOperatorRewardPool !== "") {
|
|
162
|
-
writer.uint32(
|
|
158
|
+
writer.uint32(258).string(message.maxOperatorRewardPool);
|
|
163
159
|
}
|
|
164
160
|
if (message.operatorRewardPoolOverflowBurnRatio !== "") {
|
|
165
|
-
writer.uint32(
|
|
161
|
+
writer.uint32(266).string(math_1.Decimal.fromUserInput(message.operatorRewardPoolOverflowBurnRatio, 18).atomics);
|
|
166
162
|
}
|
|
167
163
|
if (message.operatorRewardEpochBlocks !== BigInt(0)) {
|
|
168
|
-
writer.uint32(
|
|
164
|
+
writer.uint32(272).uint64(message.operatorRewardEpochBlocks);
|
|
169
165
|
}
|
|
170
166
|
if (message.minEpochVerifiedSubmissions !== 0) {
|
|
171
|
-
writer.uint32(
|
|
167
|
+
writer.uint32(280).uint32(message.minEpochVerifiedSubmissions);
|
|
172
168
|
}
|
|
173
169
|
if (message.maxUnverifiedRate !== "") {
|
|
174
|
-
writer.uint32(
|
|
170
|
+
writer.uint32(290).string(math_1.Decimal.fromUserInput(message.maxUnverifiedRate, 18).atomics);
|
|
175
171
|
}
|
|
176
172
|
if (message.arbiterQuorum !== 0) {
|
|
177
|
-
writer.uint32(
|
|
173
|
+
writer.uint32(296).uint32(message.arbiterQuorum);
|
|
178
174
|
}
|
|
179
175
|
if (message.arbiterResolutionWindow !== undefined) {
|
|
180
|
-
duration_1.Duration.encode(message.arbiterResolutionWindow, writer.uint32(
|
|
176
|
+
duration_1.Duration.encode(message.arbiterResolutionWindow, writer.uint32(306).fork()).ldelim();
|
|
181
177
|
}
|
|
182
178
|
if (message.arbiterEscalationWindow !== undefined) {
|
|
183
|
-
duration_1.Duration.encode(message.arbiterEscalationWindow, writer.uint32(
|
|
179
|
+
duration_1.Duration.encode(message.arbiterEscalationWindow, writer.uint32(314).fork()).ldelim();
|
|
184
180
|
}
|
|
185
181
|
if (message.escalationFeeAmount !== "") {
|
|
186
|
-
writer.uint32(
|
|
182
|
+
writer.uint32(322).string(message.escalationFeeAmount);
|
|
187
183
|
}
|
|
188
184
|
if (message.challengeCooldown !== undefined) {
|
|
189
|
-
duration_1.Duration.encode(message.challengeCooldown, writer.uint32(
|
|
185
|
+
duration_1.Duration.encode(message.challengeCooldown, writer.uint32(330).fork()).ldelim();
|
|
190
186
|
}
|
|
191
187
|
if (message.verifierUnbondCooldown !== undefined) {
|
|
192
|
-
duration_1.Duration.encode(message.verifierUnbondCooldown, writer.uint32(
|
|
188
|
+
duration_1.Duration.encode(message.verifierUnbondCooldown, writer.uint32(338).fork()).ldelim();
|
|
193
189
|
}
|
|
194
190
|
return writer;
|
|
195
191
|
},
|
|
@@ -228,105 +224,102 @@ exports.Params = {
|
|
|
228
224
|
message.globalMaxTrustCredit = reader.uint32();
|
|
229
225
|
break;
|
|
230
226
|
case 10:
|
|
231
|
-
message.trustDiscountRate = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
232
|
-
break;
|
|
233
|
-
case 11:
|
|
234
227
|
message.maxIdentityLinksPerUser = reader.uint32();
|
|
235
228
|
break;
|
|
236
|
-
case
|
|
229
|
+
case 11:
|
|
237
230
|
message.unverifiedLinkTtl = duration_1.Duration.decode(reader, reader.uint32());
|
|
238
231
|
break;
|
|
239
|
-
case
|
|
232
|
+
case 12:
|
|
240
233
|
message.challengeTtl = duration_1.Duration.decode(reader, reader.uint32());
|
|
241
234
|
break;
|
|
242
|
-
case
|
|
235
|
+
case 13:
|
|
243
236
|
message.bridgeInactivityThreshold = reader.uint64();
|
|
244
237
|
break;
|
|
245
|
-
case
|
|
238
|
+
case 14:
|
|
246
239
|
message.ibcPort = reader.string();
|
|
247
240
|
break;
|
|
248
|
-
case
|
|
241
|
+
case 15:
|
|
249
242
|
message.ibcChannelVersion = reader.string();
|
|
250
243
|
break;
|
|
251
|
-
case
|
|
244
|
+
case 16:
|
|
252
245
|
message.ibcPacketTimeout = duration_1.Duration.decode(reader, reader.uint32());
|
|
253
246
|
break;
|
|
254
|
-
case
|
|
247
|
+
case 17:
|
|
255
248
|
message.maxPrunePerBlock = reader.uint64();
|
|
256
249
|
break;
|
|
257
|
-
case
|
|
250
|
+
case 18:
|
|
258
251
|
message.maxOutboundPerBlock = reader.uint64();
|
|
259
252
|
break;
|
|
260
|
-
case
|
|
253
|
+
case 19:
|
|
261
254
|
message.rateLimitWindow = duration_1.Duration.decode(reader, reader.uint32());
|
|
262
255
|
break;
|
|
263
|
-
case
|
|
256
|
+
case 20:
|
|
264
257
|
message.minVerifierTrustLevel = reader.uint32();
|
|
265
258
|
break;
|
|
266
|
-
case
|
|
259
|
+
case 21:
|
|
267
260
|
message.minVerifierBond = reader.string();
|
|
268
261
|
break;
|
|
269
|
-
case
|
|
262
|
+
case 22:
|
|
270
263
|
message.verifierRecoveryThreshold = reader.string();
|
|
271
264
|
break;
|
|
272
|
-
case
|
|
265
|
+
case 23:
|
|
273
266
|
message.verifierSlashAmount = reader.string();
|
|
274
267
|
break;
|
|
275
|
-
case
|
|
268
|
+
case 24:
|
|
276
269
|
message.verificationWindow = duration_1.Duration.decode(reader, reader.uint32());
|
|
277
270
|
break;
|
|
278
|
-
case
|
|
271
|
+
case 25:
|
|
279
272
|
message.challengeWindow = duration_1.Duration.decode(reader, reader.uint32());
|
|
280
273
|
break;
|
|
281
|
-
case
|
|
274
|
+
case 26:
|
|
282
275
|
message.challengeFeeAmount = reader.string();
|
|
283
276
|
break;
|
|
284
|
-
case
|
|
277
|
+
case 27:
|
|
285
278
|
message.challengeJuryDeadline = duration_1.Duration.decode(reader, reader.uint32());
|
|
286
279
|
break;
|
|
287
|
-
case
|
|
280
|
+
case 28:
|
|
288
281
|
message.verifierDemotionCooldown = duration_1.Duration.decode(reader, reader.uint32());
|
|
289
282
|
break;
|
|
290
|
-
case
|
|
283
|
+
case 29:
|
|
291
284
|
message.verifierOverturnBaseCooldown = duration_1.Duration.decode(reader, reader.uint32());
|
|
292
285
|
break;
|
|
293
|
-
case
|
|
286
|
+
case 30:
|
|
294
287
|
message.upheldToResetOverturns = reader.uint32();
|
|
295
288
|
break;
|
|
296
|
-
case
|
|
289
|
+
case 31:
|
|
297
290
|
message.operatorRewardInflationShare = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
298
291
|
break;
|
|
299
|
-
case
|
|
292
|
+
case 32:
|
|
300
293
|
message.maxOperatorRewardPool = reader.string();
|
|
301
294
|
break;
|
|
302
|
-
case
|
|
295
|
+
case 33:
|
|
303
296
|
message.operatorRewardPoolOverflowBurnRatio = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
304
297
|
break;
|
|
305
|
-
case
|
|
298
|
+
case 34:
|
|
306
299
|
message.operatorRewardEpochBlocks = reader.uint64();
|
|
307
300
|
break;
|
|
308
|
-
case
|
|
301
|
+
case 35:
|
|
309
302
|
message.minEpochVerifiedSubmissions = reader.uint32();
|
|
310
303
|
break;
|
|
311
|
-
case
|
|
304
|
+
case 36:
|
|
312
305
|
message.maxUnverifiedRate = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
313
306
|
break;
|
|
314
|
-
case
|
|
307
|
+
case 37:
|
|
315
308
|
message.arbiterQuorum = reader.uint32();
|
|
316
309
|
break;
|
|
317
|
-
case
|
|
310
|
+
case 38:
|
|
318
311
|
message.arbiterResolutionWindow = duration_1.Duration.decode(reader, reader.uint32());
|
|
319
312
|
break;
|
|
320
|
-
case
|
|
313
|
+
case 39:
|
|
321
314
|
message.arbiterEscalationWindow = duration_1.Duration.decode(reader, reader.uint32());
|
|
322
315
|
break;
|
|
323
|
-
case
|
|
316
|
+
case 40:
|
|
324
317
|
message.escalationFeeAmount = reader.string();
|
|
325
318
|
break;
|
|
326
|
-
case
|
|
319
|
+
case 41:
|
|
327
320
|
message.challengeCooldown = duration_1.Duration.decode(reader, reader.uint32());
|
|
328
321
|
break;
|
|
329
|
-
case
|
|
322
|
+
case 42:
|
|
330
323
|
message.verifierUnbondCooldown = duration_1.Duration.decode(reader, reader.uint32());
|
|
331
324
|
break;
|
|
332
325
|
default:
|
|
@@ -347,7 +340,6 @@ exports.Params = {
|
|
|
347
340
|
message.contentTtl = object.contentTtl !== undefined && object.contentTtl !== null ? duration_1.Duration.fromPartial(object.contentTtl) : undefined;
|
|
348
341
|
message.attestationTtl = object.attestationTtl !== undefined && object.attestationTtl !== null ? duration_1.Duration.fromPartial(object.attestationTtl) : undefined;
|
|
349
342
|
message.globalMaxTrustCredit = object.globalMaxTrustCredit ?? 0;
|
|
350
|
-
message.trustDiscountRate = object.trustDiscountRate ?? "";
|
|
351
343
|
message.maxIdentityLinksPerUser = object.maxIdentityLinksPerUser ?? 0;
|
|
352
344
|
message.unverifiedLinkTtl = object.unverifiedLinkTtl !== undefined && object.unverifiedLinkTtl !== null ? duration_1.Duration.fromPartial(object.unverifiedLinkTtl) : undefined;
|
|
353
345
|
message.challengeTtl = object.challengeTtl !== undefined && object.challengeTtl !== null ? duration_1.Duration.fromPartial(object.challengeTtl) : undefined;
|
|
@@ -410,9 +402,6 @@ exports.Params = {
|
|
|
410
402
|
if (object.global_max_trust_credit !== undefined && object.global_max_trust_credit !== null) {
|
|
411
403
|
message.globalMaxTrustCredit = object.global_max_trust_credit;
|
|
412
404
|
}
|
|
413
|
-
if (object.trust_discount_rate !== undefined && object.trust_discount_rate !== null) {
|
|
414
|
-
message.trustDiscountRate = object.trust_discount_rate;
|
|
415
|
-
}
|
|
416
405
|
if (object.max_identity_links_per_user !== undefined && object.max_identity_links_per_user !== null) {
|
|
417
406
|
message.maxIdentityLinksPerUser = object.max_identity_links_per_user;
|
|
418
407
|
}
|
|
@@ -530,7 +519,6 @@ exports.Params = {
|
|
|
530
519
|
obj.content_ttl = message.contentTtl ? duration_1.Duration.toAmino(message.contentTtl) : undefined;
|
|
531
520
|
obj.attestation_ttl = message.attestationTtl ? duration_1.Duration.toAmino(message.attestationTtl) : undefined;
|
|
532
521
|
obj.global_max_trust_credit = message.globalMaxTrustCredit === 0 ? undefined : message.globalMaxTrustCredit;
|
|
533
|
-
obj.trust_discount_rate = message.trustDiscountRate === "" ? undefined : message.trustDiscountRate;
|
|
534
522
|
obj.max_identity_links_per_user = message.maxIdentityLinksPerUser === 0 ? undefined : message.maxIdentityLinksPerUser;
|
|
535
523
|
obj.unverified_link_ttl = message.unverifiedLinkTtl ? duration_1.Duration.toAmino(message.unverifiedLinkTtl) : undefined;
|
|
536
524
|
obj.challenge_ttl = message.challengeTtl ? duration_1.Duration.toAmino(message.challengeTtl) : undefined;
|
|
@@ -598,7 +586,6 @@ function createBaseFederationOperationalParams() {
|
|
|
598
586
|
contentTtl: duration_1.Duration.fromPartial({}),
|
|
599
587
|
attestationTtl: duration_1.Duration.fromPartial({}),
|
|
600
588
|
globalMaxTrustCredit: 0,
|
|
601
|
-
trustDiscountRate: "",
|
|
602
589
|
bridgeInactivityThreshold: BigInt(0),
|
|
603
590
|
maxPrunePerBlock: BigInt(0)
|
|
604
591
|
};
|
|
@@ -636,14 +623,11 @@ exports.FederationOperationalParams = {
|
|
|
636
623
|
if (message.globalMaxTrustCredit !== 0) {
|
|
637
624
|
writer.uint32(64).uint32(message.globalMaxTrustCredit);
|
|
638
625
|
}
|
|
639
|
-
if (message.trustDiscountRate !== "") {
|
|
640
|
-
writer.uint32(74).string(math_1.Decimal.fromUserInput(message.trustDiscountRate, 18).atomics);
|
|
641
|
-
}
|
|
642
626
|
if (message.bridgeInactivityThreshold !== BigInt(0)) {
|
|
643
|
-
writer.uint32(
|
|
627
|
+
writer.uint32(72).uint64(message.bridgeInactivityThreshold);
|
|
644
628
|
}
|
|
645
629
|
if (message.maxPrunePerBlock !== BigInt(0)) {
|
|
646
|
-
writer.uint32(
|
|
630
|
+
writer.uint32(80).uint64(message.maxPrunePerBlock);
|
|
647
631
|
}
|
|
648
632
|
return writer;
|
|
649
633
|
},
|
|
@@ -679,12 +663,9 @@ exports.FederationOperationalParams = {
|
|
|
679
663
|
message.globalMaxTrustCredit = reader.uint32();
|
|
680
664
|
break;
|
|
681
665
|
case 9:
|
|
682
|
-
message.trustDiscountRate = math_1.Decimal.fromAtomics(reader.string(), 18).toString();
|
|
683
|
-
break;
|
|
684
|
-
case 10:
|
|
685
666
|
message.bridgeInactivityThreshold = reader.uint64();
|
|
686
667
|
break;
|
|
687
|
-
case
|
|
668
|
+
case 10:
|
|
688
669
|
message.maxPrunePerBlock = reader.uint64();
|
|
689
670
|
break;
|
|
690
671
|
default:
|
|
@@ -704,7 +685,6 @@ exports.FederationOperationalParams = {
|
|
|
704
685
|
message.contentTtl = object.contentTtl !== undefined && object.contentTtl !== null ? duration_1.Duration.fromPartial(object.contentTtl) : undefined;
|
|
705
686
|
message.attestationTtl = object.attestationTtl !== undefined && object.attestationTtl !== null ? duration_1.Duration.fromPartial(object.attestationTtl) : undefined;
|
|
706
687
|
message.globalMaxTrustCredit = object.globalMaxTrustCredit ?? 0;
|
|
707
|
-
message.trustDiscountRate = object.trustDiscountRate ?? "";
|
|
708
688
|
message.bridgeInactivityThreshold = object.bridgeInactivityThreshold !== undefined && object.bridgeInactivityThreshold !== null ? BigInt(object.bridgeInactivityThreshold.toString()) : BigInt(0);
|
|
709
689
|
message.maxPrunePerBlock = object.maxPrunePerBlock !== undefined && object.maxPrunePerBlock !== null ? BigInt(object.maxPrunePerBlock.toString()) : BigInt(0);
|
|
710
690
|
return message;
|
|
@@ -735,9 +715,6 @@ exports.FederationOperationalParams = {
|
|
|
735
715
|
if (object.global_max_trust_credit !== undefined && object.global_max_trust_credit !== null) {
|
|
736
716
|
message.globalMaxTrustCredit = object.global_max_trust_credit;
|
|
737
717
|
}
|
|
738
|
-
if (object.trust_discount_rate !== undefined && object.trust_discount_rate !== null) {
|
|
739
|
-
message.trustDiscountRate = object.trust_discount_rate;
|
|
740
|
-
}
|
|
741
718
|
if (object.bridge_inactivity_threshold !== undefined && object.bridge_inactivity_threshold !== null) {
|
|
742
719
|
message.bridgeInactivityThreshold = BigInt(object.bridge_inactivity_threshold);
|
|
743
720
|
}
|
|
@@ -756,7 +733,6 @@ exports.FederationOperationalParams = {
|
|
|
756
733
|
obj.content_ttl = message.contentTtl ? duration_1.Duration.toAmino(message.contentTtl) : undefined;
|
|
757
734
|
obj.attestation_ttl = message.attestationTtl ? duration_1.Duration.toAmino(message.attestationTtl) : undefined;
|
|
758
735
|
obj.global_max_trust_credit = message.globalMaxTrustCredit === 0 ? undefined : message.globalMaxTrustCredit;
|
|
759
|
-
obj.trust_discount_rate = message.trustDiscountRate === "" ? undefined : message.trustDiscountRate;
|
|
760
736
|
obj.bridge_inactivity_threshold = message.bridgeInactivityThreshold !== BigInt(0) ? message.bridgeInactivityThreshold?.toString() : undefined;
|
|
761
737
|
obj.max_prune_per_block = message.maxPrunePerBlock !== BigInt(0) ? message.maxPrunePerBlock?.toString() : undefined;
|
|
762
738
|
return obj;
|
|
@@ -217,7 +217,6 @@ export interface PeerPolicy {
|
|
|
217
217
|
*/
|
|
218
218
|
allowReputationQueries: boolean;
|
|
219
219
|
acceptReputationAttestations: boolean;
|
|
220
|
-
maxTrustCredit: number;
|
|
221
220
|
/**
|
|
222
221
|
* Moderation
|
|
223
222
|
*/
|
|
@@ -249,7 +248,6 @@ export interface PeerPolicyAmino {
|
|
|
249
248
|
*/
|
|
250
249
|
allow_reputation_queries?: boolean;
|
|
251
250
|
accept_reputation_attestations?: boolean;
|
|
252
|
-
max_trust_credit?: number;
|
|
253
251
|
/**
|
|
254
252
|
* Moderation
|
|
255
253
|
*/
|
|
@@ -647,7 +647,6 @@ function createBasePeerPolicy() {
|
|
|
647
647
|
outboundRateLimitPerEpoch: BigInt(0),
|
|
648
648
|
allowReputationQueries: false,
|
|
649
649
|
acceptReputationAttestations: false,
|
|
650
|
-
maxTrustCredit: 0,
|
|
651
650
|
requireReview: false,
|
|
652
651
|
blockedIdentities: []
|
|
653
652
|
};
|
|
@@ -677,7 +676,7 @@ exports.PeerPolicy = {
|
|
|
677
676
|
writer.uint32(40).uint64(message.inboundRateLimitPerEpoch);
|
|
678
677
|
}
|
|
679
678
|
if (message.outboundRateLimitPerEpoch !== BigInt(0)) {
|
|
680
|
-
writer.uint32(
|
|
679
|
+
writer.uint32(80).uint64(message.outboundRateLimitPerEpoch);
|
|
681
680
|
}
|
|
682
681
|
if (message.allowReputationQueries === true) {
|
|
683
682
|
writer.uint32(48).bool(message.allowReputationQueries);
|
|
@@ -685,14 +684,11 @@ exports.PeerPolicy = {
|
|
|
685
684
|
if (message.acceptReputationAttestations === true) {
|
|
686
685
|
writer.uint32(56).bool(message.acceptReputationAttestations);
|
|
687
686
|
}
|
|
688
|
-
if (message.maxTrustCredit !== 0) {
|
|
689
|
-
writer.uint32(64).uint32(message.maxTrustCredit);
|
|
690
|
-
}
|
|
691
687
|
if (message.requireReview === true) {
|
|
692
|
-
writer.uint32(
|
|
688
|
+
writer.uint32(64).bool(message.requireReview);
|
|
693
689
|
}
|
|
694
690
|
for (const v of message.blockedIdentities) {
|
|
695
|
-
writer.uint32(
|
|
691
|
+
writer.uint32(74).string(v);
|
|
696
692
|
}
|
|
697
693
|
return writer;
|
|
698
694
|
},
|
|
@@ -718,7 +714,7 @@ exports.PeerPolicy = {
|
|
|
718
714
|
case 5:
|
|
719
715
|
message.inboundRateLimitPerEpoch = reader.uint64();
|
|
720
716
|
break;
|
|
721
|
-
case
|
|
717
|
+
case 10:
|
|
722
718
|
message.outboundRateLimitPerEpoch = reader.uint64();
|
|
723
719
|
break;
|
|
724
720
|
case 6:
|
|
@@ -728,12 +724,9 @@ exports.PeerPolicy = {
|
|
|
728
724
|
message.acceptReputationAttestations = reader.bool();
|
|
729
725
|
break;
|
|
730
726
|
case 8:
|
|
731
|
-
message.maxTrustCredit = reader.uint32();
|
|
732
|
-
break;
|
|
733
|
-
case 9:
|
|
734
727
|
message.requireReview = reader.bool();
|
|
735
728
|
break;
|
|
736
|
-
case
|
|
729
|
+
case 9:
|
|
737
730
|
message.blockedIdentities.push(reader.string());
|
|
738
731
|
break;
|
|
739
732
|
default:
|
|
@@ -753,7 +746,6 @@ exports.PeerPolicy = {
|
|
|
753
746
|
message.outboundRateLimitPerEpoch = object.outboundRateLimitPerEpoch !== undefined && object.outboundRateLimitPerEpoch !== null ? BigInt(object.outboundRateLimitPerEpoch.toString()) : BigInt(0);
|
|
754
747
|
message.allowReputationQueries = object.allowReputationQueries ?? false;
|
|
755
748
|
message.acceptReputationAttestations = object.acceptReputationAttestations ?? false;
|
|
756
|
-
message.maxTrustCredit = object.maxTrustCredit ?? 0;
|
|
757
749
|
message.requireReview = object.requireReview ?? false;
|
|
758
750
|
message.blockedIdentities = object.blockedIdentities?.map(e => e) || [];
|
|
759
751
|
return message;
|
|
@@ -780,9 +772,6 @@ exports.PeerPolicy = {
|
|
|
780
772
|
if (object.accept_reputation_attestations !== undefined && object.accept_reputation_attestations !== null) {
|
|
781
773
|
message.acceptReputationAttestations = object.accept_reputation_attestations;
|
|
782
774
|
}
|
|
783
|
-
if (object.max_trust_credit !== undefined && object.max_trust_credit !== null) {
|
|
784
|
-
message.maxTrustCredit = object.max_trust_credit;
|
|
785
|
-
}
|
|
786
775
|
if (object.require_review !== undefined && object.require_review !== null) {
|
|
787
776
|
message.requireReview = object.require_review;
|
|
788
777
|
}
|
|
@@ -809,7 +798,6 @@ exports.PeerPolicy = {
|
|
|
809
798
|
obj.outbound_rate_limit_per_epoch = message.outboundRateLimitPerEpoch !== BigInt(0) ? message.outboundRateLimitPerEpoch?.toString() : undefined;
|
|
810
799
|
obj.allow_reputation_queries = message.allowReputationQueries === false ? undefined : message.allowReputationQueries;
|
|
811
800
|
obj.accept_reputation_attestations = message.acceptReputationAttestations === false ? undefined : message.acceptReputationAttestations;
|
|
812
|
-
obj.max_trust_credit = message.maxTrustCredit === 0 ? undefined : message.maxTrustCredit;
|
|
813
801
|
obj.require_review = message.requireReview === false ? undefined : message.requireReview;
|
|
814
802
|
if (message.blockedIdentities) {
|
|
815
803
|
obj.blocked_identities = message.blockedIdentities.map(e => e);
|
|
@@ -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) {
|