Skip to main content
@tevm/voltaire
@tevm/voltaire / crypto/Bls12381 / Fr

Fr

Functions

isValid()

isValid(scalar): boolean
Defined in: src/crypto/Bls12381/Fr/isValid.js:9 Check if a scalar is valid (in the range [0, r-1])

Parameters

scalar
bigint Scalar to check

Returns

boolean True if valid

mod()

mod(a): bigint
Defined in: src/crypto/Bls12381/Fr/mod.js:9 Reduce a bigint modulo the scalar field order r

Parameters

a
bigint Value to reduce

Returns

bigint Value reduced to [0, r-1]