Zeth - Zerocash on Ethereum  0.8
Reference implementation of the Zeth protocol by Clearmatics
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
zeth.core.pairing.G1Point Class Reference

Public Member Functions

def __init__ (self, str x_coord, str y_coord)
 
str __str__ (self)
 
str __repr__ (self)
 
bool __eq__ (self, object other)
 
List[str] to_json_list (self)
 

Static Public Member Functions

G1Point from_json_list (List[str] json_list)
 

Public Attributes

 x_coord
 
 y_coord
 

Detailed Description

G1 Group Points. A typed tuple of strings, stored as a JSON array.

Definition at line 18 of file pairing.py.

Constructor & Destructor Documentation

◆ __init__()

def zeth.core.pairing.G1Point.__init__ (   self,
str  x_coord,
str  y_coord 
)

Definition at line 22 of file pairing.py.

22  def __init__(self, x_coord: str, y_coord: str):
23  self.x_coord = x_coord
24  self.y_coord = y_coord
25 

Member Function Documentation

◆ __eq__()

bool zeth.core.pairing.G1Point.__eq__ (   self,
object  other 
)

Definition at line 32 of file pairing.py.

32  def __eq__(self, other: object) -> bool:
33  if not isinstance(other, G1Point):
34  return False
35  return (self.x_coord == other.x_coord) and (self.y_coord == other.y_coord)
36 
Here is the caller graph for this function:

◆ __repr__()

str zeth.core.pairing.G1Point.__repr__ (   self)

Definition at line 29 of file pairing.py.

29  def __repr__(self) -> str:
30  return self.__str__()
31 
Here is the call graph for this function:

◆ __str__()

str zeth.core.pairing.G1Point.__str__ (   self)

Definition at line 26 of file pairing.py.

26  def __str__(self) -> str:
27  return str(self.to_json_list())
28 
Here is the call graph for this function:
Here is the caller graph for this function:

◆ from_json_list()

G1Point zeth.core.pairing.G1Point.from_json_list ( List[str]  json_list)
static

Definition at line 41 of file pairing.py.

41  def from_json_list(json_list: List[str]) -> G1Point:
42  return G1Point(json_list[0], json_list[1])
43 
44 

◆ to_json_list()

List[str] zeth.core.pairing.G1Point.to_json_list (   self)

Definition at line 37 of file pairing.py.

37  def to_json_list(self) -> List[str]:
38  return [self.x_coord, self.y_coord]
39 
Here is the caller graph for this function:

Member Data Documentation

◆ x_coord

zeth.core.pairing.G1Point.x_coord

Definition at line 23 of file pairing.py.

◆ y_coord

zeth.core.pairing.G1Point.y_coord

Definition at line 24 of file pairing.py.


The documentation for this class was generated from the following file:
test_commands.mock.str
str
Definition: mock.py:18