Skip to main content
Version: v2.x

Minimal Anti Collusion Infrastructure (MACI) v2.5.0 / G1Point

Class: G1Point

Notice

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

Constructors

new G1Point()

new G1Point(x, y): G1Point

Create a new instance of G1Point

Parameters

x: bigint

the x coordinate

y: bigint

the y coordinate

Returns

G1Point

Defined in

packages/crypto/ts/babyjub.ts:22

Properties

x

x: bigint

Defined in

packages/crypto/ts/babyjub.ts:13


y

y: bigint

Defined in

packages/crypto/ts/babyjub.ts:15

Methods

asContractParam()

asContractParam(): object

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

Defined in

packages/crypto/ts/babyjub.ts:42


equals()

equals(pt): boolean

Check whether two points are equal

Parameters

pt: G1Point

the point to compare with

Returns

boolean

whether they are equal or not

Defined in

packages/crypto/ts/babyjub.ts:34