示例#1
0
文件: wallet.py 项目: jnaulty/bit
 def public_point(self):
     """The public point (x, y)."""
     if self._public_point is None:
         point = self._pk.public_key().public_numbers()
         self._public_point = Point(point.x, point.y)
     return self._public_point
示例#2
0
 def public_point(self):
     """The public point (x, y)."""
     if self._public_point is None:
         self._public_point = Point(*public_key_to_coords(self._public_key))
     return self._public_point
示例#3
0
 def test_public_point(self):
     base_key = BaseKey(WALLET_FORMAT_MAIN)
     assert base_key.public_point == Point(PUBLIC_KEY_X, PUBLIC_KEY_Y)
     assert base_key.public_point == Point(PUBLIC_KEY_X, PUBLIC_KEY_Y)
示例#4
0
def test_point():
    x, y = 5, 10
    point = Point(x, y)
    assert (x, y) == point
    assert repr(point) == 'Point(x=5, y=10)'