|
|
@ -2,9 +2,14 @@ var bn = require('./bn'); |
|
|
|
var elliptic = require('elliptic'); |
|
|
|
|
|
|
|
var ec = elliptic.curves.secp256k1; |
|
|
|
var Point = ec.curve.point.bind(ec.curve) |
|
|
|
var ecpoint = ec.curve.point.bind(ec.curve) |
|
|
|
var p = ec.curve.point(); |
|
|
|
var Curve = Object.getPrototypeOf(ec.curve); |
|
|
|
|
|
|
|
var Point = function Point(x, y, isRed) { |
|
|
|
return ecpoint(x, y, isRed); |
|
|
|
}; |
|
|
|
|
|
|
|
Point.prototype = Object.getPrototypeOf(p); |
|
|
|
|
|
|
|
Point.fromX = ec.curve.pointFromX.bind(ec.curve); |
|
|
|