@nikkolasg/noble-bls12-381
Version:
Noble BLS12-381 pairing-friendly curve. High-security, easily auditable, 0-dep aggregated signatures & pubkey.
31 lines (30 loc) • 950 B
TypeScript
import { Fp } from "./fp";
import { Group } from "./group";
export declare type BigintTuple = [bigint, bigint];
export declare class Fp2 implements Group<BigintTuple> {
private static _order;
private static DIV_ORDER;
private static EIGHTH_ROOTS_OF_UNITY;
static COFACTOR: bigint;
static set ORDER(order: bigint);
static get ORDER(): bigint;
private coeficient1;
private coeficient2;
get value(): BigintTuple;
get zero(): Fp2;
get one(): Fp2;
constructor(coef1?: Fp | bigint, coef2?: Fp | bigint);
normalize(v: Fp2 | BigintTuple | bigint): bigint | Fp2;
isEmpty(): boolean;
equals(rhs: Fp2): boolean;
negative(): Fp2;
add(rhs: Fp2): Fp2;
subtract(rhs: Fp2): Fp2;
multiply(otherValue: Fp2 | bigint): Fp2;
mulByNonresidue(): Fp2;
square(): Fp2;
modularSquereRoot(): Fp2 | null;
pow(n: bigint): Fp2;
invert(): Fp2;
div(otherValue: Fp2 | bigint): Fp2;
}