def create_point(self, x, y): """Create an ECDSA point on the SECP256k1 curve with the given coords. :param x: The x coordinate on the curve :type x: long :param y: The y coodinate on the curve :type y: long """ if not isinstance(x, six.integer_types) or not isinstance(y, six.integer_types): raise ValueError("The coordinates must be longs.") return _ECDSA_Point(SECP256k1.curve, x, y)
def create_point(self, x, y): """Create an ECDSA point on the SECP256k1 curve with the given coords. :param x: The x coordinate on the curve :type x: long :param y: The y coodinate on the curve :type y: long """ if (not isinstance(x, six.integer_types) or not isinstance(y, six.integer_types)): raise ValueError("The coordinates must be longs.") return _ECDSA_Point(SECP256k1.curve, x, y)
def from_public_pair(cls, pair, network=BitcoinMainNet, **kwargs): point = _ECDSA_Point(SECP256k1.curve, pair.x, pair.y) return cls.from_point(point, network=network, **kwargs)