diff --git a/src/keri/vc/proving.py b/src/keri/vc/proving.py index 699b598a..5f92717f 100644 --- a/src/keri/vc/proving.py +++ b/src/keri/vc/proving.py @@ -3,7 +3,8 @@ keri.vc.proving module """ -from typing import Optional + +from typing import Optional, Union from .. import core from .. import help @@ -17,37 +18,37 @@ logger = help.ogler.getLogger() -def credential(schema, - issuer, - data, - recipient=None, +def credential(schema:str, + issuer:str, + data:dict, + recipient:Optional[str]=None, private:bool=False, private_credential_nonce:Optional[str]=None, private_subject_nonce:Optional[str]=None, - status=None, - source=None, - rules=None, - version=Version, - kind=Kinds.json): + status:str=None, + source:Union[dict, list]=None, + rules:Union[dict, list]=None, + version:Version=Version, + kind:Kinds=Kinds.json): """Utility function to create an ACDC. Creates dict SAD for credential from parameters and Saidifyies it before creation. Parameters: - schema (SAID): of schema for this credential + schema (str): SAID of schema for this credential issuer (str): qb64 identifier prefix of the issuer - status (str): qb64 said of the credential registry - recipient (Option[str|None]): qb64 identifier prefix of the recipient data (dict): of the values being assigned to the subject of this credential + recipient (Optional[str]): qb64 identifier prefix of the recipient private (bool): apply nonce used for privacy preserving ACDC private_credential_nonce (Optional[str]): nonce used for privacy vc private_subject_nonce (Optional[str]): nonce used for subject - source (dict | list): of source credentials to which this credential is chained - rules (dict | list): ACDC rules section for credential + status (str): qb64 said of the credential registry + source (Union[dict, list]): of source credentials to which this credential is chained + rules (Union[dict, list]): ACDC rules section for credential version (Version): version instance - kind (Serials): serialization kind + kind (Kinds): serialization kind Returns: - SerderACDC: credential instance + serdering.SerderACDC: credential instance """ vs = versify(protocol=coring.Protocols.acdc, version=version, kind=kind, size=0)