generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into status-list-cred-test-vector
- Loading branch information
Showing
2 changed files
with
293 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,37 @@ | ||
# Presentation Exchange Test Vectors | ||
|
||
## CreatePresentationFromCredentials | ||
The reference implementation for Presentation Exchange can be found [here](https://github.com/TBD54566975/web5-js/blob/main/packages/credentials/src/presentation-exchange.ts#L80). | ||
|
||
Input and output for a full presentation exchange test vectors are available [here](./wa-license.json) The reference implementation can be found [here](https://github.com/TBD54566975/web5-js/blob/main/packages/credentials/src/presentation-exchange.ts#L80) | ||
## `create_presentation_from_credentials.json` | ||
Vectors for creating a Presentation Submission from a given Presentation Definition and set of VC JWTs. | ||
|
||
### Input | ||
| Property | Description | | ||
|---------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `input.presentationDefinition` | the input [presentationDefinition](https://identity.foundation/presentation-exchange/#presentation-definition) showing the requirements used for this getting an example WA license | | ||
| `input.credentialJwt` | the input [verifiable credential secured as a JWT](https://www.w3.org/TR/vc-data-model/#json-web-token) that corresponds to the presentationDefinition to fulfill it and do a full presentation exchange | | ||
| `output.presentationSubmission` | the expected [presentationSubmission](https://identity.foundation/presentation-exchange/#presentation-submission) when the `inputs` are processed by the `createPresentationFromCredentials` method. | | ||
|
||
the value of `input` is a an object with `presentationDefinition` and the corresponding `credentialJwt` | ||
## `select_credentials.json` | ||
Vectors for selecting a subset of VC JWTs from a given set that satisfy a given Presentation Definition | ||
|
||
| Property | Description | | ||
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| `presentationDefinition` | the input [presentationDefinition](https://identity.foundation/presentation-exchange/#presentation-definition) showing the requirements used for this getting an example WA license | | ||
| `credentialJwt` | the input [verifiable credential secured as a JWT](https://www.w3.org/TR/vc-data-model/#json-web-token) that corresponds to the presentationDefinition to fulfill it and do a full presentation exchange | ||
| Property | Description | | ||
|--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `input.presentationDefinition` | the [presentationDefinition](https://identity.foundation/presentation-exchange/#presentation-definition) describing the required credentials. | | ||
| `input.credentialJwts` | a set of [verifiable credentials secured as a JWT](https://www.w3.org/TR/vc-data-model/#json-web-token) | | ||
| `output.selectedCredentials` | the expected [VC JWTs](https://identity.foundation/presentation-exchange/#presentation-submission) that satisfy the input presentation definition. If the set of VC JWTs do not satisfy the presentation definition, `output.selectedCredentials` is an empty array. | | ||
|
||
### Output | ||
## `validate_definition.json` | ||
Vectors for validating whether a Presentation Definition is valid or not | ||
|
||
the value of `output` is an object that contains the following properties | ||
| Property | Description | | ||
|--------------------------------|--------------------------------------------------------------------------------------------------------------------------| | ||
| `input.presentationDefinition` | the [presentationDefinition](https://identity.foundation/presentation-exchange/#presentation-definition) to be validated | | ||
| `errors` | `true` is the presentation definition is NOT valid. `false` otherwise. | | ||
|
||
| Property | Description | | ||
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| `presentationSubmission` | the expected [presentationSubmission](https://identity.foundation/presentation-exchange/#presentation-submission) when the `inputs` are processed by `createPresentationFromCredentials`. | | ||
## `validate_submission.json | ||
Vectors for validating whether a Presentation Submission is valid or not | ||
|
||
| Property | Description | | ||
|--------------------------------|----------------------------------------------------------------------------------------------------------| | ||
| `input.presentationSubmission` | the [presentationSubmission](https://identity.foundation/presentation-exchange/#presentation-submission) to be validated. | | ||
| `errors` | `true` is the presentation submission is NOT valid. `false` otherwise. | |
Oops, something went wrong.