|
| 1 | +# This file is automatically generated by pyo3_stub_gen |
| 2 | +# ruff: noqa: E501, F401 |
| 3 | + |
| 4 | +import builtins |
| 5 | +import typing |
| 6 | + |
| 7 | +class CredentialError(builtins.Exception): |
| 8 | + r""" |
| 9 | + An authentication error |
| 10 | + """ |
| 11 | + ... |
| 12 | + |
| 13 | +class DeserializationFailed(builtins.Exception): |
| 14 | + r""" |
| 15 | + An error trying to deserialize a binary buffer |
| 16 | + """ |
| 17 | + ... |
| 18 | + |
| 19 | +class ProtocolError(builtins.Exception): |
| 20 | + r""" |
| 21 | + An error performing the protocol |
| 22 | + """ |
| 23 | + ... |
| 24 | + |
| 25 | +class ServerState: |
| 26 | + def __new__(cls) -> ServerState: ... |
| 27 | + @staticmethod |
| 28 | + def from_creds(public_parameters:bytes, secret_key:bytes) -> ServerState: |
| 29 | + r""" |
| 30 | + Create a new server state from binary-serialized public and private keys |
| 31 | + This is meant to be used by the server, so it can store the keys somewhere and recreate the |
| 32 | + state when needed |
| 33 | + """ |
| 34 | + def get_secret_key(self) -> bytes: ... |
| 35 | + def get_public_parameters(self) -> bytes: ... |
| 36 | + def handle_registration_request(self, registration_request:bytes) -> bytes: ... |
| 37 | + @staticmethod |
| 38 | + def today() -> builtins.int: ... |
| 39 | + def handle_submit_request(self, nym:bytes, request:bytes, probe_cc:str, probe_asn:str, age_range:list, measurement_count_range:list) -> bytes: ... |
| 40 | + |
| 41 | +class SubmitRequest: |
| 42 | + @property |
| 43 | + def nym(self) -> bytes: ... |
| 44 | + @property |
| 45 | + def request(self) -> bytes: ... |
| 46 | + |
| 47 | +class UserState: |
| 48 | + def __new__(cls, public_params:bytes) -> UserState: ... |
| 49 | + def get_credential(self) -> typing.Optional[bytes]: ... |
| 50 | + def make_registration_request(self) -> bytes: ... |
| 51 | + def handle_registration_response(self, resp:bytes) -> None: |
| 52 | + r""" |
| 53 | + Handle a registration response sent by the server, updating your credentials |
| 54 | + |
| 55 | + Note that this function will only work if you previously called |
| 56 | + `make_registration_request` |
| 57 | + """ |
| 58 | + def make_submit_request(self, probe_cc:str, probe_asn:str, emission_date:builtins.int) -> SubmitRequest: ... |
| 59 | + def handle_submit_response(self, response:bytes) -> None: |
| 60 | + r""" |
| 61 | + Handle a submit response sent by the server, updating your credentials |
| 62 | + |
| 63 | + Note that this function will only work if you previously called |
| 64 | + `make_submit_request` |
| 65 | + """ |
| 66 | + |
0 commit comments