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.G2Point Class Reference

Public Member Functions

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

Static Public Member Functions

G2Point from_json_list (List[Union[str, List[str]]] json_list)
 

Public Attributes

 x_coord
 
 y_coord
 

Detailed Description

G2 Group Points. Depending on the curve, coordinates may be in the base
(non-extension) field (i.e. simple json strings), or an extension field
(i.e. a list of strings).

Definition at line 67 of file pairing.py.

Constructor & Destructor Documentation

◆ __init__()

def zeth.core.pairing.G2Point.__init__ (   self,
Union[str, List[str]]  x_coord,
Union[str, List[str]]  y_coord 
)

Definition at line 73 of file pairing.py.

73  def __init__(
74  self,
75  x_coord: Union[str, List[str]],
76  y_coord: Union[str, List[str]]):
77  self.x_coord = x_coord
78  self.y_coord = y_coord
79 

Member Function Documentation

◆ __eq__()

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

Definition at line 86 of file pairing.py.

86  def __eq__(self, other: object) -> bool:
87  if not isinstance(other, G2Point):
88  return False
89  return (self.x_coord == other.x_coord) and (self.y_coord == other.y_coord)
90 
Here is the caller graph for this function:

◆ __repr__()

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

Definition at line 83 of file pairing.py.

83  def __repr__(self) -> str:
84  return self.__str__()
85 
Here is the call graph for this function:

◆ __str__()

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

Definition at line 80 of file pairing.py.

80  def __str__(self) -> str:
81  return str(self.to_json_list())
82 
Here is the call graph for this function:
Here is the caller graph for this function:

◆ from_json_list()

G2Point zeth.core.pairing.G2Point.from_json_list ( List[Union[str, List[str]]]  json_list)
static

Definition at line 95 of file pairing.py.

95  def from_json_list(json_list: List[Union[str, List[str]]]) -> G2Point:
96  return G2Point(json_list[0], json_list[1])
97 
98 

◆ to_json_list()

List[Union[str, List[str]]] zeth.core.pairing.G2Point.to_json_list (   self)

Definition at line 91 of file pairing.py.

91  def to_json_list(self) -> List[Union[str, List[str]]]:
92  return [self.x_coord, self.y_coord]
93 
Here is the caller graph for this function:

Member Data Documentation

◆ x_coord

zeth.core.pairing.G2Point.x_coord

Definition at line 74 of file pairing.py.

◆ y_coord

zeth.core.pairing.G2Point.y_coord

Definition at line 75 of file pairing.py.


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