@sparkdreamnft/sparkdreamjs 0.0.35 → 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 (98) hide show
  1. package/akash/bundle.d.ts +134 -134
  2. package/akash/bundle.js +150 -150
  3. package/cosmos/bundle.d.ts +160 -160
  4. package/cosmos/bundle.js +182 -182
  5. package/esm/akash/bundle.js +150 -150
  6. package/esm/cosmos/bundle.js +182 -182
  7. package/esm/ibc/bundle.js +116 -116
  8. package/esm/sparkdream/bundle.js +305 -301
  9. package/esm/sparkdream/federation/v1/genesis.js +101 -3
  10. package/esm/sparkdream/federation/v1/params.js +129 -117
  11. package/esm/sparkdream/federation/v1/query.js +204 -7
  12. package/esm/sparkdream/federation/v1/query.lcd.js +11 -2
  13. package/esm/sparkdream/federation/v1/query.rpc.Query.js +16 -3
  14. package/esm/sparkdream/federation/v1/types.js +73 -1
  15. package/esm/sparkdream/federation/v1/verifier_activity.js +143 -45
  16. package/esm/sparkdream/rep/v1/{interim_template.js → acceptance_criteria.js} +13 -123
  17. package/esm/sparkdream/rep/v1/accountability.js +11 -0
  18. package/esm/sparkdream/rep/v1/bonded_role.js +50 -1
  19. package/esm/sparkdream/rep/v1/challenge.js +21 -9
  20. package/esm/sparkdream/rep/v1/genesis.js +198 -59
  21. package/esm/sparkdream/rep/v1/initiative.js +160 -49
  22. package/esm/sparkdream/rep/v1/initiative_review.js +179 -0
  23. package/esm/sparkdream/rep/v1/jury_participation.js +39 -9
  24. package/esm/sparkdream/rep/v1/jury_review.js +40 -1
  25. package/esm/sparkdream/rep/v1/member_report.js +8 -8
  26. package/esm/sparkdream/rep/v1/member_warning.js +2 -2
  27. package/esm/sparkdream/rep/v1/params.js +806 -2
  28. package/esm/sparkdream/rep/v1/query.js +1446 -325
  29. package/esm/sparkdream/rep/v1/query.lcd.js +49 -16
  30. package/esm/sparkdream/rep/v1/query.rpc.Query.js +67 -21
  31. package/esm/sparkdream/rep/v1/review_bounty.js +215 -0
  32. package/esm/sparkdream/rep/v1/role_activity.js +13 -1
  33. package/esm/sparkdream/rep/v1/tag_report.js +2 -2
  34. package/esm/sparkdream/rep/v1/tx.js +2610 -1442
  35. package/esm/sparkdream/rep/v1/tx.registry.js +128 -2
  36. package/esm/sparkdream/rep/v1/tx.rpc.msg.js +43 -1
  37. package/esm/tendermint/bundle.js +18 -18
  38. package/ibc/bundle.d.ts +99 -99
  39. package/ibc/bundle.js +116 -116
  40. package/package.json +1 -1
  41. package/sparkdream/bundle.d.ts +9709 -9199
  42. package/sparkdream/bundle.js +305 -301
  43. package/sparkdream/federation/v1/genesis.d.ts +66 -0
  44. package/sparkdream/federation/v1/genesis.js +102 -4
  45. package/sparkdream/federation/v1/params.d.ts +72 -10
  46. package/sparkdream/federation/v1/params.js +129 -117
  47. package/sparkdream/federation/v1/query.d.ts +120 -3
  48. package/sparkdream/federation/v1/query.js +204 -7
  49. package/sparkdream/federation/v1/query.lcd.d.ts +2 -1
  50. package/sparkdream/federation/v1/query.lcd.js +11 -2
  51. package/sparkdream/federation/v1/query.rpc.Query.d.ts +13 -3
  52. package/sparkdream/federation/v1/query.rpc.Query.js +15 -2
  53. package/sparkdream/federation/v1/types.d.ts +44 -0
  54. package/sparkdream/federation/v1/types.js +73 -1
  55. package/sparkdream/federation/v1/verifier_activity.d.ts +151 -68
  56. package/sparkdream/federation/v1/verifier_activity.js +144 -46
  57. package/sparkdream/rep/v1/{interim_template.d.ts → acceptance_criteria.d.ts} +39 -52
  58. package/sparkdream/rep/v1/{interim_template.js → acceptance_criteria.js} +14 -124
  59. package/sparkdream/rep/v1/accountability.d.ts +6 -0
  60. package/sparkdream/rep/v1/accountability.js +11 -0
  61. package/sparkdream/rep/v1/bonded_role.d.ts +50 -0
  62. package/sparkdream/rep/v1/bonded_role.js +50 -1
  63. package/sparkdream/rep/v1/challenge.d.ts +14 -0
  64. package/sparkdream/rep/v1/challenge.js +21 -9
  65. package/sparkdream/rep/v1/genesis.d.ts +100 -3
  66. package/sparkdream/rep/v1/genesis.js +199 -60
  67. package/sparkdream/rep/v1/initiative.d.ts +106 -2
  68. package/sparkdream/rep/v1/initiative.js +163 -50
  69. package/sparkdream/rep/v1/initiative_review.d.ts +121 -0
  70. package/sparkdream/rep/v1/initiative_review.js +182 -0
  71. package/sparkdream/rep/v1/jury_participation.d.ts +89 -5
  72. package/sparkdream/rep/v1/jury_participation.js +39 -9
  73. package/sparkdream/rep/v1/jury_review.d.ts +38 -0
  74. package/sparkdream/rep/v1/jury_review.js +40 -1
  75. package/sparkdream/rep/v1/member_report.js +8 -8
  76. package/sparkdream/rep/v1/member_warning.js +2 -2
  77. package/sparkdream/rep/v1/params.d.ts +764 -16
  78. package/sparkdream/rep/v1/params.js +806 -2
  79. package/sparkdream/rep/v1/query.d.ts +929 -179
  80. package/sparkdream/rep/v1/query.js +1450 -329
  81. package/sparkdream/rep/v1/query.lcd.d.ts +7 -3
  82. package/sparkdream/rep/v1/query.lcd.js +49 -16
  83. package/sparkdream/rep/v1/query.rpc.Query.d.ts +47 -9
  84. package/sparkdream/rep/v1/query.rpc.Query.js +66 -20
  85. package/sparkdream/rep/v1/review_bounty.d.ts +168 -0
  86. package/sparkdream/rep/v1/review_bounty.js +218 -0
  87. package/sparkdream/rep/v1/role_activity.d.ts +26 -0
  88. package/sparkdream/rep/v1/role_activity.js +13 -1
  89. package/sparkdream/rep/v1/tag_report.js +2 -2
  90. package/sparkdream/rep/v1/tx.d.ts +816 -9
  91. package/sparkdream/rep/v1/tx.js +2612 -1443
  92. package/sparkdream/rep/v1/tx.registry.d.ts +85 -1
  93. package/sparkdream/rep/v1/tx.registry.js +127 -1
  94. package/sparkdream/rep/v1/tx.rpc.msg.d.ts +20 -1
  95. package/sparkdream/rep/v1/tx.rpc.msg.js +42 -0
  96. package/sparkdream/rpc.query.d.ts +7 -2
  97. package/tendermint/bundle.d.ts +844 -844
  98. package/tendermint/bundle.js +18 -18
