package
0.12.0
Repository: https://github.com/consensys/gnark.git
Documentation: pkg.go.dev

# Functions

AssertIsTrit constrains digit to be 0, 1 or 2.
FromBase compute from a set of digits its canonical representation in little-endian order.
FromBinary is an alias of FromBase(api, Binary, digits).
FromTernary is an alias of FromBase(api, Ternary, digits).
No description provided by the author
OmitModulusCheck omits the comparison against native field modulus in case the bitlength of the decomposed value (if [WithNbDigits] not set or set to bitlength of the native modulus) eqals bitlength of the modulus.
ToBase decomposes scalar v into digits in given base using options opts.
ToBinary is an alias of ToBase(api, Binary, v, opts).
ToTernary is an alias of ToBase(api, Ternary, v, opts...).
WithNbDigits sets the resulting number of digits (nbDigits) to be used in the base conversion.
WithUnconstrainedInputs indicates to the FromBase apis to constrain its inputs (digits) to ensure they are valid digits in base b.
WithUnconstrainedOutputs sets the bit conversion API to NOT constrain the output bits.

# Constants

Binary base decomposes scalar into bits (0-1).
Ternary base decomposes scalar into trits (0-1-2).

# Type aliases

Base defines the base for decomposing the scalar into digits.
BaseConversionOption configures the behaviour of scalar decomposition.