diff --git a/src/Point.ts b/src/Point.ts index 1c7f51f..6b03457 100644 --- a/src/Point.ts +++ b/src/Point.ts @@ -15,23 +15,6 @@ class Point { this.y = new BN(y, "hex"); this.ecCurve = ecCurve; } - - encode(enc: string): Buffer { - switch (enc) { - case "arr": - return Buffer.concat([ - Buffer.from("04", "hex"), - Buffer.from(this.x.toString("hex", 64), "hex"), - Buffer.from(this.y.toString("hex", 64), "hex"), - ]); - case "elliptic-compressed": { - const key = this.ecCurve.keyFromPublic({ x: this.x.toString("hex", 64), y: this.y.toString("hex", 64) }, "hex"); - return Buffer.from(key.getPublic(true, "hex")); - } - default: - throw new Error("encoding doesn't exist in Point"); - } - } } export default Point;