mirror of
https://github.com/arnaucube/circomlib.git
synced 2026-02-06 18:56:43 +01:00
Update web3
This commit is contained in:
3
test/circuits/eddsaposeidon_test.circom
Normal file
3
test/circuits/eddsaposeidon_test.circom
Normal file
@@ -0,0 +1,3 @@
|
||||
include "../../circuits/eddsaposeidon.circom";
|
||||
|
||||
component main = EdDSAPoseidonVerifier();
|
||||
4
test/circuits/greatereqthan.circom
Normal file
4
test/circuits/greatereqthan.circom
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
include "../../circuits/comparators.circom";
|
||||
|
||||
component main = GreaterEqThan(32);
|
||||
4
test/circuits/greaterthan.circom
Normal file
4
test/circuits/greaterthan.circom
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
include "../../circuits/comparators.circom";
|
||||
|
||||
component main = GreaterThan(32);
|
||||
4
test/circuits/lesseqthan.circom
Normal file
4
test/circuits/lesseqthan.circom
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
include "../../circuits/comparators.circom";
|
||||
|
||||
component main = LessEqThan(32);
|
||||
31
test/circuits/mux1_1.circom
Normal file
31
test/circuits/mux1_1.circom
Normal file
@@ -0,0 +1,31 @@
|
||||
include "../../circuits/mux1.circom";
|
||||
include "../../circuits/bitify.circom";
|
||||
|
||||
|
||||
template Constants() {
|
||||
var i;
|
||||
signal output out[2];
|
||||
|
||||
out[0] <== 37;
|
||||
out[1] <== 47;
|
||||
}
|
||||
|
||||
template Main() {
|
||||
var i;
|
||||
signal private input selector;
|
||||
signal output out;
|
||||
|
||||
component mux = Mux1();
|
||||
component n2b = Num2Bits(1);
|
||||
component cst = Constants();
|
||||
|
||||
selector ==> n2b.in;
|
||||
n2b.out[0] ==> mux.s;
|
||||
for (i=0; i<2; i++) {
|
||||
cst.out[i] ==> mux.c[i];
|
||||
}
|
||||
|
||||
mux.out ==> out;
|
||||
}
|
||||
|
||||
component main = Main();
|
||||
35
test/circuits/mux2_1.circom
Normal file
35
test/circuits/mux2_1.circom
Normal file
@@ -0,0 +1,35 @@
|
||||
include "../../circuits/mux2.circom";
|
||||
include "../../circuits/bitify.circom";
|
||||
|
||||
|
||||
template Constants() {
|
||||
var i;
|
||||
signal output out[4];
|
||||
|
||||
out[0] <== 37;
|
||||
out[1] <== 47;
|
||||
out[2] <== 53;
|
||||
out[3] <== 71;
|
||||
}
|
||||
|
||||
template Main() {
|
||||
var i;
|
||||
signal private input selector;
|
||||
signal output out;
|
||||
|
||||
component mux = Mux2();
|
||||
component n2b = Num2Bits(2);
|
||||
component cst = Constants();
|
||||
|
||||
selector ==> n2b.in;
|
||||
for (i=0; i<2; i++) {
|
||||
n2b.out[i] ==> mux.s[i];
|
||||
}
|
||||
for (i=0; i<4; i++) {
|
||||
cst.out[i] ==> mux.c[i];
|
||||
}
|
||||
|
||||
mux.out ==> out;
|
||||
}
|
||||
|
||||
component main = Main();
|
||||
Reference in New Issue
Block a user