poseidon-encryption
Version:
Standalone package for Poseidon encryption. All credits to https://github.com/weijiekoh/circomlib/tree/feat/poseidon-encryption
24 lines (18 loc) • 743 B
JavaScript
const path = require("path");
const wasm_tester = require("circom_tester").wasm;
const babyJub = require("circomlibjs").babyjub;
describe("Point 2 bits test", function() {
let circuit;
this.timeout(100000);
before( async() => {
circuit = await wasm_tester(path.join(__dirname, "circuits", "pointbits_loopback.circom"));
});
it("Should do the both convertions for 8Base", async () => {
const w = await circuit.calculateWitness({ in: babyJub.Base8}, true);
await circuit.checkConstraints(w);
});
it("Should do the both convertions for Zero point", async () => {
const w = await circuit.calculateWitness({ in: [0, 1]}, true);
await circuit.checkConstraints(w);
});
});