Skip to main content
Module

x/bls12_381/math.ts>Fp2

Fastest JS implementation of BLS12-381. Auditable, secure, 0-dependency aggregated signatures & pairings
Latest
class Fp2
implements Field<Fp2>
import { Fp2 } from "https://deno.land/x/bls12_381@1.4.0/math.ts";

Constructors

new
Fp2(c0: Fp, c1: Fp)

Methods

add(rhs: Fp2): Fp2
div(rhs: Fp2 | bigint): Fp2
equals(rhs: Fp2): boolean
frobeniusMap(power: number): Fp2
isZero(): boolean
multiply(rhs: Fp2 | bigint): Fp2
one()
pow(n: bigint): Fp2
sqrt(): Fp2 | undefined
toBytes(): Uint8Array

Static Properties

readonly
BYTES_LEN
readonly
MAX_BITS
readonly
ONE: Fp2
readonly
ORDER
readonly
ZERO: Fp2

Static Methods

fromBigTuple(tuple: BigintTuple | bigint[]): Fp2
fromBytes(b: Uint8Array): Fp2