import * as BN from 'bn.js'; import Base from './base'; import { Curve } from './curve'; export default class Scalar extends Base { private readonly value; private _curve; constructor(value: BN, curve?: Curve); static generateRandom(curve?: Curve): Scalar; static one(): Scalar; curve(): Curve; valueOf(): BN; /** * @description get BigInteger from big endian ordered bytes */ static fromBytes(buffer: number[]): Scalar; /** * @description getting BIGNUM bytes from existing BigInteger * @return vector of bytes */ toBytes(): number[]; add(scalar: Scalar): Scalar; subtract(scalar: Scalar): Scalar; multiply(scalar: Scalar): Scalar; equal(scalar: Scalar): boolean; inverse(): Scalar; mod(scalar: Scalar): Scalar; }