Module snarkvm_wasm::prelude[][src]

Structs

AllocatedBit

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

BooleanInputGadget

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

Enums

Boolean

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

SignedIntegerError
UnsignedIntegerError

Traits

Add

Returns addition of self + other in the constraint system.

AllocBytesGadget
AllocGadget
CRHGadget
CommitmentGadget
ComparatorGadget
CompressedGroupGadget
CondSelectGadget

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

ConditionalEqGadget

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

ConditionalOrEqualsGadget
Div

Returns division of self / other in the constraint system.

EncryptionGadget
EqGadget
EvaluateEqGadget
EvaluateLtGadget
FieldGadget
FullAdder

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)

GroupGadget
Integer

The interface for a singed or unsigned integer gadget.

MaskedCRHGadget
Mul

Returns multiplication of self * other in the constraint system.

NEqGadget
Neg

Returns a negated representation of self in the constraint system.

OrEqualsGadget
PRFGadget
PairingGadget
Pow

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

RippleCarryAdder

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

SNARKGadget

This implements constraints for SNARK verifiers.

SNARKVerifierGadget
SignExtend

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

SignaturePublicKeyRandomizationGadget
Sub

Returns subtraction of self - other in the constraint system.

ThreeBitCondNegLookupGadget

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

ToBitsBEGadget
ToBitsLEGadget
ToBytesGadget
ToConstraintFieldGadget

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

TwoBitLookupGadget

Uses two bits to perform a lookup into a table

Xor

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