Skip to content

Commit

Permalink
add pres submission test vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
nitro-neal committed Jan 25, 2024
1 parent 2be5dd3 commit 230d4bd
Showing 1 changed file with 199 additions and 0 deletions.
199 changes: 199 additions & 0 deletions test-vectors/presentation_exchange/validate_submission.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
{
"description":"Validate submission",
"vectors":[
{
"description":"valid simple presentation submission",
"input":{
"presentationSubmission":{
"id":"test-submission-id",
"definition_id":"test-definition-id",
"descriptor_map":[
{
"id":"descriptor-map-id",
"format":"jwt_vc",
"path": "$.verifiableCredential[0]"
}
]
}
},
"errors":false
},
{
"description":"valid presentation submission with path nested",
"input":{
"presentationSubmission":{
"id":"test-submission-id",
"definition_id":"test-definition-id",
"descriptor_map":[
{
"id":"descriptor-map-id",
"format":"jwt_vc",
"path": "$.verifiableCredential[0]",
"path_nested" : {
"id":"descriptor-map-id",
"format":"jwt_vc",
"path": "$.verifiableCredential[0]",
"path_nested" : {
"id":"descriptor-map-id",
"format":"jwt_vc",
"path": "$.verifiableCredential[0]"
}
}
}
]
}
},
"errors":false
},
{
"description":"empty pres submission id",
"input":{
"presentationSubmission":{
"id":"",
"definition_id":"test-definition-id",
"descriptor_map":[
{
"id":"descriptor-map-id",
"format":"jwt_vc",
"path": "$.verifiableCredential[0]"
}
]
}
},
"errors":true
},
{
"description":"definition id is empty",
"input":{
"presentationSubmission":{
"id":"test-submission-id",
"definition_id":"",
"descriptor_map":[
{
"id":"descriptor-map-id",
"format":"jwt_vc",
"path": "$.verifiableCredential[0]"
}
]
}
},
"errors":true
},
{
"description":"empty descriptor map",
"input":{
"presentationSubmission":{
"id":"test-submission-id",
"definition_id":"test-definition-id",
"descriptor_map":[]
}
},
"errors":true
},
{
"description":"descriptor map has empty id",
"input":{
"presentationSubmission":{
"id":"test-submission-id",
"definition_id":"test-definition-id",
"descriptor_map":[
{
"id":"",
"format":"jwt_vc",
"path": "$.verifiableCredential[0]"
}
]
}
},
"errors":true
},
{
"description":"descriptor map has empty format",
"input":{
"presentationSubmission":{
"id":"test-submission-id",
"definition_id":"test-definition-id",
"descriptor_map":[
{
"id":"descriptor-map-id",
"format":"",
"path": "$.verifiableCredential[0]"
}
]
}
},
"errors":true
},
{
"description":"descriptor map has empty path",
"input":{
"presentationSubmission":{
"id":"test-submission-id",
"definition_id":"test-definition-id",
"descriptor_map":[
{
"id":"descriptor-map-id",
"format":"jwt_vc",
"path": ""
}
]
}
},
"errors":true
},
{
"description":"path nested has different id",
"input":{
"presentationSubmission":{
"id":"test-submission-id",
"definition_id":"test-definition-id",
"descriptor_map":[
{
"id":"descriptor-map-id",
"format":"jwt_vc",
"path": "$.verifiableCredential[0]",
"path_nested" : {
"id":"descriptor-map-id",
"format":"jwt_vc",
"path": "$.verifiableCredential[0]",
"path_nested" : {
"id":"different-id",
"format":"jwt_vc",
"path": "$.verifiableCredential[0]"
}
}
}
]
}
},
"errors":true
},
{
"description":"path nested has invliad path",
"input":{
"presentationSubmission":{
"id":"test-submission-id",
"definition_id":"test-definition-id",
"descriptor_map":[
{
"id":"descriptor-map-id",
"format":"jwt_vc",
"path": "$.verifiableCredential[0]",
"path_nested" : {
"id":"descriptor-map-id",
"format":"jwt_vc",
"path": "$.verifiableCredential[0]",
"path_nested" : {
"id":"descriptor-map-id",
"format":"jwt_vc",
"path": "$.store.book[(@.price == 10]"
}
}
}
]
}
},
"errors":true
}
]
}

0 comments on commit 230d4bd

Please sign in to comment.