-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding test vector #72
Conversation
This is awesome @nitro-neal A couple of pieces of feedback.
Let me know if that all makes sense! |
Sounds good and makes sense to me! Added README and I will add the errors when I complete what my error object will look like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome stuff! I'll take another look once you include the errors.
|
||
| Property | Description | | ||
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| `presentationSubmission` | the expected [presentationSubmission](https://identity.foundation/presentation-exchange/#presentation-submission) when the `inputs` are processed by `createPresentationFromCredentials`. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible, could you link to a "reference implementation"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
Co-authored-by: Andres Uribe <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! Seems like a good first test to me. I'm sure we'll add more vectors in the future, but this seems like a great start!
{ | ||
"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":"eyJhb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"id":"VPaHaqzslzOqisx02jMS0", | ||
"definition_id":"32f54163-7166-48f1-93d8-ff217bdb0653", | ||
"descriptor_map":[ | ||
{ | ||
"id":"wa_driver_license", | ||
"format":"jwt_vc", | ||
"path":"$.verifiableCredential[0]" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Indentation here it a little inconsistent. My editor suggested 3-space indentation, but it looks like there's also 4-space indentation as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm I used this, and it lines up with no errors for me:
https://jsonformatter.curiousconcept.com/#
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The validation is great! Just seems like we have some inconsistent indentation.
For example, the opening and closing braces for this JSON are in different columns. Maybe that's intentional? Either way, not blocking!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chatted with @nitro-neal and he's adding errors at a later point.
Here is an example of what the test may look similar to that implements thsi test vector:
our PresentationExchange function takes in :
presentationDefinition
andcredentialJwt
from the test vector, and it should generate theoutput
from the test vector