@dorafactory/maci-sdk 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.
package/dist/index.js CHANGED
@@ -66,6 +66,9 @@ __export(index_exports, {
66
66
  genPubKey: () => genPubKey,
67
67
  genRandomBabyJubValue: () => genRandomBabyJubValue,
68
68
  genRandomSalt: () => genRandomSalt,
69
+ getAMaciRoundCircuitFee: () => getAMaciRoundCircuitFee,
70
+ getCircuitType: () => getCircuitType,
71
+ getContractParams: () => getContractParams,
69
72
  getDefaultParams: () => getDefaultParams,
70
73
  hash12: () => hash12,
71
74
  hash2: () => hash2,
@@ -4131,6 +4134,22 @@ var QTR_LIB = {
4131
4134
  };
4132
4135
 
4133
4136
  // src/libs/contract/utils.ts
4137
+ function getCircuitType(circuitType) {
4138
+ let maciVoteType = null;
4139
+ switch (circuitType) {
4140
+ case "0" /* IP1V */:
4141
+ maciVoteType = "0";
4142
+ break;
4143
+ case "1" /* QV */:
4144
+ maciVoteType = "1";
4145
+ break;
4146
+ default:
4147
+ throw new Error(
4148
+ `Invalid circuit type ${circuitType}, only support 1P1V and QV`
4149
+ );
4150
+ }
4151
+ return maciVoteType;
4152
+ }
4134
4153
  function getContractParams(type, circuitType, proofSystem, maxVoter, maxOption) {
4135
4154
  let parameters;
4136
4155
  let groth16ProcessVkey = null;
@@ -6237,6 +6256,9 @@ var MaciClient2 = class {
6237
6256
  genPubKey,
6238
6257
  genRandomBabyJubValue,
6239
6258
  genRandomSalt,
6259
+ getAMaciRoundCircuitFee,
6260
+ getCircuitType,
6261
+ getContractParams,
6240
6262
  getDefaultParams,
6241
6263
  hash12,
6242
6264
  hash2,