Module snarkvm_wasm::prelude[][src]

Structs

Represents a variable in the constraint system which is guaranteed to be either zero or one.

Represents a variable in the constraint system whose value can be an arbitrary field element.

Conversion of field elements by converting them to boolean sequences Used by Groth16 and Gm17

Enums

This is a boolean value which may be either a constant or an interpretation of an AllocatedBit.

Represent variables corresponding to a field element in F.

Traits

Returns addition of self + other in the constraint system.

If condition is true, return first; else, select second.

If condition == 1, then enforces that self and other are equal; otherwise, it doesn’t enforce anything.

Returns division of self / other in the constraint system.

Specifies how to convert variables of type FpGadget<F> to a variable of type Self

Single bit binary adder with carry bit https://en.wikipedia.org/wiki/Adder_(electronics)#Full_adder sum = (a XOR b) XOR carry carry = a AND b OR carry AND (a XOR b) Returns (sum, carry)

The interface for a singed or unsigned integer gadget.

Returns multiplication of self * other in the constraint system.

Returns a negated representation of self in the constraint system.

Returns exponentiation of self ** other in the constraint system.

Returns the bitwise sum of a n-bit number with carry bit

This implements constraints for SNARK verifiers.

Sign extends an array of bits to the desired length. Expects least significant bit first

Uses three bits to perform a lookup into a table, where the last bit performs negation

Specifies how to convert a variable of type Self to variables of type FpGadget<F>

Uses two bits to perform a lookup into a table

Performs a bitwise XOR operation between self and other in the constraint system.