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.
- Loading branch information
1 parent
2be5dd3
commit 230d4bd
Showing
1 changed file
with
199 additions
and
0 deletions.
There are no files selected for viewing
199 changes: 199 additions & 0 deletions
199
test-vectors/presentation_exchange/validate_submission.json
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,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 | ||
} | ||
] | ||
} |