ipoint
Module with interfaces for point classes.
- class IPoint
Bases:
ABC
Interface for a generic elliptic curve point.
- abstract classmethod FromBytes(point_bytes: bytes) IPoint
Construct class from point bytes.
- Parameters:
point_bytes (bytes) – Point bytes
- Returns:
IPoint object
- Return type:
- abstract classmethod FromCoordinates(x: int, y: int) IPoint
Construct class from point coordinates.
- Parameters:
x (int) – X coordinate of the point
y (int) – Y coordinate of the point
- Returns:
IPoint object
- Return type:
- abstract static CurveType() EllipticCurveTypes
Get the elliptic curve type.
- Returns:
Elliptic curve type
- Return type:
- abstract static CoordinateLength() int
Get the coordinate length.
- Returns:
Coordinate key length
- Return type:
int
- abstract UnderlyingObject() Any
Get the underlying object.
- Returns:
Underlying object
- Return type:
Any
- abstract X() int
Return X coordinate of the point.
- Returns:
X coordinate of the point
- Return type:
int
- abstract Y() int
Return Y coordinate of the point.
- Returns:
Y coordinate of the point
- Return type:
int
- abstract Raw() DataBytes
Return the point raw bytes.
- Returns:
DataBytes object
- Return type:
DataBytes object
- abstract RawEncoded() DataBytes
Return the encoded point raw bytes.
- Returns:
DataBytes object
- Return type:
DataBytes object
- abstract RawDecoded() DataBytes
Return the decoded point raw bytes.
- Returns:
DataBytes object
- Return type:
DataBytes object
- abstract __add__(point: IPoint) IPoint
Add point to another point.
- Parameters:
point (IPoint object) – IPoint object
- Returns:
IPoint object
- Return type:
IPoint object
- abstract __radd__(point: IPoint) IPoint
Add point to another point.
- Parameters:
point (IPoint object) – IPoint object
- Returns:
IPoint object
- Return type:
IPoint object