]> git.codecow.com Git - libnemo.git/commitdiff
Remove unused point constructors.
authorChris Duncan <chris@zoso.dev>
Thu, 4 Dec 2025 17:30:37 +0000 (09:30 -0800)
committerChris Duncan <chris@zoso.dev>
Thu, 4 Dec 2025 17:30:37 +0000 (09:30 -0800)
src/lib/crypto/secp256k1.ts

index 1131945ab1f3da5c7d83e9a86ee9d3324ca1153d..a3b54cdc6ac6c4c089e8079663a2c4b2bcb83e85 100644 (file)
@@ -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 */