Skip to main content
Version: v3.x

Minimal Anti Collusion Infrastructure (MACI) / G1Point

Class: G1Point

Defined in: babyjub.ts:12

Notice​

A class representing a point on the first group (G1) of the Jubjub curve

Constructors​

Constructor​

new G1Point(x, y): G1Point

Defined in: babyjub.ts:22

Create a new instance of G1Point

Parameters​

x​

bigint

the x coordinate

y​

bigint

the y coordinate

Returns​

G1Point

Properties​

x​

x: bigint

Defined in: babyjub.ts:13


y​

y: bigint

Defined in: babyjub.ts:15

Methods​

asContractParam()​

asContractParam(): object

Defined in: babyjub.ts:42

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:34

Check whether two points are equal

Parameters​

pt​

G1Point

the point to compare with

Returns​

boolean

whether they are equal or not