Skip to content

Commit

Permalink
updates type hints for all
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Griffin <[email protected]>
  • Loading branch information
m00sey committed Dec 13, 2024
1 parent 26c384a commit 6063ab4
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions src/keri/vc/proving.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
keri.vc.proving module
"""
from typing import Optional

from typing import Optional, Union

from .. import core
from .. import help
Expand All @@ -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)
Expand Down

0 comments on commit 6063ab4

Please sign in to comment.