Module snarkvm_wasm::traits [−][src]
Modules
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
Returns subtraction of self
- other
in the constraint system.
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.