@sparkdreamnft/sparkdreamjs 0.0.44 → 0.0.45
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/name/v1/genesis.js +32 -2
- package/esm/sparkdream/rep/v1/params.js +13 -1
- package/esm/sparkdream/rep/v1/tx.js +145 -0
- package/esm/sparkdream/rep/v1/tx.registry.js +20 -2
- package/esm/sparkdream/rep/v1/tx.rpc.msg.js +9 -1
- package/esm/sparkdream/season/v1/tx.js +33 -2
- package/esm/sparkdream/service/v1/operator.js +25 -1
- package/esm/sparkdream/service/v1/tx.amino.js +6 -1
- package/esm/sparkdream/service/v1/tx.js +163 -0
- package/esm/sparkdream/service/v1/tx.registry.js +20 -2
- package/esm/sparkdream/service/v1/tx.rpc.msg.js +11 -1
- package/esm/sparkdream/session/v1/grant.js +98 -6
- package/esm/sparkdream/session/v1/tx.amino.js +3 -0
- package/esm/sparkdream/session/v1/tx.js +15 -3
- package/esm/sparkdream/session/v1/tx.rpc.msg.js +2 -2
- package/esm/sparkdream/shield/v1/genesis.js +32 -2
- package/esm/sparkdream/shield/v1/params.js +13 -1
- package/esm/sparkdream/shield/v1/query.js +13 -1
- package/esm/sparkdream/shield/v1/types.js +414 -15
- package/package.json +1 -1
- package/sparkdream/bundle.d.ts +129 -0
- package/sparkdream/client.d.ts +5 -0
- package/sparkdream/name/v1/genesis.d.ts +23 -1
- package/sparkdream/name/v1/genesis.js +31 -1
- package/sparkdream/rep/v1/params.d.ts +16 -0
- package/sparkdream/rep/v1/params.js +13 -1
- package/sparkdream/rep/v1/tx.d.ts +93 -0
- package/sparkdream/rep/v1/tx.js +146 -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 +8 -1
- package/sparkdream/rep/v1/tx.rpc.msg.js +8 -0
- package/sparkdream/season/v1/tx.d.ts +19 -0
- package/sparkdream/season/v1/tx.js +33 -2
- package/sparkdream/service/v1/operator.d.ts +30 -0
- package/sparkdream/service/v1/operator.js +25 -1
- package/sparkdream/service/v1/tx.amino.d.ts +6 -1
- package/sparkdream/service/v1/tx.amino.js +5 -0
- package/sparkdream/service/v1/tx.d.ts +119 -0
- package/sparkdream/service/v1/tx.js +164 -1
- package/sparkdream/service/v1/tx.registry.d.ts +13 -1
- package/sparkdream/service/v1/tx.registry.js +19 -1
- package/sparkdream/service/v1/tx.rpc.msg.d.ts +10 -1
- package/sparkdream/service/v1/tx.rpc.msg.js +10 -0
- package/sparkdream/session/v1/grant.d.ts +75 -7
- package/sparkdream/session/v1/grant.js +99 -7
- package/sparkdream/session/v1/tx.amino.js +3 -0
- package/sparkdream/session/v1/tx.d.ts +6 -4
- package/sparkdream/session/v1/tx.js +14 -2
- package/sparkdream/session/v1/tx.rpc.msg.d.ts +2 -2
- package/sparkdream/session/v1/tx.rpc.msg.js +2 -2
- package/sparkdream/shield/v1/genesis.d.ts +17 -1
- package/sparkdream/shield/v1/genesis.js +31 -1
- package/sparkdream/shield/v1/params.d.ts +16 -4
- package/sparkdream/shield/v1/params.js +13 -1
- package/sparkdream/shield/v1/query.d.ts +8 -0
- package/sparkdream/shield/v1/query.js +13 -1
- package/sparkdream/shield/v1/tx.d.ts +36 -10
- package/sparkdream/shield/v1/types.d.ts +294 -13
- package/sparkdream/shield/v1/types.js +415 -16
|
@@ -205,8 +205,19 @@ export var DKGPhase;
|
|
|
205
205
|
DKGPhase[DKGPhase["DKG_PHASE_REGISTERING"] = 1] = "DKG_PHASE_REGISTERING";
|
|
206
206
|
/** DKG_PHASE_CONTRIBUTING - Key registration closed; accepting Feldman DKG contributions */
|
|
207
207
|
DKGPhase[DKGPhase["DKG_PHASE_CONTRIBUTING"] = 2] = "DKG_PHASE_CONTRIBUTING";
|
|
208
|
-
/** DKG_PHASE_ACTIVE - DKG complete, master key available
|
|
208
|
+
/** DKG_PHASE_ACTIVE - DKG complete, master key available */
|
|
209
209
|
DKGPhase[DKGPhase["DKG_PHASE_ACTIVE"] = 3] = "DKG_PHASE_ACTIVE";
|
|
210
|
+
/**
|
|
211
|
+
* DKG_PHASE_COMPLAINING - Contributions closed; validators report dealers whose evaluation for
|
|
212
|
+
* them is missing, undecryptable or inconsistent with the commitments
|
|
213
|
+
*/
|
|
214
|
+
DKGPhase[DKGPhase["DKG_PHASE_COMPLAINING"] = 4] = "DKG_PHASE_COMPLAINING";
|
|
215
|
+
/**
|
|
216
|
+
* DKG_PHASE_JUSTIFYING - Complaints closed; accused dealers publish the disputed evaluations in
|
|
217
|
+
* clear. A dealer with an unjustified complaint at the deadline is
|
|
218
|
+
* disqualified from the key set.
|
|
219
|
+
*/
|
|
220
|
+
DKGPhase[DKGPhase["DKG_PHASE_JUSTIFYING"] = 5] = "DKG_PHASE_JUSTIFYING";
|
|
210
221
|
DKGPhase[DKGPhase["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
211
222
|
})(DKGPhase || (DKGPhase = {}));
|
|
212
223
|
export const DKGPhaseAmino = DKGPhase;
|
|
@@ -224,6 +235,12 @@ export function dKGPhaseFromJSON(object) {
|
|
|
224
235
|
case 3:
|
|
225
236
|
case "DKG_PHASE_ACTIVE":
|
|
226
237
|
return DKGPhase.DKG_PHASE_ACTIVE;
|
|
238
|
+
case 4:
|
|
239
|
+
case "DKG_PHASE_COMPLAINING":
|
|
240
|
+
return DKGPhase.DKG_PHASE_COMPLAINING;
|
|
241
|
+
case 5:
|
|
242
|
+
case "DKG_PHASE_JUSTIFYING":
|
|
243
|
+
return DKGPhase.DKG_PHASE_JUSTIFYING;
|
|
227
244
|
case -1:
|
|
228
245
|
case "UNRECOGNIZED":
|
|
229
246
|
default:
|
|
@@ -240,6 +257,10 @@ export function dKGPhaseToJSON(object) {
|
|
|
240
257
|
return "DKG_PHASE_CONTRIBUTING";
|
|
241
258
|
case DKGPhase.DKG_PHASE_ACTIVE:
|
|
242
259
|
return "DKG_PHASE_ACTIVE";
|
|
260
|
+
case DKGPhase.DKG_PHASE_COMPLAINING:
|
|
261
|
+
return "DKG_PHASE_COMPLAINING";
|
|
262
|
+
case DKGPhase.DKG_PHASE_JUSTIFYING:
|
|
263
|
+
return "DKG_PHASE_JUSTIFYING";
|
|
243
264
|
case DKGPhase.UNRECOGNIZED:
|
|
244
265
|
default:
|
|
245
266
|
return "UNRECOGNIZED";
|
|
@@ -536,7 +557,7 @@ function createBaseDayFunding() {
|
|
|
536
557
|
}
|
|
537
558
|
/**
|
|
538
559
|
* DayFunding tracks funding per day to enforce the daily cap.
|
|
539
|
-
* Day is
|
|
560
|
+
* Day is the UTC day of the block time (block_time / 86400).
|
|
540
561
|
* @name DayFunding
|
|
541
562
|
* @package sparkdream.shield.v1
|
|
542
563
|
* @see proto type: sparkdream.shield.v1.DayFunding
|
|
@@ -614,17 +635,19 @@ function createBasePendingShieldedOp() {
|
|
|
614
635
|
return {
|
|
615
636
|
id: BigInt(0),
|
|
616
637
|
targetEpoch: BigInt(0),
|
|
617
|
-
|
|
638
|
+
submissionNullifier: new Uint8Array(),
|
|
618
639
|
merkleRoot: new Uint8Array(),
|
|
619
640
|
proofDomain: 0,
|
|
620
641
|
minTrustLevel: 0,
|
|
621
642
|
encryptedPayload: new Uint8Array(),
|
|
622
643
|
submittedAtHeight: BigInt(0),
|
|
623
|
-
submittedAtEpoch: BigInt(0)
|
|
644
|
+
submittedAtEpoch: BigInt(0),
|
|
645
|
+
rateLimitNullifier: new Uint8Array()
|
|
624
646
|
};
|
|
625
647
|
}
|
|
626
648
|
/**
|
|
627
|
-
* PendingShieldedOp is stored in queue until
|
|
649
|
+
* PendingShieldedOp is stored in queue until its epoch has closed, its batch was
|
|
650
|
+
* demanded and the epoch key exists; it then executes in that block.
|
|
628
651
|
* @name PendingShieldedOp
|
|
629
652
|
* @package sparkdream.shield.v1
|
|
630
653
|
* @see proto type: sparkdream.shield.v1.PendingShieldedOp
|
|
@@ -638,8 +661,8 @@ export const PendingShieldedOp = {
|
|
|
638
661
|
if (message.targetEpoch !== BigInt(0)) {
|
|
639
662
|
writer.uint32(16).uint64(message.targetEpoch);
|
|
640
663
|
}
|
|
641
|
-
if (message.
|
|
642
|
-
writer.uint32(26).bytes(message.
|
|
664
|
+
if (message.submissionNullifier.length !== 0) {
|
|
665
|
+
writer.uint32(26).bytes(message.submissionNullifier);
|
|
643
666
|
}
|
|
644
667
|
if (message.merkleRoot.length !== 0) {
|
|
645
668
|
writer.uint32(34).bytes(message.merkleRoot);
|
|
@@ -659,6 +682,9 @@ export const PendingShieldedOp = {
|
|
|
659
682
|
if (message.submittedAtEpoch !== BigInt(0)) {
|
|
660
683
|
writer.uint32(72).uint64(message.submittedAtEpoch);
|
|
661
684
|
}
|
|
685
|
+
if (message.rateLimitNullifier.length !== 0) {
|
|
686
|
+
writer.uint32(82).bytes(message.rateLimitNullifier);
|
|
687
|
+
}
|
|
662
688
|
return writer;
|
|
663
689
|
},
|
|
664
690
|
decode(input, length) {
|
|
@@ -675,7 +701,7 @@ export const PendingShieldedOp = {
|
|
|
675
701
|
message.targetEpoch = reader.uint64();
|
|
676
702
|
break;
|
|
677
703
|
case 3:
|
|
678
|
-
message.
|
|
704
|
+
message.submissionNullifier = reader.bytes();
|
|
679
705
|
break;
|
|
680
706
|
case 4:
|
|
681
707
|
message.merkleRoot = reader.bytes();
|
|
@@ -695,6 +721,9 @@ export const PendingShieldedOp = {
|
|
|
695
721
|
case 9:
|
|
696
722
|
message.submittedAtEpoch = reader.uint64();
|
|
697
723
|
break;
|
|
724
|
+
case 10:
|
|
725
|
+
message.rateLimitNullifier = reader.bytes();
|
|
726
|
+
break;
|
|
698
727
|
default:
|
|
699
728
|
reader.skipType(tag & 7);
|
|
700
729
|
break;
|
|
@@ -706,13 +735,14 @@ export const PendingShieldedOp = {
|
|
|
706
735
|
const message = createBasePendingShieldedOp();
|
|
707
736
|
message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0);
|
|
708
737
|
message.targetEpoch = object.targetEpoch !== undefined && object.targetEpoch !== null ? BigInt(object.targetEpoch.toString()) : BigInt(0);
|
|
709
|
-
message.
|
|
738
|
+
message.submissionNullifier = object.submissionNullifier ?? new Uint8Array();
|
|
710
739
|
message.merkleRoot = object.merkleRoot ?? new Uint8Array();
|
|
711
740
|
message.proofDomain = object.proofDomain ?? 0;
|
|
712
741
|
message.minTrustLevel = object.minTrustLevel ?? 0;
|
|
713
742
|
message.encryptedPayload = object.encryptedPayload ?? new Uint8Array();
|
|
714
743
|
message.submittedAtHeight = object.submittedAtHeight !== undefined && object.submittedAtHeight !== null ? BigInt(object.submittedAtHeight.toString()) : BigInt(0);
|
|
715
744
|
message.submittedAtEpoch = object.submittedAtEpoch !== undefined && object.submittedAtEpoch !== null ? BigInt(object.submittedAtEpoch.toString()) : BigInt(0);
|
|
745
|
+
message.rateLimitNullifier = object.rateLimitNullifier ?? new Uint8Array();
|
|
716
746
|
return message;
|
|
717
747
|
},
|
|
718
748
|
fromAmino(object) {
|
|
@@ -723,8 +753,8 @@ export const PendingShieldedOp = {
|
|
|
723
753
|
if (object.target_epoch !== undefined && object.target_epoch !== null) {
|
|
724
754
|
message.targetEpoch = BigInt(object.target_epoch);
|
|
725
755
|
}
|
|
726
|
-
if (object.
|
|
727
|
-
message.
|
|
756
|
+
if (object.submission_nullifier !== undefined && object.submission_nullifier !== null) {
|
|
757
|
+
message.submissionNullifier = bytesFromBase64(object.submission_nullifier);
|
|
728
758
|
}
|
|
729
759
|
if (object.merkle_root !== undefined && object.merkle_root !== null) {
|
|
730
760
|
message.merkleRoot = bytesFromBase64(object.merkle_root);
|
|
@@ -744,19 +774,23 @@ export const PendingShieldedOp = {
|
|
|
744
774
|
if (object.submitted_at_epoch !== undefined && object.submitted_at_epoch !== null) {
|
|
745
775
|
message.submittedAtEpoch = BigInt(object.submitted_at_epoch);
|
|
746
776
|
}
|
|
777
|
+
if (object.rate_limit_nullifier !== undefined && object.rate_limit_nullifier !== null) {
|
|
778
|
+
message.rateLimitNullifier = bytesFromBase64(object.rate_limit_nullifier);
|
|
779
|
+
}
|
|
747
780
|
return message;
|
|
748
781
|
},
|
|
749
782
|
toAmino(message) {
|
|
750
783
|
const obj = {};
|
|
751
784
|
obj.id = message.id !== BigInt(0) ? message.id?.toString() : undefined;
|
|
752
785
|
obj.target_epoch = message.targetEpoch !== BigInt(0) ? message.targetEpoch?.toString() : undefined;
|
|
753
|
-
obj.
|
|
786
|
+
obj.submission_nullifier = message.submissionNullifier ? base64FromBytes(message.submissionNullifier) : undefined;
|
|
754
787
|
obj.merkle_root = message.merkleRoot ? base64FromBytes(message.merkleRoot) : undefined;
|
|
755
788
|
obj.proof_domain = message.proofDomain === 0 ? undefined : message.proofDomain;
|
|
756
789
|
obj.min_trust_level = message.minTrustLevel === 0 ? undefined : message.minTrustLevel;
|
|
757
790
|
obj.encrypted_payload = message.encryptedPayload ? base64FromBytes(message.encryptedPayload) : undefined;
|
|
758
791
|
obj.submitted_at_height = message.submittedAtHeight !== BigInt(0) ? message.submittedAtHeight?.toString() : undefined;
|
|
759
792
|
obj.submitted_at_epoch = message.submittedAtEpoch !== BigInt(0) ? message.submittedAtEpoch?.toString() : undefined;
|
|
793
|
+
obj.rate_limit_nullifier = message.rateLimitNullifier ? base64FromBytes(message.rateLimitNullifier) : undefined;
|
|
760
794
|
return obj;
|
|
761
795
|
},
|
|
762
796
|
fromAminoMsg(object) {
|
|
@@ -1060,7 +1094,8 @@ function createBaseTLEKeySet() {
|
|
|
1060
1094
|
thresholdNumerator: BigInt(0),
|
|
1061
1095
|
thresholdDenominator: BigInt(0),
|
|
1062
1096
|
validatorShares: [],
|
|
1063
|
-
createdAtHeight: BigInt(0)
|
|
1097
|
+
createdAtHeight: BigInt(0),
|
|
1098
|
+
masterPublicKeyG2: new Uint8Array()
|
|
1064
1099
|
};
|
|
1065
1100
|
}
|
|
1066
1101
|
/**
|
|
@@ -1087,6 +1122,9 @@ export const TLEKeySet = {
|
|
|
1087
1122
|
if (message.createdAtHeight !== BigInt(0)) {
|
|
1088
1123
|
writer.uint32(40).int64(message.createdAtHeight);
|
|
1089
1124
|
}
|
|
1125
|
+
if (message.masterPublicKeyG2.length !== 0) {
|
|
1126
|
+
writer.uint32(50).bytes(message.masterPublicKeyG2);
|
|
1127
|
+
}
|
|
1090
1128
|
return writer;
|
|
1091
1129
|
},
|
|
1092
1130
|
decode(input, length) {
|
|
@@ -1111,6 +1149,9 @@ export const TLEKeySet = {
|
|
|
1111
1149
|
case 5:
|
|
1112
1150
|
message.createdAtHeight = reader.int64();
|
|
1113
1151
|
break;
|
|
1152
|
+
case 6:
|
|
1153
|
+
message.masterPublicKeyG2 = reader.bytes();
|
|
1154
|
+
break;
|
|
1114
1155
|
default:
|
|
1115
1156
|
reader.skipType(tag & 7);
|
|
1116
1157
|
break;
|
|
@@ -1125,6 +1166,7 @@ export const TLEKeySet = {
|
|
|
1125
1166
|
message.thresholdDenominator = object.thresholdDenominator !== undefined && object.thresholdDenominator !== null ? BigInt(object.thresholdDenominator.toString()) : BigInt(0);
|
|
1126
1167
|
message.validatorShares = object.validatorShares?.map(e => TLEValidatorPublicShare.fromPartial(e)) || [];
|
|
1127
1168
|
message.createdAtHeight = object.createdAtHeight !== undefined && object.createdAtHeight !== null ? BigInt(object.createdAtHeight.toString()) : BigInt(0);
|
|
1169
|
+
message.masterPublicKeyG2 = object.masterPublicKeyG2 ?? new Uint8Array();
|
|
1128
1170
|
return message;
|
|
1129
1171
|
},
|
|
1130
1172
|
fromAmino(object) {
|
|
@@ -1142,6 +1184,9 @@ export const TLEKeySet = {
|
|
|
1142
1184
|
if (object.created_at_height !== undefined && object.created_at_height !== null) {
|
|
1143
1185
|
message.createdAtHeight = BigInt(object.created_at_height);
|
|
1144
1186
|
}
|
|
1187
|
+
if (object.master_public_key_g2 !== undefined && object.master_public_key_g2 !== null) {
|
|
1188
|
+
message.masterPublicKeyG2 = bytesFromBase64(object.master_public_key_g2);
|
|
1189
|
+
}
|
|
1145
1190
|
return message;
|
|
1146
1191
|
},
|
|
1147
1192
|
toAmino(message) {
|
|
@@ -1156,6 +1201,7 @@ export const TLEKeySet = {
|
|
|
1156
1201
|
obj.validator_shares = message.validatorShares;
|
|
1157
1202
|
}
|
|
1158
1203
|
obj.created_at_height = message.createdAtHeight !== BigInt(0) ? message.createdAtHeight?.toString() : undefined;
|
|
1204
|
+
obj.master_public_key_g2 = message.masterPublicKeyG2 ? base64FromBytes(message.masterPublicKeyG2) : undefined;
|
|
1159
1205
|
return obj;
|
|
1160
1206
|
},
|
|
1161
1207
|
fromAminoMsg(object) {
|
|
@@ -1289,7 +1335,10 @@ function createBaseDKGState() {
|
|
|
1289
1335
|
thresholdNumerator: BigInt(0),
|
|
1290
1336
|
thresholdDenominator: BigInt(0),
|
|
1291
1337
|
expectedValidators: [],
|
|
1292
|
-
contributionsReceived: BigInt(0)
|
|
1338
|
+
contributionsReceived: BigInt(0),
|
|
1339
|
+
complaintDeadline: BigInt(0),
|
|
1340
|
+
justificationDeadline: BigInt(0),
|
|
1341
|
+
disqualifiedDealers: []
|
|
1293
1342
|
};
|
|
1294
1343
|
}
|
|
1295
1344
|
/**
|
|
@@ -1328,6 +1377,15 @@ export const DKGState = {
|
|
|
1328
1377
|
if (message.contributionsReceived !== BigInt(0)) {
|
|
1329
1378
|
writer.uint32(72).uint64(message.contributionsReceived);
|
|
1330
1379
|
}
|
|
1380
|
+
if (message.complaintDeadline !== BigInt(0)) {
|
|
1381
|
+
writer.uint32(80).int64(message.complaintDeadline);
|
|
1382
|
+
}
|
|
1383
|
+
if (message.justificationDeadline !== BigInt(0)) {
|
|
1384
|
+
writer.uint32(88).int64(message.justificationDeadline);
|
|
1385
|
+
}
|
|
1386
|
+
for (const v of message.disqualifiedDealers) {
|
|
1387
|
+
writer.uint32(98).string(v);
|
|
1388
|
+
}
|
|
1331
1389
|
return writer;
|
|
1332
1390
|
},
|
|
1333
1391
|
decode(input, length) {
|
|
@@ -1364,6 +1422,15 @@ export const DKGState = {
|
|
|
1364
1422
|
case 9:
|
|
1365
1423
|
message.contributionsReceived = reader.uint64();
|
|
1366
1424
|
break;
|
|
1425
|
+
case 10:
|
|
1426
|
+
message.complaintDeadline = reader.int64();
|
|
1427
|
+
break;
|
|
1428
|
+
case 11:
|
|
1429
|
+
message.justificationDeadline = reader.int64();
|
|
1430
|
+
break;
|
|
1431
|
+
case 12:
|
|
1432
|
+
message.disqualifiedDealers.push(reader.string());
|
|
1433
|
+
break;
|
|
1367
1434
|
default:
|
|
1368
1435
|
reader.skipType(tag & 7);
|
|
1369
1436
|
break;
|
|
@@ -1382,6 +1449,9 @@ export const DKGState = {
|
|
|
1382
1449
|
message.thresholdDenominator = object.thresholdDenominator !== undefined && object.thresholdDenominator !== null ? BigInt(object.thresholdDenominator.toString()) : BigInt(0);
|
|
1383
1450
|
message.expectedValidators = object.expectedValidators?.map(e => e) || [];
|
|
1384
1451
|
message.contributionsReceived = object.contributionsReceived !== undefined && object.contributionsReceived !== null ? BigInt(object.contributionsReceived.toString()) : BigInt(0);
|
|
1452
|
+
message.complaintDeadline = object.complaintDeadline !== undefined && object.complaintDeadline !== null ? BigInt(object.complaintDeadline.toString()) : BigInt(0);
|
|
1453
|
+
message.justificationDeadline = object.justificationDeadline !== undefined && object.justificationDeadline !== null ? BigInt(object.justificationDeadline.toString()) : BigInt(0);
|
|
1454
|
+
message.disqualifiedDealers = object.disqualifiedDealers?.map(e => e) || [];
|
|
1385
1455
|
return message;
|
|
1386
1456
|
},
|
|
1387
1457
|
fromAmino(object) {
|
|
@@ -1411,6 +1481,13 @@ export const DKGState = {
|
|
|
1411
1481
|
if (object.contributions_received !== undefined && object.contributions_received !== null) {
|
|
1412
1482
|
message.contributionsReceived = BigInt(object.contributions_received);
|
|
1413
1483
|
}
|
|
1484
|
+
if (object.complaint_deadline !== undefined && object.complaint_deadline !== null) {
|
|
1485
|
+
message.complaintDeadline = BigInt(object.complaint_deadline);
|
|
1486
|
+
}
|
|
1487
|
+
if (object.justification_deadline !== undefined && object.justification_deadline !== null) {
|
|
1488
|
+
message.justificationDeadline = BigInt(object.justification_deadline);
|
|
1489
|
+
}
|
|
1490
|
+
message.disqualifiedDealers = object.disqualified_dealers?.map(e => e) || [];
|
|
1414
1491
|
return message;
|
|
1415
1492
|
},
|
|
1416
1493
|
toAmino(message) {
|
|
@@ -1429,6 +1506,14 @@ export const DKGState = {
|
|
|
1429
1506
|
obj.expected_validators = message.expectedValidators;
|
|
1430
1507
|
}
|
|
1431
1508
|
obj.contributions_received = message.contributionsReceived !== BigInt(0) ? message.contributionsReceived?.toString() : undefined;
|
|
1509
|
+
obj.complaint_deadline = message.complaintDeadline !== BigInt(0) ? message.complaintDeadline?.toString() : undefined;
|
|
1510
|
+
obj.justification_deadline = message.justificationDeadline !== BigInt(0) ? message.justificationDeadline?.toString() : undefined;
|
|
1511
|
+
if (message.disqualifiedDealers) {
|
|
1512
|
+
obj.disqualified_dealers = message.disqualifiedDealers.map(e => e);
|
|
1513
|
+
}
|
|
1514
|
+
else {
|
|
1515
|
+
obj.disqualified_dealers = message.disqualifiedDealers;
|
|
1516
|
+
}
|
|
1432
1517
|
return obj;
|
|
1433
1518
|
},
|
|
1434
1519
|
fromAminoMsg(object) {
|
|
@@ -1758,7 +1843,9 @@ function createBaseDKGVoteExtension() {
|
|
|
1758
1843
|
contributionPop: new Uint8Array(),
|
|
1759
1844
|
feldmanCommitmentsG2: [],
|
|
1760
1845
|
decryptionEpoch: BigInt(0),
|
|
1761
|
-
decryptionShare: new Uint8Array()
|
|
1846
|
+
decryptionShare: new Uint8Array(),
|
|
1847
|
+
complaints: [],
|
|
1848
|
+
justifications: []
|
|
1762
1849
|
};
|
|
1763
1850
|
}
|
|
1764
1851
|
/**
|
|
@@ -1801,6 +1888,14 @@ export const DKGVoteExtension = {
|
|
|
1801
1888
|
if (message.decryptionShare.length !== 0) {
|
|
1802
1889
|
writer.uint32(82).bytes(message.decryptionShare);
|
|
1803
1890
|
}
|
|
1891
|
+
writer.uint32(90).fork();
|
|
1892
|
+
for (const v of message.complaints) {
|
|
1893
|
+
writer.uint32(v);
|
|
1894
|
+
}
|
|
1895
|
+
writer.ldelim();
|
|
1896
|
+
for (const v of message.justifications) {
|
|
1897
|
+
DKGJustification.encode(v, writer.uint32(98).fork()).ldelim();
|
|
1898
|
+
}
|
|
1804
1899
|
return writer;
|
|
1805
1900
|
},
|
|
1806
1901
|
decode(input, length) {
|
|
@@ -1840,6 +1935,20 @@ export const DKGVoteExtension = {
|
|
|
1840
1935
|
case 10:
|
|
1841
1936
|
message.decryptionShare = reader.bytes();
|
|
1842
1937
|
break;
|
|
1938
|
+
case 11:
|
|
1939
|
+
if ((tag & 7) === 2) {
|
|
1940
|
+
const end2 = reader.uint32() + reader.pos;
|
|
1941
|
+
while (reader.pos < end2) {
|
|
1942
|
+
message.complaints.push(reader.uint32());
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
else {
|
|
1946
|
+
message.complaints.push(reader.uint32());
|
|
1947
|
+
}
|
|
1948
|
+
break;
|
|
1949
|
+
case 12:
|
|
1950
|
+
message.justifications.push(DKGJustification.decode(reader, reader.uint32()));
|
|
1951
|
+
break;
|
|
1843
1952
|
default:
|
|
1844
1953
|
reader.skipType(tag & 7);
|
|
1845
1954
|
break;
|
|
@@ -1859,6 +1968,8 @@ export const DKGVoteExtension = {
|
|
|
1859
1968
|
message.feldmanCommitmentsG2 = object.feldmanCommitmentsG2?.map(e => e) || [];
|
|
1860
1969
|
message.decryptionEpoch = object.decryptionEpoch !== undefined && object.decryptionEpoch !== null ? BigInt(object.decryptionEpoch.toString()) : BigInt(0);
|
|
1861
1970
|
message.decryptionShare = object.decryptionShare ?? new Uint8Array();
|
|
1971
|
+
message.complaints = object.complaints?.map(e => e) || [];
|
|
1972
|
+
message.justifications = object.justifications?.map(e => DKGJustification.fromPartial(e)) || [];
|
|
1862
1973
|
return message;
|
|
1863
1974
|
},
|
|
1864
1975
|
fromAmino(object) {
|
|
@@ -1887,6 +1998,8 @@ export const DKGVoteExtension = {
|
|
|
1887
1998
|
if (object.decryption_share !== undefined && object.decryption_share !== null) {
|
|
1888
1999
|
message.decryptionShare = bytesFromBase64(object.decryption_share);
|
|
1889
2000
|
}
|
|
2001
|
+
message.complaints = object.complaints?.map(e => e) || [];
|
|
2002
|
+
message.justifications = object.justifications?.map(e => DKGJustification.fromAmino(e)) || [];
|
|
1890
2003
|
return message;
|
|
1891
2004
|
},
|
|
1892
2005
|
toAmino(message) {
|
|
@@ -1916,6 +2029,18 @@ export const DKGVoteExtension = {
|
|
|
1916
2029
|
}
|
|
1917
2030
|
obj.decryption_epoch = message.decryptionEpoch !== BigInt(0) ? message.decryptionEpoch?.toString() : undefined;
|
|
1918
2031
|
obj.decryption_share = message.decryptionShare ? base64FromBytes(message.decryptionShare) : undefined;
|
|
2032
|
+
if (message.complaints) {
|
|
2033
|
+
obj.complaints = message.complaints.map(e => e);
|
|
2034
|
+
}
|
|
2035
|
+
else {
|
|
2036
|
+
obj.complaints = message.complaints;
|
|
2037
|
+
}
|
|
2038
|
+
if (message.justifications) {
|
|
2039
|
+
obj.justifications = message.justifications.map(e => e ? DKGJustification.toAmino(e) : undefined);
|
|
2040
|
+
}
|
|
2041
|
+
else {
|
|
2042
|
+
obj.justifications = message.justifications;
|
|
2043
|
+
}
|
|
1919
2044
|
return obj;
|
|
1920
2045
|
},
|
|
1921
2046
|
fromAminoMsg(object) {
|
|
@@ -1934,6 +2059,197 @@ export const DKGVoteExtension = {
|
|
|
1934
2059
|
};
|
|
1935
2060
|
}
|
|
1936
2061
|
};
|
|
2062
|
+
function createBaseDKGJustification() {
|
|
2063
|
+
return {
|
|
2064
|
+
complainerIndex: 0,
|
|
2065
|
+
evaluation: new Uint8Array()
|
|
2066
|
+
};
|
|
2067
|
+
}
|
|
2068
|
+
/**
|
|
2069
|
+
* DKGJustification is a dealer's public answer to a complaint: p_i(j) for the
|
|
2070
|
+
* complaining validator j, which anyone checks against the dealer's Feldman
|
|
2071
|
+
* commitments.
|
|
2072
|
+
* @name DKGJustification
|
|
2073
|
+
* @package sparkdream.shield.v1
|
|
2074
|
+
* @see proto type: sparkdream.shield.v1.DKGJustification
|
|
2075
|
+
*/
|
|
2076
|
+
export const DKGJustification = {
|
|
2077
|
+
typeUrl: "/sparkdream.shield.v1.DKGJustification",
|
|
2078
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
2079
|
+
if (message.complainerIndex !== 0) {
|
|
2080
|
+
writer.uint32(8).uint32(message.complainerIndex);
|
|
2081
|
+
}
|
|
2082
|
+
if (message.evaluation.length !== 0) {
|
|
2083
|
+
writer.uint32(18).bytes(message.evaluation);
|
|
2084
|
+
}
|
|
2085
|
+
return writer;
|
|
2086
|
+
},
|
|
2087
|
+
decode(input, length) {
|
|
2088
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2089
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2090
|
+
const message = createBaseDKGJustification();
|
|
2091
|
+
while (reader.pos < end) {
|
|
2092
|
+
const tag = reader.uint32();
|
|
2093
|
+
switch (tag >>> 3) {
|
|
2094
|
+
case 1:
|
|
2095
|
+
message.complainerIndex = reader.uint32();
|
|
2096
|
+
break;
|
|
2097
|
+
case 2:
|
|
2098
|
+
message.evaluation = reader.bytes();
|
|
2099
|
+
break;
|
|
2100
|
+
default:
|
|
2101
|
+
reader.skipType(tag & 7);
|
|
2102
|
+
break;
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
return message;
|
|
2106
|
+
},
|
|
2107
|
+
fromPartial(object) {
|
|
2108
|
+
const message = createBaseDKGJustification();
|
|
2109
|
+
message.complainerIndex = object.complainerIndex ?? 0;
|
|
2110
|
+
message.evaluation = object.evaluation ?? new Uint8Array();
|
|
2111
|
+
return message;
|
|
2112
|
+
},
|
|
2113
|
+
fromAmino(object) {
|
|
2114
|
+
const message = createBaseDKGJustification();
|
|
2115
|
+
if (object.complainer_index !== undefined && object.complainer_index !== null) {
|
|
2116
|
+
message.complainerIndex = object.complainer_index;
|
|
2117
|
+
}
|
|
2118
|
+
if (object.evaluation !== undefined && object.evaluation !== null) {
|
|
2119
|
+
message.evaluation = bytesFromBase64(object.evaluation);
|
|
2120
|
+
}
|
|
2121
|
+
return message;
|
|
2122
|
+
},
|
|
2123
|
+
toAmino(message) {
|
|
2124
|
+
const obj = {};
|
|
2125
|
+
obj.complainer_index = message.complainerIndex === 0 ? undefined : message.complainerIndex;
|
|
2126
|
+
obj.evaluation = message.evaluation ? base64FromBytes(message.evaluation) : undefined;
|
|
2127
|
+
return obj;
|
|
2128
|
+
},
|
|
2129
|
+
fromAminoMsg(object) {
|
|
2130
|
+
return DKGJustification.fromAmino(object.value);
|
|
2131
|
+
},
|
|
2132
|
+
fromProtoMsg(message) {
|
|
2133
|
+
return DKGJustification.decode(message.value);
|
|
2134
|
+
},
|
|
2135
|
+
toProto(message) {
|
|
2136
|
+
return DKGJustification.encode(message).finish();
|
|
2137
|
+
},
|
|
2138
|
+
toProtoMsg(message) {
|
|
2139
|
+
return {
|
|
2140
|
+
typeUrl: "/sparkdream.shield.v1.DKGJustification",
|
|
2141
|
+
value: DKGJustification.encode(message).finish()
|
|
2142
|
+
};
|
|
2143
|
+
}
|
|
2144
|
+
};
|
|
2145
|
+
function createBaseDKGComplaint() {
|
|
2146
|
+
return {
|
|
2147
|
+
dealerAddress: "",
|
|
2148
|
+
complainerAddress: "",
|
|
2149
|
+
justified: false,
|
|
2150
|
+
evaluation: new Uint8Array()
|
|
2151
|
+
};
|
|
2152
|
+
}
|
|
2153
|
+
/**
|
|
2154
|
+
* DKGComplaint records a complaint by complainer_address against
|
|
2155
|
+
* dealer_address in the current round and, once the dealer answers with a
|
|
2156
|
+
* valid evaluation, that evaluation (the complainer uses it in place of the
|
|
2157
|
+
* ciphertext it could not open).
|
|
2158
|
+
* @name DKGComplaint
|
|
2159
|
+
* @package sparkdream.shield.v1
|
|
2160
|
+
* @see proto type: sparkdream.shield.v1.DKGComplaint
|
|
2161
|
+
*/
|
|
2162
|
+
export const DKGComplaint = {
|
|
2163
|
+
typeUrl: "/sparkdream.shield.v1.DKGComplaint",
|
|
2164
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
2165
|
+
if (message.dealerAddress !== "") {
|
|
2166
|
+
writer.uint32(10).string(message.dealerAddress);
|
|
2167
|
+
}
|
|
2168
|
+
if (message.complainerAddress !== "") {
|
|
2169
|
+
writer.uint32(18).string(message.complainerAddress);
|
|
2170
|
+
}
|
|
2171
|
+
if (message.justified === true) {
|
|
2172
|
+
writer.uint32(24).bool(message.justified);
|
|
2173
|
+
}
|
|
2174
|
+
if (message.evaluation.length !== 0) {
|
|
2175
|
+
writer.uint32(34).bytes(message.evaluation);
|
|
2176
|
+
}
|
|
2177
|
+
return writer;
|
|
2178
|
+
},
|
|
2179
|
+
decode(input, length) {
|
|
2180
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2181
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2182
|
+
const message = createBaseDKGComplaint();
|
|
2183
|
+
while (reader.pos < end) {
|
|
2184
|
+
const tag = reader.uint32();
|
|
2185
|
+
switch (tag >>> 3) {
|
|
2186
|
+
case 1:
|
|
2187
|
+
message.dealerAddress = reader.string();
|
|
2188
|
+
break;
|
|
2189
|
+
case 2:
|
|
2190
|
+
message.complainerAddress = reader.string();
|
|
2191
|
+
break;
|
|
2192
|
+
case 3:
|
|
2193
|
+
message.justified = reader.bool();
|
|
2194
|
+
break;
|
|
2195
|
+
case 4:
|
|
2196
|
+
message.evaluation = reader.bytes();
|
|
2197
|
+
break;
|
|
2198
|
+
default:
|
|
2199
|
+
reader.skipType(tag & 7);
|
|
2200
|
+
break;
|
|
2201
|
+
}
|
|
2202
|
+
}
|
|
2203
|
+
return message;
|
|
2204
|
+
},
|
|
2205
|
+
fromPartial(object) {
|
|
2206
|
+
const message = createBaseDKGComplaint();
|
|
2207
|
+
message.dealerAddress = object.dealerAddress ?? "";
|
|
2208
|
+
message.complainerAddress = object.complainerAddress ?? "";
|
|
2209
|
+
message.justified = object.justified ?? false;
|
|
2210
|
+
message.evaluation = object.evaluation ?? new Uint8Array();
|
|
2211
|
+
return message;
|
|
2212
|
+
},
|
|
2213
|
+
fromAmino(object) {
|
|
2214
|
+
const message = createBaseDKGComplaint();
|
|
2215
|
+
if (object.dealer_address !== undefined && object.dealer_address !== null) {
|
|
2216
|
+
message.dealerAddress = object.dealer_address;
|
|
2217
|
+
}
|
|
2218
|
+
if (object.complainer_address !== undefined && object.complainer_address !== null) {
|
|
2219
|
+
message.complainerAddress = object.complainer_address;
|
|
2220
|
+
}
|
|
2221
|
+
if (object.justified !== undefined && object.justified !== null) {
|
|
2222
|
+
message.justified = object.justified;
|
|
2223
|
+
}
|
|
2224
|
+
if (object.evaluation !== undefined && object.evaluation !== null) {
|
|
2225
|
+
message.evaluation = bytesFromBase64(object.evaluation);
|
|
2226
|
+
}
|
|
2227
|
+
return message;
|
|
2228
|
+
},
|
|
2229
|
+
toAmino(message) {
|
|
2230
|
+
const obj = {};
|
|
2231
|
+
obj.dealer_address = message.dealerAddress === "" ? undefined : message.dealerAddress;
|
|
2232
|
+
obj.complainer_address = message.complainerAddress === "" ? undefined : message.complainerAddress;
|
|
2233
|
+
obj.justified = message.justified === false ? undefined : message.justified;
|
|
2234
|
+
obj.evaluation = message.evaluation ? base64FromBytes(message.evaluation) : undefined;
|
|
2235
|
+
return obj;
|
|
2236
|
+
},
|
|
2237
|
+
fromAminoMsg(object) {
|
|
2238
|
+
return DKGComplaint.fromAmino(object.value);
|
|
2239
|
+
},
|
|
2240
|
+
fromProtoMsg(message) {
|
|
2241
|
+
return DKGComplaint.decode(message.value);
|
|
2242
|
+
},
|
|
2243
|
+
toProto(message) {
|
|
2244
|
+
return DKGComplaint.encode(message).finish();
|
|
2245
|
+
},
|
|
2246
|
+
toProtoMsg(message) {
|
|
2247
|
+
return {
|
|
2248
|
+
typeUrl: "/sparkdream.shield.v1.DKGComplaint",
|
|
2249
|
+
value: DKGComplaint.encode(message).finish()
|
|
2250
|
+
};
|
|
2251
|
+
}
|
|
2252
|
+
};
|
|
1937
2253
|
function createBaseInjectedDKGData() {
|
|
1938
2254
|
return {
|
|
1939
2255
|
round: BigInt(0),
|
|
@@ -2490,3 +2806,86 @@ export const TLEMissCounterEntry = {
|
|
|
2490
2806
|
};
|
|
2491
2807
|
}
|
|
2492
2808
|
};
|
|
2809
|
+
function createBaseDecryptionDemandEntry() {
|
|
2810
|
+
return {
|
|
2811
|
+
epoch: BigInt(0),
|
|
2812
|
+
height: BigInt(0)
|
|
2813
|
+
};
|
|
2814
|
+
}
|
|
2815
|
+
/**
|
|
2816
|
+
* DecryptionDemandEntry records that the EndBlocker asked validators for
|
|
2817
|
+
* decryption shares of a closed epoch (its batch became ready) at a height.
|
|
2818
|
+
* TLE liveness for that epoch is judged one full epoch interval later.
|
|
2819
|
+
* @name DecryptionDemandEntry
|
|
2820
|
+
* @package sparkdream.shield.v1
|
|
2821
|
+
* @see proto type: sparkdream.shield.v1.DecryptionDemandEntry
|
|
2822
|
+
*/
|
|
2823
|
+
export const DecryptionDemandEntry = {
|
|
2824
|
+
typeUrl: "/sparkdream.shield.v1.DecryptionDemandEntry",
|
|
2825
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
2826
|
+
if (message.epoch !== BigInt(0)) {
|
|
2827
|
+
writer.uint32(8).uint64(message.epoch);
|
|
2828
|
+
}
|
|
2829
|
+
if (message.height !== BigInt(0)) {
|
|
2830
|
+
writer.uint32(16).int64(message.height);
|
|
2831
|
+
}
|
|
2832
|
+
return writer;
|
|
2833
|
+
},
|
|
2834
|
+
decode(input, length) {
|
|
2835
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2836
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2837
|
+
const message = createBaseDecryptionDemandEntry();
|
|
2838
|
+
while (reader.pos < end) {
|
|
2839
|
+
const tag = reader.uint32();
|
|
2840
|
+
switch (tag >>> 3) {
|
|
2841
|
+
case 1:
|
|
2842
|
+
message.epoch = reader.uint64();
|
|
2843
|
+
break;
|
|
2844
|
+
case 2:
|
|
2845
|
+
message.height = reader.int64();
|
|
2846
|
+
break;
|
|
2847
|
+
default:
|
|
2848
|
+
reader.skipType(tag & 7);
|
|
2849
|
+
break;
|
|
2850
|
+
}
|
|
2851
|
+
}
|
|
2852
|
+
return message;
|
|
2853
|
+
},
|
|
2854
|
+
fromPartial(object) {
|
|
2855
|
+
const message = createBaseDecryptionDemandEntry();
|
|
2856
|
+
message.epoch = object.epoch !== undefined && object.epoch !== null ? BigInt(object.epoch.toString()) : BigInt(0);
|
|
2857
|
+
message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0);
|
|
2858
|
+
return message;
|
|
2859
|
+
},
|
|
2860
|
+
fromAmino(object) {
|
|
2861
|
+
const message = createBaseDecryptionDemandEntry();
|
|
2862
|
+
if (object.epoch !== undefined && object.epoch !== null) {
|
|
2863
|
+
message.epoch = BigInt(object.epoch);
|
|
2864
|
+
}
|
|
2865
|
+
if (object.height !== undefined && object.height !== null) {
|
|
2866
|
+
message.height = BigInt(object.height);
|
|
2867
|
+
}
|
|
2868
|
+
return message;
|
|
2869
|
+
},
|
|
2870
|
+
toAmino(message) {
|
|
2871
|
+
const obj = {};
|
|
2872
|
+
obj.epoch = message.epoch !== BigInt(0) ? message.epoch?.toString() : undefined;
|
|
2873
|
+
obj.height = message.height !== BigInt(0) ? message.height?.toString() : undefined;
|
|
2874
|
+
return obj;
|
|
2875
|
+
},
|
|
2876
|
+
fromAminoMsg(object) {
|
|
2877
|
+
return DecryptionDemandEntry.fromAmino(object.value);
|
|
2878
|
+
},
|
|
2879
|
+
fromProtoMsg(message) {
|
|
2880
|
+
return DecryptionDemandEntry.decode(message.value);
|
|
2881
|
+
},
|
|
2882
|
+
toProto(message) {
|
|
2883
|
+
return DecryptionDemandEntry.encode(message).finish();
|
|
2884
|
+
},
|
|
2885
|
+
toProtoMsg(message) {
|
|
2886
|
+
return {
|
|
2887
|
+
typeUrl: "/sparkdream.shield.v1.DecryptionDemandEntry",
|
|
2888
|
+
value: DecryptionDemandEntry.encode(message).finish()
|
|
2889
|
+
};
|
|
2890
|
+
}
|
|
2891
|
+
};
|