Constructs a new Scalar
instance.
Optional
obj: anyReturns if the scalar is equal to the provided scalar.
The scalar to compare with.
true
if the scalars are equal, false
otherwise.
Returns the underlying C++ object, transferring ownership from this instance to the caller.
The underlying object of the instance.
Serialize the scalar to a hexadecimal string.
Returns the size of the underlying C++ object.
The size of the underlying C++ object in bytes.
Converts the scalar to an integer. *
The scalar as a number.
Returns a string representation of the instance.
A string representation of the instance.
Returnsthe underlying C++ object.
The underlying C++ object.
Static
deserializeStatic
fromConstucts a new instance using the provided object.
The object to use for the new instance.
A new instance of the class.
Static
fromConstructs a new instance using the provided object and size.
The object to use for the new instance.
The size of the object.
A new instance of the class.
Static
random
Represents an element of the finite field $\mathbb{F}_r$, where $r$ is the order of the generator point of the BLS12-381 G1 group. A wrapper of MclScalar in navio-core.
Examples: