Skip to main content
Version: v3.x

Minimal Anti Collusion Infrastructure (MACI) / G2Point

Class: G2Point

Defined in: babyjub.ts:55

Notice​

A class representing a point on the second group (G2) of the Jubjub curve. This is usually an extension field of the base field of the curve.

Constructors​

Constructor​

new G2Point(x, y): G2Point

Defined in: babyjub.ts:65

Create a new instance of G2Point

Parameters​

x​

bigint[]

the x coordinate

y​

bigint[]

the y coordinate

Returns​

G2Point

Properties​

x​

x: bigint[]

Defined in: babyjub.ts:56


y​

y: bigint[]

Defined in: babyjub.ts:58

Methods​

asContractParam()​

asContractParam(): object

Defined in: babyjub.ts:86

Return the point as a contract param in the form of an object

Returns​

object

the point as a contract param

x​

x: string[]

y​

y: string[]


equals()​

equals(pt): boolean

Defined in: babyjub.ts:78

Check whether two points are equal

Parameters​

pt​

G2Point

the point to compare with

Returns​

boolean

whether they are equal or not