generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
392de55
commit 0fbcb47
Showing
2 changed files
with
63 additions
and
42 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Presentation Exchange Test Vectors | ||
|
||
## CreatePresentationFromCredentials | ||
|
||
Input and output for a full presentation exchange test vectors are available [here](./wa-license.json) | ||
|
||
### Input | ||
|
||
the value of `input` is a an object with `presentationDefinition` and the corresponding `credentialJwt` | ||
Check failure on line 9 in web5-test-vectors/presentation-exchange/README.md GitHub Actions / lintTrailing spaces
Check failure on line 9 in web5-test-vectors/presentation-exchange/README.md GitHub Actions / lintTrailing spaces
|
||
|
||
| 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 [credentialJwt](https://www.w3.org/TR/did-core/#dfn-diddocumentmetadata) that corresponds to the presentationDefinition to fulfill it and do a full presentation exchange | ||
|
||
### Output | ||
|
||
the value of `output` is an object that contains the following properties | ||
|
||
| Property | Description | | ||
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| `presentationSubmission` | the expected [presentationSubmission](https://www.w3.org/TR/did-core/#dfn-diddocument) when the `inputs` are processed by `createPresentationFromCredentials`. | |
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,46 +1,45 @@ | ||
{ | ||
"description": "Simple Presentation Exchange", | ||
"vectors": [ | ||
{ | ||
"description": "presentation exchange for wa drivers license", | ||
"input": { | ||
"presentationDefinition": { | ||
"id": "32f54163-7166-48f1-93d8-ff217bdb0653", | ||
"input_descriptors": [ | ||
{ | ||
"id": "wa_driver_license", | ||
"name": "Washington State Business License", | ||
"purpose": "We can only allow licensed Washington State business representatives into the WA Business Conference", | ||
"constraints": { | ||
"fields": [ | ||
{ | ||
"path": [ | ||
"$.credentialSubject.dateOfBirth", | ||
"$.credentialSubject.licenseNumber", | ||
"$.credentialSubject.licenseState" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
"description":"Simple Presentation Exchange", | ||
"vectors":[ | ||
{ | ||
"description":"presentation exchange for wa drivers license", | ||
"input":{ | ||
"presentationDefinition":{ | ||
"id":"32f54163-7166-48f1-93d8-ff217bdb0653", | ||
"input_descriptors":[ | ||
{ | ||
"id":"wa_driver_license", | ||
"name":"Washington State Business License", | ||
"purpose":"We can only allow licensed Washington State business representatives into the WA Business Conference", | ||
"constraints":{ | ||
"fields":[ | ||
{ | ||
"path":[ | ||
"$.credentialSubject.dateOfBirth", | ||
"$.credentialSubject.licenseNumber", | ||
"$.credentialSubject.licenseState" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"credentialJwt":"eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6ImRpZDprZXk6ejZNa25qSkVXZ0xzaDNSeDM3ZXpUQjJKaE1RY1kxYzN4dnRYS3cxaEF6ZmVlSnpKI3o2TWtuakpFV2dMc2gzUngzN2V6VEIySmhNUWNZMWMzeHZ0WEt3MWhBemZlZUp6SiJ9.eyJpc3MiOiJkaWQ6a2V5Ono2TWtuakpFV2dMc2gzUngzN2V6VEIySmhNUWNZMWMzeHZ0WEt3MWhBemZlZUp6SiIsInN1YiI6ImRpZDprZXk6ejZNa25qSkVXZ0xzaDNSeDM3ZXpUQjJKaE1RY1kxYzN4dnRYS3cxaEF6ZmVlSnpKIiwidmMi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RleHQiOlsiaHR0cHM6Ly93d3cudzMub3JnLzIwMTgvY3JlZGVudGlhbHMvdjEiXSwidHlwZSI6WyJWZXJpZmlhYmxlQ3JlZGVudGlhbCIsIldhRHJpdmVMaWNlbnNlIl0sImlkIjoidXJuOnV1aWQ6OGYzYmU5NjktOTEyYS00MWNjLWFjYjUtZjMzOGQ2MmQ1OGNlIiwiaXNzdWVyIjoiZGlkOmtleTp6Nk1rbmpKRVdnTHNoM1J4MzdlelRCMkpoTVFjWTFjM3h2dFhLdzFoQXpmZWVKekoiLCJpc3N1YW5jZURhdGUiOiIyMDIzLTExLTI5VDIxOjQ5OjIxWiIsImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImlkIjoiZGlkOmtleTp6Nk1rbmpKRVdnTHNoM1J4MzdlelRCMkpoTVFjWTFjM3h2dFhLdzFoQXpmZWVKekoiLCJkYXRlT2ZCaXJ0aCI6IjExLTExLTIwMTEiLCJsaWNlbnNlTnVtYmVyIjoiMTIzNCIsImxpY2Vuc2VTdGF0ZSI6IldBIn19fQ.oGaIuZI9vRcauGI2Zi469mx8KZR1zpNV_HbmFtvWoap6CaPtn-uaG4oxswAfB4ITUs5fePKIgUvdGbBKyWx1CQ" | ||
}, | ||
"output": { | ||
"presentationSubmission": { | ||
"id": "VPaHaqzslzOqisx02jMS0", | ||
"definition_id": "32f54163-7166-48f1-93d8-ff217bdb0653", | ||
"descriptor_map": [ | ||
{ | ||
"id": "wa_driver_license", | ||
"format": "jwt_vc", | ||
"path": "$.verifiableCredential[0]" | ||
} | ||
] | ||
"output":{ | ||
"presentationSubmission":{ | ||
"id":"VPaHaqzslzOqisx02jMS0", | ||
"definition_id":"32f54163-7166-48f1-93d8-ff217bdb0653", | ||
"descriptor_map":[ | ||
{ | ||
"id":"wa_driver_license", | ||
"format":"jwt_vc", | ||
"path":"$.verifiableCredential[0]" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
|
||
} |