@smithii_io/mixoor 0.0.4 → 0.0.5
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 +20 -0
- package/circuits/build/transaction_js/transaction.wasm +0 -0
- package/circuits/transaction_0001.zkey +0 -0
- package/circuits/verification_key.json +124 -0
- package/dist/src/index.js +5 -10
- package/dist/src/index.js.map +1 -1
- package/dist/src/index.mjs +5 -10
- package/dist/src/index.mjs.map +1 -1
- package/dist/test/_setup.js.map +1 -1
- package/dist/types/src/utils/circuit.d.ts.map +1 -1
- package/dist/types/test/_setup.d.ts +2 -2
- package/dist/types/test/_setup.d.ts.map +1 -1
- package/package.json +5 -3
package/dist/src/index.mjs
CHANGED
|
@@ -1166,23 +1166,18 @@ 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
|
-
|
|
1171
|
-
"
|
|
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
1178
|
zkeyPath
|
|
1181
1179
|
);
|
|
1182
|
-
const vKeyPath = path.join(
|
|
1183
|
-
__dirname,
|
|
1184
|
-
"../../../../circuits/verification_key.json"
|
|
1185
|
-
);
|
|
1180
|
+
const vKeyPath = path.join(packageRoot, "circuits/verification_key.json");
|
|
1186
1181
|
const isValid = await groth16.verify(
|
|
1187
1182
|
JSON.parse(fs.readFileSync(vKeyPath, "utf8")),
|
|
1188
1183
|
publicSignals,
|