@@ -0,0 +1,218 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReviewBountyContribution = exports.ReviewBounty = void 0;
4
+ //@ts-nocheck
5
+ const binary_1 = require("../../../binary");
6
+ function createBaseReviewBounty() {
7
+ return {
8
+ initiativeId: BigInt(0),
9
+ amount: "",
10
+ contributions: [],
11
+ committed: false
12
+ };
13
+ }
14
+ /**
15
+ * ReviewBounty is DREAM escrowed against one initiative to attract reviewer
16
+ * attention to it.
17
+ *
18
+ * The DREAM review fee pays for the act of reviewing at a rate fixed by the
19
+ * budget. A bounty is how the people who actually want a particular initiative
20
+ * looked at — its creator, its stakers, anyone — bid that attention up. Review
21
+ * is the scarcest input in the system once the completion gate is mandatory,
22
+ * and a flat fee cannot express "this one matters more".
23
+ *
24
+ * Paid out per verdict filed and split across the round's reviewers, exactly
25
+ * like the fee: outcome-blind. A bounty released on successful completion would
26
+ * be a straightforward bribe to approve, which is the bias the reviewer role
27
+ * exists to remove.
28
+ * @name ReviewBounty
29
+ * @package sparkdream.rep.v1
30
+ * @see proto type: sparkdream.rep.v1.ReviewBounty
31
+ */
32
+ exports.ReviewBounty = {
33
+ typeUrl: "/sparkdream.rep.v1.ReviewBounty",
34
+ encode(message, writer = binary_1.BinaryWriter.create()) {
35
+ if (message.initiativeId !== BigInt(0)) {
36
+ writer.uint32(8).uint64(message.initiativeId);
37
+ }
38
+ if (message.amount !== "") {
39
+ writer.uint32(18).string(message.amount);
40
+ }
41
+ for (const v of message.contributions) {
42
+ exports.ReviewBountyContribution.encode(v, writer.uint32(26).fork()).ldelim();
43
+ }
44
+ if (message.committed === true) {
45
+ writer.uint32(32).bool(message.committed);
46
+ }
47
+ return writer;
48
+ },
49
+ decode(input, length) {
50
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
51
+ let end = length === undefined ? reader.len : reader.pos + length;
52
+ const message = createBaseReviewBounty();
53
+ while (reader.pos < end) {
54
+ const tag = reader.uint32();
55
+ switch (tag >>> 3) {
56
+ case 1:
57
+ message.initiativeId = reader.uint64();
58
+ break;
59
+ case 2:
60
+ message.amount = reader.string();
61
+ break;
62
+ case 3:
63
+ message.contributions.push(exports.ReviewBountyContribution.decode(reader, reader.uint32()));
64
+ break;
65
+ case 4:
66
+ message.committed = reader.bool();
67
+ break;
68
+ default:
69
+ reader.skipType(tag & 7);
70
+ break;
71
+ }
72
+ }
73
+ return message;
74
+ },
75
+ fromPartial(object) {
76
+ const message = createBaseReviewBounty();
77
+ message.initiativeId = object.initiativeId !== undefined && object.initiativeId !== null ? BigInt(object.initiativeId.toString()) : BigInt(0);
78
+ message.amount = object.amount ?? "";
79
+ message.contributions = object.contributions?.map(e => exports.ReviewBountyContribution.fromPartial(e)) || [];
80
+ message.committed = object.committed ?? false;
81
+ return message;
82
+ },
83
+ fromAmino(object) {
84
+ const message = createBaseReviewBounty();
85
+ if (object.initiative_id !== undefined && object.initiative_id !== null) {
86
+ message.initiativeId = BigInt(object.initiative_id);
87
+ }
88
+ if (object.amount !== undefined && object.amount !== null) {
89
+ message.amount = object.amount;
90
+ }
91
+ message.contributions = object.contributions?.map(e => exports.ReviewBountyContribution.fromAmino(e)) || [];
92
+ if (object.committed !== undefined && object.committed !== null) {
93
+ message.committed = object.committed;
94
+ }
95
+ return message;
96
+ },
97
+ toAmino(message) {
98
+ const obj = {};
99
+ obj.initiative_id = message.initiativeId !== BigInt(0) ? message.initiativeId?.toString() : undefined;
100
+ obj.amount = message.amount === "" ? undefined : message.amount;
101
+ if (message.contributions) {
102
+ obj.contributions = message.contributions.map(e => e ? exports.ReviewBountyContribution.toAmino(e) : undefined);
103
+ }
104
+ else {
105
+ obj.contributions = message.contributions;
106
+ }
107
+ obj.committed = message.committed === false ? undefined : message.committed;
108
+ return obj;
109
+ },
110
+ fromAminoMsg(object) {
111
+ return exports.ReviewBounty.fromAmino(object.value);
112
+ },
113
+ fromProtoMsg(message) {
114
+ return exports.ReviewBounty.decode(message.value);
115
+ },
116
+ toProto(message) {
117
+ return exports.ReviewBounty.encode(message).finish();
118
+ },
119
+ toProtoMsg(message) {
120
+ return {
121
+ typeUrl: "/sparkdream.rep.v1.ReviewBounty",
122
+ value: exports.ReviewBounty.encode(message).finish()
123
+ };
124
+ }
125
+ };
126
+ function createBaseReviewBountyContribution() {
127
+ return {
128
+ funder: "",
129
+ amount: "",
130
+ fundedAt: BigInt(0)
131
+ };
132
+ }
133
+ /**
134
+ * ReviewBountyContribution is one funder's stake in a bounty.
135
+ * @name ReviewBountyContribution
136
+ * @package sparkdream.rep.v1
137
+ * @see proto type: sparkdream.rep.v1.ReviewBountyContribution
138
+ */
139
+ exports.ReviewBountyContribution = {
140
+ typeUrl: "/sparkdream.rep.v1.ReviewBountyContribution",
141
+ encode(message, writer = binary_1.BinaryWriter.create()) {
142
+ if (message.funder !== "") {
143
+ writer.uint32(10).string(message.funder);
144
+ }
145
+ if (message.amount !== "") {
146
+ writer.uint32(18).string(message.amount);
147
+ }
148
+ if (message.fundedAt !== BigInt(0)) {
149
+ writer.uint32(24).int64(message.fundedAt);
150
+ }
151
+ return writer;
152
+ },
153
+ decode(input, length) {
154
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
155
+ let end = length === undefined ? reader.len : reader.pos + length;
156
+ const message = createBaseReviewBountyContribution();
157
+ while (reader.pos < end) {
158
+ const tag = reader.uint32();
159
+ switch (tag >>> 3) {
160
+ case 1:
161
+ message.funder = reader.string();
162
+ break;
163
+ case 2:
164
+ message.amount = reader.string();
165
+ break;
166
+ case 3:
167
+ message.fundedAt = reader.int64();
168
+ break;
169
+ default:
170
+ reader.skipType(tag & 7);
171
+ break;
172
+ }
173
+ }
174
+ return message;
175
+ },
176
+ fromPartial(object) {
177
+ const message = createBaseReviewBountyContribution();
178
+ message.funder = object.funder ?? "";
179
+ message.amount = object.amount ?? "";
180
+ message.fundedAt = object.fundedAt !== undefined && object.fundedAt !== null ? BigInt(object.fundedAt.toString()) : BigInt(0);
181
+ return message;
182
+ },
183
+ fromAmino(object) {
184
+ const message = createBaseReviewBountyContribution();
185
+ if (object.funder !== undefined && object.funder !== null) {
186
+ message.funder = object.funder;
187
+ }
188
+ if (object.amount !== undefined && object.amount !== null) {
189
+ message.amount = object.amount;
190
+ }
191
+ if (object.funded_at !== undefined && object.funded_at !== null) {
192
+ message.fundedAt = BigInt(object.funded_at);
193
+ }
194
+ return message;
195
+ },
196
+ toAmino(message) {
197
+ const obj = {};
198
+ obj.funder = message.funder === "" ? undefined : message.funder;
199
+ obj.amount = message.amount === "" ? undefined : message.amount;
200
+ obj.funded_at = message.fundedAt !== BigInt(0) ? message.fundedAt?.toString() : undefined;
201
+ return obj;
202
+ },
203
+ fromAminoMsg(object) {
204
+ return exports.ReviewBountyContribution.fromAmino(object.value);
205
+ },
206
+ fromProtoMsg(message) {
207
+ return exports.ReviewBountyContribution.decode(message.value);
208
+ },
209
+ toProto(message) {
210
+ return exports.ReviewBountyContribution.encode(message).finish();
211
+ },
212
+ toProtoMsg(message) {
213
+ return {
214
+ typeUrl: "/sparkdream.rep.v1.ReviewBountyContribution",
215
+ value: exports.ReviewBountyContribution.encode(message).finish()
216
+ };
217
+ }
218
+ };
@@ -206,6 +206,19 @@ export interface RoleActivity {
206
206
  overturnedActions: {
207
207
  [key: string]: bigint;
208
208
  };
209
+ /**
210
+ * last_slash_epoch is the reward epoch (in the units the role's own
211
+ * reward distribution reads -- see roleRewardEpoch) in which this role
212
+ * was most recently slashed. Stamped by SlashBond for every role type.
213
+ *
214
+ * Reward distributions may use it as a "no pay in an epoch you were
215
+ * slashed in" gate; only the federation verifier does today. Stamping it
216
+ * generically anyway is deliberate: it is a property of the bond, the
217
+ * stamp is one write on a path that is already writing, and a role that
218
+ * wants the gate should not have to reintroduce a private counter to get
219
+ * it. Zero means never slashed under the current accounting.
220
+ */
221
+ lastSlashEpoch: bigint;
209
222
  }
