})
}
- /** Create 3d xyz point from 2d xy. (0, 0) => (0, 1, 0), not (0, 0, 1) */
- static pointFromAffine (ap: AffinePoint): Point {
- const { x, y } = ap
- return x === 0n && y === 0n ? this.I : this.Point(x, y, 1n)
- }
-
/** Convert Uint8Array or hex string to Point. */
static pointFromBytes (bytes: Bytes): Point {
this.abytes(bytes)
return p ? p.assertValidity() : this.err('bad point: not on curve')
}
- static pointFromHex (hex: string): Point {
- return this.pointFromBytes(this.hexToBytes(hex))
- }
-
/** Generator / base point */
static G: Point = this.Point(this.Gx, this.Gy, 1n)
/** Identity / zero point */