KERI Verificable Credential API¶
keri.vc.protocoling¶
keri.vc.handling module
- class keri.vc.protocoling.IpexHandler(resource, hby, notifier)[source]¶
Processor of exn IPEX messages.
- handle(serder, attachments=None)[source]¶
Do route specific processsing of IPEX protocol exn messages
- Parameters:
serder (Serder) – Serder of the IPEX protocol exn message
attachments (list) – list of tuples of pather, CESR SAD path attachments to the exn event
- response(serder)[source]¶
Return the IPEX exn message sent as a response to the provided serder, if any
- Parameters:
serder (Serder) – IPEX exn message to check for a response
Returns:
- verify(serder, attachments=None)[source]¶
Do route specific processsing of IPEX protocol exn messages
- Parameters:
serder (Serder) – Serder of the IPEX protocol exn message
attachments (list) – list of tuples of pather, CESR SAD path attachments to the exn event
- Returns:
True means the exn passed behaviour specific verification for IPEX protocol messages
- Return type:
bool
- class keri.vc.protocoling.Ipexage(apply, offer, agree, grant, admit, spurn)¶
- admit¶
Alias for field number 4
- agree¶
Alias for field number 2
- apply¶
Alias for field number 0
- grant¶
Alias for field number 3
- offer¶
Alias for field number 1
- spurn¶
Alias for field number 5
- keri.vc.protocoling.ipexAdmitExn(hab, message, grant, dt=None)[source]¶
Admit a disclosure
- Parameters:
hab (Hab) – identifier environment for issuer of credential
message (str) – Human readable message regarding the admission
grant (Serder) – IPEX grant exn message serder
dt (str) – timestamp
- Returns:
credential issuance exn peer to peer message bytes: attachments for exn message
- Return type:
Serder
- keri.vc.protocoling.ipexAgreeExn(hab, message, offer)[source]¶
Agree an offer
- Parameters:
hab (Hab) – identifier environment for issuer of credential
message (str) – Human readable message regarding the credential agreement
offer (Serder) – IPEX exn offer message that this offer is response to.
- Returns:
credential issuance exn peer to peer message bytes: attachments for exn message
- Return type:
Serder
- keri.vc.protocoling.ipexApplyExn(hab, recp, message, schema, attrs)[source]¶
Apply for an ACDC
- Parameters:
hab (Hab) – identifier environment for issuer of credential
recp (str) – qb64 AID of recipient
message (str) – Human readable message regarding the credential application
schema (any) – schema or its SAID
attrs (any) – attribute field label list
- Returns:
credential issuance exn peer to peer message bytes: attachments for exn message
- Return type:
Serder
- keri.vc.protocoling.ipexGrantExn(hab, recp, message, acdc, iss=None, anc=None, agree=None, dt=None)[source]¶
Disclose an ACDC
- Parameters:
hab (Hab) – identifier environment for issuer of credential
recp (str)
message (str) – Human readable message regarding the credential disclosure
acdc (bytes) – CESR stream of serialized ACDC with attachments
iss (bytes) – serialized TEL issuance event
anc (bytes) – serialized anchoring event in the KEL, either ixn or rot
agree (Serder) – optional IPEX exn agree message that this grant is response to.
dt (str) – Iso8601 formatted date string to use for this request
- Returns:
credential issuance exn peer to peer message bytes: attachments for exn message
- Return type:
Serder
- keri.vc.protocoling.ipexOfferExn(hab, message, acdc, apply=None)[source]¶
Offer a metadata ACDC
- Parameters:
hab (Hab) – identifier environment for issuer of credential
message (str) – Human readable message regarding the credential offer
acdc (any) – metadata ACDC or its SAID
apply (Serder) – optional IPEX exn apply message that this offer is response to.
- Returns:
credential issuance exn peer to peer message bytes: attachments for exn message
- Return type:
Serder
- keri.vc.protocoling.ipexSpurnExn(hab, message, spurned)[source]¶
Reject an application, offer or agreement
- Parameters:
hab (Hab) – identifier environment for issuer of credential
message (str) – Human readable message regarding the admission
spurned (Serder) – apply, offer, agree or grant received
- Returns:
credential issuance exn peer to peer message bytes: attachments for exn message
- Return type:
Serder
keri.vc.proving¶
keri.vc.proving module
- keri.vc.proving.credential(schema, issuer, data, recipient=None, private=False, salt=None, status=None, source=None, rules=None, version=(1, 0), kind='JSON')[source]¶
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
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
private (bool) – apply nonce used for privacy preserving ACDC
salt (string) – salt for nonce
source (dict | list) – of source credentials to which this credential is chained
rules (dict | list) – ACDC rules section for credential
version (Version) – version instance
kind (Serials) – serialization kind
- Returns:
credential instance
- Return type:
SerderACDC
keri.vc.walleting¶
keri.vc.walleting module
- class keri.vc.walleting.Wallet(reger: Reger | None = None, name='test', temp=False)[source]¶
Wallet represents all credentials received or verified
- class keri.vc.walleting.WalletDoer(hby, verifier, **kwa)[source]¶
DoDoer for process escrows and cues associated with a wallet
- __init__(hby, verifier, **kwa)[source]¶
Waller doer processes the verifier cues and escrows for an Enterprise Wallet
- Parameters:
hab (Habitat) – is the local environment associate with this wallet
verifier (Verifier) – is the verifier that processes and stores credentials
- escrowDo(tymth, tock=0.0)[source]¶
Processes the escrows for group icp, rot and ixn request messages.
- Parameters:
tymth (function) – injected function wrapper closure returned by .tymen() of Tymist instance. Calling tymth() returns associated Tymist .tyme.
tock (float) – injected initial tock value
- Usage:
add result of doify on this method to doers list
- Returns:
doifiable Doist compatible generator method
- Return type:
Doist