Skip to content

Commit

Permalink
remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshu committed Jul 11, 2024
1 parent abdd7a5 commit 74e5536
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/Point.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit 74e5536

Please sign in to comment.