210
223
  export interface RoleActivityProtoMsg {
211
224
  typeUrl: "/sparkdream.rep.v1.RoleActivity";
@@ -276,6 +289,19 @@ export interface RoleActivityAmino {
276
289
  overturned_actions?: {
277
290
  [key: string]: string;
278
291
  };
292
+ /**
293
+ * last_slash_epoch is the reward epoch (in the units the role's own
294
+ * reward distribution reads -- see roleRewardEpoch) in which this role
295
+ * was most recently slashed. Stamped by SlashBond for every role type.
296
+ *
297
+ * Reward distributions may use it as a "no pay in an epoch you were
298
+ * slashed in" gate; only the federation verifier does today. Stamping it
299
+ * generically anyway is deliberate: it is a property of the bond, the
300
+ * stamp is one write on a path that is already writing, and a role that
301
+ * wants the gate should not have to reintroduce a private counter to get
302
+ * it. Zero means never slashed under the current accounting.
303
+ */
304
+ last_slash_epoch?: string;
279
305
  }
280
306
  export interface RoleActivityAminoMsg {
281
307
  type: "/sparkdream.rep.v1.RoleActivity";
@@ -402,7 +402,8 @@ function createBaseRoleActivity() {
402
402
  epochActions: {},
403
403
  totalActions: {},
404
404
  upheldActions: {},
405
- overturnedActions: {}
405
+ overturnedActions: {},
406
+ lastSlashEpoch: BigInt(0)
406
407
  };
407
408
  }
408
409
  /**
@@ -472,6 +473,9 @@ exports.RoleActivity = {
472
473
  value
473
474
  }, writer.uint32(88).fork()).ldelim();
474
475
  });
476
+ if (message.lastSlashEpoch !== BigInt(0)) {
477
+ writer.uint32(96).int64(message.lastSlashEpoch);
478
+ }
475
479
  return writer;
476
480
  },
477
481
  decode(input, length) {
@@ -526,6 +530,9 @@ exports.RoleActivity = {
526
530
  message.overturnedActions[entry11.key] = entry11.value;
527
531
  }
528
532
  break;
533
+ case 12:
534
+ message.lastSlashEpoch = reader.int64();
535
+ break;
529
536
  default:
530
537
  reader.skipType(tag & 7);
531
538
  break;
@@ -566,6 +573,7 @@ exports.RoleActivity = {
566
573
  }
567
574
  return acc;
568
575
  }, {});
576
+ message.lastSlashEpoch = object.lastSlashEpoch !== undefined && object.lastSlashEpoch !== null ? BigInt(object.lastSlashEpoch.toString()) : BigInt(0);
569
577
  return message;
570
578
  },
571
579
  fromAmino(object) {
@@ -613,6 +621,9 @@ exports.RoleActivity = {
613
621
  }
614
622
  return acc;
615
623
  }, {});
624
+ if (object.last_slash_epoch !== undefined && object.last_slash_epoch !== null) {
625
+ message.lastSlashEpoch = BigInt(object.last_slash_epoch);
626
+ }
616
627
  return message;
617
628
  },
618
629
  toAmino(message) {
@@ -653,6 +664,7 @@ exports.RoleActivity = {
653
664
  obj.overturned_actions[k] = v.toString();
654
665
  });
655
666
  }
667
+ obj.last_slash_epoch = message.lastSlashEpoch !== BigInt(0) ? message.lastSlashEpoch?.toString() : undefined;
656
668
  return obj;
657
669
  },
658
670
  fromAminoMsg(object) {
@@ -34,7 +34,7 @@ exports.TagReport = {
34
34
  writer.uint32(32).bool(message.underReview);
35
35
  }
36
36
  for (const v of message.reporters) {
37
- writer.uint32(82).string(v);
37
+ writer.uint32(42).string(v);
38
38
  }
39
39
  return writer;
40
40
  },
@@ -57,7 +57,7 @@ exports.TagReport = {
57
57
  case 4:
58
58
  message.underReview = reader.bool();
59
59
  break;
60
- case 10:
60
+ case 5:
61
61
  message.reporters.push(reader.string());
62
62
  break;
63
63
  default: