@smithii_io/mixoor 0.0.7 → 0.0.9

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.
@@ -3,6 +3,7 @@ import { buildPoseidon } from 'circomlibjs';
3
3
  import * as fs from 'fs';
4
4
  import * as path from 'path';
5
5
  import { groth16 } from 'snarkjs';
6
+ import { fileURLToPath } from 'url';
6
7
  import { randomBytes as randomBytes$1 } from 'crypto';
7
8
 
8
9
  // src/generated/accounts/nullifierAccount.ts
@@ -1166,6 +1167,13 @@ async function generateProof(input) {
1166
1167
  pathIndices: input.pathIndices,
1167
1168
  amount: BigInt(input.amount).toString()
1168
1169
  };
1170
+ let __dirname;
1171
+ if (typeof __filename !== "undefined") {
1172
+ __dirname = path.dirname(__filename);
1173
+ } else {
1174
+ const __filename_esm = fileURLToPath(import.meta.url);
1175
+ __dirname = path.dirname(__filename_esm);
1176
+ }
1169
1177
  const packageRoot = path.join(__dirname, "../..");
1170
1178
  const wasmPath = path.join(
1171
1179
  packageRoot,
@@ -1175,11 +1183,7 @@ async function generateProof(input) {
1175
1183
  const { proof, publicSignals } = await groth16.fullProve(
1176
1184
  circuitInputs,
1177
1185
  wasmPath,
1178
- zkeyPath,
1179
- void 0,
1180
- void 0,
1181
- { singleThread: true }
1182
- // ! does this impact performance
1186
+ zkeyPath
1183
1187
  );
1184
1188
  const vKeyPath = path.join(packageRoot, "circuits/verification_key.json");
1185
1189
  const isValid = await groth16.verify(