pragma circom 2.0.0; include "comparators.circom"; template SumOfInputs(numInputs, maxBitsInput) { signal input in[numInputs]; signal output out; component validations[numInputs]; signal intermediate[numInputs]; validations[0] = Num2Bits(maxBitsInput); validations[0].in <== in[0]; intermediate[0] <== in[0]; for (var i=1; i