From: Chris Duncan Date: Thu, 4 Dec 2025 17:30:37 +0000 (-0800) Subject: Remove unused point constructors. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=11927ac4d0892a00bc28469fdd1431c2cd422b9d;p=libnemo.git Remove unused point constructors. --- diff --git a/src/lib/crypto/secp256k1.ts b/src/lib/crypto/secp256k1.ts index 1131945..a3b54cd 100644 --- a/src/lib/crypto/secp256k1.ts +++ b/src/lib/crypto/secp256k1.ts @@ -280,12 +280,6 @@ export class Secp256k1 { }) } - /** 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) @@ -311,10 +305,6 @@ export class Secp256k1 { 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 */