Structs§
- Circuit for Poseidon hash.
Enums§
- Similar to
num::Num
, we useElt
to accumulate both values and linear combinations, then eventually extract into anum::AllocatedNum
, enforcing that the linear combination corresponds to the result.
Functions§
- Calculates a * (b + to_add) — and enforces that constraint.
- Calculates (a * (pre_add + b)) + post_add — and enforces that constraint.
- Create circuit for Poseidon hash, returning an allocated
Num
at the cost of one constraint. - Create circuit for Poseidon hash, minimizing constraints by returning an unallocated
Num
. - Calculates square of sum and enforces that constraint.