@@ -5,55 +5,40 @@ import builtins
55import typing
66
77__version__ : builtins .str
8-
98class CredentialError (builtins .Exception ):
109 r"""
1110 An authentication error
1211 """
13-
1412 ...
1513
1614class DeserializationFailed (builtins .Exception ):
1715 r"""
1816 An error trying to deserialize a base64-encoded payload
1917 """
20-
2118 ...
2219
2320class ProtocolError (builtins .Exception ):
2421 r"""
2522 An error performing the protocol
2623 """
27-
2824 ...
2925
3026class ServerState :
3127 def __new__ (cls ) -> ServerState : ...
3228 @staticmethod
33- def from_creds (public_parameters : str , secret_key : str ) -> ServerState :
29+ def from_creds (public_parameters :str , secret_key :str ) -> ServerState :
3430 r"""
3531 Create a new server state from base64-encoded keys
3632 This is meant to be used by the server, so it can store the keys somewhere and recreate the
3733 state when needed
3834 """
39-
4035 def get_secret_key (self ) -> str : ...
4136 def get_public_parameters (self ) -> str : ...
42- def handle_registration_request (self , registration_request : str ) -> str : ...
37+ def handle_registration_request (self , registration_request :str ) -> str : ...
4338 @staticmethod
4439 def today () -> builtins .int : ...
45- def handle_submit_request (
46- self ,
47- nym : str ,
48- request : str ,
49- probe_cc : str ,
50- probe_asn : str ,
51- age_range : tuple [builtins .int , builtins .int ],
52- min_measurement_count : builtins .int ,
53- ) -> str : ...
54- def handle_update_request (
55- self , req : str , old_public_params : str , old_secret_key : str
56- ) -> str : ...
40+ def handle_submit_request (self , nym :str , request :str , probe_cc :str , probe_asn :str , age_range :tuple [builtins .int , builtins .int ], min_measurement_count :builtins .int ) -> str : ...
41+ def handle_update_request (self , req :str , old_public_params :str , old_secret_key :str ) -> str : ...
5742
5843class SubmitRequest :
5944 @property
@@ -62,46 +47,38 @@ class SubmitRequest:
6247 def request (self ) -> str : ...
6348
6449class UserState :
65- def __new__ (cls , public_params : str ) -> UserState : ...
50+ def __new__ (cls , public_params :str ) -> UserState : ...
6651 def get_credential (self ) -> typing .Optional [str ]: ...
67- def set_public_params (self , new_public_params : str ) -> None : ...
52+ def set_public_params (self , new_public_params :str ) -> None : ...
6853 def make_registration_request (self ) -> str : ...
69- def handle_registration_response (self , resp : str ) -> None :
54+ def handle_registration_response (self , resp :str ) -> None :
7055 r"""
7156 Handle a registration response sent by the server, updating your credentials
72-
57+
7358 Note that this function will only work if you previously called
7459 `make_registration_request`
7560 """
76-
77- def make_submit_request (
78- self ,
79- probe_cc : str ,
80- probe_asn : str ,
81- age_range : tuple [builtins .int , builtins .int ],
82- min_measurement_count : builtins .int ,
83- ) -> SubmitRequest : ...
84- def handle_submit_response (self , response : str ) -> None :
61+ def make_submit_request (self , probe_cc :str , probe_asn :str , age_range :tuple [builtins .int , builtins .int ], min_measurement_count :builtins .int ) -> SubmitRequest : ...
62+ def handle_submit_response (self , response :str ) -> None :
8563 r"""
8664 Handle a submit response sent by the server, updating your credentials
87-
65+
8866 Note that this function will only work if you previously called
8967 `make_submit_request`
9068 """
91-
9269 def make_credential_update_request (self ) -> str :
9370 r"""
9471 Creates a credential update request to be sent to the server.
9572 """
96-
97- def handle_credential_update_response (self , resp : str ) -> None :
73+ def handle_credential_update_response (self , resp :str ) -> None :
9874 r"""
9975 Handles the credential update response sent by the server, updating your credentials.
100-
76+
10177 This function only works if you previosly called `make_credential_update_request`
10278 """
10379
10480def get_protocol_version () -> builtins .str :
10581 r"""
10682 Returns the version of the `ooniauth-core`, the actual protocol implementation.
10783 """
84+
0 commit comments