mirror of https://github.com/nucypher/pyUmbral.git
Some improved type hints
parent
d037149682
commit
f6bb4e102a
|
@ -302,7 +302,7 @@ class UmbralPublicKey:
|
|||
|
||||
@classmethod
|
||||
def expected_bytes_length(cls, curve: Optional[Curve] = None,
|
||||
is_compressed: bool = True):
|
||||
is_compressed: bool = True) -> int:
|
||||
"""
|
||||
Returns the size (in bytes) of an UmbralPublicKey given a curve.
|
||||
If no curve is provided, it uses the default curve.
|
||||
|
@ -310,7 +310,7 @@ class UmbralPublicKey:
|
|||
"""
|
||||
return Point.expected_bytes_length(curve=curve, is_compressed=is_compressed)
|
||||
|
||||
def to_bytes(self, encoder: Callable = None, is_compressed: bool = True):
|
||||
def to_bytes(self, encoder: Callable = None, is_compressed: bool = True) -> bytes:
|
||||
"""
|
||||
Returns an Umbral public key as bytes.
|
||||
Optionally, if an encoder function is provided it will be used to encode
|
||||
|
|
|
@ -127,8 +127,8 @@ class KFrag():
|
|||
|
||||
def verify(self,
|
||||
signing_pubkey: UmbralPublicKey,
|
||||
delegating_pubkey: UmbralPublicKey = None,
|
||||
receiving_pubkey: UmbralPublicKey = None,
|
||||
delegating_pubkey: Optional[UmbralPublicKey] = None,
|
||||
receiving_pubkey: Optional[UmbralPublicKey] = None,
|
||||
params: Optional[UmbralParameters] = None,
|
||||
) -> bool:
|
||||
if params is None:
|
||||
|
|
Loading…
Reference in New Issue