Skip to main content
Version: v1.3_alpha

G2Point

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.

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new G2Point(x, y): G2Point

Create a new instance of G2Point

Parameters

NameTypeDescription
xbigint[]the x coordinate
ybigint[]the y coordinate

Returns

G2Point

Defined in

crypto/ts/babyjub.ts:65

Properties

x

x: bigint[]

Defined in

crypto/ts/babyjub.ts:56


y

y: bigint[]

Defined in

crypto/ts/babyjub.ts:58

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

NameType
xstring[]
ystring[]

Defined in

crypto/ts/babyjub.ts:86


checkPointsRange

checkPointsRange(x, type): void

Check whether the points are in range

Parameters

NameTypeDescription
xbigint[]the x coordinate
type"x" | "y"the type of the coordinate

Returns

void

Defined in

crypto/ts/babyjub.ts:98


equals

equals(pt): boolean

Check whether two points are equal

Parameters

NameTypeDescription
ptG2Pointthe point to compare with

Returns

boolean

whether they are equal or not

Defined in

crypto/ts/babyjub.ts:78