Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
    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)
Ejemplo n.º 3
0
 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)
Ejemplo n.º 4
0
 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)