Skip to content

Commit

Permalink
fix(py): missing ValidatorMessage stub in Python bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-roslaniec committed Jun 22, 2023
1 parent 6b33158 commit 2c3aa01
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
1 change: 1 addition & 0 deletions nucypher-core-python/nucypher_core/ferveo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

Validator = _ferveo.Validator
Transcript = _ferveo.Transcript
ValidatorMessage = _ferveo.ValidatorMessage
Dkg = _ferveo.Dkg
Ciphertext = _ferveo.Ciphertext
DecryptionShareSimple = _ferveo.DecryptionShareSimple
Expand Down
23 changes: 18 additions & 5 deletions nucypher-core-python/nucypher_core/ferveo.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Sequence, Tuple
from typing import Sequence


class Keypair:
Expand Down Expand Up @@ -65,6 +65,19 @@ class DkgPublicKey:
...


class ValidatorMessage:

def __init__(
self,
validator: Validator,
transcript: Transcript,
):
...

validator: Validator
transcript: Transcript


class Dkg:

def __init__(
Expand All @@ -82,7 +95,7 @@ class Dkg:
def generate_transcript(self) -> Transcript:
...

def aggregate_transcripts(self, messages: Sequence[Tuple[Validator, Transcript]]) -> AggregatedTranscript:
def aggregate_transcripts(self, messages: Sequence[ValidatorMessage]) -> AggregatedTranscript:
...


Expand Down Expand Up @@ -115,10 +128,10 @@ class DecryptionSharePrecomputed:

class AggregatedTranscript:

def __init__(self, messages: Sequence[Tuple[Validator, Transcript]]):
def __init__(self, messages: Sequence[ValidatorMessage]):
...

def verify(self, shares_num: int, messages: Sequence[Tuple[Validator, Transcript]]) -> bool:
def verify(self, shares_num: int, messages: Sequence[ValidatorMessage]) -> bool:
...

def create_decryption_share_simple(
Expand Down Expand Up @@ -246,4 +259,4 @@ class ValidatorPublicKeyMismatch(Exception):


class SerializationError(Exception):
pass
pass

0 comments on commit 2c3aa01

Please sign in to comment.