@smithii_io/mixoor 0.0.4 → 0.0.6

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.
@@ -1166,23 +1166,20 @@ async function generateProof(input) {
1166
1166
  pathIndices: input.pathIndices,
1167
1167
  amount: BigInt(input.amount).toString()
1168
1168
  };
1169
+ const packageRoot = path.join(__dirname, "../..");
1169
1170
  const wasmPath = path.join(
1170
- __dirname,
1171
- "../../../../circuits/build/transaction_js/transaction.wasm"
1172
- );
1173
- const zkeyPath = path.join(
1174
- __dirname,
1175
- "../../../../circuits/transaction_0001.zkey"
1171
+ packageRoot,
1172
+ "circuits/build/transaction_js/transaction.wasm"
1176
1173
  );
1174
+ const zkeyPath = path.join(packageRoot, "circuits/transaction_0001.zkey");
1177
1175
  const { proof, publicSignals } = await groth16.fullProve(
1178
1176
  circuitInputs,
1179
1177
  wasmPath,
1180
- zkeyPath
1181
- );
1182
- const vKeyPath = path.join(
1183
- __dirname,
1184
- "../../../../circuits/verification_key.json"
1178
+ zkeyPath,
1179
+ true
1180
+ // ! use single thread for proving
1185
1181
  );
1182
+ const vKeyPath = path.join(packageRoot, "circuits/verification_key.json");
1186
1183
  const isValid = await groth16.verify(
1187
1184
  JSON.parse(fs.readFileSync(vKeyPath, "utf8")),
1188
1185
  publicSignals,