Private
Static
pexThe Presentation Exchange (PEX) instance.
Static
createCreates a presentation from a list of Verifiable Credentials that satisfy a given presentation definition. This function initializes the Presentation Exchange (PEX) process, validates the presentation definition, evaluates the credentials against the definition, and finally constructs the presentation result if the evaluation is successful.
The parameters for the presentation creation.
The Presentation Definition V2 to match the VCs against.
The list of Verifiable Credentials (VCs) in JWT format to be evaluated.
The result of the presentation creation process, containing a presentation submission that satisfies the presentation definition criteria.
If the evaluation results in warnings or errors, or if the required credentials are not present, an error is thrown with a descriptive message.
Static
evaluateEvaluates a presentation against a presentation definition.
The result of the evaluation process.
Private
Static
resetStatic
satisfiesValidates if a list of VC JWTs satisfies the given presentation definition.
The parameters for the satisfaction check.
The criteria to validate against.
An array of VC JWTs as strings.
Error if the evaluation results in warnings or errors.
Static
selectSelects credentials that satisfy a given presentation definition.
The parameters for the credential selection.
The Presentation Definition to match against.
The list of Verifiable Credentials to select from.
selectedVcJwts A list of Verifiable Credentials that satisfy the Presentation Definition.
Static
validateThis method validates whether an object is usable as a presentation definition or not.
presentationDefinition to be validated.
the validation results to reveal what is acceptable/unacceptable about the passed object to be considered a valid presentation definition
Static
validateThis method validates whether an object is usable as a presentation submission or not.
the object to be validated.
the validation results to reveal what is acceptable/unacceptable about the passed object to be considered a valid presentation submission
The Presentation Exchange (PEX) Library implements the functionality described in the DIF Presentation Exchange specification