@dorafactory/maci-sdk 0.0.40 → 0.0.50

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/README.md CHANGED
@@ -217,10 +217,12 @@ const voteResponse = await client.maci.vote({
217
217
  **Voting Rules:**
218
218
 
219
219
  MACI supports two voting rules:
220
+
220
221
  1. 1P1V (One Person One Vote): Each voting weight (vc) directly counts as votes
221
222
  2. QV (Quadratic Voting): The sum of squares of voting weights (vc) is consumed as total voting power
222
223
 
223
224
  Vote options format:
225
+
224
226
  ```typescript
225
227
  selectedOptions: [
226
228
  { idx: number, vc: number }, // idx: option index, vc: voting weight
@@ -229,13 +231,14 @@ selectedOptions: [
229
231
  ```
230
232
 
231
233
  Examples:
234
+
232
235
  ```typescript
233
236
  // 1P1V mode example (total voting power: 4)
234
237
  const options1p1v = [
235
238
  { idx: 0, vc: 2 }, // 2 votes for option 0
236
239
  { idx: 1, vc: 1 }, // 1 vote for option 1
237
240
  { idx: 4, vc: 1 }, // 1 vote for option 4
238
- ];
241
+ ];
239
242
  // Total voting power consumed = 2 + 1 + 1 = 4
240
243
 
241
244
  // QV mode example (total voting power: 6)
@@ -248,6 +251,7 @@ const optionsQv = [
248
251
  ```
249
252
 
250
253
  **Important Notes:**
254
+
251
255
  - Option indices (idx) must be unique
252
256
  - Voting weights (vc) must be positive integers
253
257
  - In QV mode, total voting power consumed is the sum of squares of voting weights